Go to Post It's wrong to scuttle someone else's boat because you don't think it's seaworthy. You probably don't know that what you were seeing will be called a submarine. - ThatHat [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 17-02-2007, 15:08
Armando's Avatar
Armando Armando is offline
...I'm hungry...
AKA: Naoki
FRC #2061
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Las Vegas
Posts: 21
Armando is an unknown quantity at this point
programming the pneumatics

if anyone can helpme program tne pneumatics, that'll be e lot of help. i got no clue
__________________

"Is it the anime?..."
  #2   Spotlight this post!  
Unread 17-02-2007, 17:48
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
Re: programming the pneumatics

I can't help you if you're using EasyC, but if you're using Microchip's toolchain, you can program spikes to operate a solenoid and thus control airflow to your cylinders through the relayX global aliases.

For example:
Code:
if(p1_sw_trig) { /* port 1 joystick trigger is depressed */ 
    relay1_fwd = 1; /* Output +12V to your solenoid, allowing air flow in one direction*/
    relay1_rev = 0; /* No output to -12V */
} else { /* Trigger released */
    relay1_fwd = relay1_rev = 0; /* No output, solenoid changes position and flow reverses */
}
Basically, just use the relays to control +12V and -12V to solenoids or pumps or whatever have you. Never put relayX_fwd and relayX_rev both to 1, however. Sorry if I can't give a better description... I'm totally wiped from last night (got home at 3:45AM after a few disasters...)
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
  #3   Spotlight this post!  
Unread 17-02-2007, 21:47
paulcd2000's Avatar
paulcd2000 paulcd2000 is offline
Accidentally speaks in C
AKA: Paul Dagnelie
FRC #1719 (The Umbrella Corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore
Posts: 368
paulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the rough
Send a message via AIM to paulcd2000
Re: programming the pneumatics

In MPLab (all i know), the relays are controlled by default fairly well. here's the code from default:
Code:
relay1_fwd = p1_sw_trig & rc_dig_in01;  /* FWD only if switch1 is not closed. */
  relay1_rev = p1_sw_top  & rc_dig_in02;  /* REV only if switch2 is not closed. */
  relay2_fwd = p2_sw_trig & rc_dig_in03;  /* FWD only if switch3 is not closed. */
  relay2_rev = p2_sw_top  & rc_dig_in04;  /* REV only if switch4 is not closed. */
  relay3_fwd = p3_sw_trig;
  relay3_rev = p3_sw_top;
  relay4_fwd = p4_sw_trig;
  relay4_rev = p4_sw_top;
  relay5_fwd = p1_sw_aux1;
  relay5_rev = p1_sw_aux2;
  relay6_fwd = p3_sw_aux1;
  relay6_rev = p3_sw_aux2;
  relay7_fwd = p4_sw_aux1;
  relay7_rev = p4_sw_aux2;
  relay8_fwd = !rc_dig_in18;  /* Power pump only if pressure switch is off. */
  relay8_rev = 0;
basically, the first relay is controlled by the trigger and side switch on the first joystick. the second is the same on the second joy, etc. etc., up until the fifth. THose are as follows:
relay 5: Joy 1 top buttons
relay 6: Joy 3 top buttons
relay 7: joy 4 top buttons
here's the nice one:
relay 8: opposite of 18th input.
Basically, the last one is for the pneumatics. put a pressure switch on the 18 digital input, and the compressor will run automatically! Isn't technology amazing?
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams

5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)

We have blades on our robot?! ***sweeeeeet***

There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."
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 Pneumatics? itzrobz Programming 2 20-01-2007 00:30
Programming of Pneumatics Ben Piecuch Programming 3 18-02-2005 02:39
Pneumatics Programming KWalsh Programming 8 19-02-2004 09:17
Programming PBASIC for pneumatics archiver 2001 2 23-06-2002 23:58
Pneumatics electrical wiring and programming archiver 2001 1 23-06-2002 23:10


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

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