11-09-2012 09:49 AM
Hi,
I'm having an issue with the displayed data on a waveform chart, operating in 'Strip Chart' mode. When data is being written to empty visual space on the chart, the data is plotted appropriately. But when data reaches the right-hand side of the chart, causing the chart to scroll, data 'appears' to be stretched/dilated over time. I'm using a simulated DAQ device so all data being plotted is a sinusoidal, making this easy to observe (it's as if the sine wave suddenly has a lower frequency/longer period).
But when I adjust x-scale of the chart (either programitcally or by using the 'hand' pallete tool), the data snaps back to being correct (i.e. all having the smae, original frequency). Any ideas for causes/fixes? Thanks.
-Joe
11-09-2012 10:02 AM
Hi Joe,
Could it possibly be to do with your chart history length? As the chart history fills up the display generally slows down and can sometimes cause the data to look a little bit off. You could try increasing/decreasing the chart history length to see if this changes the chart behaviour.
Kind Regards,
11-09-2012 10:09 AM
I adjusted the chart to History=1000, but the issue is still there. Even with a higher history and displaying 5 minutes of 20 Hz data, it was only using ~2%CPU, so I kind of doubt they are related.
Any other ideas? Thanks.
11-09-2012 10:14 AM
Hi Joe,
Would it be possible to take a look at your block diagram (VI snippet or upload VI) so that I can get a better understanding of how you are writing your data to the chart?
Thanks,
11-09-2012 10:26 AM
Sure. There is a DAQ handler that makes AI read calls, and writes 1-D waveforms to a queue:
Then a Display Handler reads from the queue. spilts the array of waveforms for display on two separate charts, and divides one waveform into another to create a ratio:
Thanks.
11-09-2012 02:51 PM
I confirmed that the same behavior exists for the 'Voltage - Continuous Input.vi' example (when you replace the graph with a chart). Could this be a new problem? I've never seen it before. Thanks.
11-12-2012 08:43 AM
Attached is a example VI saved in LV2009. It reads data from a DAQ, and writes it to a waveform chart. If you read from simulated DAQ, you will see the result. You could also just write any other cyclical data.
When you run it in LV2009, LV2010 or LV2011 the data is displayed correctly.
When you run it LV2012, the displayed data is incorrect (time-dilated) when the chart starts to scroll.
11-12-2012 09:43 AM - edited 11-12-2012 09:43 AM
I can confirm the behavior.
See the attached screenshot.
11-12-2012 02:11 PM
Thanks for validating my sanity!
Did you verify normal behavior on a pre-2012 version of LV?
11-12-2012 02:29 PM
Yes. LV 2011 did not do that.
Overall, it seems kind of weird, and the VI seems slow to run in both versions. But I don't know if that is related to the way the NI_DAQmx generates the simulated sine wave and the way it is "sampled" within the VI. I always thought the simulated signal was either a 1Hz sine wave or a 10.1 Hz sinewave. But in the VI, the sinewave seems much, much lower frequency.