LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display real time on waveform chart x-axis when dt is not constant

I am logging data from a device through a RS232 serial port. The device streams data approximately every 6 seconds, but it may vary from 4 to 8 seconds. I want to use a waveform chart to display data, with x-axis being the absolute time.

 

I am using a code very similar to the Real-Time Chart.vi example. The problem I have is: since my data does not come in a constant interval, I cannot wire a constant to the  XScale.Multiplier.

 

Any suggestions?

 

Thanks in advance.

0 Kudos
Message 1 of 5
(4,095 Views)

There was a mistake in the previous description. I want the x-axis to be relative time.

0 Kudos
Message 2 of 5
(4,078 Views)
You could use an XY graph. If you want it to operate like a chart (i.e., an XY chart), then take a look at the example that ships with LabVIEW called "XY Chart". It uses a subVI as a buffer.
0 Kudos
Message 3 of 5
(4,074 Views)

pack your new value along with the real "t0" into a waveform data type and then plot those to a chart and make sure the "ignore attributes" is NOT checked. The Waveform data typ chart will plot the values based on the "t0" of the WF.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 5
(4,070 Views)

The waveform datatype using the current timestamp certainly gets the job done.  Since you want relative time you will probably want to subtract the starting time otherwise you'll get rather large numbers on the x-axis.

 

-Darin

0 Kudos
Message 5 of 5
(4,064 Views)