Go to Post As you get more into your years in FRC, you start becoming friends with more people. You should try it out. Robotics people are pretty nice. - [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-10-2013, 02:53 PM
Mr.Roboto3335's Avatar
Mr.Roboto3335 Mr.Roboto3335 is offline
Wait, What?
AKA: Jimmy
FRC #3335 (Cy-Borgs)
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Texas
Posts: 47
Mr.Roboto3335 is an unknown quantity at this point
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.
__________________
Wait, what?
Reply With Quote
  #2   Spotlight this post!  
Unread 02-10-2013, 03:07 PM
GreyHat GreyHat is offline
Registered User
FRC #0087
 
Join Date: Feb 2013
Location: United States
Posts: 3
GreyHat is an unknown quantity at this point
Re: Pressure switch

What exactly is the problem you are experiencing? You're extremely vague about what you're asking.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-10-2013, 03:11 PM
Mr.Roboto3335's Avatar
Mr.Roboto3335 Mr.Roboto3335 is offline
Wait, What?
AKA: Jimmy
FRC #3335 (Cy-Borgs)
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Texas
Posts: 47
Mr.Roboto3335 is an unknown quantity at this point
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.
__________________
Wait, what?
Reply With Quote
  #4   Spotlight this post!  
Unread 02-10-2013, 03:15 PM
GreyHat GreyHat is offline
Registered User
FRC #0087
 
Join Date: Feb 2013
Location: United States
Posts: 3
GreyHat is an unknown quantity at this point
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 02-10-2013, 03:19 PM
Mr.Roboto3335's Avatar
Mr.Roboto3335 Mr.Roboto3335 is offline
Wait, What?
AKA: Jimmy
FRC #3335 (Cy-Borgs)
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Texas
Posts: 47
Mr.Roboto3335 is an unknown quantity at this point
Re: Pressure switch

I just started learning java so I have no idea how to put that into code.
__________________
Wait, what?
Reply With Quote
  #6   Spotlight this post!  
Unread 02-10-2013, 03:52 PM
FrankJ's Avatar
FrankJ FrankJ is offline
Robot Mentor
FRC #2974 (WALT)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Marietta GA
Posts: 1,886
FrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond repute
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.
Reply With Quote
  #7   Spotlight this post!  
Unread 02-10-2013, 03:57 PM
Mr.Roboto3335's Avatar
Mr.Roboto3335 Mr.Roboto3335 is offline
Wait, What?
AKA: Jimmy
FRC #3335 (Cy-Borgs)
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Texas
Posts: 47
Mr.Roboto3335 is an unknown quantity at this point
Re: Pressure switch

I still don't understand. Can you put that in actual code?
__________________
Wait, what?
Reply With Quote
  #8   Spotlight this post!  
Unread 02-12-2013, 11:07 AM
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 587
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
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
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:51 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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