When I look at HAL configuration there are four pins associated with Stepperspindle: index-enable, rawcounts, spindle-revs, time.
I'm running the lathe motor with the following in the ini file:
MOTOR_SCALE 3200 // stepper takes 3200 steps per revolution
STEP_SCALE 1600 // lathe spindle has a 2:1 relationship with the motor, stepper revolves once, lathe spindle revolves twice.
I wondered how this might gel with:
setp stepperspindle.0.steps-per-rev 1600
Which went in HAL file per the original instructions, it seems correct- but how could I be so lucky?
Got the motor running and watched the first 3 pins.
Results:
index-enable=nothing
rawcounts=count is going but with a minus sign in front of it
spindle-revs=count is going but with a minus sign in front of it
I can "correct" the minus on spindle revs by changing the HAL entry to:
setp stepperspindle.0.steps-per-rev -1600, which feels wrong somehow because the originals in the ini file are both positive and produce counterclockwise rotation with M4
rawcounts seems less trivial to fix
from the comp file:
.......signed steps-per-rev = 100 "stepper steps per rev / per index";
If that means what I think it means it will produce indexes far more frequently than I was expecting?