|
Re: Relays not working
Relay.Value has 4 values: kForward, kOff, kOn, and kReverse. These each do something specific with the relay.
kForward drives it forward - in other words, it connects M+ to your +12V input, and M- to the ground input.
kReverse drives it backwards - M+ to ground, M- to +12V.
kOff turns off the connections - it connects both M+ and M- to ground.
kOn turns on both connections - it connects both M+ and M- to +12V.
In terms of FIRST use with motors, all you really need is off, forward, and reverse. Using it with the compressor, all you need is off and forward.
However, in some low voltage situations (like pneumatic solenoid valves or LED lighting) you can run the ground wire directly into the power distribution board's ground, and run the positive wire to either of the relay outputs.
In the case of a 2-position pneumatic solenoid hooked up to a single cylinder, this means you always drive the relay forward or reverse, and the cylinder will move accordingly - setting it to off or on won't do anything.
In the case of LED lighting, this can allow you to turn on different sets of LED's - for example, forward might turn on red LED's, while reverse turns on blue ones. off would turn them both off, while on would turn them both on.
__________________
2007 - Present: Mentor, 2177 The Robettes
LRI: North Star 2012-2016; Lake Superior 2013-2014; MN State Tournament 2013-2014, 2016; Galileo 2016; Iowa 2017
2015: North Star Regional Volunteer of the Year
2016: Lake Superior WFFA
|