Need help with programming double solenoids

Hello, I am new to Labview programming and I was trying to program a double solenoid using an example code. Their code is from 2011 and I ran into trouble with wiring it to the “boxes” the attachments are my code and the sample code i used. I also cannot find how to get the joystick “box” etiher







Use this example updated for 2015 instead.

If you save the example picture, then drag and drop in on your block diagram it will generate the code.

To get a joystick value now you’ll need to use the Index Array function rather than Unbundling by Name, like so

http://puu.sh/g0lRV/4aa91483b1.png

Thanks! but how do I set what button is forward and which is reverse

Use the “Sticky Solenoid Example” on the page Mark pointed to. The integers connected to the Index Array function select which button values come out of the function. It’s a zero-based array, so “1” is actually the second button.

Alright I am very close I have a xbox controller and I want it so Y is up and A is down. here is what i got. Even trying all buttons it doesn’t work





The enums in Teleop are incorrect for Solenoid Set. That’s why they have red dots.
Get a correct Solenoid Set Enum by

  • Deleting the wire into Solenoid Set (the one with the red dot)

  • Right-click on the now vacant Solenoid Set input node and choose Create->Constant
    That’s the correct Solenoid Set enum type.

  • Now make copies of the correct one and replace all the others

  • Finally, remove the enum you created into Solenoid Set and wire Solenoid Set into the Select as it was before.
    *]If done correctly all the red dots should be gone.

Alright this worked! Now when i push a button my air cylinder goes all the way up or all the way down. Is there any way to have an in-between…I attempted to code the right stick on the xbox controller but said there were two different data types

Simple answer: no. Pneumatic solenoid valves are two-state devices. There is no middle ground.

Complicated answer: with sufficient analysis and design, one can devise a way to use multiple solenoid valves and flow restrictors to cause a pneumatic cylinder to retract or extend an arbitrary amount. It will move in a spring-like fashion due to external forces, so some sort of feedback on its actual position would be helpful.

When i click the buuton it is one-and-done.We want the button while pressed to flow and when released no flow anyway for this?

Do you mean like this example?
The solenoid here is Forward only as long as the button is held.

So is there a way to lift a joystick to lift the cylinders some and then let go and it will hold that pressure until i move to joystick again?

You can’t do it with a double solenoid valve connected to a typical pneumatic cylinder.

It is possible to do something like what you are asking by using multiple solenoid valves connected in creative ways, but it is not something you will find an off-the-shelf solution for. However, it will be very difficult to make it meet the pneumatics rules, which require that the working pressure never exceed 60 psi.