Using the LabVIEW Real-Time Module
- Updated2025-09-22
- 2 minute(s) read
The LabVIEW Real-Time (RT) Module combines LabVIEW graphical programming with the power of a real-time operating system, enabling you to build real-time applications. NI-Embedded CAN for RIO provides features and performance specifically designed for the LabVIEW Real-Time Module.
High Priority Loops
Many real-time applications contain at least one loop that must execute at the highest priority. This high-priority loop typically contains code to read inputs, execute a control algorithm, and then write outputs. The high-priority loop executes at a fast period, such as 500 µs (2 kHz). To ensure that the loop diagram executes within the period, the average execution time (cost) of read and write VIs must be low. The execution time also must be consistent from one loop iteration to another (low jitter).
The CAN Read VI and the CAN Write VI provide fast and consistent execution time, and they avoid access to shared resources such as the memory manager. When the CAN Read VI and the CAN Write VI execute for the first loop iteration, they often perform tasks such as auto-start of the session. These tasks result in high cost for the first iteration compared to any subsequent iteration. When you measure performance of the CAN Read VI and the CAN Write VI, discard the first iteration from the measurement.
For another VI or property node (not the CAN Read VI or CAN Write VI), you must assume it is not designed for use within high priority loops. The property nodes are designed for configuration purposes. VIs that change state like the CAN Start VI require time for hardware or software configuration. Nevertheless, there are exceptions for which certain properties and VIs support high-priority use. Refer to the help for the specific features you want to use within a high priority loop. This help may specify an exception.