|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#3
|
||||
|
||||
|
Re: Need help with programming pneumatics
Single acting solenoids are controlled with "On" and "Off". When turned on the solenoid opens one way, and when turned off (or the power is cut) they default back the other way.
Double acting solenoids have to be driven in both directions. "Forward" and "Reverse". To some extent "On" and "Forward" do the same thing. But "Off" will not drive a double acting solenoid back. The "On", "Off", "Forward", and "Reverse" settings are from an enumerated list. "Off" = 0 "On" = 1 "Forward" = 2 "Reverse" = 3 The code you started with (sending 0 and 1) would have worked for a single acting solenoid. The reason why the arm was pushed out indefinitely was the "On" or 1 command drove it forward, and it needed a "Reverse" or 3 command not an "Off"/0 command to reverse the direction. PS. It looks like you are using old code for the joystick portion as well. "Joystick Get" has been replaced with "Joystick Get Values" and is now unpacked by indexing the array instead of unbundling by name. Last edited by Alpha Beta : 31-01-2015 at 13:48. Reason: Added Joystick Comments |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|