APIs, concepts, guides, and more

◆ MoveRelative() [2/2]

void MoveRelative ( const double *const relativePosition,
const double *const vel,
const double *const accel,
const double *const decel,
const double *const jerkPct )
Description:
MoveRelative command a relative point-to-point motion, with an S-Curve velocity profile. Each Axis will move relative increment distance from the currently commanded position.
S-Curve Velocity Profile
Parameters
relativePositionAn array of relative increments, positive or negative, in UserUnits.
velarray of Maximum velocity, UserUnits/second.
accelarray of Maximum acceleration , UserUnits/second/second. (peak up to 2× accel when jerkPercent = 100, see below)
decelarray of Maximum deceleration , UserUnits/second/second. (peak up to 2× decel when jerkPercent = 100, see below)
jerkPctarray of Jerk Percent, 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: