Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: DAQ Timeout
Date: Mon, 21 Jan 2008 15:18:02 +0000 (UTC)
Organization: Imperial College
Lines: 34
Message-ID: <fn2d3a$pmn$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1200928682 26327 172.30.248.38 (21 Jan 2008 15:18:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 21 Jan 2008 15:18:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1192337
Xref: news.mathworks.com comp.soft-sys.matlab:446768



Hi there, I am running the following code using a NI
PXI-6713 analog output card:

a0 = analogoutput('nidaq','PXI1Slot2');
addchannel(a0,1);
addchannel(a0,0);
set(a0,'SampleRate',1000);
set(a0,'TriggerType','Manual');
data = a*ones(10,1);
data2 = b*ones(10,1);
putdata(a0,[data data2]);
start(a0);
trigger(a0);

I execute this for different values of a and b in a loop
changing from one to the other every 2 seconds using pause(2);

However after about ~170 iterations I get the following error:
??? NIDAQmx error : The specified resource is reserved. The
operation
could not be
completed as specified. Task Name: MWDAT0528  Status Code:
-50103

Error in ==> dc_test at 25
start(a0);

I probably need to put some wait handle or something because
I guess I am not buffering properly or something of the likes.
Anyone know what I might be doing wrong ? 

Thanks,
Jason