How to import a continuous signal from USB-6009 to an Oscilloscope (DAQ toolbox)
2 views (last 30 days)
I am using the USB-6009 card from NI. How can I output a smooth sine wave out using the DAQ toolbox?
I have written some codes like this, is there anything wrong?
t = timer('TimerFcn', ' putsample(AO,data(i)));
Walter Roberson on 27 Jun 2011
You definitely do not want to be starting a new timer for every sample! At most you might want to have a single timer that you use to putsample() the next sample.
Rob Purser on 6 Jul 2011
The USB-6009 doesn't support hardware clocked outputs. There's no way to have it generate a smooth curve. You're on the right track with the timer, but you need to set it to fixed rate mode, and call putsample inside the timer callback function. See the documentation for the timer for more info.