Please sign in to comment.
Stop spindle on HALT
When a machine enters a `HALT` state for any reason, the spindle should stop for safety along with everything else. This commit changes the default behavior to `turn_off` the spindle `on_halt`. I added an optional `spindle.ignore_on_halt` config parameter that defaults to `false` in case anyone needs the previous less-safe behavior. I believe this addresses #1069. I confirmed functionality on `PWMSpindleControl` via `M957` as well as a physical scope while causing `HALT` via `M112` or `^X` over the serial interface. I found some weirdness in `AnalogSpindleControl` around `report_speed`, but I'll address that in another PR. I did confirm that `turn_off` is being called `on_halt` as it should be and the PWM duty cycle is reduced to 0 even though `M957` (`report_speed`) continues to report that the spindle is moving. Without having the equipment for the other side of the RS485 connection, I can't do much to test `ModbusSpindleContol`, but `HuanyangSpindleControl`, the only supported Modbus VFD right now, implements `turn_off`, so I don't see any reason it shouldn't work fine with this change.
- Loading branch information...
Showing with 22 additions and 0 deletions.