StateWORKS Runtime System
The run-time system uses one fixed VFSM Executor program to run all the state machines in the system. This reliable and efficient program “understands” the formal control specification of each state machine and ensures that it is implemented. (Formal Control Specification = output generated by StateWORKS Studio. Usually a file, but it can also be a C++ construction for embedded products without a file system. In that case, the specification data can simply be compiled and linked with the run-time system.)
VFSM Executor Flowchart
Implementation includes performing all necessary state transitions, as well as initiating actions of various kinds, such as driving outputs in the I/O system, sending commands to other state machines, and invoking computation processes.
A real-time database (RTDB) is used to coordinate all interactions with I/O systems and all communications between the various finite state machines. This database is also used for communication between the StateWORKS software and other processes running in the system.
The following diagram illustrates how the various components of the run-time system work together.
RTDB Run-Time System
At startup, the executor loads the system control specification generated by the StateWORKS development environment and initializes the RTDB.
Communication with the real world happens through the I/O unit. The I/O unit monitors the interfaces connected to the system and converts all events into virtual inputs accepted by the RTDB. On the other side, the RTDB generates virtual signals that are converted by the I/O unit into real commands understood by the controlled system.
Administration and maintenance of the RTDB are handled by a client connected to the TCP/IP maintenance interface.
For more information, refer to building applications with RTDB library and the thinStates compiler.