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#
int finalVelocity = 5;
Constants.VELOCITY,
Constants.ACCELERATION,
Constants.DECELERATION,
Constants.JERK_PERCENT,
finalVelocity);
- C++
const int NUM_AXES = 1;
const int AXIS_INDEX = 0;
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);
std::cout << "Motion Complete\n" << std::endl;