Log in

View Full Version : Why do the pneumatics not work?


xXhunter47Xx
05-01-2015, 22:58
https://github.com/Patribots4738/BattleOfTheBorder

Here's our code on git.
Currently the solenoid fires once and then the code crashes, and the compressor does not start.

The pressure switch is wired correctly, NC connected to DIO signal and C connected to DIO (-). The compressor is wired to a spike, and the spike is connected to a RELAY port.

In the code you can see that they're both correctly inputted (if the right code is uploaded of course).

We're kind of stumped.

ejb1123
05-01-2015, 23:11
If you don't define pcmID it defaults to 0.

x86_4819
05-01-2015, 23:16
Why do you have a "while (true)" loop inside your TeleopPeriodic? TeleopPeriodIc will automatically get called every 20ms, so there is no need for you to have your own loop inside of it. That is probably the source of your problem, as you aren't letting anything else run while your while loop is iterating infinitely.

tStano
05-01-2015, 23:23
Is this on a roboRIO or a cRIO?

if its a roboRIO, there are multiple issues with the legality and likely the functionality of this. You will need a pneumatics control module in your system, on a CAN network with the roboRIO, Power distribution panel, etc.

If its a cRIO, the people above me probably are on the right track.

nickmcski
05-01-2015, 23:28
The pressure switch is wired correctly, NC connected to DIO signal and C connected to DIO (-). The compressor is wired to a spike, and the spike is connected to a RELAY port.
http://www.usfirst.org/sites/default/files/uploadedFiles/Robotics_Programs/FRC/Game_and_Season__Info/2014/2015_CS_Layout.jpg
With the 2015 wiring you don't need to connect the compressor to a spike, just wire it into the PCM (Pneumatic control module) along with the pressure sensor.

xXhunter47Xx
06-01-2015, 12:34
Should have specified, it's a cRIO. The issue was a crimped PWM. I'll bring up the while loop issue with the rest of programming though. Thanks everyone!