Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Pressure switch (http://www.chiefdelphi.com/forums/showthread.php?t=113192)

Mr.Roboto3335 10-02-2013 14:53

Pressure switch
 
We are using a pressure switch to turn on/off the compressor. I've been searching the interent with no luck in finding anything useful. If you can help it would be appreciated.

GreyHat 10-02-2013 15:07

Re: Pressure switch
 
What exactly is the problem you are experiencing? You're extremely vague about what you're asking.

Mr.Roboto3335 10-02-2013 15:11

Re: Pressure switch
 
I just want to learn how to program a pressure switch to turn on the compressor when the pressure gets lower than 90psi and turn off at 120.

GreyHat 10-02-2013 15:15

Re: Pressure switch
 
Run a periodic check on your Pressure Switch class to check if the value is less than 90 PSI, and if the compressor is not already on. If it isn't, turn it on. Then do another check to see if pressure is greater than 120 PSI, and if the compressor is on. If it is, turn it off.

Mr.Roboto3335 10-02-2013 15:19

Re: Pressure switch
 
I just started learning java so I have no idea how to put that into code.

FrankJ 10-02-2013 15:52

Re: Pressure switch
 
There is a method in the WPLIB? for the compressor. It should run in one of the periodic sections of code. The pressure switch is one of the digital inputs which the method reads & turns on & off the spike on one of the digital outputs. I believe you pass the IO you are using. Sorry for vagueness, I have minions that do actual programing. :)

Mr.Roboto3335 10-02-2013 15:57

Re: Pressure switch
 
I still don't understand. Can you put that in actual code?

BradAMiller 12-02-2013 11:07

Re: Pressure switch
 
Take a look at this web page. It shows how to use the Compressor object built into WPILib. It will automatically run the compressor when the pressure switch shows low pressure.

Be sure to not put the code in a loop since the Compressor class will start up a thread that will do all the checking in the background.

http://wpilib.screenstepslive.com/s/...for-pneumatics

Brad


All times are GMT -5. The time now is 10:10.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi