Path: news.mathworks.com!not-for-mail
From: "Jacob " <jkrans@mtholyoke.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: outputting data with NI USB-6008 in MATLAB
Date: Tue, 9 Oct 2007 20:35:13 +0000 (UTC)
Organization: Mount Holyoke College
Lines: 66
Message-ID: <fegom0$2vt$1@fred.mathworks.com>
References: <fahim1$dt2$1@fred.mathworks.com> <fdb536$lci$1@fred.mathworks.com>
Reply-To: "Jacob " <jkrans@mtholyoke.edu>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1191962113 3069 172.30.248.37 (9 Oct 2007 20:35:13 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 9 Oct 2007 20:35:13 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1067704
Xref: news.mathworks.com comp.soft-sys.matlab:432090



I am having the same trouble, but once I change over to
"PUTSAMPLE" start, I receive the following error:
> ??? Data must be queued using PUTDATA before starting.

Error in ==> annewave at 49
start(ao)

Help?!
Thanks!
Jake

"Sherryl Radbil" <sherryl.radbil.dontspamme@mathworks.com>
wrote in message <fdb536$lci$1@fred.mathworks.com>...
> Hi Yeelin,
> The USB-6008 does not have an onboard clock, therefore you
> cannot use PUTDATA/START. You must use PUTSAMPLE, just as
> the error message states.
> 
> When I change the code use PUTSAMPLE and start I do not see
> the error you are seeing.
> 
> If this is still an issue please post the exact code for the
> putsample example and I will try it here.
> Include everything from the "ao = analogoutput..."
> 
> Regards,
> Sherryl
> 
> "Yeelin Chong" <yeelin_e0@hotmail.com> wrote in message
> <fahim1$dt2$1@fred.mathworks.com>...
> > Hi,
> > 
> > I am trying to outputting data with NI USB-6008 analog 
> > output channel, however I am facing problem everytime i 
> > run the program.
> > 
> > my program is as below:
> > 
> > ao = analogoutput('nidaq','Dev1');
> > addchannel(ao,1)
> > set(ao,'SampleRate',150);
> > set(ao,'TriggerType','Immediate');
> > putdata(ao,3.5)
> > start(ao)
> > 
> > 
> > ???analog output subsystem of this device does not support 
> > clocked generation, must use PUTSAMPLE to output data.
> > 
> > while I change the PUTDATA to PUTSAMPLE command, another 
> > error will shown
> > 
> > ???only 1 sample per channel can be output
> > 
> > 
> > I am wondering how to settle the above problems, however I 
> > couldn't find out a solution. Could any one help on this? 
> > Besides that, i would like to have a simple program that 
> > can be used to output data to analog output channel.
> > 
> > Thank a lot...
> > 
> > regards,
> > yeelin
>