Does this look Okay?

Please look at the picture I am trying to set up a different controller to make a certian function happen with pneumatics http://labviewhelpplease.webs.com/index.htm
If the image isn’t showing visit the website
http://labviewhelpplease.webs.com/index.htm::rtm::

That code will work and do stuff with solenoids. If you want to know if it will do the stuff you want, you’ll have to describe how you want the pneumatic cylinders to respond to the buttons.

I want to hit a button to make a cylinder go out and when i hit another button i want it to go in, but i don’t want it to be used on the driver controller.

Ok, that’s what the top section of code will do.

The bottom section will extend (or retract) a cylinder when you push a button and keep it there as long as you hold the button. When you let go, the cylinder will move back, basically making your double solenoid act like a single.

The Joystick Open should go in Begin.VI with the output wired to a Joystick Set RefNum. Then use a Joystick Get RefNum in Teleop.VI and wire the output of that to the Joystick Get.

Pattern your joystick code off of the existing code for your primary joystick, all you want to change in the second copy (upstream of the Joystick Get at least) is the USB port and RefNum name.

You’ll get allocation errors from allocating solenoid channels 1 and 2 twice. For a double solenoid, you need two separate solenoid channels.