Programming a compressor

Pleas Help! we are having trouble programming and getting the compressor to work, we have it wired correctly via the port 1 and 1 on the DIO and Relay ports and the compressor does have the pressure sensor hooked up but have not the slightest clue on how i would get it to start running, anything would be of help, preferebly pictures too. thanks!

Part of a general LabVIEW document I wrote explains how to initialize and configure a compressor. You can read what I wrote here.

it says i cant access that link because it requires a hightend security

I was able to access it fine, but I’ve attached it as a PDF for you.

HowToCodeAnAwesomeRobotinLabVIEW.pdf (322 KB)


HowToCodeAnAwesomeRobotinLabVIEW.pdf (322 KB)

Thanks! ill be checking this out right now and post any results i get shortly

yeah it still isnt working, ill provide screenshots and maybe ya guys can tell me whats wrong?http://i.imgur.com/CXV1zXc.png

Did you make sure to put the control loop in Periodic Tasks? You’ll need that if you actually want the compressor to do anything.

yeah its at the bottom here.http://i.imgur.com/evQDlvd.png

Your code looks fine. I do notice that your code has Relay 3 listed for the compressor in Begin, but you said in your original post that you have the compressor connected to port 1 on the relay module. That might be your problem…

oh yes, i noticed that. that wasw because i was testing something eright before i posted that, but that isnt the problem

wish i knew why it wont work =(

Are you sure everything is wired correctly? Can you take a multimeter and see if the spike is sending voltage to the compressor? What colour is the LED on the spike? What is the pressure switch saying (can also be checked with a multimeter)?

it looks like we are getting up to 7 volts off the spike relay, and the little light on it is orange, didnt know the pressure switch says anything

also it connected to a spike relay but idk if thats what causing the issue… just know its still not working

That doesn’t sound right. You should be getting +12, -12, or 0. Check the input wiring - it should go a terminal on the PDB protected by a 20 amp breaker.

If it’s solid orange, that means it’s outputting neutral (zero volts). If it’s trying to get your compressor to run, it’ll turn green (forward). There should be a PWM wire between the spike and Relay port 3 on your digital sidecar (like you specified in code)

When the pressure going through the pressure switch is <120 psi, there will be an open circuit between the two wires coming off it (which should go to DIO 14, like you specified in code). That circuit will close when the pressure reaches 120 psi. This tells the cRIO to turn off the compressor.

Take a look at the Signal Wiring Diagram and the Power Wiring Diagram to see how to wire the pressure switch and a spike relay.

Thanks! I’ll make sure all that is good tomorrow, hopefully can get everything working before midnight

so looks like it was a bad spike relay. compressor works fine now and even more issues arise today such as the trigger button not working even though before it did and now our motor that is suppose to be triggered by it turns on when teleop is enabled =/

That happened to us yesterday evening. We added a servo, and suddenly one of the other motors decided to run backwards full speed. It turns out that the “database” we use to track robot I/O had duplicated a bunch of PWM channels.

Read the Diagnostics window on the Driver Station. It might be telling you something about trying to open a PWM output twice.