Huanyang Spindle Driver Rewrite Test plan

Test cases

Normal cases

  • Clockwise start/stop: S8000 M3 [pause] M5
  • spindle should start to 8000rpm, and stop when requested
  • Counter-clockwise start/stop: S8000 M4 [pause] M5
  • spindle should start to 8000rpm CCW, and stop when requested
  • Speed change: M3 S8000 [pause] S12000 M5
  • spindle should start to 8000rpm, then change to 12000rpm
  • Door while running: S8000 M3 [open door] [close door]
  • spindle should start to 8000rpm, then stop when door is opened, and stay stopped when door is closed
  • Restart after door/cycle-start: S8000 M3 [open door] [close door] ~
  • spindle should start to 8000rpm , stop when door is opened, and resume to 8000rpm when cycle-start is issued
  • No restart if disabled during door/suspend: S8000 M3 [open door] [close door] M5 ~
  • spindle should start to 8000rpm , stop when door is opened, and stay stopped even when cycle-start is issued
  • TODO: some test cases around spindle overrides (speed and state)

Edge cases

  • Start spindle, press STOP on VFD - should alarm
  • M3, X100, press STOP on VFD - should alarm and kill motion
  • Start spindle, disconnect RS485 - should alarm (spindle will keep running)
  • now reconnect RS485 - spindle should stop as comms are reestablished
  • Turn on ESP with VFD off; should not alarm
  • now send M3 - should alarm since comms are not healthy