Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 6002 idle level after completing task

Hardware: USB-6002

 

I have created two sigmoidal waveforms which I would like to output through A0 on my USB 6002. Currently, my code works in generating both the ascending and descending waveforms, however, in between triggering the ascending and descending waveforms I would like to have the analog output from the USB 6002 idle at the last outputted voltage value. I'm looking to do something like this: 

Note Apr 12, 2023.jpg

I know there is an idle output behavior property but to my knowledge, this functionality is not available with my USB 6002.

0 Kudos
Message 1 of 3
(570 Views)

I don't think you can achieve that with your DAQ assistant express VIs, you need to use the DAQmx drivers to achieve that and use only one Event structure in a VI (you can add event cases to a single event structure)

santo_13_0-1681326330163.png

 

In general, if you don't clear the task and just stop the task, the last generated value will be retained at the output, then you write the new waveform to DAQmx and start the task.

 

Skip the DAQ Assistant part in this article - https://www.ni.com/en-us/support/documentation/supplemental/06/learn-10-functions-in-ni-daqmx-and-ha...

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 2 of 3
(559 Views)

Thank you for the advice. After learning a bit about the DAQmx functions, it looks like I'm getting closer to my goal.

 

My issue now is getting the correct waveform to output from the DAQ. I'm guessing I made an error with the hardware timing but I'm not sure. I'm trying to output a single cycle of a sine wave, but the waveform seen on the DAQ is not similar to what I believe to be inputting.

 

I have attached my code, data files, and output from an oscilloscope.

Download All
0 Kudos
Message 3 of 3
(526 Views)