Programming Compressor

I am wondering if anyone knows how to program the compressor in labview to enable and disable during different points during autonomous and teleop. I have the compress working in teleop when I hit enable but I want to be able to disable it and enable and not just let it run automatically. Does anyone know how to do this? I tried using the start and stop blocks

Just wondering, why would you ever want to disable it? I’m sure there’s a way but since it turns on and off automatically it’s one less thing to worry about.

Air isn’t that crucial to us this year. If for some reason the battery starts getting low I would like to cut power. I’m also working on a way to enable the compressor without the driverstation so the pit crew can pump it full of air without having to use the driverstation, however in order to do this I need to enable the compressor in robot main instead of teleop.

This is illegal. All energizing of the robot must go through the driver station

“R51 All signals must originate from the OPERATOR CONSOLE and be transmitted to the ROBOT via the ARENA Ethernet network.”

This is the only rule in regards to controlling the robot with something other then the driverstation, but this rule only applies during a match and not well working in the pits. The other rules that would cover it are rules applying to wireless or bluetooth devices however this control would be wired directly to the robot. As long as the controller doesn’t interfere during a match it would be legal.

False, see rules R69 and R80:

Emphasis mine.
The compressor must be controlled by the robot, which must be controlled by the Driver Station.

R69: The compressor is powered off of the robot.

R80: I am not enable nor disabling the robot, I am merely powering the compressor for a short period of time.

How do you intend to power the compressor without enabling the robot?
In order for the RoboRIO to send control signals to the rest of the control system, it must be enabled via the driver station. This is a safety feature. You can write code that only turns on the compressor, but it still would require the driver station to enable the robot. See these instructions for how to do that.
C++
Java
For LabVIEW, use the compressor VIs. See here for LabVIEW resources.

So of course this isn’t official rule clarification but what I can tell is that what you plan on doing is legal. as long as you just plan on enabling and disabling the compressor only during a match through the driver station. I kind of recall this question being asked on the Q&A. Now it’s just a matter of figuring out how to enable and disable the compressor with code. Sorry I don’t know Lab View I only know java. Try asking in the programing forum under Lab View

CooneyTech,
So I assume your using a PCM to closed-loop the compressor. Under typical conditions the PCM will drive the compressor if the pressure switch indicates that pressure is not-full. However if during the match you would prefer to force off this feature (for example for the sake of power management) you can force OFF the compressor by using the WPI_CompressorStop.vi.

When you start the compressor again using WPI_CompressorStart.vi, it will re-enable the closed loop feature so that when the pressure switch reads not-full, compressor will drive to fill pressure.

The VIs are under Actuators => Compressor in the right click menu bar.

Does that answer your question?

In C++, there are Compressor->Start(); and Compressor->Stop() functions that will enable and disable the compressor.
http://first.wpi.edu/FRC/roborio/release/docs/cpp/classCompressor.html

There are similar functions in Java.
http://first.wpi.edu/FRC/roborio/release/docs/java/classedu_1_1wpi_1_1first_1_1wpilibj_1_1Compressor.html

This if from the Labview Documentation:

Compressor
Use the Compressor Vis to start and stop a compressor. The Compressor Vis manipulate a pressure Switch connected To the High pressure Side of The pneumatic Circuit of The robot, controlling the compressor of the robot.
https://decibel.ni.com/content/docs/DOC-14708

Unless your pneumatics system has a leak and/or you have an extreme shortage of batteries, I can’t imagine the compressor taxing your system that much - especially given your statement that pneumatics is not that critical in your design. Can you just put more air storage on your robot, and run to recharge between matches…then change the battery to a freshly charged one before starting the new match?

Our team has used pneumatics extensively each year I’ve been involved, and we have never had an issue with the compressor running down the battery. In 2012 we had a 18" stroke 2" bore cylinder on our shooter - and two other smaller cylinders…our compressor ran almost constantly, but we never had a battery issue. (We have had air-supply issues…)

Last year, we used a lot of power when throwing the ball (2 cims on a throw arm). It made a difference if the compressor was running or not.