LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time from cRIO Get Date/Time in Seconds is wrong

This was working this morning. Honest! Smiley Surprised

Now it's not. The time from Get Date/Time in Seconds is off by 6 hours. Ah, you say. Change the time zone in the cRIO. The time zone is correct. What happened??

PaulG.
Retired
0 Kudos
Message 1 of 8
(4,256 Views)

@PaulG. wrote:

 The time zone is correct. What happened??


Y2K?

0 Kudos
Message 2 of 8
(4,245 Views)

Anybody intelligent have anything to offer? Smiley Indifferent

PaulG.
Retired
0 Kudos
Message 3 of 8
(4,229 Views)

Sorry, I couldn't resist.Smiley Sad. It may just be time to reset it back to it's factory settings and just redeploy the exe. Or is this not an option?

0 Kudos
Message 4 of 8
(4,226 Views)

No, it's not an option to reset. I did that already last Thursday. Re-formatted and re-installed the sw. I set up a static IP address and it's working just fine. I hit it all weeked and I don't want to mess with it too much. I simply cannot get the time zone to change. In MAX is says it is set to Eastern Time but the time displayed is CUT. I need to get this worked out because I'm moving the system to TX next week and the time zone will change again.

PaulG.
Retired
0 Kudos
Message 5 of 8
(4,183 Views)

Hi PaulG,

 

Was there anything that happened to the cRIO between when it was reading the correct value to the time it was reading CUT? 

As for It displaying CUT but "set to" Eastern Time, you can select what ever time zone you would like in MAX but that time displayed will not change till you save these settings to the cRIO and reset. So could the time zone have been selected to be Eastern Time without saving and resetting the cRIO?

 

Also you might want to look into using a SMTP server to sync the cRIO to a time server. Here is a link

 

<Brian A | Applications Engineering | National Instruments> 

0 Kudos
Message 6 of 8
(4,161 Views)

@Brian_A wrote:

Hi PaulG,

 

Was there anything that happened to the cRIO between when it was reading the correct value to the time it was reading CUT? 

As for It displaying CUT but "set to" Eastern Time, you can select what ever time zone you would like in MAX but that time displayed will not change till you save these settings to the cRIO and reset. So could the time zone have been selected to be Eastern Time without saving and resetting the cRIO?

 

Also you might want to look into using a SMTP server to sync the cRIO to a time server. Here is a link

 

<Brian A | Applications Engineering | National Instruments> 


To my knowledge nothing happened between the time it worked and the time it stopped working. I go into MAX and select Easter Time zone and it reboots like it wants to. I still get CUT time in my code. I go back to MAX and it still shows eastern time zone.

 

I don't want to do this in the code. I want to go into MAX and set the time zone the way it's supposed to.

 

The time in the host (laptop) is showing the correct (eastern) time zone.

PaulG.
Retired
0 Kudos
Message 7 of 8
(4,147 Views)

A few debug options:

-get a timestamp display that shows the timezone offset (%Z?)

-use a timestamp display that shows UTC time (%<..>T)

-use a typecast with an cluster of U64 to get the actual stored second (first U64) and compare that with what you expect.

 

How do you display the time? on a fp? Can you display the time as a string with various time formatters?

Use a computer with a different timezone to view the FP of the cRIO code.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 8 of 8
(4,140 Views)