Copyright: Created with EasyHelp (Tel: 0973 209667)


FSM/State Machine - RG350855

Description

This function block implements an extensible, event-driven, finite state machine.  The block has as many outputs as are required by the application.  For example, in the above drawing, the output labeled (2, EVENT 1)-> 1 means that when the state machine is in state 2 and receives an Event of 1, it will generate an output connected to that label and go into state 1.  See State Machine Primer.

State machines implement sequential logic in a will-defined and general manner.  They are easy to design, debug and maintain.

State machines expect event numbers as inputs; in many cases, these event numbers must be generated from logic levels through the use of  FSM/Logic to Event function blocks.

Note that the state machine does not supply any data of its own for outputs, and the user must specify any data required.

Parameters

Event	Event input to the state machine.  Expects an event number.

Reset	Overriding reset to the state machine.  This operation forces the machine into the initialization state.

Get State	Returns the current state of the machine.


Description

This function block implements an extensible, event-driven, finite state machine.  The block has as many outputs as are required by the application.  For example, in the above drawing, the output labeled (2, EVENT 1)-> 1 means that when the state machine is in state 2 and receives an Event of 1, it will generate an output connected to that label and go into state 1.  See State Machine Primer.

State machines implement sequential logic in a will-defined and general manner.  They are easy to design, debug and maintain.

State machines expect event numbers as inputs; in many cases, these event numbers must be generated from logic levels through the use of  FSM/Logic to Event function blocks.

Note that the state machine does not supply any data of its own for outputs, and the user must specify any data required.


Parameters

Event	Event input to the state machine.  Expects an event number.

Reset	Overriding reset to the state machine.  This operation forces the machine into the initialization state.

Get State	Returns the current state of the machine.


State Machine Primer

In order to design a state machine, the user draws a state transition diagram defining: (i) all the states in which the machine can exist, (ii) how the machine transitions between states as a result of input events, and (iii) the outputs which the machine sends when it makes a transition.

In order to implement the state machine, the user assigns numbers to each state and to each event.  Then, for each state, the user specifies which events will be acted on when in that state.  Next, for each significant event in a state, the user specifies the transition information:  the new state and the outputs to send.