Air Assist giving Error 3 (command not recognized) or Error 20 (invalid code)

I’m using GRBL 1.1f to control my K40 and I’m looking into controlling a relay so I can have my air assist only turn on when needed. But when I switch it on (M7) it gives an error (3) that it doesn’t recognize it. M8 gives an error 20, which is worse. Is there something I need to configure in GRBL to get it to work?

Error 3 makes no sense - It’s not a $ or system command. Error 20 is more expected, as that’s “unrecognized GCode” which is normal for M7 (mist) because that’s disabled by default, but M8 (flood) is enabled by default, so I’m not sure why that would give you an error. Do these errors happen when you type the M commands in the console? It’s not a configuration option, it’s compile time when the code is built, but as I said, M8 is enabled by default. Where did your version of GRBL come from?

I got my GRBL from the GRBL GitHub. My controller is the 3-axis SainSmart v1.1 CNC/Laser Controller, if that matters. I can’t speak as to what errors I’m supposed to get, all I can tell you are the errors I get back from the controller. I won’t be able to let you know about the console as I won’t get back to the makerspace until Tuesday, at the earliest. I’ll let you know when I’m able to check.