Thanks, PCW.
This is the encoder part of my .hal-file:
Code:
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.scale [SPINDLE]ENCODER_SCALE
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.counter-mode 0
# see 'man hostmot2' for descriptions
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask 0
net spindle-position hm2_[HOSTMOT2](BOARD).0.encoder.00.position => motion.spindle-revs
net spindle-raw-velocity hm2_[HOSTMOT2](BOARD).0.encoder.00.velocity => motion.spindle-speed-in lowpass.0.in
net spindle-velocity lowpass.0.out
net spindle-index-enable hm2_[HOSTMOT2](BOARD).0.encoder.00.index-enable <=> motion.spindle-index-enable
# note: gpio pins only read at servo thread frequency
# these nodes are only for driving diagnostic "LEDs" in the UI
# this is only going to be useful when the spindle is rotated by hand slowly
net spindle-phase-A hm2_[HOSTMOT2](BOARD).0.gpio.016.in
net spindle-phase-B hm2_[HOSTMOT2](BOARD).0.gpio.015.in
net spindle-phase-Z hm2_[HOSTMOT2](BOARD).0.gpio.014.in_not
net spindle-encoder-count hm2_[HOSTMOT2](BOARD).0.encoder.00.count
So I guess I would need to sets spindle-index-enable? Or would it be motion.spindle-index-enable?
I tried halcmd in a terminal, but the command was unknown. I found it in operator/tmc/bin. When I tried ./halcmd on spindle-index-enable, it complained about needing 2 arguments, while only 1 was given. Tried with "./halcmd sets spindle-index-enable 1", which worked, and when I checked both in halshow, they were both high and turned low after I had rotated the spindle some.
Any idea what to check next?
Br,
Stig