Hello, tonight is the night before my team’s first competition. And for some f:ahh: cking reason, the robot is still not ready. In addition to me not being able to troubleshoot my code, the inspectors came around and totally overrode our solenoid system. Now we wave to use a solenoid breakout board. I have no idea what the hell that is and how to program it. What is it and how could I program it. Any replies will be appreciated.
The solenoid breakout board is nothing but a convenient way to bring out the signals from the solenoid card. It allows you to use 2-pin headers and cables similar to the PWM cables. You should have gotten several with your KOP. The only big difference is that you need to bring +12VDC (from the PDB) or +24VDC (from the PDB cRIO connector) (depending on which solenoids you bought) to the breakout board to run the solenoids and you should have power somewhere in your custom setup anyways.
It is not a big setback and should not affect programming at all. Don’t be rough on the inspectors (never a wise idea for many reasons), they are just try to make sure the wiring is safe. Next year be sure to follow the wiring diagrams that FIRST gives us.
HTH
If you can detail how you had been using your solenoids and what specifically changed (now you are using a breakout card-where did the wires previously connect?), that will probably help us suggest what to change now. Also, I’m sure that other teams at Howell will be able to help you work through your pneumatic programming difficulties. Just let them know that you need assistance, and someone will gladly help.
What wireties said above is definitely true. You need to use 2 pin cables, but as far as I know, you could also have the solenoid actuated from a spike, which would be powered from digital sidecar via PWM. If you want to continue using the solenoid breakout board, the code doesn’t need to change that much. If you are using C++ or Java, you instantiate a new Solenoid (or double) with the parameters being which port the solenoid is plugged into the solenoid breakout board. I am not familiar with lab view, but maybe someone else can explain how to code it there. This would be an example:
//Single Solenoid
Solenoid piston = new Solenoid (portNumber);
//Double Solenoid
DoubleSolenoid piston2 = new DoubleSolenoid (portANumber, portBNumber);
Something worth noting is that actuating single and double solenoids in C++/Java are done in different ways. This is due to the fact that a double solenoid has no default position.
//Single Solenoid actuation
piston.set(true);
piston.set(false);
//double solenoid actuation
piston2.set(DoubleSolenoid.Value.kForward);
piston2.set(DoubleSolenoid.Value.kReverse);
Just out of curiosity – what were you doing that required a change?
The solenoid breakout board looks nearly identical to the analog breakout board except that each pin set has 2 pins instead of 3. It plugs into a card on the cRio. This card looks nearly identical to a analog card, but it has lights on it. You plug your solenoids into this breakout board using things that look very much like PWM cables but only have 2 conductors. The code explained in this section does a good job of controlling them. Also, as explained above, spike relays should also be legal if you are missing a piece of this assembly.