Long movecorrectabs(long position), Long movecorrectinc(long distance), Long movedistance(long distance) – Rockwell Automation 2098-IPD-xxx Ultra5000 C Programming using the Motion Library User Manual

Page 82: Movecorrectabs • movecorrectinc • movedistance

Advertising
background image

Publication 2098-PM001E-EN-P — July 2002

2-42

Referencing the Motion Library

long MoveCorrectAbs(long position);

Corrects a move to stop at a new target position specified in the
argument. Uses the programmed move acceleration, deceleration, and
velocity values. Position is programmed in counts.

The reference position for the MoveCorrectAbs function is set using
the MoveSetPos function.

Move status may be checked with a MoveInProgress function.

Returns 0 if successful, or -1 on an error.

long MoveCorrectInc(long distance);

Corrects a move to stop a distance from the current target position.
New target position is the original target position plus the specified
distance. Uses the programmed move acceleration, deceleration, and
velocity values. Distance is programmed in counts.

Move status may be checked with a MoveInProgress function.

Returns 0 if successful, or -1 on an error.

long MoveDistance(long distance);

Starts an incremental move of the specified distance using the
programmed move acceleration, deceleration, and velocity values.
Distance is programmed in counts.

This function is identical to the MoveIncremental function.

Move status may be checked with a MoveInProgress function.

Returns 0 if successful, or -1 on an error.

Note: Returns an error if a move is already in progress.

Advertising