NRC_RobotMoveJoint(int vel, const NRC_Position& target, int acc, int dec)
Robot point-to-point motion
The robot moves from the current position to the target position in a point-to-point 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 point-to-point 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, as the percentage of the maximum speed of the robot. Parameter range: 0 < vel <= 100 |
target | NRC_Position& | Robot motion target position |
acc | int | Robot running acceleration, as a percentage of the maximum acceleration of each joint of the robot. Parameter range: 0 < acc <= 100 |
dec | int | Robot running deceleration, as a percentage of the maximum deceleration of each joint of the robot. Parameter range: 0 < dec <= 100 |
Sample code
NRC_Position target={NRC_ACS,10,10,10,10,10,10};
NRC_RobotMoveJoint(50, target, 50, 50);
//Perform a point-to-point movement to the target position with a velocity of 50%, acceleration of 50% , and deceleration of 50%