NRC_RobotMoveLinear(int vel, const NRC_Position& target, int acc, int dec)
Robot linear motion
The robot moves from the current position to the target position in a linear manner at a velocity of vel
Before calling this function, please power on the servo by calling the NRC_ServoEnable() function
After this function is successfully called, the robot will start moving. Please pay attention to safety
Type
int=>Robot linear motion
Return value | Description |
---|---|
0 | The function is called successfully |
-101 | Invalid input parameter |
-102 | The target object does not exist. This typically occurs when the system initialization is incomplete, and calling other functions may return this value |
-103 | The target object is currently in an inoperable state |
Parameter Option
Parameter | Type | Description |
---|---|---|
vel | int | The running speed of the robot, expressed as the absolute speed of the TCP in millimeters per second (mm/s). Parameter range: vel > 1 |
target | NRC_Position& | Robot motion target position |
acc | int | Robot running acceleration, as a percentage of the maximum Cartesian acceleration. Parameter range: 0 < acc <= 100 |
dec | int | Robot running deceleration, as a percentage of the maximum Cartesian deceleration. Parameter range: 0 < dec <= 100 |
Sample code
NRC_Position target={NRC_ACS,10,10,10,10,10,10};
NRC_RobotMoveLinear(50, target, 5, 5);
//Perform a linear motion to the target position with a velocity of 50mm/s, acceleration of 5%, and deceleration of 5%