LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time is displayed incorrectly - cRIO

I apologize if this is an easy fix, but I've searched quite a few posts already and nothing seems to do the trick. Plus they are all from like 2008 and whatnot, so I'm hoping there has been an easy fix since then.

 

Anyways, when I try to display the time, it is incorrect. For example, it is currently 3:02 pm here, and my VI is showing 10:42 am. It does display the correct date.

 

My laptop's time setting is UTC-7 Mountain Time. I went into Measurement and Automation Explorer and set my cRIO's time zone to be GMT-7 Mountain Time, saved it, and reset the controller. I also restarted labview.

 

In my block diagram, I'm using a Seconds to Date/Time with an indicator, a Get Date/Time String with indicators, and a Get Date/Time in Seconds with indicator. All 3 are showing 10:42 am.

 

I attached my VI to this post. This is my first labview program, so I apologize if it's messy or I used any wrong terminology.

0 Kudos
Message 1 of 17
(1,797 Views)

A timestamp is just a timestamp, which is simply "seconds since whatever epoch time".  The LabVIEW indicators simply format it into something readable by a human.  You can set the properties of the indicator to display UTC, if you like.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 17
(1,754 Views)

After you set the timezone on the cRIO did you set the time?

0 Kudos
Message 3 of 17
(1,724 Views)

I did not! I didn't see the option to! I will see if I can find out where to do that.

0 Kudos
Message 4 of 17
(1,699 Views)

You should be able to do that within MAX.

0 Kudos
Message 5 of 17
(1,694 Views)

Negative, that is not an option.

0 Kudos
Message 6 of 17
(1,690 Views)

You don't have a Time Settings Tab for it in MAX?

 

Which of the Ethernet ports on the cRIO are you plugged into?  I think I once read that you don't get full control off the second port, only the first.  On mine they are labelled 0 and 1.    So if you are in the second port, try plugging into the first and try again.

0 Kudos
Message 7 of 17
(1,684 Views)

After following this topic, only now did I realize that I misunderstood the issue.  Sheesh.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 17
(1,680 Views)

@David99999 wrote:

Negative, that is not an option.


NI-Max TIME.png

This should be editable. Changing the timezone does not normally adjust the clock for the difference of the timezone.

Rolf Kalbermatter
My Blog
Message 9 of 17
(1,661 Views)

I'm not sure that all RIOs can have their time set by MAX -- I recall having trouble doing this with a myRIO.  However, if the RIO is connected to a PC, you can use the PC to set the (my)RIO's time.  You need to know the RIO's IP (you can write code to find this out), then use System Config's Set Time to set the time to, say, the TimeStamp returned from Get Date/Time in Seconds.  You can find Set Time in the Real Time\RT Utilities\System Configuration Palette. 

 

I confess that I was surprised when this worked!

 

Bob Schor

0 Kudos
Message 10 of 17
(1,645 Views)