APIs, concepts, guides, and more
Final Velocity Motion

Perform an absolute or relative move with a specified final velocity.

🔹 What is Velocity Motion?

An absolute or relative move with a specified, non-zero final velocity.

🔹 Why use Velocity Motion?

A move with final velocity will make an absolute or relative move, and upon reaching the specified position, continue moving at the specified final velocity (as if you had made a position move and then, immediately after, a velocity move). This motion will continue indefinitely until it is stopped, either manually or through the program. To command a move with final velocity, enter your desired final velocity as the last argument in your regular move command.

📜 Sample Code

  • C#

    axis.AmpEnableSet(true);
    axis.MoveSCurve(POSITION, VELOCITY, ACCELERATION, DECELERATION, JERK_PERCENT, FINAL_VELOCITY); // axis continues at final velocity after reaching position
    // wait until axis transitions to final velocity
    while (axis.StatusBitGet(RSIEventType.RSIEventTypeMOTION_AT_VELOCITY) == false)
    Thread.Sleep(100);

  • C++

    // *NOTICE* The following constants must be configured before attempting to run with hardware.
    const int NUM_AXES = 1; // The number of axes to configure
    const int AXIS_INDEX = 0; // The index of the axis to configure
    // Motion Parameters
    const double POSITION_0 = 0;
    const double POSITION_1 = 0.5;
    const double VELOCITY = 1;
    const double ACCELERATION = 10;
    const double DECELERATION = 10;
    const double JERK_PERCENT = 50;
    const double FINAL_VELOCITY = 0.5;
    std::cout << "SCurve Motion with Final Velocity:" << std::endl;
    std::cout << "Moving to position: " << POSITION_1 << std::endl;
    std::cout << "Final Velocity: " << FINAL_VELOCITY << std::endl;
    axis->MoveSCurve(POSITION_1, VELOCITY, ACCELERATION, DECELERATION, JERK_PERCENT, FINAL_VELOCITY);
    HelperAtVelocityWait(controller, axis, TIMEOUT);
    std::cout << "Motion Complete" << std::endl;
    std::cout << "Moving back to position: " << POSITION_0 << std::endl;
    std::cout << "Final Velocity: " << 0 << std::endl;
    axis->MoveSCurve(POSITION_0, VELOCITY, ACCELERATION, DECELERATION, JERK_PERCENT, 0);
    axis->MotionDoneWait(TIMEOUT);
    std::cout << "Motion Complete\n" << std::endl;