Skip to main content

NRC_SetSyncJointPara(int syncGroupNum, int syncAxisNum, NRC_RobotJointConfig config)

Set robot external axis parameters

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

Type

int=>Set robot external axis parameters

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
syncGroupNumintThe serial number of the axis group to be set, parameter range: 1 <= axisNum <= 3
syncAxisNumintThe serial number of the axis in an axis group to be set, parameter range: 1 <= axisNum <= 2
configNRC_RobotJointConfigSee NRC_RobotJointConfig

Sample code

int syncGroupNum = 2;
int syncGroupType[3]={2,1,0};
int syncGroupType1;
NRC_RobotJointConfig robotJointConfig = {121,17, 155, -155, 4000, -4000, 1,-1,2.12, -2.12, 1,1};//Joint parameter configuration
for (int i=1; i<syncGroupNum+1; i++)
{
cout<<"syncGroupNum:"<<syncGroupNum+1<<endl;
syncGroupType1=syncGroupType[i-1];
cout<<"syncGroupType1:"<<syncGroupType1<<endl;
for (int j=1; j<syncGroupType[i-1]+1; j++)
{
cout<<"syncGroupType2:"<<syncGroupType[i]+1<<endl;
NRC_SetSyncJointPara(i,j,robotJointConfig );
cout<<"i:"<<i<<endl;
cout<<"j:"<<j<<endl;
}
}