convert ID

Menu: State Charts

The convert ID provides a method to identify the currently active state. It converts a numeric state ID to the corresponding state name. 

The convert ID block is not only available for use inside the state chart; you can only insert convert ID blocks in the continuous portion of the diagram.

 

Qualified Name: Indicates that the complete path to the currently active state is used. This is useful when your state charts contain multiple submachine states or composite states.

Short Name: Indicates that only the name of the currently active state is used.

Example

In this example, output from the state chart block is the numeric ID of the currently active state. The convert ID block converts the numeric ID of the currently active state to its state name. When the simulation begins, convert ID converts the numeric ID to Initial. When trigger Turn ON evaluates to TRUE, the transition is taken from Initial state to Running state. The convert ID block converts the numeric ID to Running. 

convert ID ex 3