LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing using DAQAssist in a loop

I have a high-speed signal continuously generated from my circuit which is being read into Labview using the DAQAssist.  There is a lot of processing done to this data before the loop repeats itself.  Is there any delay between signal acquisition in the DAQAssist?  I need the next signal acquisition to occur immediately where the prior acquisition left off.
 
Thanks,
Anthony
Message 1 of 2
(2,581 Views)
Hello Anthony,
 
The configuration of your DAQ Assistant determines how your data is acquired.  If you have chosen "Continuous" on the Task Timing tab, then your samples will be acquired continuously, at the rate you specify, until you stop your program.  There will be no pauses in the acquisition.  Each loop iteration, the DAQ Assistant will return however many samples you have entered in the "Samples To Read" field.  If your processing inside the while loop takes too long, there is a chance you could cause a buffer overflow because you have not been removing samples from the buffer fast enough.  You will see an error if this happens. 
 
So, if you do not want any pauses or delays in the acquisition you should configure your DAQ Assistant for continuous operation.  If you need the acquisition to stop while you are processing the data, then I would recommend not using the DAQ Assistant, but instead using the DAQmx API to reduce configuration time inside your while loop.  To do this, I would start with the example from the Example Finder at Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Analog Measurements >> Voltage called Acq&Graph Voltage - Int Clk.  You will have to add a DAQmx Stop Task VI after the DAQmx Read and then add the while loop around the DAQmx Start Task, DAQmx Read, and DAQmx Stop Task.  You will then have the acquisition stop between when the data has been acquired and the next loop iteration.  If you need further help with this, just let me know.
 
Hope this helps,
Laura
Message 2 of 2
(2,570 Views)