|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#2
|
|||
|
|||
|
Re: Programming PBASIC for pneumatics
Posted by Josh Vetter at 2/1/2001 9:59 AM EST
Student on team #548, Robostangs, from Northville High School and BOSCH. In Reply to: Programming PBASIC for pneumatics Posted by Will Korinek on 2/1/2001 9:44 AM EST: Check out the white pages, there is one about wiring and programming pneumatics. But if you don't want to read all of that, here is what it says about programming it: In this example, the pump is controlled by the spike relay 5 output, and the pressure switch is on robot controller digital input 1 (input – pin 1 and ground pin 3). This code is inserted in the main loop of the robot controller program. ' Test the state of the pressure switch if rc_sw1 = 1 then pump_on ' jump if under the pressure limit ' 110 psi pressure limit has been reached ' turn pump off pump_off: relay5_fwd = 0 relay5_rev = 0 goto nextaction: ' turn pump on pump_on: relay5_fwd = 1 relay5_rev = 0 nextaction: Josh Vetter P.s. you may want to add a delay before the pump turns off so that the pump doesn't cycle. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming with the PBASIC Tokenizer | Raven_Writer | Programming | 12 | 05-01-2003 15:27 |
| PBasic Question | Melissa H. | Programming | 28 | 17-11-2002 18:53 |
| Programming the second joystick in PBASIC | archiver | 2001 | 2 | 24-06-2002 00:25 |
| pbasic programming | punarhero | Programming | 4 | 21-01-2002 23:32 |
| Simplifying PBasic | IDiggles | General Forum | 16 | 06-11-2001 01:36 |