State machines
Introduction
A State Machine (SM) is a representation of an event-driven system that transitions from one mode of operation to another when the condition that determines the change is true. MS can be used to design and develop supervisory control, task scheduling, fault management, communication protocols, user interfaces, and hybrid systems.
The MS Engee is implemented graphically inside the block Chart. To get started, place the Chart block on the Engee workspace and access it by double-clicking the mouse.
Inside Chart the Engee block library consists of four elements:
These elements form the basis of MS, but additional elements are used to realise the models more fully, e.g.:
For better understanding of MS operation it is recommended to switch on animation of transitions in settings window :
The animation is realised by highlighting the transitions. The transitions will be highlighted according to the order of execution:
The Simulation Speed parameter in the Settings window of |
Visualisation of state machine results
The MS visualisation process has no major differences from the visualisation of classical Engee models:
-
In chart window
, with record signals enabled, select the output signal (in our case Chart.a - output variable
a
from the Chart block): -
Run a simulation of the model
. The simulation result will be shown on the coordinate plane of the graph window:
For more information about visualisation in Engee see Graphs.