9
« Last post by JasonO on August 18, 2026, 10:47:33 AM »
In case it's ever of use to anyone else, the way I ended up achieving variable velocity jogging with servo motors from an analog joystick input, was by using an AXSCRIPT, with a WHILE loop, with a Ramp to Velocity step inside the WHILE. The Ramp to Velocity is set to immediately continue on to the next step.
So as long as the axis permissive (referenced by the WHILE step) is ON, it keeps looping and updating the axis velocity based on the analog input. Meanwhile, I have it calculating on every scan how many pulses will be needed to ramp to a stop from the axis current velocity, using a trapezoid ramp.
When the joystick is released OR the axis reaches the soft limit minus the number of pulses needed to stop, the AXSCRIPT leaves the WHILE loop and switches to an Absolute Position Move step to bring the axis to a stop. That way, if the stop is caused by reaching a soft limit, it can ramp to a stop exactly at the soft limit position, from whatever its initial velocity had been.