NRC_ecatGetCommand(unsigned int axisNum, unsigned int index, unsigned int subindex, unsigned char* value, unsigned int size)
Read the value of a certain command word of the servo
Type
int =>Read the value of a certain command word of the servo
Return value | Description |
---|---|
0 | The function is called successfully |
-101 | Invalid input parameter |
-102 | The target object does not exist. This typically occurs when the system initialization is incomplete, and calling other functions may return this value |
-103 | The target object is currently in an inoperable state |
Parameter Option
Parameter | Type | Description |
---|---|---|
axisNum | unsigned int | Axis number of the robot |
index | unsigned int | Command word code |
subindex | unsigned int | Command word subcode |
value | unsigned char* | The result is stored in this pointer and returned |
size | unsigned int | The number of bytes of the value corresponding to the command word |
Sample code
unsigned short value = 0;
NRC_ecatGetCommand(1, 0x6041, 0, (unsigned char* )&value, sizeof(value));
printf("value=%d\n", value);
unsigned int value = 0;
NRC_ecatGetCommand(3, 0x202C, 0, (unsigned char* )&value, sizeof(value));
printf("value=%d\n", value);