View Full Version : Pneumatics & Java
GoldenGollem
28-04-2016, 15:08
I have just started out controlling pneumatics with Java and had a few general questions.
Do you need to program a softy for compressors in the program or will the auto shut off function on the compressor work fine?
(Regarding the Prev) What is the best way to code in the pressure switch?
Can you use relays and solenoids essential interchangeable for pistons?
Is there any need for wiring it to the RoboRio via PWM cables or just to the PCM?
Any help is appreciated.
Thanks, GG
Assuming you are using the PCM.
You don't need to code the compressor unless you want it specially off rather than controlled by the pressure switch. The compressor is actually controlled by the PCM. The Roborio just enables it.
You don't need to code the pressure switch
Not really sure about this one. I think you need a solenoid class in the code to enable the compressor. In any case you need to direct the output to the PCM and the relay ports on the roborio. (Assuming you are using the PCM and not a Spike realy.
PWM ports have nothing to do with pneumatics.
GoldenGollem
29-04-2016, 13:24
Thanks for the answers. One other question...
What would be the difference coding wise if I were to use a spike relay vs. PCM.
-GG
Thanks for the answers. One other question...
What would be the difference coding wise if I were to use a spike relay vs. PCM.
-GG
Do you want to use a spike relay to control the compressor, a solenoid valve, or both?
In either case, as I read the documentation, you would not use the pneumatics library, but control them as described on the wpilib relay page (https://wpilib.screenstepslive.com/s/4485/m/13810/l/241864?data-resolve-url=true&data-manual-id=13810).
If controlling the compressor through a relay, you would connect the pressure switch to a DIO (it's normally closed). If the pressure switch is open, you MUST turn off the compressor and leave it off, both for safety and FRC regs. You MAY turn of the compressor based on other criteria (e.g. a pressure gauge or other loads on the system).
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.