Status#

When an abnormal situation takes place the controller sets an error bit indicating a particular error or warning. The table below lists all available error and warning codes and their descriptions. The easiest way to check all statuses is to use mdtool. Another way could be to use the CANdle lib register access and read the statuses, or decode the general “Quick Status” using the CANdle lib getQuickStatus() function.

Errors and warnings can be cleared by register access, or using mdtool clear command. Please note that all warnings and only non-critical errors can be cleared.

Quick Status#

Quick status provides a general info about errors in each category of statuses. No warnings are indicated here. Last bit indicatest whether the current target (position or velocity) has been reached.

Error bit Error description
0 Main encoder error
1 Output encoder error
2 Calibration encoder error
3 MOSFET bridge error
4 Hardware errors
5 Communication errors
6 Motion errors
8-14 RESERVED
15 Target position (in Position PID / Profile position mode) or velocity ( in Velocity PID / Velocity profile mode) reached within position or velocity window

Main / Output Encoder Errors#

Error name Error bit Error description Action to clear it
ERROR_COMMUNICATION 0 MDxx could not communicate with the encoder Check connections
ERROR_WRONG_DIRECTION 1 Indicates the calibrated output encoder direction is different from the main encoder direction Recalibrate
ERROR_EMPTY_LUT 2 Indicates the encoder eccentricity table is empty Recalibrate
ERROR_FAULTY_LUT 3 Indicates the encoder eccentricity table is faulty (contains too large corrections) Check the setup and recalibrate
ERROR_CALIBRATION_FAILED 4 Calibration failed due to wrong motor <> encoder setup Check setup, recalibrate in case of problems contact MABRobotics
ERROR_POSITION_INVALID 5 Position reading is invalid Check endcoder physical setup, in case of problems contact MABRobotics
ERROR_INIT 6 Encoder initialization failed Check endcoder setup and connection, in case of problems contact MABRobotics
WARNING_LOW_ACCURACY 30 Encoder position readout accuracy may be lower than specified Check endcoder physical setup and reboot the MDxx

Calibration Errors#

Error name Error bit Error description Action to clear it
ERROR_OFFSET_CAL 0 Problem with the offset determination during calibration Try recalibrating
ERROR_RESISTANCE_IDENT 1 Problem with resistance identification Try recalibrating or running the `mdtool config bandwidth` command
ERROR_INDUCTANCE_IDENT 2 Problem with inductance identification Try recalibrating or running the `mdtool config bandwidth` command
ERROR_POLE_PAIR_CAL 3 Problem with pole pair detection routine Try recalibrating
ERROR_SETUP 4 Problem with motor config file download, or the setup parameters themselves Check the config file again and try to upload one more time

Bridge errors#

Error name Error bit Error description Action to clear it
ERROR_BRIDGE_COM 0 Communication problem with the bridge Contact MABRobotics
ERROR_BRIDGE_OC 1 The bridge detected overcurrent Lower the current limit, clear the error or restart the drives
ERROR_BRIDGE_GENERAL_FAULT 2 Usually indicates a hardware issue Contact MABRobotics

Hardware errors#

Error name Error bit Error description Action to clear it
ERROR_OVER_CURRENT 0 Overcurrent detected Lower the current limit, clear the error or restart the drive
ERROR_OVER_VOLTAGE 1 Overvoltage detected Lower the system voltage, avoid rapid braking in the system, use a modern PSU, or a LiPo battery
ERROR_UNDER_VOLTAGE 2 Undervoltage detected Ensure your power supply has enough current capability for your system
ERROR_MOTOR_TEMP 3 Motor temperature exceeded the limit set in the config file Wait for the motor to cool down
ERROR_MOSFET_TEMP 4 MDxx power side exceeded the limit of 100*C wait for the MDxx to cool down
ERROR_ADC_CURRENT_OFFSETS 5 Error during adc current offsets calibration Usually indicates a hardware error - contact MABRobotics

Comunication errors#

Error name Error bit Error description Action to clear it
WARNING_CAN_WD 30 Indicates the communication with the host was ended by the watchdog make sure candle.end() is called in your script, clear using mdtool

Motion status#

Error name Error bit Error description Action to clear it
ERROR_POSITION_OUTSIDE_LIMITS 0 Current shaft position is outside the limits from the config file Re-home the actuator, set a temporary zero to move it back into the limits, or increase the limit range, clear using mdtool
ERROR_VELOCITY_OUTSIDE_LIMITS 1 Velocity exceeded the max velocty param Ensure the velocity limit is set to a proper value, clear using mdtool
WARNING_ACCELERATION_CLIPPED 24 Acceleration command was clipped to max acceleration at least once Check acceleration limits, clear using mdtool
WARNING_TORQUE_CLIPPED 25 Torque command was clipped to max torque at least once Check torque limits, clear using mdtool
WARNING_VELOCITY_CLIPPED 26 Velocity command was clipped to max velocity at least once Check velocity limits, clear using mdtool
WARNING_POSITON_CLIPPED 27 Position command was clipped to either max or min position at least once Check position limits, clear using mdtool

The following table shows when warnings and errors are issued based on the mode the controller is currently in:

../_images/status_vs_motion_mode.png