Compressor Auto Shut-off

Our programming team was wondering how the compressor automatically shuts off when working in conjunction with the pressure switch. We are using Labview 2013 to program and wanted to know whether or not there was code to write that specifically shuts off the compressor at a certain PSI.

Team 3868

Well the Compressor Is like programmed by the manufacturer(I think) to turn off at 120 Psi and kick back in after it reaches lower than 90 Psi. To program the compressor in labview you will have to go into the begin vi and place a compressor open, start, and and set vi than connect each one. Remember to give the compressor a refnum name in the Set Vi. Now go into the Periodic Task and enable a piece of code that has a compressor get, and control loop by right clicking in the corner of the code and clicking on enable this sub diagram. REMEMBER to replace the refnum name of the compressor in the Periodic Task to what you named your compressor in the Begin vi. Now deploy the code and test it! I’m going to infer you guys have already wired it correctly so I’m not going to go into detail their.

Not quite.

We’ve used the compressors when making a T-Shirt shooter to reach around 150/160 PSI.

The automatic shutoff you MIGHT be referring to is the pressure switch that is wired up to the DIO. It is set to trigger when the pressure reaches 120PSI, and the compressor code, once started, will always keep the compressor on until the pressure switch is turned on. (Or switched off, I don’t remember which state it is usually in).

There is also the automatic blow-off/relief valve, that must be adjusted to blow at 120PSI. It opens up at 120, releasing the pressure until it falls back down below 120.

For the purposes of FRC:
In C++ (and I assume in Java also): You create a compressor object, specifying what relay port the Spike is on, and what port the DIO input is on for the pressure switch. You then simply tell the compressor object to start, (such as ourCompressor.Start() ) and everything is done.

You can also use the Stop() method to disable the compressor, if you need to shut it off to save battery power for something else.

For non FRC uses: (AKA- When you want to use it to go above 120 PSI, or don’t have a pressure switch installed)

Create a Relay object. (Relay myRelay = new Relay(1):wink: Then have a button to turn the relay on, and one to turn it off. This will tell the Spike to turn the compressor on and stay on, until you turn it off. Be careful though, there will be NO automatic shut off (so the pressure might exceed safe limits), or more likely, the compressor will get EXTREMELY hot.

As for FRC Labview code: Having not used Labview, I can’t say for certain: But I’d imagine what chriz said should work. There should be examples somewhere for you to find.