From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI USB-6009 daq sample loss on next while loop iteration

Solved!
Go to solution

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!

Download All
0 Kudos
Message 1 of 2
(3,325 Views)
Solution
Accepted by topic author dynamic_melody

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 2
(3,319 Views)