You can check the runtime status of a VI by using a VI Property Node. To determine the status, check the Execution State
of the VI in the following way:
- Place an Open VI Reference function from the Applications Control Palette.
- Right-click the VI Path input of the Open VI Reference and select Create»Control or Create»Constant.
- Place a Property Node from the Applications Control Palette. Wire the VI Reference output of the Open VI Reference to the Reference input on the Property Node. On the Property Node, left-click on Property and select Execution»State.
- Right-click the Property Node output of Execution State and select Create»Indicator.
- Place a Close Reference VI from the Applications Control Palette.
- Wire the block diagram similar to the following snippet:
The following are the possible values of the Execution:State
- Bad: VI has errors and cannot execute or VI is not currently running.
- Idle: VI is not running, but is in memory.
- Run top level: VI is the top-level VI in an active hierarchy.
- Running: VI is reserved for execution by one or more active top-level VIs.
If the VI path is not a valid path, the VI will return an error.