Frequently Asked Questions (FAQ) for the LabVIEW Statechart Module
Primary Software: LabVIEW Modules>>Statechart Module
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A
Problem: What are some of the frequently asked questions regarding the LabVIEW Statechart Module?
Solution:
- How can I debug my Statechart?
To debug a statechart for which you have generated code, right-click a linked Run Statechart function and select Debug Statechart from the shortcut menu. This action is valid only when you have linked the Run Statechart function to a statechart.
Debugging a statechart is available for statecharts that execute on the desktop, on a LabVIEW real-time target, or on a LabVIEW FPGA target running on the host computer.
Refer to the Debugging Statecharts section of the LabVIEW Help for more detailed information about debugging statecharts, including information on setting breakpoints and execution highlighting.
- What do the flashing glyphs in the corners of my states mean when highlighting execution of my statechart?
The glyphs indicate whether the state is executing an entry action, an exit action, or a static reaction. Refer to the document Using Highlight Execution on a Statechart: Flashing Glyphs for more information about flashing glyphs.
- Can I resize the code window for actions, guards, and transitions?
You cannot resize the code window. National Instruments recommends you create subVIs to provide code reuse, easier debugging, and faster code generation.
Refer to the help topic Creating SubVIs for more information about using subVIs.
- Can I call a LabVIEW statechart from a language other than LabVIEW?
You can build a DLL to call a statechart from other programming languages. Refer to the help topic Calling a Statechart from C Code for more information about calling a statechart from other programming languages.
- Can I open a state directly without right-clicking and selecting the Configure State option?
To configure a state, double-click the thin outer black border of the state you want to configure. Refer to the help topic Configuring a State for more information about configuring states.
- What is the difference between Junction and Join and when should they be used?
The Join connector merges multiple incoming transition segments into one outgoing segment. Use the Join connector to specify the substates that a statechart must be in before the statechart can leave the enclosing superstate. You can place the Join connector only within a state.
The Junction connector connects common elements of multiple transitions together. For example, you can use a Junction connector to specify that multiple transitions use the same action, even though each transition might have a different trigger. You can place the Junction connector only in a region.
- What is the difference between an asynchronous and synchronous statechart and when should each be used?
Synchronous statecharts execute one iteration at the moment the Run Statechart function receives all input data. Asynchronous statecharts execute one iteration once the Run Statechart function receives all input data and a trigger is present on the external trigger queue. If the Run Statechart function receives all input data and a trigger is not present on the external trigger queue, the function does not execute until a trigger is present. The Run Statechart function specifies that the thread that executes the statechart sleeps until a trigger is present on the external trigger queue.
The type of statechart you build depends on when you want the statechart to perform an iteration. Use a synchronous statechart when the statechart behavior is defined entirely by its inputs and current state. A synchronous statechart is used in time critical scenarios and when you want the statechart to execute at regular intervals. Use an asynchronous statechart in non-time critical scenarios when steps of the statechart do not occur at regular intervals. Refer to the help topic Synchronous and Asynchronous Statecharts for more information about the differences between synchronous and asynchronous statecharts.
- What is the purpose of the View As Subdiagram option for a state?
Viewing a state as a subdiagram can simplify the visual appearance of the statechart diagram. For example, you may want to view a state as a subdiagram when the size and complexity of the state makes visual navigation of the statechart difficult.
-