Go to Post It's in the RUMOR MILL section, hence it is a RUMOR. Personally I find it entertaining to see what gets started in this particular forum section and have people go off the deep end. - Gary Dillard [more]
Home
Go Back   Chief Delphi > Technical > Pneumatics
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-02-2005, 20:46
lasoaaro lasoaaro is offline
Registered User
#1411
 
Join Date: Feb 2005
Location: Peterborough, Ontario, Canada
Posts: 2
lasoaaro is an unknown quantity at this point
Exclamation Pneumatic Coding Problem

Hello All FIRST Teams who read this.

My question goes out to the programmers. I was wondering if anyone knew a line of code that we could use to shut our compressor off once the pressure on the pressure guage reached 115psi and turned it back on if it dropped to around 30psi. our mapping is as follows:

digital_io_out17 /Compressor/
digital_io_out18 /Pressure Guage/


If someoue could help us that would be great!

Thanks alot guys

//~!AaRoN!~
  #2   Spotlight this post!  
Unread 10-02-2005, 20:49
phrontist's Avatar
phrontist phrontist is offline
Proto-Engineer
AKA: Bjorn Westergard
FRC #1418 (Vae Victus)
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Falls Church, VA
Posts: 828
phrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond repute
Send a message via AIM to phrontist
Re: Coding Problems?

Quote:
Originally Posted by lasoaaro
Hello All FIRST Teams who read this.

My question goes out to the programmers. I was wondering if anyone knew a line of code that we could use to shut our compressor off once the pressure on the pressure guage reached 115psi and turned it back on if it dropped to around 30psi. our mapping is as follows:

digital_io_out17 /Compressor/
digital_io_out18 /Pressure Guage/


If someoue could help us that would be great!

Thanks alot guys

//~!AaRoN!~
]

I presume you mean the digital pressure switch? If you are, this code is really obvious and I'm sure you'll figure it out if you just think about it. I'll give you a hint: if
__________________

University of Kentucky - Radio Free Lexington

"I would rather have a really big success or a really spectacular crash and failure then live out the warm eventual death of mediocrity" - Dean Kamen
  #3   Spotlight this post!  
Unread 10-02-2005, 20:54
lasoaaro lasoaaro is offline
Registered User
#1411
 
Join Date: Feb 2005
Location: Peterborough, Ontario, Canada
Posts: 2
lasoaaro is an unknown quantity at this point
Re: Coding Problems?

if... yesh, that's what it is, lol... ok so..uhm, tell me if this is right?
if digital_io_out18 = 115;
then..uhm...? lol sorry i'm not THE greatest with C...
hmm..see i was looking through trying to find a list of acceptable codes in C for robotics but i coudn't seem to find a list so I'm tryin' to figure it out...but you can use then statements..correct..?

Thanks
  #4   Spotlight this post!  
Unread 10-02-2005, 20:56
russell's Avatar
russell russell is offline
Registered User
#1430 (WRONG)
Team Role: Electrical
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Anchorage AK
Posts: 402
russell is a name known to allrussell is a name known to allrussell is a name known to allrussell is a name known to allrussell is a name known to allrussell is a name known to all
Re: Coding Problems?

30psi? You wont be able to do much of anything with 30psi but if you really want it to kick in at 30psi you are going to have to use the pressure transducer and a few if statements. If you want to use the pressure switch it switches off at about 115 and back on down around 80-90 (I think). The code for it is in the default user_routines.c
  #5   Spotlight this post!  
Unread 10-02-2005, 21:06
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: Coding Problems?

The line of code that you need is already in the default code. Connect the switch to digital I/O 18, and the compressor to relay 8. You CANNOT power the compressor with a digital I/O pin.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #6   Spotlight this post!  
Unread 11-02-2005, 16:24
cabbagekid2 cabbagekid2 is offline
Registered User
#0368 (Kika Mana)
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Honolulu, HI
Posts: 85
cabbagekid2 has a spectacular aura aboutcabbagekid2 has a spectacular aura aboutcabbagekid2 has a spectacular aura about
Re: Coding Problems?

Quote:
Originally Posted by lasoaaro
if... yesh, that's what it is, lol... ok so..uhm, tell me if this is right?
if digital_io_out18 = 115;
then..uhm...? lol sorry i'm not THE greatest with C...
hmm..see i was looking through trying to find a list of acceptable codes in C for robotics but i coudn't seem to find a list so I'm tryin' to figure it out...but you can use then statements..correct..?

Thanks
The pressure switch is connected to a digital input/output. So it can not have a value of 115, or even 30. It can only have a value of 1 or 0. So when the pressure reaches 115 psi is sends a signal (either 1 or 0, i don't know) and when it drops down to 95 psi it sends the opposite signal. The only way for you to read the exact pressure value is to add an additional analog sensor to measure the pressure. But why would you want to turn the compressor on at only 30 psi? That's the minimum pressure needed to run a solenoid! Wouldn't you want to keep your pressure at least half the maximum allowed value?
  #7   Spotlight this post!  
Unread 11-02-2005, 23:03
dawonn's Avatar
dawonn dawonn is offline
Mentor
AKA: Dereck
FRC #2586 (Calumet Copperbots)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Auburn Hills, Mi
Posts: 53
dawonn is an unknown quantity at this point
Re: Coding Problems?

Quote:
if digital_io_out18 = 115;
then..uhm...? lol sorry i'm not THE greatest with C...
hmm..see i was looking through trying to find a list of acceptable codes in C for robotics but i coudn't seem to find a list so I'm tryin' to figure it out...but you can use then statements..correct..?
I think that you are just learning c are you not? you have experience with VB or Qbasic do you? that will help you but C isn't the same.....
when you make an if statement you don't use a then statement like in BASIC.

Take a couple hours and read some documentation. On this site is the official Programming reference PDFs they have code that is specific to the FIRST controller. the 2004 version is what you want there is no 2005 edition. look on page 19 in the gray code box it shows an if statement for an input and a pwm.

http://www.ifirobotics.com/rc.shtml#Programming

A genecic c programming book would be a worthwhile buy.

Have fun you about to become a professional C programmer!
  #8   Spotlight this post!  
Unread 12-02-2005, 22:32
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: Pneumatic Coding Problem

lasoaaro,

There are a few quick things you need to be aware of:

Your compressor should be hooked up to a "Relay" output, not a digital output. On your robot controller, you will see plugs labelled "Relay Outputs." These should be wired to a SPIKE Relay module, which in turn should be wired to your compressor.

The SPIKE driving the compressor should NOT be wiring to a Digital Output as you have mentioned.

Additionally, the Nason Pressure Switch should be wired directly to a Digital Input (not output as you stated - they are the same plugs, but you can configure them to be inputs OR outputs in software). Again you will see plugs marked "Digital In/Out" on the robot controller. Once everything is wired correctly, the correct code to use should be:

Code:
relayX_fwd = rc_dig_inYY;
Where X is the Relay Output for the compressor, and Y is the Digital Input for the Nason Pressure Gauge.

I noticed you are located in Peterborough. I don't know if it's feasible to visit Toronto, however if you are having programming difficulties, contact the director for the Regional(s) that you are attending, and they will be able to hook you up with a veteran programmer to assist you, or to arrange a time to visit a nearby team for help.

-SlimBoJones...

Quote:
Originally Posted by lasoaaro
Hello All FIRST Teams who read this.

My question goes out to the programmers. I was wondering if anyone knew a line of code that we could use to shut our compressor off once the pressure on the pressure guage reached 115psi and turned it back on if it dropped to around 30psi. our mapping is as follows:

digital_io_out17 /Compressor/
digital_io_out18 /Pressure Guage/


If someoue could help us that would be great!

Thanks alot guys

//~!AaRoN!~
  #9   Spotlight this post!  
Unread 16-02-2005, 17:19
scifi3018 scifi3018 is offline
Registered User
#0804
 
Join Date: Feb 2004
Location: rock hill sc
Posts: 20
scifi3018 is an unknown quantity at this point
Re: Pneumatic Coding Problem

Why in the pneumatics manuel does it state
Quote:
No specific Digital Input Port is designated for the pressure switch. The Robot Controller must be programmed to react to the Input Port that is connected to the pressure switch
While in the standard progamming 2.2 and 2.4 it says
Quote:
digital_io_18 = INPUT; /* Used for pneumatic pressure switch. */
And
Quote:
relay8_fwd = !rc_dig_in18; /* Power pump only if pressure switch is off. */
???
This is the code that comes pre-programmed into the bot... so why in the manual does it deny it?
  #10   Spotlight this post!  
Unread 16-02-2005, 21:31
Nitroxextreme's Avatar
Nitroxextreme Nitroxextreme is offline
Relation to Mrs. Steve
AKA: Jon
FRC #1626 (Falcon Robotics ; 190 (Gompei and The Herd))
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Bedminster, NJ
Posts: 276
Nitroxextreme is a splendid one to beholdNitroxextreme is a splendid one to beholdNitroxextreme is a splendid one to beholdNitroxextreme is a splendid one to beholdNitroxextreme is a splendid one to beholdNitroxextreme is a splendid one to behold
Send a message via AIM to Nitroxextreme
Re: Pneumatic Coding Problem

this doesnt work for us any suggestions
__________________



"He needed a chuck norris lesson in FIRST"...."I will give him a round house kick to the face...with gracious professionalism"
  #11   Spotlight this post!  
Unread 16-02-2005, 21:37
scifi3018 scifi3018 is offline
Registered User
#0804
 
Join Date: Feb 2004
Location: rock hill sc
Posts: 20
scifi3018 is an unknown quantity at this point
Re: Pneumatic Coding Problem

Doesnt work??

Check List:
1) Pump hooked up to a spike relay, hooked up to relay header 8
2) Pressure switch wired between ground and signal on a pwm cable hooked to dig_in 18
3) no rogue programming activitys
4) bot turned on

This should work fine, when the pneumatics get up to 115psi then it shuts off and resumes at 95psi, cant think of any reason why that wouldnt work...
  #12   Spotlight this post!  
Unread 18-02-2005, 12:11
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,915
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Pneumatic Coding Problem

Quote:
Originally Posted by scifi3018
This is the code that comes pre-programmed into the bot... so why in the manual does it deny it?
What the manual means is you can move those around to any digital input and relay combination you choose. The default code is only providing a suggested location, not a required location.
For instance, our team needed digital input 18 for a multi-bit binary switch, the default pressure switch input was in the way (for deeper programming reasons), so we moved the pressure sensor to a different digital input.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Closed Thread


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
Programming Problem: Extremely Frustrating chantilly_team Programming 19 12-02-2005 23:00
Physics Problem Venkatesh Math and Science 13 30-11-2004 20:30
Victor problem Andy Baker Electrical 15 24-06-2003 09:49
The problem with scouting... archiver 2001 10 23-06-2002 23:49
Major problem with chipphua motors aka Scott White Motors 18 19-03-2002 19:44


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

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