Axis: Error(s): AxisError.MOTOR_FAILED motor: Error(s): MotorError.CURRENT_LIMIT_VIOLATION,How to solve this error?

odrv0.config.brake_resistance = 2.0
odrv0.config.dc_bus_undervoltage_trip_level = 8.0
odrv0.config.dc_bus_overvoltage_trip_level = 56.0
odrv0.config.dc_max_positive_current = 30.0
odrv0.config.dc_max_negative_current = -5.0
odrv0.config.max_regen_current = 0
odrv0.save_configuration()

odrv0.axis0.motor.config.pole_pairs = 14
odrv0.axis0.motor.config.calibration_current = 10
odrv0.axis0.motor.config.resistance_calib_max_voltage = 5
odrv0.axis0.motor.config.motor_type = MOTOR_TYPE_HIGH_CURRENT
odrv0.axis0.motor.config.current_lim = 20
odrv0.axis0.motor.config.requested_current_range = 30
odrv0.save_configuration()

编码器参数配置
odrv0.axis0.encoder.config.mode = ENCODER_MODE_INCREMENTAL
odrv0.axis0.encoder.config.cpr = 16384
odrv0.axis0.encoder.config.bandwidth = 3000
odrv0.axis0.config.calibration_lockin.current = 5
odrv0.axis0.config.calibration_lockin.ramp_time = 0.4
odrv0.axis0.config.calibration_lockin.ramp_distance = 3.1415927410125732
odrv0.axis0.config.calibration_lockin.accel = 20
odrv0.axis0.config.calibration_lockin.vel = 40
odrv0.save_configuration()

odrv0.axis0.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL
odrv0.axis0.controller.config.vel_limit = 50
odrv0.axis0.controller.config.vel_gain = 0.01
odrv0.axis0.controller.config.vel_integrator_gain = 0.005
odrv0.axis0.controller.config.input_mode =INPUT_MODE_PASSTHROUGH
odrv0.axis0.controller.config.vel_ramp_rate = 4
odrv0.save_configuration()
odrv0.reboot()

odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION
odrv0.axis0.motor.config.pre_calibrated = True

odrv0.axis0.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION
odrv0.axis0.config.startup_encoder_offset_calibration = True

odrv0.axis0.config.startup_encoder_offset_calibration = True
odrv0.axis0.config.startup_closed_loop_control = True

odrv0.save_configuration()
odrv0.reboot()

The above are my configuration parameters,There is a load on the motor, which is a round iron piece of about 0.6 kg. The following error occurred during operation. How should I solve this error? Trouble master answers。I use a magnetic incremental encoder and the motor is EA60 kv330 model。
微信截图_20240425152429

What’s current_lim_margin? You probably need your encoder bandwidth much lower for the record. Can you show how the magnetic encoder is positioned relative to the motor? Typically using INPUT_MODE_VEL_RAMP is better than PASSTHROUGH for this.

odrv0.axis0.motor.config.current_lim = 20
The motor-driven momentum wheel load will lose its normal operation at high speeds.

Can you elaborate the issue that happens?

Are you using an Eagle Power EA60?(just what it looks like from the picture) If so I am also using this motor and have been getting the same error off and on.