Sensor-less start up

Hello all,

I am trying to set up an odrive 270KV to be sensorless and I keep encountering the same error of invalid axis state,

This is the code I am inputting

odrv0.axis0.controller.config.vel_gain = 0.01
odrv0.axis0.controller.config.vel_integrator_gain = 0.05
odrv0.axis0.controller.config.control_mode = 2
odrv0.axis0.controller.vel_setpoint = 1000
odrv0.axis0.motor.config.direction = 1
odrv0.axis0.sensorless_estimator.config.pm_flux_linkage = .002
odrv0.axis0.requested_state = AXIS_STATE_SENSORLESS_CONTROL

Can anyone help?

Thanks!!!

I think you have to run the motor calibration to get the resistance and inductance values

AXIS_STATE_MOTOR_CALIBRATION

Sorry for the late reply,

This worked.

Thank you