Skip to main content

NRC_RunqueueInsertIMOV(int vel, int acc, int dec, const NRC_Position& deviation, int pl=0)

Insert IMOV instruction in the run queue

Before calling this function, please call NRC_CreateNoFlieRunqueue() to create a fileless run queue

When the deviation.coord is NRC_ACS, the instruction will use the joint interpolation method, and when the deviation.coord is other values, the linear interpolation method will be used

Type

int=>Insert IMOV instruction in the run queue

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; When the deviation.coord is NRC_ACS, it is a percentage of the robot's maximum speed with a range of 0 < vel <= 100. When the deviation.coord is not NRC_ACS, it is the absolute running speed of the robot TCP in millimeters per second (mm/s), with a range of vel > 1
accintRobot running acceleration, parameter range: 0 < acc <= 100; when the deviation.coord is NRC_ACS, it is the percentage of the maximum acceleration of each joint of the robot; when the deviation.coord is not NRC_ACS, it is the percentage of the robot’s maximum Cartesian acceleration
decintRobot running deceleration, parameter range: 0 < dec <= 100; when the deviation.coord is NRC_ACS, it is the percentage of the maximum deceleration of each joint of the robot; when the deviation.coord is not NRC_ACS, it is the percentage of the robot’s maximum Cartesian deceleration
deviationconst NRC_Position&Robot motion deviation, see NRC_Position for details
plintSmoothness, which refers to the smooth transition between the current and the next movement instructions. The higher the value of pl, the smoother the transition, but the greater the trajectory deviation. The range of the parameter is 0 <= pl <= 5

Sample code

NRC_Position dev1 = { NRC_ACS, { 10, 20, -10, 10, 0, 0 } };
NRC_RunqueueInsertIMOV(50,5,5,dev1,5);
//Insert IMOV instruction in the run queue, vel=50mm/s, acc=5, dec=5, PL=5