Go to Post Some may call it an obsession and they may be right, but I call it a huge learning experience. - Elgin Clock [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 09-02-2013, 17:12
brobot brobot is offline
Registered User
FRC #4360
 
Join Date: Feb 2013
Location: Minnesota
Posts: 1
brobot is an unknown quantity at this point
Pressure switch

Were trying to use a low pressure switch for our pneumatics. My question is do I need to program it so it'll work? If so, how?
Reply With Quote
  #2   Spotlight this post!  
Unread 09-02-2013, 17:17
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 542
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Pressure switch

Quote:
Originally Posted by brobot View Post
Were trying to use a low pressure switch for our pneumatics. My question is do I need to program it so it'll work? If so, how?
yes. you'll need two things

1) a pressure switch on the compressor that will return true when the pressure is above n psi and false when it is below n psi. (ask your electrical team to setup n)

2) a compressor hooked up to the sidecar (or a relay hooked up to the compressor)

if(pressure switch == true){
set compressor = false
}else{
set compressor = true
}

so basically what it will do is that if the pressure switch is returning true (meaning that its above n psi) than turn the compressor off but if its returning false (below n psi) it will turn it on to turn up the psi.

you also will want to have this running not only in teleopPeriodic but also autonomosPeriodic and disabledPeriodic
Reply With Quote
  #3   Spotlight this post!  
Unread 09-02-2013, 17:29
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
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

You can also use the Compressor object in WPILib. The way it works is to start a background thread that polls the pressure switch periodically and turns the compressor on and off by itself. So you don't need loops and don't need to look at the switch or operate the Spike relay that controls the compressor.

To use it see this page for a C++ example, but the Java version is almost the same:

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 09:52.

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