Thread Subject: outputting data with NI USB-6008 in MATLAB

Subject: outputting data with NI USB-6008 in MATLAB

From: Yeelin Chong

Date: 22 Aug, 2007 14:53:54

Message: 1 of 6

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

Subject: outputting data with NI USB-6008 in MATLAB

From: Sherryl Radbil

Date: 25 Sep, 2007 14:13:58

Message: 2 of 6

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

Subject: outputting data with NI USB-6008 in MATLAB

From: Jacob

Date: 9 Oct, 2007 20:35:13

Message: 3 of 6

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
>

Subject: outputting data with NI USB-6008 in MATLAB

From: Sherryl Radbil

Date: 10 Oct, 2007 14:33:52

Message: 4 of 6

Jacob,
It is hard to know exactly what is wrong with your code
without seeing it.

Note that PUTSAMPLE stands on its own.
PUTDATA/START are a pair.
You can read about these 3 commands in the online documentation.
This page also mentions devices with no onboard clock so you
may want to start here.
http://www.mathworks.com/access/helpdesk/help/toolbox/daq/f6-6809.html

Also, this solution may interest you as it describes the
behavior of a device without an onboard clock for analog output.
http://www.mathworks.com/support/solutions/data/1-1DQAPW.html?product=DA&solution=1-1DQAPW

Sherryl


Subject: outputting data with NI USB-6008 in MATLAB

From: ida jia

Date: 31 Oct, 2008 18:54:02

Message: 5 of 6

Hi,Yeelin, I got exactly same problem as you got here. Have you figured it out? When I try to use PUTSAMPLE I also got the same error.

Thank you so much.

"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

Subject: outputting data with NI USB-6008 in MATLAB

From: ida jia

Date: 31 Oct, 2008 20:20:18

Message: 6 of 6

I try it again using PUTSAMPLE instead of putsat and start, it works then
"ida jia" <ruting.jia@utsa.edu> wrote in message <gefk8a$lcc$1@fred.mathworks.com>...
> Hi,Yeelin, I got exactly same problem as you got here. Have you figured it out? When I try to use PUTSAMPLE I also got the same error.
>
> Thank you so much.
>
> "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

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com