Go to Post This is still about fun. Remember that. - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 20-08-2010, 19:04
Rangel's Avatar
Rangel Rangel is offline
John Rangel
FRC #0842 (Falcon Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Phoenix, AZ
Posts: 740
Rangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond repute
How to work with pneumatics

Hey I'm starting to do pneumatics only I dont know how to start. How would you start to do something simple like turn the compressor on. We are using Windriver by the way. The compressor is connected to Digital sidecar relay 8 also.
__________________
2012 Dean's List Winner
2011-2014 Arizona Regional Winners
2016 Las Vegas Regional Winner
2014-? Mentor


Reply With Quote
  #2   Spotlight this post!  
Unread 20-08-2010, 19:14
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: How to work with pneumatics

Have you looked at the compressor class?
Reply With Quote
  #3   Spotlight this post!  
Unread 20-08-2010, 19:20
Rangel's Avatar
Rangel Rangel is offline
John Rangel
FRC #0842 (Falcon Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Phoenix, AZ
Posts: 740
Rangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond repute
Re: How to work with pneumatics

How do we use this compressor class?
__________________
2012 Dean's List Winner
2011-2014 Arizona Regional Winners
2016 Las Vegas Regional Winner
2014-? Mentor


Reply With Quote
  #4   Spotlight this post!  
Unread 20-08-2010, 22:50
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: How to work with pneumatics

Code:
Compressor *compressor;

Contructor() {
...
compressor = new Compressor(PRESSURE_SWITCH_CHANNEL, RELAY_CHANNEL);
compressor->Start();
...
}
replace PRESSURE_SWITCH_CHANNEL and RELAY_CHANNEL of course
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
Reply With Quote
  #5   Spotlight this post!  
Unread 22-08-2010, 12:07
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,006
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: How to work with pneumatics

The short version is that there are classes (named objects) in the software packages we have been given. You just plug in the specifics (such as 'channel 8 of sidecar 0') and it works. I'm not a programmer, so I can't explain how it works. Magic, maybe. But it's pretty easy.

Turning the compressor on an off is only the start, of course. You turn it on while the pressure switch is "closed" and then turn it off when the switch is "open". The only other major thing you need to do is 'turn on this solenoid valve' when 'this' (usually a joystick button press) happens. You usually toggle the valve on or off depending on what condition it had last.
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #6   Spotlight this post!  
Unread 22-08-2010, 23:46
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: How to work with pneumatics

What? I just made a solenoid object and literally just turned on or off the solenoid that was controlling the compressor, it worked great.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
Reply With Quote
  #7   Spotlight this post!  
Unread 23-08-2010, 02:06
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: How to work with pneumatics

Quote:
Originally Posted by davidthefat View Post
What? I just made a solenoid object and literally just turned on or off the solenoid that was controlling the compressor, it worked great.
It "works", but it's not in accordance with the robot rules of the past two years. The compressor must be controlled based on the feedback from the pressure switch.
Reply With Quote
  #8   Spotlight this post!  
Unread 31-08-2010, 19:22
Rangel's Avatar
Rangel Rangel is offline
John Rangel
FRC #0842 (Falcon Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Phoenix, AZ
Posts: 740
Rangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond repute
Re: How to work with pneumatics

Quote:
Originally Posted by Radical Pi View Post
Code:
Compressor *compressor;

Contructor() {
...
compressor = new Compressor(PRESSURE_SWITCH_CHANNEL, RELAY_CHANNEL);
compressor->Start();
...
}
replace PRESSURE_SWITCH_CHANNEL and RELAY_CHANNEL of course
How do we put this piece of code on our code. We just have the simple template.
__________________
2012 Dean's List Winner
2011-2014 Arizona Regional Winners
2016 Las Vegas Regional Winner
2014-? Mentor


Reply With Quote
  #9   Spotlight this post!  
Unread 31-08-2010, 20:19
Rangel's Avatar
Rangel Rangel is offline
John Rangel
FRC #0842 (Falcon Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Phoenix, AZ
Posts: 740
Rangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond reputeRangel has a reputation beyond repute
Re: How to work with pneumatics

Never mind, got the compressor to start but now we need to get the compressor to stop. How do you make it stop at 60 psi?
Attached Files
File Type: txt code.txt (1.0 KB, 28 views)
__________________
2012 Dean's List Winner
2011-2014 Arizona Regional Winners
2016 Las Vegas Regional Winner
2014-? Mentor


Reply With Quote
  #10   Spotlight this post!  
Unread 31-08-2010, 22:17
Bot190's Avatar
Bot190 Bot190 is offline
Registered User
FRC #0166 (ChopShop)
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Merrimack NH
Posts: 105
Bot190 will become famous soon enough
Re: How to work with pneumatics

Quote:
Never mind, got the compressor to start but now we need to get the compressor to stop. How do you make it stop at 60 psi?
You can't do this with whats in the KOP. Your pneumatics system should have a pressure switch inline with it. The pressure switch from the programs point of view, returns 1 when the pressure is less than 90 then returns 0 when its greater than 115. If i remember correctly. What the compressor class does is takes the channel for the pressure switch and a channel for the relay for the compressor itself. Then it turns the compressor on when the pressure switch returns a 1 and shuts it off when the pressure switch returns 0.

To turn the compressor off when it reaches a different PSI, you either need a pressure switch that changes state at 60 PSI or you need a Pressure Transducer, which applies resistance depending on the pressure.
__________________

Reply With Quote
  #11   Spotlight this post!  
Unread 31-08-2010, 22:23
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: How to work with pneumatics

Quote:
Originally Posted by Rangel(kf7fdb) View Post
Never mind, got the compressor to start but now we need to get the compressor to stop. How do you make it stop at 60 psi?
you have compressor.Start() in the OperatorControl loop. it should be in the initializer (where you have GetWatchdog().SetExpiiration(0.1), so your code becomes
Code:
	RobotDemo(void):
		myRobot(3, 4),	
		myRobot2(2, 1),
		myRobot3(5, 6),
		stick(1),
		stick2(2),
		stick3(3),
		compressor(1, 8)
		
	{
		compressor.Start();
		GetWatchdog().SetExpiration(0.1);
	}
Assuming you have a pressure switch hooked up to GPIO port 1 your compressor should stop at 120 psi

Also, why do you have 2 different robotDrives running with the same inputs? You can list 4 jaguars in the initializer of a single robotDrive and it will output to two motors per side.
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Half of pneumatics doesn't work Red Mage Pneumatics 12 12-02-2009 09:52
No pneumatics work help nevereverregret Pneumatics 3 12-02-2009 08:14
How to wire pneumatics LuckyLotto2487 Electrical 9 11-02-2009 14:35
Ultrasonics: Will it work and how to make it work DavidB Electrical 2 17-01-2009 16:27
How long to get Pneumatics? sanddrag Pneumatics 3 31-01-2005 01:18


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

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