I been trying to find out if when the FESTO solenoid fires if it will just stay as long as the button is depressed or will stay up when the button is pressed once. Also how can i make the single solenoid program make it like a double solenoid. If someone could please help me I would appreciate it thank you
chris
Hi Chris,
The single solenoid will only stay on as long as the button is depressed, if you’re setting the relay controlling it directly equal to the button. To control it sort of like a double solenoid (it’ll still act like a single when the power is off), try something like this:
if (p1_sw_trig == 1) relay1_fwd = 1;
if (p1_sw_top == 1) relay1_fwd = 0;
This would make a single solenoid hooked up to relay1 turn on when p1_sw_trig is pressed, and stay on until p1_sw_top is pressed.
Well the toggle/hold question is all in the programming - nothing to do with the actual pneumatics. (According to the valve, if theres electricity going through it, its in one position, no electricity in the other).
You can NOT make it into a double solenoid simply because when the robot is disabled no code is run (therefore no electricity goes to the valve and it is in that position, not the one you left it in).
thank you guys. Sorry I ask this stupid question but when the toggle is no longer depressed it will go back down correct.
Questions are rarely stupid. In this case, however, many of the words in the question seem somewhat confused. What do you mean by “toggle” here? I don’t know what it would mean for a toggle to be “depressed”, I don’t know what “it” you’re referring to, and usually when something is no longer depressed it goes back up.
To answer the questions you asked originally: A Festo valve indeed will return to its unenergized state when it’s no longer being energized. You cannot change this behavior in programming; it is just the way the hardware works. You can use programming the way Pat Fairbank suggests, but remember that when the robot is disabled all outputs are deactivated and the valve will turn off until the robot is reenabled.
alright so the pnuematic will go back to a close state when the robot is disabled or when someone stop touching the button
thank you
Chris,
This can be done in software using a state variable:
if (p4_sw_trig)
festo_state = 1;
if (p4_sw_top)
festo_state = 0;
relay3_fwd = festo_state;
relay3_rev = 0;
Here, the Festo (or any spring loaded single solenoid) is connected via a spike to the relay3 output of the RC. Note that the variable festo_state must be static.
Hope this helps.
Mike
Yes, but…
…this assumes that the pneumatic device is in a “close state” when the Festo is off, and that there is code running which turns the Festo on only while the button is touched. It’s easy to change the way the hoses connect so that the pneumatic cylinder runs in the opposite direction and only goes to the “close state” when specifically commanded, and it’s easy to change the code so that the signal to the Festo valve does something other than simply reflect the state of the button.
Ok i have one more question on the programing the double solinoid
this is what i have
relay1_fwd = p3_sw_trig; //lower arm extend double solenoid
relay1_rev = p3_sw_top; //lower arm retract double solenoid
relay2_fwd = p3_sw_aux1; //upper arm extent double solenoid
relay2_rev = p3_sw_aux2; //upper arm retract double solenoid
//relay3_fwd
//relay3_rev
//relay4_fwd
//relay4_rev
relay5_fwd = p4_sw_aux1 //lift plate up festo solenoid
relay5_rev = p4_sw_aux2 // lift plate down festo solenoid
ok will this work or will it cuase it to keep going one way and back the other way. If so how would i code this. Thanks