Error 20 "Unsupported or invalid g-code command found in block. On or near line 2:"

Every time I try to engrave I get error 20.

Unsupported or invalid g-code command found in block.
On or near line 2:

Moves fine and frames fine.
using mks dlc32 board.
Any help is appreciated.

Make sure you’ve selected GRBL as the device type, rather than the more exotic choices.

It may require the DTR option:

There are apparently subtle problems depending on the controller’s GRBL version:

If fiddling around with those variables doesn’t get it running, let us know what happened.

I have tried everything I can find online and while different settings appear to fix other people’s problems, I keep getting the same error. I will check what version GRBL I have tonight.

I had no luck so have installed an older version of the firmware and it all seems to work perfectly :person_shrugging:

Is it possible you had g-code clustering enabled in Edit->Device Settings? That’s only available on certain controllers and would cause an error if had this set.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.