Skip to main content

NRC_SetCurrentPosToZeroPos(int axisNum,bool mod)

Set current position to zero or clear multiturn value

Please set this parameter when the servo is stopped or in a ready state

It takes about two or three seconds to execute the function

For most types of servos, when executing this function, the servo will be enabled and powered on, please pay attention to safety

Type

int =>Set current position to zero or clear multiturn value

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
axisNumintThe number of the axis to be operated on; when "axisNum" is 0, it indicates all axes. Parameter range: 0 <= axisNum <= total number of robot axes
modbool0: Set zero; 1: Clear multi-turn value

Sample code

NRC_SetCurrentPosToZeroPos(0,1);//Clear multi-turn value for all axes