View Full Version : Momentary Switch Programming
I need help on the programming of a momentary switch used for a double solenoid. I basically want the solenoid to fire when i press the button then when I let go it should retract. I have the switch wired to p1_sw_trig on the OI. The solenoid is wired to relay two. The two grounds from the solenoid are wired directly to the battery ground. One red switch is wired to M+ and vice versa. Thanks
Pat Fairbank
22-05-2006, 17:12
Are you saying that the black wires from the solenoid are connected to the ground, and one each of the red wires are connected to M+ and M-? If so, that's not the FIRST-legal way to wire a double solenoid - you're supposed to use either two Spikes, or a couple of diodes in to connect all 4 wires to a single Spike.
Nevertheless, if you do something like this, it should work:
relay2_fwd = p1_sw_trig;
relay2_rev = !p1_sw_trig;or if that turns out to be the opposite of what you want, try
relay2_fwd = !p1_sw_trig;
relay2_rev = p1_sw_trig;
WE have wired the solenoids this way in the past and posted a question on the Q & A forum. First approved it in 2004.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.