I apologize if it is already documented somewhere but. If you can, how do you save the startup calibration (rotating one direction, then the other) so it doesn’t do it each time?
Also, does anyone have any idea why the startup calibration will turn one way sometimes and the other way other times? Everything is hard wired in so the cables haven’t changed. Sometimes the direction it turns to locate the index mark changes too seems a bit odd…
Not sure if this helps but here are the config settings:
In [5]: odrv0.axis0
Out[5]:
error = 0x0000 (int)
enable_step_dir = False (bool)
current_state = 8 (int)
requested_state = 0 (int)
loop_counter = 3574902 (int)
config:
startup_motor_calibration = False (bool)
startup_encoder_index_search = True (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)
get_temp()
motor:
error = 0x0000 (int)
armed_state = 3 (int)
is_calibrated = True (bool)
current_meas_phB = -0.10100078582763672 (float)
current_meas_phC = -0.1333787441253662 (float)
DC_calib_phB = -2.276343584060669 (float)
DC_calib_phC = -1.5992008447647095 (float)
phase_current_rev_gain = 0.02500000037252903 (float)
current_control: ...
gate_driver: ...
timing_log: ...
config: ...
controller:
pos_setpoint = -4200.0 (float)
vel_setpoint = 0.0 (float)
vel_integrator_current = -0.027316205203533173 (float)
current_setpoint = 0.0 (float)
config: ...
set_pos_setpoint(pos_setpoint: float, vel_feed_forward: float, current_feed_forward: float)
set_vel_setpoint(vel_setpoint: float, current_feed_forward: float)
set_current_setpoint(current_setpoint: float)
move_to_pos(goal_point: float)
start_anticogging_calibration()
encoder:
error = 0x0000 (int)
is_ready = True (bool)
index_found = True (bool)
shadow_count = -4201 (int)
count_in_cpr = 3991 (int)
interpolation = 0.5 (float)
phase = 2.667912244796753 (float)
pos_estimate = -4200.8828125 (float)
pos_cpr = 3991.23046875 (float)
hall_state = 2 (int)
vel_estimate = 0.0 (float)
config: ...
sensorless_estimator:
error = 0x0000 (int)
phase = 2.2241086959838867 (float)
pll_pos = 2.2200675010681152 (float)
vel_estimate = -9.548842430114746 (float)
config: ...
trap_traj:
config: ...