LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Date and Time in XY Graph

Hello,

Im trying to build my xy graph and want the Date and Time as X axis. I now got the Time in Seconds after starting. 

Any hints? 

Best regards

Julsbng_0-1709127244544.png

 

0 Kudos
Message 1 of 3
(666 Views)

Hi Juls,

 

format the x axis to show relative time.

 

I recommend to use the HighResTime instead of MillisecondTime as it outputs relative time in seconds instead of milliseconds.

Best regards,
GerdW


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

Arrrggghhh!  A picture of an Express VI that I can't find on my Palettes!  I can't tell whether you've got a Graph or a Chart, can't see its appearance, have to "guess".

 

Sounds like you need to do the following (to teach yourself):

  1. Create a new VI.
  2. Write a For Loop that creates an Array of 100 Random Numbers (using the default "Random Number (0, 1)").
  3. Wire this to a Waveform Chart.
  4. Run the Program.  This should give you something like this:Waveform Chart.png
  5. Right-click the Chart and choose "Properties.
  6. Click "Display Format", choose "Time (X-Axis)", and examine how you want Time to be displayed.

You will notice some strange behavior.  If you choose "Relative Time", then Time starts at 0 (in seconds) and goes to 100.  Now, it is probably shown as 00:00 (in HH:MM format, but you can change this to HH:MM:SS), but if you choose Absolute Time, it might start at 17:00 (which is 5 PM EST).  Also, there's no Date.  To get the Date, as well, you might have to use the Advanced Editing Mode.

 

This is a great time to press the "Help" button, which will bring up some details about formatting Charts and Graphs.

 

Oops, I forgot to ask -- what is the type of data you are plotting?  Are you plotting 1D Arrays (where "Time" is not explicitly handled)?  Are you plotting Waveforms (where "Time" is explicitly handled, and may save you a lot of fussing to get the "starting time" represented at the origin of the plot)?

 

LabVIEW Charts and Graphs are pretty powerful, and not too obscure, but you do need to learn a bit about them ...  Hope this gets you started.

 

Bob Schor

 

 

 

0 Kudos
Message 3 of 3
(648 Views)