|Download Help (Windows Only)|
Using the LabVIEW Statechart Module involves the following two steps:
The following sections provide information about these steps.
Building a statechart involves defining the following items:
When you build a statechart, you define unique states in which the statechart can be. You also define transitions between these states, when the statechart can take these transitions, and what actions these transitions can take. You then define triggers that cause the statechart to begin evaluating a certain transition. For example, consider a statechart that you use to control a chemical process. You can specify that the statechart moves from State 1 to State 2 after receiving the Valve Open trigger. States and transitions also have associated actions, which you use to modify output and state data associated with the statechart.
After you define the valid triggers and configure the statechart to react to those triggers, you must send those triggers to the statechart. You send triggers to the statechart by creating a VI, known as the caller VI, to send triggers at a specific time. For example, you can configure the caller VI to send the Stop trigger after you click the Stop front panel button.
The caller VI also sends input data to the statechart so the statechart can act on that data. The caller VI receives data that the statechart modifies as a result of a state or transition action. You then can use this data in other parts of the caller VI or send this data to other VIs.
The following figure shows how a caller VI interacts with a statechart.
The previous figure shows how the caller VI sends data to the statechart, which returns output data to the caller VI. If the statechart is asynchronous, the caller VI also might send a trigger to the statechart. Sending a trigger to the statechart causes the statechart to begin executing.