SCurve

What is SCurve Motion?

S-Curve Motion initiates a point-to-point motion using an “S” shaped velocity profile similar to that shown below.

This move type generates a motion that takes the same time as a trapezoidal move but allows the acceleration to have smoother transitions.

This comes at the expense of requiring larger peak accelerations and decelerations. The total move time is always the same as the equivalent trapezoidal move.

You can change the velocity, acceleration, and deceleration of a moveSCurve that is executing on the fly simply by calling the function again with different parameters.

SCurve Motion Overview

Jerk %

Notes

Acceleration

Velocity

0%

Acceleration is always constant. This is the same as a Trapezoidal move profile.

Peak Acceleration is specified by the user.

50%

Acceleration is ramping 50% of the time and constant for 50% of the time.

Peak Acceleration is 133% of the value specified by the user.

100%

Acceleration is ramping 100% of the time and is never constant.

Peak Acceleration is 200% of the value specified by the user.

Jerk Percent

The Jerk percent is a parameter (from 0 to 100.0) which provides an easy way to change the acceleration profile without changing the move time. In most systems, there is a practical limit to acceleration, as it is proportional to the current in most motor types. Be sure to know the acceleration limitations to your system before trying a move SCurve profile.

Maximum Acceleration

Changing the Jerk Percent will change the max acceleration given by this formula:

Where,

max_accel: the maximum acceleration (or decel) for a point-to-point profile.

accel: the specified acceleration (or decel) from the application code.

jerk_percent: the specified jerk percentage (0 to 100.0) from the application code.

Multi-Axis SCurve Motion Overview

All Point to Point methods can be used for coordinated motion on multiaxis objects. It is important that you set up your arrays appropriately for a multiaxis object. See the examples below on how to structure your arrays for Multi-Axis SCurve Motion.

EXAMPLE 1 - Three Axis Multi-Axis XYZ with MoveSCurve()

The position data for all three axes are combined into the array. The time array is shared for all axes. This is why you need 3x as many position points than you need time points. See the example below:

Axis1 → relativePosition[0] = 10; velocity[0] = 10; acceleration[0] = 100; deceleration[0] = 100; jerkPCT[0] = 50; Axis2 → relativePosition[1] = 10; velocity[1] = 10; acceleration[1] = 100; deceleration[1] = 100; jerkPCT[0] = 50; Axis3 → relativePosition[2] = 10; velocity[2] = 10; acceleration[2] = 100; deceleration[2] = 100; jerkPCT[0] = 50;

multiAxis.MoveSCurve(relativePosition, velocity, acceleration, deceleration, jerkPCT);

The jerkPCT in the example above is a double-precision percent value and NOT a double-precision decimal value.

The values passed to the function MoveSCurve() will be multiplied internally by the specified user units (AKA: counts per unit). The reason for this is to avoid creating an extra input array. We simply just use the same array you have passed to the function. Therefore, the values passed to the function might not be the same ones once the function has been triggered.

Last updated