05-08-2010 02:17 PM
Hello Experts,
I have a program which continously acquires analog data from DAQ card at 5 kHz. I am plotting the 2 channels on the waveform chart in strip chart mode.
I would like to have the speed of the waveform reduced when the xscale is around 2s. When the xscale is around 5-6s, the speed of the waveform is correct for me. I am decreasing the xscale to 2s, so that I get better time resolution and I am able to see much better. When I use xscale of 2s, the graph updates too fast and I can hardly see anything.
Is there any way to decrease the speed without compromising on the real time data acquisition?
05-08-2010 07:14 PM
05-08-2010 07:24 PM
05-08-2010 07:46 PM - edited 05-08-2010 07:47 PM
Remove your Graph updating (control) from the acquisition loop, that way you can choose the frequency of updating the graph independent of anything else. Make another parallel loop (producer/consumer architecture) for your graph updating.
Store the graph data from the acquisition loop in an array using a shift register. When you want to update the graph (i.e. at what frequency - could be after so many data point acquisitions - size of array) send the data to the graph loop (using queue).
05-08-2010 07:52 PM