Easy C Pneumatics

Can anyone help me figure out how to program pneumatics in easy c? i thought it was done using a joystick digital to latch block, but i cant seem to get it working. Pictures and sample programs help.

It works with joystick to digital output block.

As already mentioned, the pneumatics are controlled by a digital output. In Easy C port 9-12 are outputs by default, but you can change any port. To program it just say SetDigitalOutput (port,value) or the joystick digital to digital block for simplify. If it is not working, you can poke the orange or blue button on the solenoid with a hex key to test the piston and solenoid. If that doesn’t work the problem is with your piston, solenoid or tubing, if that does work, the problem is with you code.
Hope this helps!

Write two variables, shoot catapult and retract catapult in operator control, int!
Also drag two joystick digital for shoot and retract… retrieve to shoot catapult variable for shoot, and retract catapult for retract for the other button.
Then drag if (Shoot catapult =1)
Set getdigitaloutput (port,1)
Then drag else if(Retract catapult=1)
Set getdigitaloutput (port,0)

Make sure you have it under while loop (1)… :slight_smile:

In this thread:

I broke down every single step you need to program your pneumatics in EasyC. The program has one button that fires the pneumatics and then has another button that makes the pneumatics fall back down. Good luck. Let me know if you have any problems.

Hey everyone. Thanks for all the help :smiley: I’ve got it all figured it now :smiley: