COMPRESSOR PROGRAMMING HELP

*Hello,

Our team is trying to program the robot so that when we turn it on, the compressor fills up the tanks until it reaches the max psi it is supposed to go, and then with a press of a button the solenoid opens and the piston goes forward. And everytime the tank goes under pressure, it refills.

This is the code I have so far. .Could you give me some extra insight unto what I am doing wrong… *

Thank you, very much

http://img11.imageshack.us/img11/4522/operatorcontrol.png](http://imageshack.us/photo/my-images/11/operatorcontrol.png/)

Uploaded with ImageShack.us

The code’s in the wrong vi.

Some of it belongs in Begin.vi and one piece belongs in Periodic Tasks.vi

Thank you very much .

You Sir deserve a bunch of cookies, this worked for us as well!

I like cookies…:slight_smile:

Hey,
We are also using pneumatics this year. But we havent programmed any pneumatics. We couldnt understand what control loop is? Can anyone please help us?

It’s just something that you’re supposed to put inside Periodic Tasks and forget about it. It takes care of stopping the compressor when the pressure sensor turns on.

We got our compressor working by this code however our solenoids dont work. Any suggestions or recommendations??

It is generally bad practice to use Open inside teleop. Instead, use Open in Begin, then insert to a RefNum Registry Set and give it a name. In Teleop, use Refnum Registry Get. Then give it a command. See how the default code has the joystick and RobotDrive. All you have to do is use the same palette as what you’re working with.

Try the Compressor With Cylinder example, see if it works. Don’t forget to change the RT CompactRIO Target IP address by changing its properties.