LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I turn the analog output off using DAQ Assistant? Iam using a NI 6009 module.

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. 

0 Kudos
Message 1 of 10
(4,419 Views)

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>   ---'


0 Kudos
Message 2 of 10
(4,413 Views)

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.

0 Kudos
Message 3 of 10
(4,407 Views)

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>   ---'


0 Kudos
Message 4 of 10
(4,398 Views)

Thank you! I will try it out tomorrow at work.

0 Kudos
Message 5 of 10
(4,381 Views)

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! Smiley Tongue) 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 Smiley Tongue ).  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/

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 6 of 10
(4,373 Views)

I ended up putting a DAQ assistantSmiley Sad 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!

0 Kudos
Message 7 of 10
(4,319 Views)

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.

 

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 8 of 10
(4,271 Views)

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.

0 Kudos
Message 9 of 10
(2,805 Views)

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.

0 Kudos
Message 10 of 10
(2,797 Views)