This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

The Current Time is Incorrect on My LabVIEW Real-Time Controller

Updated Apr 30, 2019

Reported In

Software

  • LabVIEW Real-Time Module

Driver

  • NI-Sync

Operating System

  • NI Linux Real-Time
  • PharLap
  • VxWorks

Issue Details

Why are the time and date incorrect on my Real-Time Controller and how can I fix this?

Solution

Your time and date could be incorrect if you have not yet set the correct time zone for your controller.You can change the time zone your controller is set to by following the instructions in How to Set the Time Zone of a Real-Time Controller.

If you have configured the correct time zone, the time your application displays may be offset from what you expect if your host computer is set to a different time zone than your real-time controller, depending on the method you are using to display the time after setting it.

If you are using Get Date/Time in Seconds from the Timing palette, you are likely using a Time Stamp indicator to display the time on the front panel as it is the default data type of the function.
 
This can cause the time of the Real-Time controller to be displayed in the time zone of your host computer rather than its own time zone. Because the front panels of all real-time applications reside on the host computer, a Time Stamp indicator will reference the time zone of the computer LabVIEW is running on, rather than the one of the Real-Time Target. The Time Stamp indicator will then automatically convert the date and time to display it in the computer's own timezone.

One way to avoid an unintentional time zone conversion is by using Get Date/Time String, instead of Get Date/Time in Seconds, to obtain the current time on the controller. 

 
You could also convert the timestamp data type by using the Seconds to Date/Time VI.

All of these functions can be found by navigating to Functions Palette » Programming » Timing.

Additional Information

LabVIEW determines the host computer's time zone configuration at launch. You will need to restart LabVIEW for any change to the host computer's time zone to take effect. 

WAS THIS ARTICLE HELPFUL?

Not Helpful