gnea / grbl

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino
https://github.com/gnea/grbl/wiki
Other
4.1k stars 1.61k forks source link

Accessory state is not reported when everything is switched off #1242

Open jes opened 10 months ago

jes commented 10 months ago

If you send an M3 S1000 then you get a status report with A:S to tell the GUI that the spindle is turned on.

But if you then send M5 to turn the spindle off, there is no accessory status report, because all the accessories are turned off.

It would be better if the accessory state were reported in response to changes even if all accessories are turned off (e.g. send a A:) so that the GUI can discover that the spindle has been turned off.

jes commented 10 months ago

One workaround, if you don't have flood coolant, is to turn on flood coolant with M8 so that you then always get accessory status reports of A:F, and then when the spindle is turned on you get A:SF and when it's turned off it goes back to A:F.

jes commented 10 months ago

The same bug exists with the Pn status: Grbl will report when a pin becomes activated, but won't report when the last pin became inactive, because reporting pin state is gated behind a check of whether any pins are active.

jes commented 10 months ago

Update: I was incorrect about the pin states as they are reported on every update even if there have been no changes (so you know the probe pin is not active if you don't see any Pn report)

So this bug only exists for the accessory state.