StateWORKS Run-time System (Executor)

FSM executor flow chart
VFSM Executor Flow Chart

The run-time system uses one, fixed VFSM Executor program to run all the state machines in the system. This totally 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 can also be a C++ construction for embedded products without a file system. Then one can simply compile the specification data and link with the run-time system.)

Implementation includes performing all the necessary state transitions, and also 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 data base (RTDB) is used to coordinate all interactions with I/O systems and all communications between the various finite state machines. This data base is also used for communications between the StateWORKS software and other processes running in the system.

The following diagram ilustrates how the various components of the run-time system work together.

Run-time system using RTDB library
RTDB Run-Time System

At the start up the executor loads the system control specification generated by the StateWORKS development environment and initializes the RTDB.

The communication with the real world happens through the I/O Unit. The I/O unit watches the interfaces introduced to the system and converts all events to virtual inputs accepted by the RTDB. On the other side the RTDB generates virtual signals which are converted by the I/O-Unit to real commands understood by the controlled system.

The administration and maintenance of the RTDB is done by a client connected to the TCP/IP maintenance interface.

Alternatively the run-time system may be built using the VFSM library. The VFSM library contains the VFSM Executor which is to be integrated into an application using a few access functions. The following diagram shows which part of the RTDB is available in the VFSM library.

Run-time system using VFSM library
VFSM Run-Time System

Actually, the VFSM library gives a programmer the possibility to develop an application which uses the specification results. Of course this solution is missing the comfort of a (RTDB) data base with objects and their properties accessible via TCP/IP. Anyway, in certain situations, especially for not too complex applications the VFSM library may be the solution.

See how to build applications with RTDB and VFSM libraries