Hello. There. Can, please, anyone explain to me what the AXIS_STATE_CLOSED_LOOP_CONTROL does? What it is used for?and when should it be used? I run all the calibration process, encoder and motor, without errors. As soon as I execute the AXIS_STATE_CLOSED_LOOP_CONTROL suddenly the motor starts spinning and I don’t understand what is causing the motor to do that after a fresh calibration. Thanks
AXIS_STATE_CLOSED_LOOP_CONTROL is the main operational mode of the drive. You should use it when running normally.
The reason your motor spins out is because your encoder offset is incorrect. Possible reasons:
- You set pre_calibrated to true when you shouldn’t
- Your mechanical linkage has changed since calibration
- Your encoder offset calibration had issues
What if the three possible reasons you’re presenting doesn’t seem to effect the issue?
I’m having the same issue, where the motor starts spinning after issuing the odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL command. This is regardless of the control_mode/input_mode used and after investigation your mentioned possible reasons.
- The pre_calibrated parameter is set to false for both the encoder, motor and controller.anticogging.
- The mechanical linkage hasn’t changed.
- The encoder offset calibration has no issues, as the encoder.is_ready flag is set to True after performing the calibration (during either FULL_CALIBRATION_SEQUENCE or ENCODER_OFFSET_CALIBRATION).
Notice that I get not errors during dump_errors(odrv0)
Are you having this issue immediately after FULL_CALIBRATION, or only when you reboot?