LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Detection of DC voltage polarity with LED in LabVIEW (direction detection of rotation tachogenerator)

Hello,

 

I am relative new to LabVIEW. I have got tachogenerator, where the output signal is simply DC voltage. (The DC voltage is proportional to rpm from motor). The motor can turn on both direction, so I want to detect the direction of rotation with 2 LED (red and green) in LabVIEW, for 1 direction is positive DC voltage and for opposite direction is output negative DC voltage. (For 0 rpm is voltage 0) Is there any easy method how to simply detect that if the voltage is positive the red LED will be flash or turn on, and if the direction will be opposite (negative voltage) the second green LED will be flash or turn on?

 

Thank you very much

0 Kudos
Message 1 of 4
(1,324 Views)

Use the Comparison functions to determine if a value is more or less than 0.

There's also a Sign option, if you wanted...

 

For populating boolean values, consider a Select node (although in your case, you wouldn't need this and could use the output of your comparison directly, together with a "Not" node).

 

For flashing, there's a property node to control this, or you can set it via right click menu, I believe, or you could write a While loop and a Not node and a Wait (ms) to go around and around (but then you need a way to get the correct value into the loop).


GCentral
0 Kudos
Message 2 of 4
(1,280 Views)

You will need some sort of hardware to read the voltage value. Do you have a DAQ card or anything yet? Even an Arduino or Raspberry Pi would work with the LINX module.

0 Kudos
Message 3 of 4
(1,254 Views)

You could even do it with a single LED -- set it to "True" and if the rotation is CW, set its "Color" property to one color, and if it is CCW, set it to another color (and, if you want, if its rotation is "sufficiently close to 0", set its color to Black).  Note that isn't as mnemonic as having a pair of LEDs named "CW" and "CCW", with one (or none) of them flashing as appropriate, but you can combine the two ideas and have the CW LED flash one color and the CCW LED flash another ...  The possibilities are bewildering!

 

Bob Schor

0 Kudos
Message 4 of 4
(1,227 Views)