Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Frequently Asked Questions (FAQ) for 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 NI Statechart Module?

Solution:
  1. How can I debug my Statechart?
    • Right-Click on a linked Run Statechart function and select Debug Statechart. Turn on highlight execution and set breakpoints as you would in a normal VI. Debugging a statechart is currently only available on the Desktop platform. After your code functionality has been verified, you can disable debugging to improve the efficiency of the generated Run Statechart Function that represents the statechart.  See the help topic Debugging Statecharts for more details.

  2. What do the flashing glyphs in the corners of my states mean when highlighting execution of my statechart?

  3. Can I resize the code window for actions, guards and transitions?
    • No, the size of the window is fixed. Use a subVI to provide code reuse, easier debugging and faster code generation. 

  4. Can I call a LabVIEW statechart from a language other than LabVIEW?
    • Yes, you can use the Run Statechart function in a wrapper VI and generate a DLL that can be called from other languages. More information can be found under Related Links: Can I call a LabVIEW Statechart from C?

  5. Can I open a state directly without right-clicking and selecting the Configure State option?
  6. What is the difference between Junction and Join and when should they be used?
    • The Join object merges multiple incoming transition segments into one outgoing segment. You can use this object to specify the substates that a statechart must be in before the statechart can leave the enclosing superstate. You can place the Join object only within a state.
    • The Junction object 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. Junction is placed only within a region.  In other words, the Join will wait for all incoming segments to arrive before proceeding to the outgoing transition, while the Junction will execute the outgoing transition desired after any one of the incoming transitions arrive. You can set different priorities for outgoing transitions. 

  7. What is the difference between an asynchronous and synchronous statechart and when should each be used?
    • An asynchronous statechart allows anybody to send a trigger to a Run Statechart function at any time, and the Run Statechart node will block waiting for a trigger if there are no unprocessed triggers. A synchronous statechart requires that the caller of the Run Statechart function specify the trigger explicitly at the Run Statechart function location, and so the Run Statechart function will execute when all inputs to the function are satisfied.
    • There is no hard and fast rule about which is more appropriate. Typically, a synchronous statechart is used when there are no triggers besides the default NULL trigger and the statechart behavior is defined entirely by its inputs and current state. Often a synchronous statechart is used in time critical scenarios and when one wants the statechart to execute at regular intervals. Typically, an asynchronous statechart is used in non-time critical scenarios when steps of the statechart do not occur at regular intervals.  See the help topic Synchronous and Asynchronous Statecharts (Statechart Module) for more information. 

  8. What is the purpose of the View As Subdiagram option for my states?
    • The View As Subdiagram option can be used to keep a statechart diagram readable and clean. The normal view requires that the state expand to show all of the objects contained within. For large and complicated states it can be better to view the state as a subdiagram so that the state can stay a reasonable size, but have the complexity required for functionality.


  9. Related Links:
    Statechart 1.0 Help: Debugging Statecharts
    KnowledgeBase 4F1G1C45: Using Highlight Execution on a Statechart: Flashing Glyphs KnowledgeBase: 4ERDKKK2: Can I call a LabVIEW Statechart from C?
    Statechart 1.0 Help: Configuring a State (Statechart Module)
    Statechart 1.0 Help: Synchronous and Asynchronous Statecharts (Statechart Module)

    Attachments:





    Report Date: 12/04/2007
    Last Updated: 12/18/2007
    Document ID: 4G3GQD8H

    Your Feedback! poor Poor  |  Excellent excellent   Yes No
     Document Quality? 
     Answered Your Question? 
      1 2 3 4 5
    Please Contact NI for all product and support inquiries.submit