Continous output signal using DAQ usb 6008 in matlab
2 views (last 30 days)
Show older comments
Takoua
on 31 Mar 2011
Commented: Noor Atifah Nordin
on 2 Oct 2017
Good evening,
I am trying to output a continuous signal using the NI DAQ usb 6008. When using this code:
ao = analogoutput('nidaq','Dev1');
ch = addchannel(ao,0);
putsample(ao,2)
I am sending one sample to the output. Can anyone help me to output several samples and then get a continuous signal?
I have tried the function "repeatoutput" but when verifying the output signal using an oscilloscope, I have nothing.
Thank you in advance
Takoua
1 Comment
Noor Atifah Nordin
on 2 Oct 2017
hye Takuoa,
can i ask you to teach me how you generate data from oscilloscope using usb 6008 ? my prof has ask me to generate signal from oscilloscope using ni daq 6008 in matlab to. i've been out of option on how to do it. does it required the latest version of matlab, because right now i;m using quite old version (r2012a) since i have a laptop with 32 bit only. Can you pleaseeeee enlighten me about this?
Accepted Answer
Chirag Gupta
on 12 Apr 2011
Hi Takoua,
You can try using the putdata function. You can get more information about it by typing doc putdata on the MATLAB command prompt.
This way you can queue up your data and then continuously output it when you do start(ao)
However, since NI USB 6008 is a basic device, it might not have an onboard clock for analog output and you would then get an error indicating the same. In this scenario, the DAQ board itself does not support continuous output.
A possible workaround might be to use timer function and update your value. You could then theoretically update values every millisecond.
0 Comments
More Answers (1)
See Also
Categories
Find more on Simultaneous and Synchronized Operations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!