SIS function blocks > SIS Advanced Function Blocks > Logic Solver State Transition Diagram function block

Logic Solver State Transition Diagram function block execution

The Logic Solver State Transition Diagram (LSSTD) function block implements a state transition diagram. The block can have up to 16 states (outputs) and up to 16 transitions (inputs). You configure the number of transition inputs, the number of output states, and a matrix of states versus transitions where each entry indicates the state that the block goes to when that transition is active. By default the number of inputs (transitions) is 3 and the number of outputs (states) is 2.

The LSSTD block has a discrete input with status (IN_Dn) for each transition, a named set output STATE indicating the current state, and a discrete output with status for each state (OUT_Dn). When the block executes it loops through the transition inputs until an active input is found that has an entry for the current state in the state-transition matrix. STATE is then set to the matrix value and the corresponding OUT_Dn output is also set. Once an active transition is found that has a non-zero matrix entry, no more transitions are checked. If the current state is a terminal state, that is, there are no entries in the matrix for this state that are not zero, or if masked transitions prevent transition to another state, the TERMINAL parameter is set to True.

The initial state for the block is state 1. When RESET_STATE is set to True, the block returns to the initial state. The RESET_STATE parameter automatically resets to False after it has been used.

The LSSTD block also has an ENABLE input. When ENABLE is False, STATE is set to 0 and all OUT_Dn outputs are set to 0. When ENABLE is changed from False to True the block is forced into state 1 and OUT_D1 is set to True. This allows an LSSTD block to control other LSSTD blocks which implement sub-state machines. The Boolean output of the final sub-state machine can then be wired into a transition of the top level block which causes the sub-state block ENABLE parameter to be set to False.

For information on how to implement a state transition diagram with an LSSTD block, refer to the application information section for this block.

Overrides

In normal operation the block transitions between states based on the beginning state, the active transition inputs, and the configuration of the state-transition matrix.  The normal behavior can be overridden in two ways.

The OVERRIDE parameter indicates when the normal logic is being overridden. It can take on one of the following values from lowest to highest priority: