Error in daqdevice/start

1 view (last 30 days)
Priscilla
Priscilla on 22 Dec 2014
Commented: shabnam khorasani on 17 Dec 2018
Hi all,
I'm using an MCC daq board USB-1208FS on Matlab-32bit r2013a. I am trying to test how the board works, and to do so I want to generate an analog output, and read it on an analog input channel. Here's the code (it should be correct, since this is what Measurement Computing suggests):
% analog output
ao=analogoutput('mcc',0);
chan=addchannel(ao,0);
putdata(ao,y'); % where y is a waveform
start(ao);
%analog input
count=256;
rate=256;
range=5.0;
ai=analoginput('mcc',0);
ch=addchannel(ai,0);
ch.InputRange=[-range range];
ai.SampleRate=rate;
ai.SamplesPerTrigger=count;
ai.TriggerType='Immediate';
start(ai);
[data,time]=getdata(ai);
If I try to run this code, I get an error:
Error using daq.analoginput_mcc_2_3/start
MCC: Background operation already in progress.
Error in daqdevice/start (line 62)
start( daqgetfield(obj,'uddobject') );
Error in _script
start(ai);
It seems like once the first object is started, the start function cannot be used again for the input object.
Any suggestion to solve this issue would be very appreciated.
Thanks, Priscilla
  1 Comment
shabnam khorasani
shabnam khorasani on 17 Dec 2018
Hi Priscilla
I have the exact same problem now!
So, would you please tell me how you solved the problem?
thanks
Shabnam

Sign in to comment.

Answers (0)

Categories

Find more on Hardware Discovery and Setup 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!