Problem in homing with index
The HAL and INI file configuration is as follows.
I expect that when the a-axis reaches the homing switch, it will move in the opposite direction, and as soon as it receives the z-pulse, it will immediately stop the axis and consider that position to be zero, but after receiving the z-pulse, a relatively large extra movement It is done at maximum speed in the opposite direction.
Does anyone know how to fix this problem?
Code:
#STEPGEN - A-AXIS
########################################################################
# - Setup of timings
setp 5A-75B:V8.2.stepgen.03.position-scale [JOINT_3]SCALE
setp 5A-75B:V8.2.stepgen.03.steplen 5000
setp 5A-75B:V8.2.stepgen.03.stepspace 5000
setp 5A-75B:V8.2.stepgen.03.dir-hold-time 10000
setp 5A-75B:V8.2.stepgen.03.dir-setup-time 10000
setp 5A-75B:V8.2.stepgen.03.max-velocity [JOINT_2]MAX_VELOCITY
setp 5A-75B:V8.2.stepgen.03.max-acceleration [JOINT_2]STEPGEN_MAXACCEL
# setp 5A-75B:V8.2.stepgen.00.debug 1
# - Connect velocity command
net apos_cmd joint.3.motor-pos-cmd => 5A-75B:V8.2.stepgen.03.position-cmd
net apos_fb joint.3.motor-pos-fb <= 5A-75B:V8.2.encoder.03.position
# - enable the drive
net aenable joint.3.amp-enable-out => 5A-75B:V8.2.stepgen.03.enable
#HOME
net a-index-inable 5A-75B:V8.2.encoder.03.index-enable
net a-index-inable joint.3.index-enable
net home-a <= 5A-75B:V8.2.gpio.j16:6.in-not
net home-a => joint.3.home-sw-in
#ENCODER
setp 5A-75B:V8.2.encoder.03.position-scale [JOINT_3]SCALE
setp 5A-75B:V8.2.encoder.03.x4-mode 1
################################################################################################
#*** AXIS_A *******************************
[AXIS_A]
MAX_VELOCITY = 1.9
MAX_ACCELERATION = 9
MIN_LIMIT = -1
MAX_LIMIT = 500.0
[JOINT_3]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -1
MAX_LIMIT = 500.0
MAX_VELOCITY = 1.9
MAX_ACCELERATION = 5
STEPGEN_MAXACCEL = 10
SCALE = 50000
FERROR = 100
MIN_FERROR = 100
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 1
HOME_LATCH_VEL = -0.1
HOME_USE_INDEX = YES
VOLATILE_HOME = 1
#HOME_NO_ENCODER_RESET = YES
HOME_SEQUENCE = 1