03-31-2016 03:56 PM
Iam trying to use the analog output to trigger a external relay and would like the ability to turn the output off when stopping the labview program.
03-31-2016 04:01 PM
By off do you mean zero volts? I'm not sure exactly what the behavious is when the device is powered off, but you can set the output to 0V programmatically before you end your application.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
03-31-2016 04:06 PM
I would want the output to go to 0 volts when I stop the program. When the program runs, I want the output to be 5V. Thank you.
03-31-2016 04:20 PM - edited 03-31-2016 04:22 PM
This is just a simple analog output signal then, eh?
By the way, if you want to only do 0V or 5V, use one of the digital channels on the device instead.
Here's a nice DAQmx analog output example than can be run on a USB 6009.
If you need more help beyond that, share your code here with what you've tried.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
03-31-2016 04:46 PM
Thank you! I will try it out tomorrow at work.
03-31-2016 04:54 PM
Be careful driving any substantial relay with any of these outputs directly. They can only provide 5-8 mA.
As far as shutting down power when you stop your VI that has nothing to do with your hardware or (Blech! ) DAQ ASSistant. You just need to code the behavior you desire. If (I hope) you are using a proper state machine architecture then just add the code to write 0 Volts in your shutdown state. If you just have a simple, single-loop running, you can put a DAQmx write after the loop (or use another ). Easy!
There is no magic parameter in the DAQ Assistant like "Return to Zero Volts on Exit" if that's what you're looking for. It is a very basic crutch and won't take you far compared to the real DAQmx functions which are VERY powerful but at the same time, easy to get started with.
Basic DAQmx: http://www.ni.com/product-documentation/2835/en/
04-01-2016 06:39 PM
I ended up putting a DAQ assistant inside a case structure (true condition) and put a constant 5V into the data input. I then put a DAQ assistant with 0V data input at the false condition. I then toggled a stop button on the front panel to stop the 5V and the VI. The examples you sent me helped me very much! Thanks again!
04-05-2016 09:55 AM
I'm glad you got it working! Read through some of the DAQmx tutorials and don't forget the wealth of knowledge in the LabVIEW shipping examples:
Help > Find Examples... Hardware I/O > DAQmx This is full of good examples you can learn from or use as a starting point when coding DAQ programs.
06-05-2019 04:42 PM
Hi. Can I take a look at your labview program? I am trying to do the same thing as you do, using a case structure to change the analog output. My output is right with nothing in the false case, but program reports error when I put another DAQ assistant wired with zero in it.
06-05-2019 09:08 PM
Rather than responding to a 3 year old thread, it would be better if you attached our VI in your own new thread. Any VI using a DAQ Assistant would be a simple VI, and thus would be simple to fix if we saw the actual VI file.