LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ waveform question

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
0 Kudos
Message 1 of 5
(3,209 Views)

Your understanding is correct


However I am getting choppy plots, I originally thought it might be due to loop timing.  Are there other explainations?


Are you performing continous acquisition?? and what exactly do you mean by choppy plots??

you mean your plot is only plotting a part of acquired data like last 1000 points????

0 Kudos
Message 2 of 5
(3,190 Views)
What I meant choppy is that the chart does not seem continuous, and there are like dead spaces through out the graph.  I am sampling in a contontinuous mode, and I check the array size on the waveform array, it is consistably 100 samples like I requested.
 
Joey
CLD
0 Kudos
Message 3 of 5
(3,188 Views)
Hi Joey,

I had a few questions.  You have set up a continuous task, but what kind of timing do you have setup in your while loop?  Also what specific DAQ card are you using.  When you say dead spaces, is the value dropping low for a while unexpectedly, or is there just no physical signal there at all?  It might help if you can take a screen shot of the dead spaces.  That might be easier than trying to convey it in words.  Please keep us informed and we will get this issue resolved.

Have a great weekend,

Michael D
Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(3,174 Views)
i used a timed loop to do something like yours, with one continuos sample
0 Kudos
Message 5 of 5
(3,161 Views)