|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#3
|
||||
|
||||
|
Re: Help Solenoid Programming
solenoids are programmed a little differently that the drive, joysticks, analog inputs, or digital inputs that you're used to so i'll just write the code you need to initialize it and then give you an example of how to let air in and how to let air out. I'm going to assume that you're using the simple robot template, if you arent this code will still work but it will be placed in a different part of your code
//defines the pointers as part of the solenoid class, goes in class RobotDemo: public Simple Robot { Solenoid *kicker_kick; Solenoid *kicker_return; //initializes solenoids and gives them a channel on the relay section of the IO board goes in RobotDemo(void): kicker_kick = new Solenoid(1); kicker_return = new Solenoid(2); //pushes the kicker out, remember not to let the two sides of the solenoid fight each other, goes into the while(IsOperatorControl()) { kicker_return->Set(false); kicker_kick->Set(true); //pulls the kicker back in kicker_kick->Set(false); kicker_return->Set(true); |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Labview Solenoid Programming | 3p1c w1n | Programming | 12 | 12-02-2010 17:29 |
| Solenoid Programming Issue. | Dr. Manhattan | Pneumatics | 2 | 10-02-2009 17:42 |
| solenoid programming | holty531 | Programming | 0 | 10-02-2008 16:17 |
| Programming a Solenoid | Brigander | Pneumatics | 4 | 17-02-2007 14:06 |
| Solenoid Programming | duckshepherd | Pneumatics | 1 | 17-02-2003 09:15 |