LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time is wrong

When I use a USB temperature collector (NI 9211A). I create a Graph. The x-axis being time is 4 hours fast. I do not know how to fix it.
CLD Certified 2014
0 Kudos
Message 1 of 11
(3,488 Views)

hi,

 

Have you checked the system time?

 

regards

 

Shrek

0 Kudos
Message 2 of 11
(3,466 Views)

Shrek is absolutely right.  LabVIEW pulls its time from the OS system time.  Try using a Get Date in Seconds VI and I would imagine that it will be four hours off as well.  It might also be a time zone setting on your computer, so you could try checking that as well.

 

 

Nick Keel 

Applications Engineering 

National Instruments

Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments
0 Kudos
Message 3 of 11
(3,438 Views)
I checked my system and it is correct. My computer shows the correct time and date and time zone. The Vi still is wrong.
CLD Certified 2014
0 Kudos
Message 4 of 11
(3,423 Views)
I checked my system and it is correct. My computer shows the correct time and date and time zone. The Vi still is wrong.
CLD Certified 2014
0 Kudos
Message 5 of 11
(3,422 Views)

Hi A...,

 

have you done as was said before?

 

What is the result of GetDateTimeInSeconds?

Can you show your "wrong" VI or the "wrong" time function? Saying "The VI is wrong." doesn't help a lot in searching the error...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 11
(3,419 Views)
time error.jpg
CLD Certified 2014
0 Kudos
Message 7 of 11
(3,370 Views)

Hi Dragon,

 

well, what do we see on this frontpanel?

 

- There are no plots visible, so the formatting might just show some standard values instead.

- In the table above the plot you only show times in seconds with a value of 8.65s.

- The plot xscale is set to show a range of 9s - wow, this might be connected with that 8.65s shown in the table.

- There is no indication how you set the xscale...

- And yes, there is a difference between computer time and time shown on xscale. But see point 4 Smiley Wink

 

How is the plot generated? How is it set to 3:16PM? Can you show your vi instead of the frontpanel? Can you show a stripped down version just showing the problem with some default values in the controls? A frontpanel is not enough - I can generate the same... 

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 11
(3,367 Views)

Sorry I am new to this. Does this Vi. help? One version is in 2009, the other in 8.6.

Thanks

CLD Certified 2014
Download All
0 Kudos
Message 9 of 11
(3,355 Views)

You are not writing any time information to the graph. A graph or chart does NOT automatically read the system time. It is something that you have to programatically provide. There are several ways to do it. Since this example is obviously not the same as the image you posted, we still have no idea what you are doing and really no idea how to fix it exactly. Why won't you post your real code? How many more posts are required to get some real information from you?

 

If you are acquiring DAQ data, then request a waveform data type. That dattype includes timing information. Otherwise, get the current time and use a property node to set the offset and multiplier. Look at the exampe programs. One is called Real Time Chart.

0 Kudos
Message 10 of 11
(3,353 Views)