The time for adding a channel
1 view (last 30 days)
Show older comments
When I declare the device and AO channel using DAQ toolbox, it takes quite a bit of time to do it. Is that normal?
%%Create the new obj
ao = analogoutput('nidaq','Dev1');
% Create channel
chan = addchannel(ao,0);
I have used the cputime to calculate the time, it was 11.75s. It's pretty long. Anything causes this time problem? Is that possible to fix?
Manisha on 31 Jan 2012
The long time is because of the
command you have in the starting. This commands removes all functions from memory and therefore when you execute
it has to load all the drivers and functions needed. So if you try to run your script again without the clear all, you will see a substantial decrease in the time taken.
Hope that helps,
Find more on Data Acquisition Toolbox Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!