|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#5
|
||||
|
||||
|
Re: Pneumatics coding
Quote:
ok now that you have all the pneumatics plugged into relays and not pwms, ill go over how they work. The relays are basically 2 digital outputs slapped into a single cable, so there are two bits that you can set. relay#_fwd and relay#_rev. What this gets translated into is either +12V, -12V, 0V to the festo Valves. So in order to set them to one direction you would use this line of code relay#_fwd = 1; relay#_rev = 0; this will set your festo valve to actuate your pneumatic one way and if you switch which bit is set to 1 then you actuate the pneumatic the other way. Now is for some reason you dont want any pressure in the cylinders then you set each bit to 0. Now if you want to change these based on a button on a joystick then you can change the relay#_fwd and relay#_rev bits inside an if statment such as if(p1_sw_top ==1) { relay#_fwd = 1; relay#_rev = 0; } If you need any help any further feel free to pm me and I'll try to help you. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| C coding | ExarKun666 | General Forum | 12 | 21-12-2007 14:13 |
| Photoswitch coding | magical hands | Programming | 0 | 17-01-2006 21:20 |
| pneumatics coding problem (or technical) | wildabyss | Programming | 2 | 22-02-2005 22:16 |
| pneumatics coding problem (or technical) | wildabyss | Pneumatics | 2 | 22-02-2005 22:16 |
| coding a potentiometer | incognito_NICK | Programming | 5 | 14-02-2005 15:56 |