Statechart Code Generation Page (Project Library Properties Dialog Box)

LabVIEW 2010 Statechart Module Help

Edition Date: June 2013

Part Number: 372103F-01

»View Product Info
Download Help (Windows Only)

Requires: Statechart Module

Access this page by right-clicking a .lvsc file in the Project Explorer window and selecting Properties from the shortcut menu. You also can open a statechart diagram and press the <Ctrl-I> keys.

Use this page to specify how LabVIEW generates block diagram code for a statechart. These options affect the size, speed, and functionality of the generated code. Depending on the Execution Target, Usage, and Queue Type you specify, some options might or might not appear.

  • Execution Target—Specifies the type of target on which you want to execute the statechart.

    You can choose from the following options:

    • Desktop—(default) Specifies that you want to execute this statechart on a computer running Windows.
    • LabVIEW Real-Time Target—Specifies that you want to execute this statechart on a real-time (RT) target.
    • LabVIEW FPGA Target—Specifies that you want to execute this statechart on an FPGA target.
    • LabVIEW Mobile/Touch Panel/Embedded—Specifies that you want to execute this statechart on a Mobile, Touch Panel, or embedded target.
    • LabVIEW Embedded Static—Specifies that you want to execute this statechart on an embedded target that requires static array allocation.
  • Usage—Specifies whether the statechart is synchronous or asynchronous. If you set the Execution Target to LabVIEW FPGA Target, Usage specifies whether the statechart runs in a single-cycle loop application or if the statechart can have an internal loop while running on an FPGA target.

    You can choose from the following options:

    • Synchronous—(default) Specifies that the statechart is synchronous.
    • Asynchronous— Specifies that the statechart is asynchronous.
    • Single-Cycle Loop— (default, FPGA only) Specifies that the statechart runs in a single-cycle loop application.
    • While Loop— (FPGA only) Specifies that the statechart can have an internal loop while running on an FPGA target.
  • Queue Settings—(Asynchronous only) Specifies options relating to the queue Type you choose.
    • Type—(Asynchronous only) Specifies the type of external trigger queue the statechart uses.

      You can choose from the following options:

      • LV Queue—(default) Specifies that the external queue is a LabVIEW queue.
      • RT FIFO—(Real-Time only) Specifies that the external queue is an RT FIFO.
    • Size (–1, unlimited)—(LV Queue only) Specifies the maximum number of triggers in the queue. The default value is –1, which specifies a queue of unlimited size.
    • Enqueue timeout in ms (–1, no timeout)—(LV Queue only) Specifies the amount of time, in milliseconds, to wait for an open slot in the queue. The default value is –1, which specifies no timeout.
    • Size—(RT FIFO only) Specifies the maximum number of triggers in the RT FIFO. The default value is 10 triggers.
    • Enqueue timeout in ms—(RT FIFO only) Specifies the amount of time, in milliseconds, to wait for an open slot in the RT FIFO. The default value is 0 ms.

      If the specified amount of time elapses and no slots are available in the RT FIFO, LabVIEW either overwrites the oldest trigger with the incoming trigger or discards the incoming trigger. You specify this behavior by using the Enqueue overwrite on timeout option.

    • Enqueue overwrite on timeout—(RT FIFO only) Specifies whether LabVIEW overwrites the oldest value in the RT FIFO if the RT FIFO does not have an available slot. Use the Enqueue timeout (ms) option to specify the length of time that LabVIEW waits for an available slot.

      If you place a checkmark in this checkbox and a timeout occurs, LabVIEW overwrites the oldest trigger in the queue with the incoming trigger. If you remove the checkmark from this checkbox, LabVIEW discards the incoming trigger.

    • Read mode—(RT FIFO only) Specifies the read behavior of the RT FIFO.

      You can choose from the following options:

      • Polling—(default) Use this mode to optimize the throughput performance of read operations. The polling mode continually polls the FIFO for new data or an open slot. The polling mode responds quicker than the Blocking mode to new data or new empty slots, but requires more CPU overhead. Use the Enqueue timeout in ms option to specify the amount of time a read operation should poll for new data. You also can use the Enqueue overwrite on timeout option to specify whether to overwrite the oldest value in the RT FIFO when the value of the Enqueue timeout in ms expires.
      • Blocking—Use this mode to optimize the utilization of the CPU during read operations. The blocking mode allows the thread of the VI to sleep while it waits, allowing other tasks in the system to execute. Use the Enqueue timeout in ms option to specify the amount of time a read operation can wait for a new value. You also can use the Enqueue overwrite on timeout option to specify whether to overwrite the oldest value in the RT FIFO when the value of the Enqueue timeout in ms expires.
    • Write mode—(RT FIFO only) Specifies the write behavior of the RT FIFO.

      You can choose from the following options:

      • Polling—(default) Use this mode to optimize the throughput performance of write operations. The polling mode continually polls the RT FIFO for new data or an open slot. The polling mode responds quicker than the Blocking mode to new data or new empty slots, but requires more CPU overhead. Use the Enqueue timeout in ms option to specify the amount of time a write operation should poll for empty slots. You also can use the Enqueue overwrite on timeout option to specify whether to overwrite the oldest value in the RT FIFO when the value of the Enqueue timeout in ms expires.
      • Blocking—Use this mode to optimize the utilization of the CPU during write operations. The blocking mode allows the thread of the VI to sleep while it waits, allowing other tasks in the system to execute. Use the Enqueue timeout in ms option to specify the amount of time a write operation waits for an empty slot. You also can use the Enqueue overwrite on timeout option to specify whether to overwrite the oldest value of the Enqueue timeout in ms expires.
  • Internal trigger queue size—Specifies the maximum number of triggers in the internal trigger queue. The default value is 10 triggers. This option is not valid for statecharts that run in a single-cycle loop application.
  • Reset output values after each iteration—Specifies whether the statechart resets the values of the Outputs.ctl type definition after every iteration of the statechart.

    Place a checkmark in this checkbox to specify that LabVIEW resets the value of this type definition after each iteration. Remove the checkmark from this checkbox to specify that LabVIEW caches the value of this type definition after each iteration.
  • Debugging—(Windows, Real-Time Module, and FPGA Module) Specifies whether you can debug the statechart. You can choose either Enabled or Disabled. The default value is Enabled.
  • Guard or Action VI reentrancy—Defines how the statechart handles the reentrancy of the guards and actions of this statechart. This option is not valid if you specify Enabled in the Debugging pull-down menu.

    You can choose from the following options:

    • Preallocate clone for each instance—Allocates clones of the reentrant VI for each call to the reentrant VI. This option is recommended for VIs that are to run with low jitter on LabVIEW Real-Time.
    • Share clones between instances—Allocates clones of the reentrant VI on-demand for each call to the reentrant VI. Do not select this option if a clone VI must preserve state information across calls or if the VI is part of an application that needs to minimize jitter.

WAS THIS ARTICLE HELPFUL?

Not Helpful