|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Double Solenoid problems
Are the opposite cases just blank or are they doing something as well?
Your code seems to be turning the same solenoid On and Off at the same time for Button 6. If the solenoid is defined as a double solenoid, then you want to use Forward/Reverse, rather than On/Off. Forward will be one position and Reverse the other. Here's an example. On activates the value, but off just stops it. Off doesn't reverse it. Last edited by Mark McLeod : 10-02-2011 at 18:53. |
|
#2
|
|||
|
|||
|
Re: Double Solenoid problems
Quote:
I tried implenting your toggle code, and it does go forward when i hit button 1(and stays that way after I let go), but it doesn't reverse after I press button 1 again. How would I go about combining both code snippets? |
|
#3
|
|||
|
|||
|
Re: Double Solenoid problems
I can't post any screenshots, but I think I can explain simply enough what you want. Marks approach is more elegant than mine but mine is the one I'm familiar with so here goes. assuming that you are using the thin festo valves or equivalent that came in the KOP, and that you are running the from the pneumatics bumper in slot 7 or 8 on the crio. each valve has 2 solenoids, so in begin I open 2 single solenoids. lets call them sol1 and sol2. then we open the device refs in teleop for sol1 and sol2. so using one case structure, when button 6 is true we set sol1 off and sol2 on (or vise versa) and in the false case we set sol1 on and sol2 to off (or vise versa). this does require button 6 to be held, but it should get your solenoid actuating. if you want it to stay actuated look at the labview example for joystick button latching, and also check out FRCmastery for a video about shift registers and typedefs. hope this helps.
|
|
#4
|
|||
|
|||
|
Re: Double Solenoid problems
Use two single solenoids instead. Double solenoids caused our team some pain.
You are wiring one solenoid to 4 different buttons. Is that really needed or useful, or even your intention? If you wish to wire one solenoid to one button, use a double case structure. Wire the outside case to a "get solenoid vi". In the inner structure, wire the button to the case and make the solenoid change with the true case. |
|
#5
|
|||
|
|||
|
Re: Double Solenoid problems
This is some code I came up with real quick. I hope it helps.
It uses one button that alternates the position of the solenoid when pushed. |
|
#6
|
|||
|
|||
|
Re: Double Solenoid problems
question, i remember having trouble with this last year, but where in the world are the "forward/reverse" cases, as I can only get true or false statements this year, and those are not working
|
|
#7
|
|||||
|
|||||
|
Re: Double Solenoid problems
Position the cursor over the input node of the Solenoid Set vi (until you see the wire spool cursor).
Right-click for the menu and choose Create -> Constant That'll give you the matching enumerated choices. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|