Loop Timing Considerations in LabVIEW

Updated Dec 4, 2024

Reported In

Software

  • LabVIEW

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)
  • Windows

Issue Details

I'm trying to control the loop timing for some loops in my code but I'm having difficulty achieving a consistent loop rate. What can I do to control this?

Solution

For applications that truly require deterministic loop timing, NI recommends using the LabVIEW Real-Time Module, where the LabVIEW code runs in a real-time operating system that can guarantee determinism.

When using LabVIEW Real-Time, theĀ Timed Loop is a structure on the block diagram that allows the precise specification of timing and priority for loop execution, along with error reporting when the desired loop timing cannot be maintained. The Timed Loop is supported on Windows, but this is generally discouraged because deterministic loop execution cannot be guaranteed on a non-deterministic OS. The Controlling Timing in LabVIEW Applications (Real-Time, Windows) help topic containsĀ additional information on this topic.

Additional Information

If you are failing to meet your timing requirements you can also explore the priority settings on VI execution. In a modular application the subVIs requiring time-sensitive execution can be set to run in a different execution system (i.e. "thread"), assigned a higher priority, or both.