Log in

View Full Version : COMPRESSOR PROGRAMMING HELP


dcarswell
23-01-2012, 20:19
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 (http://imageshack.us)

Mark McLeod
23-01-2012, 22:44
The code's in the wrong vi.

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

http://team358.org/files/programming/ControlSystem2009-/LabVIEW/CompressorExample2.jpg

dcarswell
23-01-2012, 23:34
Thank you very much .

bbsoccergamer
25-01-2012, 18:07
You Sir deserve a bunch of cookies, this worked for us as well!

Mark McLeod
25-01-2012, 18:36
I like cookies...:)

cilginbilgin
28-01-2012, 04:47
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?

NeatNit
28-01-2012, 09:13
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.

cilginbilgin
29-01-2012, 12:56
We got our compressor working by this code however our solenoids dont work. Any suggestions or recommendations??

NeatNit
29-01-2012, 17:10
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.