if (top_grab=OPEN) {
grab_relay_open=OPEN;
grab_relay_close=CLOSE;
} else { grab_relay_open=CLOSE;
grab_relay_close=OPEN;
}
{
does it look somthing like this? well this work? for the double solenoids to one spike programming?
if (top_grab=OPEN) {
grab_relay_open=OPEN;
grab_relay_close=CLOSE;
} else { grab_relay_open=CLOSE;
grab_relay_close=OPEN;
}
{
does it look somthing like this? well this work? for the double solenoids to one spike programming?
For double solenoid programming.
if(condition)
{
printf(“actuator forward”);
relay1_fwd = 1;
relay1_rev = 0;
} else {
printf(“actuator back”);
relay1_fwd = 0;
relay1_rev = 1;
}
There is another thread similar to this called someting like “how do you wire your double solenoids”
Anyhow, it is more of a wiring thing than a programming thing I think. This is how we do it. We have two double solenoids. We have one relay that actuates the extend function on both, and one relay that actuates the retract function on both. We do this because it is the cylinders for shifting, and we don’t mind (actually want) them firing at the same time.
Would it not be easier to use only one solenoid, and connect both cylinders to it with T fittings?