Skip to main content

NRC_JobfileInsertMOVJEXT(int line, int vel, int acc, int dec, const NRC_Position& target,const NRC_SyncPosition& targetSync, int pl = 0)

Insert MOVJEXT instruction into the job file

Before calling this function, please call NRC_CreateJobfile(std::string jobname) or NRC_OpenJobfile(std::string jobname) to create or open a job file

Type

int=>Insert MOVJEXT instruction into the job file

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
lineintThe line number where the instruction will be inserted, parameter range: 0 < line <= (NRC_GetJobfileLineSum()+1)
velintThe running speed of the robot, expressed as a percentage of the maximum speed of the robot. Parameter range: 0 < vel <= 100
accintRobot running acceleration, as a percentage of the maximum acceleration for each joint of the robot. Parameter range: 0 < acc <= 100
decintRobot running deceleration, as a percentage of the maximum deceleration for each joint of the robot. Parameter range: 0 < dec <= 100
targetconst NRC_Position&Robot motion target position, see NRC_Position for details
targetSyncconst NRC_SyncPosition&External axis motion target position, see NRC_SyncPosition 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 target2 =  { NRC_MCS, 320,0,580,3.14159,0,0};
NRC_SyncPosition synctarget2 = {NRC_ACS,0.5,1,1.5,2,2.5};
NRC_JobfileInsertMOVJEXT(1,20, 20,20, target2,targetSync2, 5);