stateTransition

Block Category: State Transition

Description: The stateTransition block models and simulates complex event-driven systems. A system can be in a number of states, and for every state, you can have an arbitrary number of rules, or conditions. The Boolean rules determine when to transition from one state to the next.

Export: Exports rules to a text file in STC format. An STC file is a semi-colon-separated text file that can be examined and edited in a text editor.

Import: Imports rules from the specified STC file. An STC file is a semi-colon-separated text file.

State: Indicates the current state. All state names must be legal C identifiers because they will become enumerated types at C-generation time.

To State: Indicates the state to which to transition. The transition is made once the transition condition is met. All state names must be legal C identifiers because they will become enumerated types at C-generation time.

Transition Condition: Indicates a Boolean condition or rule written in C. To get information from the diagram into the stateTransition block, Use variable blocks to access information from the diagram in the stateTransition block.

To add a new condition

1.    Open the Properties dialog and point to the condition after which you want to add a new condition.

2.    Click INSERT.

The newly created highlighted text indicates where the new condition is to be inserted.

3.    Double-click the highlighted text to enter Insert mode under the State category.

4.    Enter the information, then click outside the category.

5.    Move the pointer to the To State category and double-click.

6.    Select the state to which to transition, or type in a new state, then click outside the category.

7.    Double-click over the Transition Condition category.

8.    Enter the transition condition, then click outside the category.

To delete an existing condition

      Open the Properties dialog and highlight the condition you want to delete, then press DEL.