07-05-2007 07:21 AM
07-12-2007 02:36 PM
07-19-2007 01:20 PM
This may be overkill, but the example DAQmxWithUI/SynchronizeTwoAIContinuous does what you're asking. Ultimately, there are only three functions to call for every update: EndReadWaveform, PlotWaveformAppend, and BeginReadWaveform (to start things going again). All the action takes place in the callback.
Hopefully that helps!
John
07-23-2007 02:04 PM
Thanks John for your reply,
I was able to acheive my goal. May I add some hints how I did it?
There is one thing that is very important when ploting data in real time, its to minimize the number of calls to the graphical object (for exemple WaveformGraph).
The only thing to do is to buff the data into a double[] buffer (or a jagged array of double [] if more than 1 waveform plot is used). Then you call PlotAppendY with that buffer.
The thing that can't be done and that was my mistake, its to call for every data coming in PlotAppendY. This is very unoptimized.
The size of the buffer depends on the rate the data coming in and the capacity of the history buffer of each waveform plot.
I'll try to develop a little formula (function of the data rate and the history size) that can fit common today's computer specs. (I'll test it only on mine ...)
I'll post it when I'm done with it. In the mean time, if someone got one, feel free to save me some time by posting it before me!
Regards,
Jean