LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display accurate elapsed time on waveform chart/graph

Hello,

 

I have recently been doing small demos on virtual data to get ready for when I use actual data. In this test VI I created a sine waveform that creates a new sample every 100 ms in a while loop. I have scaled the function simply to make it larger. My goal was to be able to display this waveform on both a chart and graph, and I was successful but I can't figure out how to get the x-axes of both the chart and graph to show actual elapsed time in seconds.

 

I have tried to edit the advanced options in the chart/graph properties and fiddled around with sending clusters into the graph but I can't seem to get it to work. I really don't know what the x-axis is displaying and don't know how to control it.

 

I have attached my simple VI. Any help would be much appreciated. 

 

Thank you.

0 Kudos
Message 1 of 8
(7,272 Views)

Can you save your VI in version 2012 and re-post it.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 2 of 8
(7,257 Views)

The waveform graph's X scale has a default offset of zero, and a default Multiplier of 1.  Since you are sending data to it 10 times per second, you need to set the Multiplier to 0.1.

 

Then you need to set the display a time format that displays seconds, rather than just hours:minutes like you do now.

Message 4 of 8
(7,249 Views)

Awesome that worked! So the default multipler of 1 means that it assumes 1 sample/second?

0 Kudos
Message 5 of 8
(7,240 Views)

@pj1390 wrote:

Hello,

 

I have recently been doing small demos on virtual data to get ready for when I use actual data. In this test VI I created a sine waveform that creates a new sample every 100 ms in a while loop. I have scaled the function simply to make it larger. My goal was to be able to display this waveform on both a chart and graph, and I was successful but I can't figure out how to get the x-axes of both the chart and graph to show actual elapsed time in seconds.

 

I have tried to edit the advanced options in the chart/graph properties and fiddled around with sending clusters into the graph but I can't seem to get it to work. I really don't know what the x-axis is displaying and don't know how to control it.

 

I have attached my simple VI. Any help would be much appreciated. 

 

Thank you.


Though the delay in the loop is 100ms, it is not very accurate (as your code is running on Windows and not on a Real-time OS) so in order to display the time veryaccurately, you need to use XY graph.

 

Attached is the example.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


Message 6 of 8
(7,237 Views)

That's a very neat solution and gets around the delay issues that I have had.

 

Thank you!

0 Kudos
Message 7 of 8
(7,231 Views)

@pj1390 wrote:

Awesome that worked! So the default multipler of 1 means that it assumes 1 sample/second?



Actually, it means 1 second per sample.

0 Kudos
Message 8 of 8
(7,210 Views)