LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView Time 2 Hours Ahead of Computer System Time

why1.JPG

 

Im using this method to get current date and time on my x-axis of my chart. Problem is, why is it 2 hours ahead of my current time (computer system time)?

0 Kudos
Message 1 of 24
(2,975 Views)

What's the time formatting string of your charts? With Advanced editing mode you can see the actual format string.

Furthermore, I think you can set chart properties outside the loop.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 24
(2,935 Views)

Managing the time scale on a chart is difficult to figure out. No documentation anywhere. You are close with what you have so far. The next step is to go to "Display Format" in the Properties dialog and select "Absolute time" for the Type for the X-Axis. Then select the Advanced editing button in the lower left corner. From the pull-down menu in the middle select Absolute time format codes. Here you will see the Absolute time container. This is what you want as the container in the format string (%< >T). Once you have that container then you can fill it up with whatever you want.

 

You can have two lines of time/date info on the x-axis but to get that second line you can't just add a carriage return in then time container. You have to go back to the default editing mode and select "Custom date format" in the lower pull-down menu. For some reason this puts a carriage return inside the container. Now you can add date or time info on the second line.

 

Let me know if this doesn't work. Good luck.

0 Kudos
Message 3 of 24
(2,903 Views)

what does the percentage sign means?

0 Kudos
Message 4 of 24
(2,866 Views)

Hi august,

 

the "%" is part of the format string as described in the context help...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 24
(2,861 Views)

It's still not working, the time shown is stil 2 hours ahead of the my real time 

 

1.JPG

 

3.JPG

 

2.JPG

0 Kudos
Message 6 of 24
(2,857 Views)

on another note, somehow it stops the initial date from counting and stays there...just like how i wanted it to be Smiley Happy

0 Kudos
Message 7 of 24
(2,855 Views)

Hi august,

 


Im using this method to get current date and time on my x-axis of my chart.


 

In your first message you only set the time from before your loop starts. I don't understand why you need to set the very same XScale.Offset/Multiplier in each iteration of the loop...

 


somehow it stops the initial date from counting and stays there...just like how i wanted it to be


 

??? I really don't understand that sentence...

 

Have you heard of the German LabView Forum? Maybe it's easier for you...

Best regards,
GerdW


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

Your screenshots indicates, that you have more than two hours difference (6:26 PM to 4:24 PM).

 

How about some basic debugging: place a time stamp indicator on your front panel, showing you the output of your "Get Date/Time In Seconds" VI.

 

Did you change the timezone settings of windows while LabVIEW is running? That would be an explanation. LabVIEW will detect such a change only if it starts.

 

Best regads,

Jens

Kudos are welcome...
0 Kudos
Message 9 of 24
(2,828 Views)

1.JPG

 

This is current program that works how I wanted it to be, only problem is it is ahead by 2 hours

 

 

For the codes, I got it from searched for it somewhere in the labview forums. I forgot where's it. Actually I myself is not sure of this code. The FPGA is running at every 10ms multiple btw

 

why1.JPG

 

 

 

 

0 Kudos
Message 10 of 24
(2,825 Views)