LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to toggle LED at analog output from my VI Using NI USB 6009

Greetings,

I bought this NI USB 6009 Multifunction I/O and found various uses for it. In my VI, I am acquiring some signals using the DAQ assistant. After doing a couple manipulation I would like to toggle a LED at one of the two Analog outputs available. I tried configure it in Max and was able to toggle it there, but now I would like to have the VI do it once a certain value is attained. Can anyone  tell me how this is done as I think I might be doing something incorrect.

 

Thanks

Edward

0 Kudos
Message 1 of 6
(3,506 Views)

Without seeing your code, its very difficlut to determine what is wrong.  You simply have to output a voltage on an AO channel.  Connect that channel through a current limiting resistor to the LED.  The other side of the LED must go to the Analog Ground of the 6009.  Make sure your LED is connected with the correct polarity.  Set the AO output to some voltage (depends upon the current limiting resistor value) to turn on the LED.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 6
(3,496 Views)

Greetings,

Attached you will find just a simple code to turn on the LED if the indicator on the VI's front panel illuminates. In my original code it is something similar. I have also check the wiring and I don't think that's the problem since I was able to toggle it through Max. I am using LV 2009. When  the output channel was configured in Max, the output voltage was set to range from 0-5V. I am not sure if the DAQ  Assistant  analog output is being triggered properly.

 

OK, Lets say that I wanted to turn on the LED if a number was greater than the one stored in memory. How would I pass that to the NI USB 6009 to turn on a External LED. Please assume that the output is wired properly.  

 

Thanks

Edward

0 Kudos
Message 3 of 6
(3,484 Views)

I don't like using DAQ Assistant because you can't see all the settings without double clicking and going through all the pages.  But it seems as if you have your VoltageOut channel set to 1.1. 

 

In your VI, you are feeding a boolean to the input that should see a dynamic data signal (yuch).  You could wire in a numeric instead and it should take that.  You need to feed your boolean to a case selector.  In the True case, wire a numeric 5 to the DAQ data input.  In the False case wire in a 0.

- tbob

Inventor of the WORM Global
Message 4 of 6
(3,476 Views)

Thanks

 

That worked.

 

 

Thanks

Edward

0 Kudos
Message 5 of 6
(3,465 Views)

Could you please elaborate on how to go about it. Apreciate it!

0 Kudos
Message 6 of 6
(2,883 Views)