Background:This post captures G and M codes that are specific or that have modes or options that are specific to Laser machines.
Donate:Please consider donating (button to the right of this post).
Your donations help fund additional research, tools and parts that I will return to the community as information.
For other information on the K40-S build use the K40-S BUILD INDEX with schematics
Special K40-S Gcode formats
Adapted Gcodes for K40-S follow.
The G01 commandG01 <X Y F S>
- X- x position
- Y- Y position
- S- Laser power in decimal from 1(max) - 0(min)
Currently Unsupported LaserWeb Gcodes
G20 will be ignored and all values will be interpreted as metric. Example: 1" will render as 1mm
Mcodes (Machine options)
Laser Mode :The new "laser" mode will cause Grbl to move continuously through consecutive G1, G2, and G3 commands with spindle speed changes. When "laser" mode is disabled, Grbl will instead come to a stop to ensure a spindle comes up to speed properly. Spindle speed overrides also work with laser mode so you can tweak the laser power, if you need to during the job. Switch between "laser" mode and "normal" mode via a $ setting.
Dynamic Laser Power Scaling with Speed :
If your machine has low accelerations, Grbl will automagically scale the laser power based on how fast Grbl is traveling, so you won't have burnt corners when your CNC has to make a turn! Enabled by the M4 spindle CCW command when laser mode is enabled!