Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: outputting data with NI USB-6008 in MATLAB
Date: Tue, 25 Sep 2007 14:13:58 +0000 (UTC)
Organization: The MathWorks Inc
Lines: 52
Message-ID: <fdb536$lci$1@fred.mathworks.com>
References: <fahim1$dt2$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1190729638 21906 172.30.248.37 (25 Sep 2007 14:13:58 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 25 Sep 2007 14:13:58 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 796075
Xref: news.mathworks.com comp.soft-sys.matlab:430078



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