Use Absolute Motion to move directly to a specified position, ensuring the axis reaches a defined destination regardless of its previous position.
🔹 What is Absolute Motion?
An absolute motion always moves to a specified position without being affected by the previous motion.
🔹 Why use Absolute Motion?
Absolute Motion makes it very easy for us to reach a specified destination.
- Note
- An Absolute move will move the axis to position 25 rather than 25 units ahead of the current position.
A Relative move will move the axis 25 units ahead of the current position, rather than to position 25.
In our API an absolute motion will let us move a single axis with a trapezoidal profile to an absolute distance.
- Note
- You can change the velocity, acceleration, and deceleration of a moveSCurve that is executing on the fly simply by calling the function again with different parameters.
📜 Sample Code
- C#
public const double POSITION = 2;
public const double VELOCITY = 200;
public const double ACCELERATION = 100;
public const double DECELERATION = 100;
public const double JERK_PERCENT = 50;
axis.
MoveTrapezoidal(Constants.POSITION, Constants.VELOCITY, Constants.ACCELERATION, Constants.DECELERATION);
- 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 << "Absolute (Trapezoidal) Motion:" << std::endl;
std::cout << "Moving to position: " << POSITION_1 << std::endl;
std::cout << "Motion Complete" << std::endl;
std::cout << "Moving back to position: " << POSITION_0 << std::endl;
std::cout << "Motion Complete\n" << std::endl;