Update variable while running if statement

Hi,

In this sketch, I want the actuator to track with joystick position, farthest forward joystick position being 3 inches of extension. Farthest back being zero extension, but I only want to allow the actuator to retract from an extended position when the button is pressed.

Eventually I want to control 2 actuators, 1 on the +y axis, the other on the -y axis with both actuators being fully retracted when the joystick is in the center.

Can you read that again?
If the joystick is fully back with the actuator zero/fully back.
Then fully retracted with joystick in centre is not logical.

Center joystick is center actuator position.

S0 I understand the button is a safety that must be pressed to allow the USER to operate the joystick to RETACT the actuator, it doesn't cause an automatic retraction.

What is the application?

Tom... :slight_smile: