I am not able to control the motor and set
odrv0.axis0.controller.vel_setpoint = 120
or any number
this is not working
I am using the AMT102-W encoder, and the calibration sequence seems to be passing with the beep sound
there is an error, please help with the text for this error, where can I find the error text?
In [2]: odrv0.axis0.error
Out[2]: 256
I have a 56V Odrive version 3.6 and I am trying to control the D6374 Odrive motor, there is no documentation on how to use this, I wish there were examples
I have saved the configuration to use
Configure motor
odrv0.axis0.motor.config.current_lim = 15
odrv0.axis0.motor.config.pole_pairs = 7
odrv0.axis0.motor.config.motor_type = MOTOR_TYPE_HIGH_CURRENT
Brake resistance
odrv0.config.brake_resistance = 2 # Ohms
Encoder
odrv0.axis0.encoder.config.cpr = 4096
odrv0.axis0.encoder.config.use_index = Tru
odrv0.axis0.encoder.config.calib_range = 0.1
Controller configuration
axis = odrv0.axis0
axis.controller.config.vel_limit = 170667
axis.controller.config.control_mode = CTRL_MODE_VELOCITY_CONTROL
axis.controller.config.pos_gain = 0.0
axis.controller.config.vel_gain = 0.0015
axis.controller.config.vel_ramp_rate = 0
axis.controller.config.vel_integrator_gain = 0.00
axis.controller.config.setpoints_in_cpr = True
axis.controller.vel_ramp_enable = False
Set needed startup procedures to true
axis.config.startup_motor_calibration = True
axis.config.startup_encoder_index_search = True
axis.config.startup_encoder_offset_calibration = True
axis.config.startup_closed_loop_control = True
axis.config.startup_sensorless_control = False
odrv0.save_configuration()
for some reason it says the encoder is not ready ??? I don’t understand why?
odrv0.axis0.encoder.is_ready
Out[6]: False
odrv0.axis0.encoder
Out[22]:
error = 0x0002 (int)
is_ready = False (bool)
index_found = True (bool)
shadow_count = 29692 (int)
count_in_cpr = 1020 (int)
interpolation = 0.5 (float)
phase = 0.9530782699584961 (float)
pos_estimate = 29692.75 (float)
pos_cpr = 1020.75048828125 (float)
hall_state = 0 (int)
vel_estimate = 0.0 (float)
calib_scan_response = 9348.0 (float)
config:
mode = 0 (int)
use_index = True (bool)
find_idx_on_lockin_only = False (bool)
pre_calibrated = False (bool)
zero_count_on_find_idx = True (bool)
cpr = 4096 (int)
offset = 5027 (int)
offset_float = 0.7411249876022339 (float)
enable_phase_interpolation = True (bool)
bandwidth = 1000.0 (float)
calib_range = 0.10000000149011612 (float)
calib_scan_distance = 50.26548385620117 (float)
calib_scan_omega = 12.566370964050293 (float)
idx_search_unidirectional = False (bool)
ignore_illegal_hall_state = False (bool)
set_linear_count(count: int)