Test

Copy
MoveAxisAdditive
VOID MoveAdditive(int Index, double Distance)
{
    RtPrintf("Make an additional move.\n\n");

    double setPosition = 0;

    //Display the starting position.
    GetAxisPosition(Index, mcSetValue, &setPosition);
    printf("Starting position: %f\n\n", setPosition);

    //Start an additive move.
    KsCommandStatus status = WaitForCommand(30, FALSE, MoveAxisAdditive(Index, Distance,
        MAXIMUM_VELOCITY, MAXIMUM_ACCELERATION, MAXIMUM_DECELERATION, MAXIMUM_JERK, mcAborting));
    if (status.Error)
        RtPrintf("MoveAxisAdditive failed: %d\n", status.ErrorId);

    GetAnAxisPosition(Index);
}

 

The difference between a commanded and set position is that a commanded position is the target position of a command, and a set position is an interpolated position when an axis is heading to a command's target.