Executing Statecharts on Supported Targets (Statechart Module)
- Updated2023-02-21
- 3 minute(s) read
You can use the LabVIEW Statechart Module to execute a statechart on many different types of targets. The following table shows the supported target types and any additional software you must install to execute a statechart on that type of target.
Type of Target | Additional Required Software |
---|---|
A computer running Windows | — |
A National Instruments FPGA target, such as an NI Reconfigurable I/O (NI-RIO) device or CompactRIO controller |
|
An NI Real-Time (RT) target, such as a PXI controller, Compact FieldPoint, or Compact Vision System |
|
A target that runs Windows Mobile | LabVIEW Mobile Module |
An embedded target, such as the MCB2400 target | LabVIEW Embedded Module for ARM Microcontrollers |
A Touch Panel target that runs Windows XP Embedded or Windows CE | LabVIEW Touch Panel Module |
![]() |
Note Refer to the National Instruments Web site for information about the National Instruments products this table mentions. |
You specify the execution target for the statechart by using the Statechart Code Generation page of the Project Library Properties dialog box.
When generating code for a different target, you do not need to modify the guard or action logic of the statechart. This logic is cross-platform as long as the target supports the data types you use.
For asynchronous statecharts that execute on an RT target, you must use an RT FIFO for the external trigger queue. You can specify this and other options by using the Statechart Code Generation page.
Deploying Statecharts
You deploy statecharts to targets by using the Project Explorer window. In this window, you must add the caller VI to the target on which you want to run the statechart. However, National Instruments recommends that you add both the caller VI and the statechart .lvsc file to the target.
Considerations for FPGA Targets
Before building a statechart that runs on an FPGA target, you must decide whether the statechart runs in a single-cycle loop application. Then, configure the statechart appropriately by using the Statechart Code Generation page. This dialog box contains a Usage pull-down menu that you use to specify whether the statechart runs in a single-cycle loop or regular While Loop. Then, generate code for the statechart.
![]() |
Note If you configure a statechart to run single-cycle loop application, the statechart does not have an internal trigger queue. Therefore, you cannot send triggers to this queue. |
If you configure a statechart for a single-cycle loop application but place that statechart in a While Loop, the statechart does not behave like a single-cycle application.