02-24-2014 10:49 PM
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.
02-24-2014 11:38 PM
Can you save your VI in version 2012 and re-post it.
02-24-2014 11:47 PM
02-24-2014 11:48 PM
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.
02-24-2014 11:58 PM
Awesome that worked! So the default multipler of 1 means that it assumes 1 sample/second?
02-25-2014 12:00 AM
@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.
02-25-2014 12:20 AM
That's a very neat solution and gets around the delay issues that I have had.
Thank you!
02-25-2014 07:01 AM
@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.