For information on the latest version, please have a look at GL013301.
servol_g (Auto Mode)
This function performs asynchronous Cartesian interpolation using velocity and acceleration blending, enabling smooth, continuous TCP (Tool Center Point) motion. It updates position targets in real time while maintaining the specified kinematic constraints.
Also, this API operates only in Auto (Run) mode. It is not available in Manual (Teach) mode.
Definition
DRFLEx.h within class CDRFLEx, public section (line 819)
bool servol_g(float fTargetPos[NUM_TASK],
float fTargetVel[2],
float fTargetAcc[2],
float fTargetTime = 0.f)
{
return _servol_g(_rbtCtrl, fTargetPos, fTargetVel, fTargetAcc, fTargetTime);
}
Parameter
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
fTargetPos |
float[6] |
Target Cartesian pose [X, Y, Z, Rx, Ry, Rz]. |
|
fTargetVel |
float[2] |
Translational and rotational velocity limits. |
|
fTargetAcc |
float[2] |
Translational and rotational acceleration limits. |
|
fTargetTime |
float |
0.0f |
Transition time [sec]. Automatically adjusted as needed. |
Return
Value |
Description |
|---|---|
0 |
Failed |
1 |
Success |
Example
#include "DRFLEx.h"
using namespace DRAFramework;
int main() {
CDRFLEx drfl;
// Preconditions: Connected, servo ON, Auto mode active
float tcp[6] = {400.f, 200.f, 300.f, 180.f, 0.f, 0.f};
float vel[2] = {100.f, 50.f};
float acc[2] = {200.f, 100.f};
drfl.servol_g(tcp, vel, acc, 0.4f);
return 0;
}
Note
servol_gprovides continuous TCP motion with velocity/acceleration blending.Ideal for path streaming, sensor-based control, and hybrid trajectory updates.
If
fTargetTimecannot be met, motion parameters are internally optimized.It is not linked with
change_operation_speed()orforce/stiffness controlAPIs.Use for smooth Cartesian trajectory generation and real-time feedback control.