grblHAL / core

grblHAL core code and master Wiki
Other
330 stars 87 forks source link

Undocumented New Realtime Commands #130

Open SRFirefox opened 2 years ago

SRFirefox commented 2 years ago

I'm working on a laser cutter overhaul and found grblHAL to be a fantastic option for replacing my 12 year old control board, but there seem to be a few new useful commands that are undocumented. The ones that I'm interested in are CMD_STOP and CMD_OPTIONAL_STOP_TOGGLE. I can presume the intended behavior from the name and a skim of the code, but I'd like to confirm the intended function of these commands before I try to implement them so I can plan for expected behavior.

If these commands allow me gracefully stop a g-code program without losing position they would greatly simplify a fairly typical use-case for lasers for when power/speeds are adjusted as one is learning a new material. In addition, I would be happy to write or update documentation as I'm working on this laser retrofit.

terjeio commented 2 years ago

CMD_STOP is similar to CMD_RESET but less harsh. Position is still lost if CMD_STOP is issued during motion, send CMD_FEED_HOLD followed by CMD_STOP when motion is ended to keep position.

CMD_OPTIONAL_STOP_TOGGLEcontrols the behaviour of M1, if on M1 causes a feed hold if off it is ignored.