필터 지우기
필터 지우기

The time for adding a channel

조회 수: 1 (최근 30일)
Kay
Kay 2012년 1월 26일
Hi,
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
clear all;clc;
t1=cputime;
ao = analogoutput('nidaq','Dev1');
% Create channel
chan = addchannel(ao,0);
t2=cputime-t1
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?
thanks, Kay

답변 (1개)

Manisha
Manisha 2012년 1월 31일
Hi Kay,
The long time is because of the
clear all
command you have in the starting. This commands removes all functions from memory and therefore when you execute
analogoutput
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,
Manisha

카테고리

Help CenterFile Exchange에서 Simultaneous and Synchronized Operations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by