Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

how to control relay from Labview

DEAR guys,

can you please tell me how to switch on and off the relay connected to the digital I/O of the USB DAQ 6008 by clicking the switch on the front panel?
I use a transistor to connect to the relay since the current output from the DAQ card is not sufficient to drive the relays

Thanks

0 Kudos
Message 1 of 4
(5,112 Views)
Do not forget to connect a diode in parallel with the relay coil (in reverse direction, i.e. the catode connected to the supply voltage and the anode to the collector of the transistor) since the current generated when cutting off the relay coil might kill your transistor (and, if you have bad luck, the output of your control board, too). 
0 Kudos
Message 2 of 4
(5,105 Views)
i I knowthe concept but i dont know how to write the code for this...i set the DAQ assistant to output mode....then what block do i need to conect if i want to switch on and off the relay by pressing a button from the front panel
0 Kudos
Message 3 of 4
(5,087 Views)

For a single line, you only need a single front panel Boolean. This is pretty easy to do with the lower level DAQmx functions so you might want to also look at the examples that ship with LabVIEW.

 

Simple Boolean Output.png

0 Kudos
Message 4 of 4
(5,078 Views)