11-26-2013 06:27 PM
Hey, currently I am using NI 6210 for switch control and data acquisiton. I used labview to control 7 switches periodically and read data from 7 channels in the meantime (1 sample on demand). I ran 70 loops to get 10 groups of data, the time cost was like 2.2 seconds.
I would like to finish 700 loops in 2 seconds, is there any way to improve?
Thanks,
Pem
Solved! Go to Solution.
11-26-2013 07:10 PM
Look at the stop terminal of the DAQ Assistant Express VI. You're starting and stopping the DAQ task on every iteration of the loop.
From the help file:
Stop
Specifies to stop the task and release device resources when this Express VI completes execution. For continuous tasks, this input is FALSE by default, meaning the task continues to run until the application stops. To stop the task so you can use the device again in the same application, wire this input to the same stop control you wire to the conditional terminal of the while loop. For single-point and finite tasks, this input is TRUE by default, meaning the task stops after all samples are acquired. To optimize single-point performance when using this Express VI in a loop, wire this input to the same stop control you wire to the conditional terminal of the while loop.
Also from the help file:
For continuous single-point input or output, the DAQ Assistant Express VI might not provide optimal performance. Refer to the Cont Acq&Graph Voltage-Single Point Optimization VI in examples\DAQmx\Analog In\Measure Voltage.llb for an example of techniques to create higher-performance, single-point I/O applications.
11-27-2013 01:40 AM
The general idea is to set up the daq-task outside the loop as e.g. at 1kHz sample rate, then in the loop, extract 100 samples at a time and work on those. After loop, close the task.
/Y
11-27-2013 05:31 PM
Thanks yall, that do improve a lot.
11-27-2013 07:49 PM
Hey Kelly- Now I tried to use other sampling method, like N samples (1k samples at rate of 200k). It still cost more than 2 seconds for 10 group data. Any way to speed it up?
Thanks,
Pem