LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Crio with VXworks does not support Daylight Saving Time

When you update the time of a compact Rio using the RT Set Date and Time Vi the time of course is updated. However, the Compact Rio running VXworks, does not support Daylight Saving Time. This results in files being one hour out of sync or time -> string being one hour out of sync. Labview does not have a good solution for this. I found an excellent and very easy solution.

 

There is a simple way to calculate if DST applies. This code however has some copyright on it, but is free to use. So here is the link to the code:

http://www.webexhibits.org/daylightsaving/i.html

 

In the formula the term 'MOD' is used. This means you have to use quotien&remainder vi. Take the remainder and floor it. 

When they refer to 'y' they mean year with 4 digits as in 2009. So don't use '09' or something more similar.

 

This code will take you 15 minutes to implement. It will give you a simple T/F for DST. You can transform this to 0,1 and add this to the 'hour' input of the RT Set Date and Time Vi.


Good Luck. 

Message 1 of 6
(3,494 Views)

We also had the same problem on our cRIO and solved it by using the new IEEE1588 software sync driver to sync the RT clock to

GPS time.

0 Kudos
Message 2 of 6
(3,463 Views)
you did what? Smiley Very Happy
0 Kudos
Message 3 of 6
(3,455 Views)

Actually it appears that the NI 1588 drivers do not support daylight savings time, sorry.

 

0 Kudos
Message 4 of 6
(3,272 Views)

In layman's terms, IEEE 1588 does not account for Daylight Savings Time (DST). It is completely agnostic to that aspect of "time." However, the LabVIEW controls and constants inherit localized time characteristics (including DST). For example, IEEE 1588 time in New York, New York reads the same value as it does in the Austin, Texas. However, just like your Windows system clock, the controls and indicators in LabVIEW can inherit local time characteristics (e.g., Central Time Zone versus Eastern Time Zone--IEEE 1588 time is same but shown in LabVIEW as 5:19 PM in Austin and 6:19 PM in New York).

 

In short, no, IEEE 1588 does not account for DST because it does not have to. I hope this helps clear things up.

Regards,

--
Tyler C

0 Kudos
Message 5 of 6
(3,246 Views)

Yes, but fortunately, the 1588 API includes a time offset in seconds that can be set to +/-3600 s to compensate for DST.

You simply need to query the LV system time cluster to find out if you are on or off DST.  I would prefer to just leave the

1588 time alone but it is being used as a master clock to slave cRIO's which publish NSV to a citadel database.  We often view

this data in the Distributed System Manager which uses the windows system clock for its x axis time, thus it would be disconcerting

if the cRIO timestamps were not sync'd.

0 Kudos
Message 6 of 6
(3,238 Views)