I know that my compressor is working wired directly to a battery. When I hook it to the Pneumatic Control Module, the PCM blinks green but the compressor won’t turn on. There is no code deployed, if that helps.

How do I fix this?

When wired into a PCM the compressor needs code to tell it to turn on and it will only turn on when the robot is enabled from the Driver Station.

Do you know what the default button on the joystick to turn it on is?

There isn’t a default button.

You just have to do something in your code that creates a Solenoid object (C++/Java). You might have to do something with a PCM object, but I’m not sure.

So I can’t run it on the robotmain code? I have to separately program it?

Read this : http://wpilib.screenstepslive.com/s/4485/m/13809/l/599707-operating-a-compressor-for-pneumatics if you do java/c++ ( I dont know for lavbview)

Your problem is that you don’t have code deployed. You must start the compressor programatically. I usually do this in autonomousInit() or teleopInit().

We’re using java, and I’m not sure what language you’re using, but you start the compressor using


. Once you enable the robot, your compressor will automatically turn off/on as pressure is needed, as dictated by the pressure switch.

How do I do this in LabView?

I don’t found actual working example, but maybe this post can help : https://www.chiefdelphi.com/forums/showthread.php?t=145531

That reminds me, I forgot to put the compressor loop in my code. I’ll screenshot it when I figure it out.

You put this code in Begin.vi.

Make sure you have a pressure switch wired to your PCM.



do you have a pressure switch wired to the PCM? I thought the new control system ran the compressor automatically without code now.

With Labview, all that is needed to run the compressor is to open a solenoid object in the begin vi. The compressor vis are used to run the compressor on the older cRios.

2014 to 2015 Porting Guide for LABview

FRC Solenoid.PNG

FRC Solenoid.PNG

Then why did they leave it in there when they removed cRIO support? was that a miscommunication between NI and WPI?

The old compressor control vi’s are only used in the rare case where you want to be able to shut the compressor off rather than let it automatically fill the pneumatic storage tanks whenever they are low.
For instance, when you are in a pushing contest and you want every milliamp of power available to the drive CIMs, or you detect a near brownout condition and you want to disable pneumatics before some other mechanism.

I just realized that about 15 minutes ago, thanks. Just got done writing code that turns off the compressor when the climber is enabled.

That’s a great example :slight_smile: