|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
programming the pneumatics
if anyone can helpme program tne pneumatics, that'll be e lot of help. i got no clue
|
|
#2
|
|||
|
|||
|
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 */
}
|
|
#3
|
||||
|
||||
|
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; 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? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |