05-10-2013 04:04 PM
im trying to get readings every ms. i can get large amount of samples, but i have a sensor that activates and deactivates quickly, being used to keep track of counting. Before i used the DAQ assistant and input a high level of samples at a 800hz. i'm now using a DAQmx read function but the rate seems limited in a timed loop/while loop to 1000ms. how do i get a quicker read rate?
and am i limited to the number of DAQmx modules? can i have a DAQ assist to take inputs while DAQmx to write output?
05-10-2013 04:26 PM
First of all, you want to move your task initialization code outside of the loop. You only need to initialize once before the loop. You should also clear the task after the loop.
Secondly, you stated that you wanted to sample every ms. That means you should set your sample rate to 1000, not 800. I would also recommend using the Continuous Samples acquisition and don't wire the number of samples in the DAQmx Timing VI.
Thirdly, I don't know why you changed the array into a cluster to get a single waveform. All you needed was the Index Array.
Attached is a quickly modified version of your program. See if this does what you need.