simple state

A simple state is a state with no regions or substates.

When you open the dialog box for the state block, you can adjust its size by dragging the diagonal lines in the lower left corner.

For information on editing states, see Working with states and pseudo-states.


Object - state


Background: Specifies the color of the decomposition region of the state.

Border: Specifies the color for the state borders.

Header: Specifies the color of the header region. To change the font color, use the View > Fonts command.

Comment: Indicates information or notes about the state. The comments only appear in the dialog box.

Name: Specifies a name for the state. The name can be alphanumeric characters. It must be unique with respect to other state names in the state chart.

State Activity Code: Specifies one or more actions and associated behaviors. Enter and edit state activity code in the Activity Manager window.


Entry: Code is executed on state entry.

Exit: Code is executed on state exit.

Do: Code is executed for each execution cycle that the state remains active.

On Trigger: Code is executed when the state is active and when the specified trigger is TRUE. 

Add/Delete Action: Adds or deletes the action to the Selected Actions window.

Attach Breakpoint: Sets a breakpoint on the state that causes the simulation to stop after the corresponding time step is complete. For more information, see Using breakpoints.

Available Triggers: Lists the available triggers.

Deferred Triggers: Lists the deferred triggers.

Edit Behavior: Specifies the state behavior for the corresponding action. State behavior is specified as C statements. For more information, see Associating behaviors with states.

Log Message: Logs the specified message when a state behavior is executed. For more information, see Logging messages.