LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

execution time too low

Solved!
Go to solution

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?

 

0 Kudos
Message 1 of 9
(3,237 Views)

whats the device? 


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 9
(3,235 Views)

NI-USB 6009

 

0 Kudos
Message 3 of 9
(3,232 Views)
Solution
Accepted by topic author JudeLi

Well,

Clearing the task inside the loop is something of a problem.  (The error handler should jump up on the second iteration) 


"Should be" isn't "Is" -Jay
Message 4 of 9
(3,221 Views)

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.....

 

0 Kudos
Message 5 of 9
(3,214 Views)

Because it put in an auto-indexing tunnel.  You need to right-click on the tunnel and disable auto-indexing.

Message 6 of 9
(3,211 Views)

@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.


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 7 of 9
(3,208 Views)

It works! Thank you very much!

 

0 Kudos
Message 8 of 9
(3,205 Views)

It's amazing! I've never ever thought the shift register can be used like that! Thanks a lot!

 

0 Kudos
Message 9 of 9
(3,198 Views)