Get Date/Time in Seconds VI Timing in LabVIEW Real-Time

Updated Aug 17, 2023

Reported In

Software

  • LabVIEW Real-Time Module

Issue Details

When using LabVIEW Real-Time (RT) 7.1.1 or before, Get Date/ Time in Seconds VI does not keep real-time and falls behind.

Solution

Format Date/ Time String VI and Get Date/ Time String VI are also affected. The problem is that when the real-time operating system (RTOS) runs code set for time-critical priority, it ignores its book-keeping routines.

One of the book-keeping tasks of the RTOS (or any OS for that matter) is to keep system time. In LabVIEW RT, this is done with interrupt service request, which get ignored when the RTOS is busy running time-critical code. This is how the RTOS is able to maintain deterministic and reliable behavior.

Beginning with LabVIEW 8.0, a new timing source has been implemented which does not experience this behavior. Additionally, this timing source allows for a true millisecond timing source for timed loops. Hence, using Get Date/ Time in Seconds VI should now keep real-time.