I have a DAQ card I like to sample at 1000 samples/second, I then like to read it 100 samples at a time. My question is two fold, first I like to validate my understanding of some DAQ waveform experiments I ran, two I like to ask a more specific question about my application.
Experiment 1:
I have a while loop simulating as if I am constantly reading 100 samples of analog inputs into a waveform chart. For t0, I use a time stamp and dt = 1/1000(samples/sec). I also have a wait time in the while loop that simulate the loop delay.
Experiment 2.
I am constanly reading analog input from a DAQ card, the output waveform is connected to a waveform chart. I also have a wait time in the while loop that simulate the loop delay.
Question 1:
In principle a waveform strip chart reads an an array of data that are separated by dt starting at d0. In the experiment I was able to create spaces in between plots as I increase the loop delay. For example if I am sampling at 1000 sample per sec, dt = 1 ms, and t0 = 0ms. If I input 100 samples, in the next loop interation the strip chart needs to have a t0 of 100ms for the plot to be continuous. However if I introduce loop delay of 50 ms, there will be a 50ms of dead space between plots.
In experiment 2 I tried to create the same condition to introducing space between plots, however it seems like the DAQ card is pretty smart about fetching for the correct data from the correct position in the buffer, I might get error if data is no longer in the buffer, but t0 does not seem to loose sync.
Is my understanding of what is happening with the two experiments correct?
Question 2:
My application require me to read the DAQ card and plot the data in terms of time on a strip chart. However I am getting choppy plots, I originally thought it might be due to loop timing. Are there other explainations?
Joey Cao
CLD