Skip to main content

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 valueDescription
0The function is called successfully
-101Invalid input parameter
-102The target object does not exist. This typically occurs when the system initialization is incomplete, and calling other functions may return this value
-103The target object is currently in an inoperable state

Parameter Option

ParameterTypeDescription
velintThe running speed of the robot, expressed as the absolute speed of the TCP in millimeters per second (mm/s). Parameter range: vel > 1
targetNRC_Position&Robot motion target position
accintRobot running acceleration, as a percentage of the maximum Cartesian acceleration. Parameter range: 0 < acc <= 100
decintRobot 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%