movesx_g (Auto Mode)
This function executes Cartesian spline motion through multiple TCP waypoints, enabling smooth and continuous trajectory generation in Cartesian space.
This API operates only in Auto (Run) mode. It is not available in Manual (Teach) mode.
Definition
DRFLEx.h within class CDRFLEx, public section
bool movesx_g(float fTargetPos[MAX_SPLINE_POINT][NUM_TASK],
unsigned char nPosCount,
float fTargetVel[2],
float fTargetAcc[2],
float fTargetTime = 0.f,
MOVE_MODE eMoveMode = MOVE_MODE_ABSOLUTE,
MOVE_REFERENCE eMoveReference = MOVE_REFERENCE_BASE,
SPLINE_VELOCITY_OPTION eVelOpt = SPLINE_VELOCITY_OPTION_DEFAULT)
{
return _movesx_g(_rbtCtrl, fTargetPos, nPosCount, fTargetVel, fTargetAcc, fTargetTime, eMoveMode, eMoveReference, eVelOpt);
}
Parameter
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
fTargetPos |
float[MAX_SPLINE_POINT][6] |
List of Cartesian waypoints [X, Y, Z, Rx, Ry, Rz]. Rx, Ry, Rz are fixed X-Y-Z angles in deg. |
|
nPosCount |
unsigned char |
Number of waypoints (max = MAX_SPLINE_POINT). |
|
fTargetVel |
float[2] |
Translational and rotational velocity limits. |
|
fTargetAcc |
float[2] |
Translational and rotational acceleration limits. |
|
fTargetTime |
float |
0.0f |
Total spline motion duration [sec]. |
eMoveMode |
|
Defines movement mode (absolute/relative). |
|
eMoveReference |
|
Reference coordinate system. |
|
eVelOpt |
|
Defines velocity blending strategy for spline motion. |
Caution
The function converts Rx, Ry, Rz of each of the first nPosCount waypoints to ZYZ Euler angles and writes them back into fTargetPos[i][3] to fTargetPos[i][5]. Pass a fresh copy of the waypoints on every call; reusing the same array converts the angles again.
Return
Value |
Description |
|---|---|
0 |
Failed |
1 |
Success |
Example
// Define Cartesian spline path
float path[3][6] = {
{400.f, 100.f, 200.f, 180.f, 0.f, 0.f},
{420.f, 120.f, 180.f, 180.f, 10.f, 0.f},
{440.f, 140.f, 160.f, 180.f, 20.f, 0.f}
};
float vel[2] = {200.f, 100.f};
float acc[2] = {300.f, 150.f};
drfl.movesx_g(path, 3, vel, acc, 2.5f);
Note
movesx_ggenerates smooth TCP trajectories via spline blending between waypoints.Supports flexible control via velocity, acceleration, and reference frame settings.
Automatically adjusts blending when physical limits are reached.
Use for precision path execution, contour following, or surface scanning tasks.
Not linked with
force/stiffness controlorchange_operation_speed()functions.