I purchased 2 odrive boards and 4 D6374 motors, and 4 CUI AMT102 encoders. We attached the encoders to our motors using a mount we designed. The odrive will successfully execute AXIS_STATE_FULL_CALIBRATION_SEQUENCE without an error. I then set odrv0.axis0.encoder.config.pre_calibrated = True and odrv0.axis0.motor.config.pre_calibrated = True, saved the configuration then rebooted. When the odrive is moved to AXIS_STATE_CLOSED_LOOP_CONTROL the odrv0.axis0.error = 0x01. Ive tried this sequence a number of times swapping out each piece of hardware (since I purchased multiple sets) with no resolution (making sure I erase the configuration and reboot at every swap). Needless to say I would think the should have been very easy since the controller and the motor come from odrive.
This the results:
odrv0.axis0.motor returns:
error = 0x0000 (int)
armed_state = 0 (int)
is_calibrated = True (bool)
current_meas_phB = -0.013124942779541016 (float)
current_meas_phC = 0.08837532997131348 (float)
DC_calib_phB = -1.839632272720337 (float)
DC_calib_phC = -2.2229766845703125 (float)
phase_current_rev_gain = 0.02500000037252903 (float)
current_control:
p_gain = 0.022648924961686134 (float)
i_gain = 31.99142074584961 (float)
v_current_control_integral_d = 0.0 (float)
v_current_control_integral_q = 0.0 (float)
Ibus = 0.0 (float)
final_v_alpha = 0.0 (float)
final_v_beta = 0.0 (float)
Iq_setpoint = 0.0 (float)
Iq_measured = 0.0 (float)
max_allowed_current = 71.99999237060547 (float)
gate_driver:
drv_fault = 0 (int)
timing_log:
TIMING_LOG_GENERAL = 0 (int)
TIMING_LOG_ADC_CB_I = 1263 (int)
TIMING_LOG_ADC_CB_DC = 11189 (int)
TIMING_LOG_MEAS_R = 0 (int)
TIMING_LOG_MEAS_L = 0 (int)
TIMING_LOG_ENC_CALIB = 0 (int)
TIMING_LOG_IDX_SEARCH = 0 (int)
TIMING_LOG_FOC_VOLTAGE = 0 (int)
TIMING_LOG_FOC_CURRENT = 0 (int)
config:
pre_calibrated = True (bool)
pole_pairs = 7 (int)
calibration_current = 10.0 (float)
resistance_calib_max_voltage = 1.0 (float)
phase_inductance = 2.2648924641544e-05 (float)
phase_resistance = 0.031991422176361084 (float)
direction = 1 (int)
motor_type = 0 (int)
current_lim = 70.0 (float)
requested_current_range = 70.0 (float)
current_control_bandwidth = 1000.0 (float)
set_current_control_bandwidth(current_control_bandwidth: float)
odrv0.axis0.encoder returns:
error = 0x0000 (int)
is_ready = False (bool)
index_found = False (bool)
shadow_count = 3 (int)
count_in_cpr = 3 (int)
interpolation = 0.5 (float)
phase = 0.6743001937866211 (float)
pos_estimate = 3.9967904090881348 (float)
pll_vel = 0.0 (float)
pos_cpr = 3.765063762664795 (float)
hall_state = 3 (int)
vel_estimate = 0.0 (float)
config:
mode = 0 (int)
use_index = False (bool)
pre_calibrated = True (bool)
idx_search_speed = 10.0 (float)
cpr = 8192 (int)
offset = 4558 (int)
offset_float = 1.049887776374817 (float)
bandwidth = 1000.0 (float)
calib_range = 0.019999999552965164 (float)
odrv0.axis0.controller returns:
pos_setpoint = 0.0 (float)
vel_setpoint = 0.0 (float)
vel_integrator_current = 0.0 (float)
current_setpoint = 0.0 (float)
config:
control_mode = 2 (int)
pos_gain = 20.0 (float)
vel_gain = 0.0005000000237487257 (float)
vel_integrator_gain = 0.0010000000474974513 (float)
vel_limit = 20000.0 (float)
set_pos_setpoint(pos_setpoint: float, vel_feed_forward: float, current_feed_forward: float)
ctrl_reset()
set_vel_setpoint(vel_setpoint: float, current_feed_forward: float)
set_current_setpoint(current_setpoint: float)
start_anticogging_calibration()
finally, just the axis part from odrv0.axis0:
error = 0x0001 (int)
enable_step_dir = False (bool)
current_state = 1 (int)
requested_state = 0 (int)
loop_counter = 1263250 (int)
config:
startup_motor_calibration = False (bool)
startup_encoder_index_search = False (bool)
startup_encoder_offset_calibration = False (bool)
startup_closed_loop_control = False (bool)
startup_sensorless_control = False (bool)
enable_step_dir = False (bool)
counts_per_step = 2.0 (float)
ramp_up_time = 0.4000000059604645 (float)
ramp_up_distance = 12.566370964050293 (float)
spin_up_current = 10.0 (float)
spin_up_acceleration = 400.0 (float)
spin_up_target_vel = 400.0 (float)