07-09-2013 01:06 PM
I was trying to measure the execution time. The rate is 1KS/s per channel and the samples to read is 100 per channel in a for loop of 10. The time should be around 1000ms, but it's only 500-600ms. And when I changed the rate/numbers of samples, the execution time doesn't change..... how could this happen?
Solved! Go to Solution.
07-09-2013 01:12 PM
whats the device?
07-09-2013 01:14 PM
NI-USB 6009
07-09-2013 01:42 PM
Well,
Clearing the task inside the loop is something of a problem. (The error handler should jump up on the second iteration)
07-09-2013 01:55 PM
I've tried to drag the clear task out of the loop but every time I did it, it ended up in a broken wire saying that the soure is a 1-D array of DAQmx event and the type of sink is DAQmx event.....
07-09-2013 01:57 PM
Because it put in an auto-indexing tunnel. You need to right-click on the tunnel and disable auto-indexing.
07-09-2013 02:01 PM
@JudeLi wrote:
I've tried to drag the clear task out of the loop but every time I did it, it ended up in a broken wire saying that the soure is a 1-D array of DAQmx event and the type of sink is DAQmx event.....
You can right-click on the output tunnel and tell it to not auto index. But even better would be to use shift registers just in case you tell that FOR loop to run 0 times.
07-09-2013 02:05 PM
It works! Thank you very much!
07-09-2013 02:15 PM
It's amazing! I've never ever thought the shift register can be used like that! Thanks a lot!