CLOSED_LOOP_CONTROL, motor no response

Hi, I have some problem on Odrive Close-loop comment:
I use Odrive(3.6 24V), AS5047P (SPI mode) to drive a motor and read encoder numbers. After following the getting started step. I do
odrv0.axis1.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
the motor no response, the I check the error(as follows) and then set it to True:
axis: Error(s):
AXIS_ERROR_CONTROLLER_FAILED
motor: Error(s):
MOTOR_ERROR_CONTROL_DEADLINE_MISSED
controller: Error(s):
CONTROLLER_ERROR_OVERSPEED
Then I run the order again:
odrv0.axis1.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
there have error as follows, I cannot set it to true:
axis: Error(s):
AXIS_ERROR_ENCODER_FAILED
encoder: Error(s):
ENCODER_ERROR_ABS_SPI_COM_FAIL

For the first one, you need to change controller.config.vel_limit.

For the second one, you probably need to ensure your electrical noise level is as low as possible. Use ferrite rings, shielded cable, and / or differential communication between the encoder and the ODrive.

Hi, thank you for you help, The problem is solved. but there have new problem:
every time I close loop , the motor rotate suddenly, there have an error motor:
ERROR_CURRENT_LIMIT_VIOLATION I increase the curremt_limit , but it does not work. if I do full calibration, there have no this problem.

Hmm… I’m not sure about that one, did you find a way to fix it?

Hi, yes. I adjust the current_limit to a bigger value, then it works.
Thank you for your help.

1 Like

I also set the encoder.config.use_index to false.

1 Like