ROBOTIS e-Manual v1.13.01
| Dynamixel SDK |
It checks the errors included in status packet.
| int dxl_get_rxpacket_error( int errbit ); |
- errbit
This is Bit Flag to check whether errors occur or not. It has one of the following values.
|
Value |
Name |
Contents |
|
1 |
ERRBIT_VOLTAGE |
If the Error-impressed voltage is deviated from the set movement voltage range in the control table, it is set to 1. |
|
2 |
ERRBIT_ANGLE |
If the writing of Goal Position value is deviated from the range between CW Angle Limit ~ CCW Angle Limit, it is set to 1. |
|
4 |
ERRBIT_OVERHEAT |
If the internal temperature of Dynamixel is deviated from the set movement temperature range in the control table, it is set to 1. |
|
8 |
ERRBIT_RANGE |
When the command is deviated from the using range, it is set to 1. |
|
16 |
ERRBIT_CHECKSUM |
When Checksum of the transmitted Instruction Packet is not matching, it is set to 1. |
|
32 |
ERRBIT_OVERLOAD |
When the set torque cannot control the current load, it is set to 1. |
|
64 |
ERRBIT_INSTRUCTION |
If an undefined instruction is transmitted, or action command is transmitted without reg_write command, it is set to 1. |
- If it is 1, errors occur; if it is 0, no errors occur.
| if( dxl_get_rxpacket_error(ERRBIT_VOLTAGE) == 1 )
{ // Input voltage error occurred } if( dxl_get_rxpacket_error(ERRBIT_ANGLE ) == 1 ) { // Angle limit error occurred } if( dxl_get_rxpacket_error(ERRBIT_OVERHEAT) == 1 ) { // Overheating error occurred } if( dxl_get_rxpacket_error(ERRBIT_RANGE) == 1 ) { // Range error occurred } if( dxl_get_rxpacket_error(ERRBIT_CHECKSUM) == 1 ) { // Checksum error occurred } if( dxl_get_rxpacket_error(ERRBIT_OVERLOAD) == 1 ) { // Overload error occurred } if( dxl_get_rxpacket_error(ERRBIT_INSTRUCTION) == 1 ) { // Instruction error occurred } |