APIs, concepts, guides, and more

◆ MoveSCurve() [2/2]

void MoveSCurve ( const double *const position,
const double *const vel,
const double *const accel,
const double *const decel,
const double *const jerkPct )
Description:
MoveSCurve calls a point-to-point S-Curve velocity profile move.
Parameters
*positionArray of target positions (in UserUnits for each Axis).
*velArray of velocities (UserUnits/second).
*accelArray of average accelerations (UserUnits/second/second). (peak up to 2× accel when jerkPercent = 100, see below)
*decelArray of average decelerations (UserUnits). (peak up to 2× decel when jerkPercent = 100, see below)
*jerkPctArray of jerk percents, which defines the percentage of acceleration time which is smoothed, 0.0 to 100.0
Note
Non-Blocking Execution Motion commands return instantly and do not pause code execution. Use MotionDoneWait() post-call to block execution until motion completes, or MotionDoneGet() to poll for completion.
Warning


Using a non-zero JerkPercent increases the maximum acceleration above the user-specified average.
If your system can’t handle the higher peak, you risk overshoot or excessive load. The relation between average acceleration and maximum acceleration is:

\[ Maximum Acceleration \;=\; \frac{accel}{1 - \bigl(jerkPercent \times 0.005\bigr)} \]

  • accel: the requested (average) acceleration value given in the MoveSCurve command.
  • jerkPercent: the percent of time with non-zero jerk (0–100) given in the MoveSCurve command.
  • Maximum Acceleration: the resulting peak commanded acceleration.

See the S-Curve Motion concept page for more information.

Warning


Using a non-zero JerkPercent increases the maximum deceleration above the user-specified average.
If your system can’t handle the higher peak, you risk overshoot or excessive load. The relation between average deceleration and maximum deceleration is:

\[ Maximum Deceleration \;=\; \frac{decel}{1 - \bigl(jerkPercent \times 0.005\bigr)} \]

  • decel: the requested (average) deceleration value given in the MoveSCurve command.
  • jerkPercent: the percent of time with non-zero jerk (0–100) given in the MoveSCurve command.
  • Maximum Deceleration: the resulting peak commanded deceleration.

See the S-Curve Motion concept page for more information.

Sample Code:
// Assume 2 axes.
double positions[2] = {1000.0, 2000.0};
double velocities[2] = {1000.0, 1000.0};
double accels[2] = {10000.0, 10000.0};
double decels[2] = {10000.0, 10000.0};
double jerkPcts[2] = {50.0, 25.0};
multiAxis->MoveSCurve(positions, velocities, accels, decels, jerkPcts);
See also
MotionAttributeMaskGet
Examples
MultiAxisMotion.cs, and MultiaxisMotion.cpp.