Features
This is a function for moving the robot at constant velocity by blending the robot with the blending radius set in the path information after receiving path information consisting of one or more lines or arcs.
Parameter
|
Parameter Name |
Data Type |
Default Value |
Description |
|
tTargetPos |
struct MOVE_POSB [MAX_MOVEB_POINT] |
- |
Maximum 25 path information |
|
nPosCount |
unsigned char |
- |
Number of valid paths |
|
fTargetVel |
float[2] |
- |
Linear Velocity, Angular Velocity |
|
fTargetAcc |
float[2] |
- |
Linear Acceleration, Angular Acceleration |
|
fTargetTime |
float |
0.f |
Reach Time [sec] |
|
eMoveMode |
enum.MOVE_MODE |
MOVE_MODE_ ABSOLUTE |
Refer to Constant and Enumeration Type Constant |
|
eMoveReference |
enum.MOVE_REFERENCE |
MOVE_REFERENCE_BASE |
Refer to Constant and Enumeration Type Constant |
-
If an argument is inputted to fTargetVel (e.g., fTargetVel = {30, 0}), the input argument corresponds to the linear velocity of the motion, while the angular velocity is determined proportionally to the linear velocity.
-
If an argument is inputted to fTargetAcc (e.g., fTargetAcc = {60, 0}), the input argument corresponds to the linear acceleration of the motion, while the angular acceleration is determined proportionally to the linear acceleration.
-
If fTargetTime is specified, values are processed based on fTargetTime, ignoring fTargetVel and fTargetAcc .
-
When eMoveMode is MOVE_MODE_RELATIVE, each pos of the posb list is defined as a relative coordinate for the preceding pos.
-
A user input error is generated if the blending radius in posb is 0.
-
A user input error is generated due to the duplicated input of Line if contiguous Line-Line segments have the same direction.
-
If the blending condition causes a rapid change in direction, a user input error is generated to prevent sudden acceleration.
-
This function does not support online blending of previous and subsequent motions.
Return
|
Value |
Description |
|
0 |
Error |
|
1 |
Success |
Example
MOVE_POSB xb[4];
memset(xb, 0x00, sizeof(xb));
int segNum = 4;
float tvel = { 50, 50 };
float tacc = { 100, 100 };
xb[0]._iBlendType = 0; // line
xb[0]._fBlendRad = 50;
xb[0]._fTargetPos[0][0] = 559;
xb[0]._fTargetPos[0][1] = 234.5;
xb[0]._fTargetPos[0][2] = 651.5;
xb[0]._fTargetPos[0][3] = 0;
xb[0]._fTargetPos[0][4] = 180;
xb[0]._fTargetPos[0][5] = 0;
xb[1]._iBlendType = 1; // circle
xb[1]._fBlendRad = 50;
xb[1]._fTargetPos[0][0] = 559;
xb[1]._fTargetPos[0][1] = 234.5;
xb[1]._fTargetPos[0][2] = 451.5;
xb[1]._fTargetPos[0][3] = 0;
xb[1]._fTargetPos[0][4] = 180;
xb[1]._fTargetPos[0][5] = 0;
xb[1]._fTargetPos[1][0] = 559;
xb[1]._fTargetPos[1][1] = 434.5;
xb[1]._fTargetPos[1][2] = 451.5;
xb[1]._fTargetPos[1][3] = 0;
xb[1]._fTargetPos[1][4] = 180;
xb[1]._fTargetPos[1][5] = 0;
xb[2]._iBlendType = 0; // line
xb[2]._fBlendRad = 50;
xb[2]._fTargetPos[0][0] = 559;
xb[2]._fTargetPos[0][1] = 434.5;
xb[2]._fTargetPos[0][2] = 251.5;
xb[2]._fTargetPos[0][3] = 0;
xb[2]._fTargetPos[0][4] = 180;
xb[2]._fTargetPos[0][5] = 0;
xb[3]._iBlendType = 0; // line
xb[3]._fBlendRad = 50;
xb[3]._fTargetPos[0][0] = 559;
xb[3]._fTargetPos[0][1] = 234.5;
xb[3]._fTargetPos[0][2] = 251.5;
xb[3]._fTargetPos[0][3] = 0;
xb[3]._fTargetPos[0][4] = 180;
xb[3]._fTargetPos[0][5] = 0;
drfl.moveb(xb, segNum, tvel, tacc);
// Moves the robot from the current position through a trajectory consisting of LINE→CIRCLE→LINE→LINE,
// maintaining velocity 50, 50(mm/sec, deg/sec) and acceleration 100, 100(mm/sec2, deg/sec2).
// Blending to the next segment begins
// when the distance of 50 mm from the end point of each segment is reached.