07-08-2009 01:19 PM
Hello friends. I noticed that adding a DAQ Assistant in a VI previously executing in 60ms inceases the loop time to 1200ms. I'd like to reduce this loop time to some hundreds of miliseconds. Is this time cost just a matter of the VI and DAQ itselves or my PC is also guilty?
Is there any way to reduce this aquisition loop time?
Solved! Go to Solution.
07-08-2009 01:23 PM
07-08-2009 01:37 PM
Thankyou Dennis.
This is the acquisition VI. By the way, I'm using a USB 6008 Module.
07-08-2009 02:22 PM
Well, you have set the analog acquisition to a rate of 1000 Samples/sec and are requesting 1000 samples. Simple arithmetic says that will take - 1 second. More simple arithmetic says that if you reduce the number of samples to 500, the acquisition will take 1/2 second.
07-08-2009 02:34 PM
I tried to change de DAQ Assistant to some DAQmx functions. That really reduced the loop time. Now I can run the loop whithout problems in 300ms. The new VI is attached below. Even if this change resulted in a 4x reduction, I'd be really happy if I could run this acquisition cycle in 100ms or less. Is it possible to optimize more?
Thanks so much
Leonardo
07-08-2009 02:50 PM
Oh! You are right Dennis! That was a silly mistake.
Thanks so much
Leonardo
07-08-2009 02:54 PM
Your exisiting reduction is a result of you changing from 1000 samples to 1. You could have done the same thing with the DAQ Assistant.
You can probably reduce it further by moving the DAQmx Create Channel and a Start/Stop Task in the calling VI. Probably no need to do either every time you call the subVI.
07-08-2009 03:06 PM
Great idea, Dennis!
I'll do it right now.