Microchip_Examples/StepAndDirectionExamples (non-ClearPath)/StepAndDirection (non-ClearPath)/StepAndDirection.cpp
void MoveDistance(int32_t distance) {
    SerialPort.Send("Moving distance: ");
    SerialPort.SendLine(distance);

    // Command the move of incremental distance
    motor.Move(distance);

    // Waits for all step pulses to output
    SerialPort.SendLine("Moving... Waiting for the step output to finish...");
    while (!motor.StepsComplete()) {
        continue;
    }

    SerialPort.SendLine("Steps Complete");
}
/*------------------------------------------------------------------------------
 * MoveDistance
 *
 *    Command "distance" number of step pulses away from the current position
 *    Prints the move status to the USB serial port
 *    Returns when step pulses have completed
 *
 * Parameters:
 *    int distance  - The distance, in step pulses, to move
 *
 * Returns: None
 */
MoveDistance
Command "distance" number of step pulses away from the current position
Prints the move status to the USB serial port
Returns when step pulses have completed

int distance  - The distance, in step pulses, to move

None
MoveDistance Command " distance " number of step pulses away from the current position Prints the move status to the USB serial port Returns when step pulses have completed int distance - The distance in step pulses to move None
void MoveDistance(int32_t distance) {
    SerialPort.Send("Moving distance: ");
    SerialPort.SendLine(distance);
    motor.Move(distance);
    SerialPort.SendLine("Moving... Waiting for the step output to finish...");
    while (!motor.StepsComplete()) {
        continue;
    }
    SerialPort.SendLine("Steps Complete");
}
void MoveDistance ( int32_t distance ) { SerialPort . Send ( " " ) ; SerialPort . SendLine ( distance ) ; motor . Move ( distance ) ; SerialPort . SendLine ( " " ) ; while ( ! motor . StepsComplete ( ) ) { continue ; } SerialPort . SendLine ( " " ) ; }
MoveDistance
    Command "distance" number of step pulses away from the current position
    Prints the move status to the USB serial port
    Returns when step pulses have completed
MoveDistance Command " distance " number of step pulses away from the current position Prints the move status to the USB serial port Returns when step pulses have completed
// Command the move of incremental distance // Waits for all step pulses to output