04-06-2016 03:25 PM
Hi,
I am trying to acquire and display data measured from a NI USB-6009 daq device using Labview 2015. I'm using the daq assistant set for diferential mode and n samples with the sampling rate and total samples inputed by the user. My problem is that when the specified amount of samples is acquired and the while loop continues to the next iteration, some samples are dropped (I know this because I tested it acquiring a sin wave and there is a noticeable artifact in the signal at the time points when the while loop iterates - I have uploaded a file showing this artifact in a sin wave that was recorded with 1000Hz sampling rate recording 500 samples each iteration which means that the artifact occurs every half second).
I believe this can be fixed by simply taking the daq assistant out of the while loop and specifying how many samples you want the entire test to acquire. However, I would like to see the signal in a graph as its being acquired and have the daq be able to acquire data indefinitely until the user presses stop which to my knowledge would require a while loop. I have uploaded my vi for reference, and any help would be greatly appreciated!
Solved! Go to Solution.
04-06-2016 04:54 PM
Set your Acqisition Mode to "Continuous Samples".
N Samples: reads the desired number of samples and stops. Will read again when DAQ Assistant is ran again. This means there is a gap of time between reads.
Continuous Samples: The DAQ just continuously reads data. The DAQ Assistant just gets the number of samples requested and the DAQ just keeps reading and storing in the buffer.