I am trying to use z pin of the encoders for that I am requesting state = AXIS_STATE_ENCODER_INDEX_SEARCH after the calibration of motors. But nothing happened. I am getting no error bits. Also , one problem I have noticed that the variable index_found becomes true as soon as I started O drive even the z pin is low.
These are the config settings I have used
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)
step_gpio_pin = 7 (int)
dir_gpio_pin = 8 (int)
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)
encoder:
error = 0x0000 (int)
is_ready = False (bool)
index_found = True (bool)
interpolation = 0.5 (float)
phase = -0.2883787155151367 (float)
pos_estimate = 0.0 (float)
pos_cpr = 0.0 (float)
hall_state = 6 (int)
vel_estimate = 0.0 (float)
The state requested is
odrv0.axis1.requested_state= AXIS_STATE_ENCODER_INDEX_SEARCH
Problem : Nothing happened after this command .
Hope for a quick reply @madcowswe sir.