The brains of laser cutters and CNC machines, G-code controllers, have a host of settings covering speed, physical limits, directions and intensity (of a laser beam, or rotational speed of a spinning endmill). Even if you’ve bought a pre-made laser or CNC machine, you’re still likely to benefit from fine-tuning the settings for your materials or needs. And if you’re building your own laser or CNC, you’ll need to be all over controller settings.
The best case scenario is that you can adjust the settings you need in a nice user interface, without learning manual configuration via a G-code sender. An example is shown in the image below, from Lightburn software, where the Laser mode enable can be set by clicking a checkbox. Checking the box actually sends settings to your controller in the background, user friendly right ?
So why don’t all machine settings just get shown in a nice user interface ? Well, there’s quite a few settings, and not all of them are relevant to each application and every user, so designers only make interfaces for the minimum. If you need to change a setting that’s not in the user interface, you’ll need to use the command line to send $ settings to your controller.
G-code controllers normally just receive movement directions, such as go to x position 150 at full speed is G0 X150 (note there is no F or feed rate parm, it assumes the fastest feed rate e.g. the $110 value. Reduce $110 if this is too fast). So the $ symbol indicates to the controller that the instructions relate to settings, and are not an instruction to move, burn or cut anything. The command line is circled and highlighted in the image below. It’s where you can click in the space and type in settings (or even directions such as G0 X150 directly).
The command-line is available in any G-code sender software.
Useful $ settings
The $$ command reads all your machine’s current settings. It’s a great idea to get started by typing $$ and copying and pasting the results to a backup document, so you can always go back to your existing configuration if you need to. Now you’re ready to make changes !
Our experience with K40 laser is that $100=157 and $101=157 are sweet spots for x and y speed. Why not try these out ?
Another good K40 setting is to increase maximum speed. Experiment around with $111=5000 or higher. 5000 in this case means 5000mm/minute, which is equivalent to 0.08 metres per second. At some point the machine can’t keep up with the signals it receives from the controller, and it’ll skip steps if you go too high. But a higher value that doesn’t skip steps means you’ll get more speed from your machine.
If you’re building your own DIY machine, must-have $ settings are the steps/mm ($100 for X axis,101 for Y axis), the travelling direction $3 (inverts the direction: 1 is for X, 2 is for only Y and 3 is for both X and Y) and the acceleration $120 and $121.
Back to lasering – another import setting is $30, which is the power range of the laser. When your laser engraves too darkly, increase the $30 from 1000 to a higher number like 1200 etc. Trial and error probably gives you the best setting. When your engraving is too light then simply reduce your $30 setting.
Once again, if you have user-friendly software like Lightburn, many of these settings are in the user interface. It’s just good to know that you can access all settings manually in any G-code sender software if you want to.
Defaults for the Mini Gerbil
CNCjs 1.9.15 [Grbl]
Connected to COM324 with a baud rate of 115200
Grbl 1.1f [‘$’ for help]
$0=10 (Step pulse time, microseconds)
$1=255 (Step idle delay, milliseconds)
$2=0 (Step pulse invert, mask)
$3=1 (Step direction invert, mask)
$4=0 (Invert step enable pin, boolean)
$5=1 (Invert limit pins, boolean)
$6=0 (Invert probe pin, boolean)
$7=0 (ATC M6, pulse/ff , just for CNC )
$8=100 (ATC Tool Td, milliseconds just for CNC )
$9=100 (ATC M6 Td, milliseconds, just for CNC)
$10=1 (Status report options, mask, used to be 31 to show all info)
$11=0.010 (Junction deviation, millimeters)
$12=0.002 (Arc tolerance, millimeters)
$13=0 (Report in inches, boolean)
$19=0 (Softstart, milliseconds, just for CNC spindles)
$20=0 (Soft limits enable, boolean)
$21=0 (Hard limits enable, boolean)
$22=1 (Homing cycle enable, boolean)
$23=3 (Homing direction invert, mask)
$24=2000.000 (Homing locate feed rate, mm/min)
$25=2000.000 (Homing search seek rate, mm/min)
$26=250 (Homing switch debounce delay, milliseconds)
$27=4.0 for mechanical or 2.500 for electronic switches (Homing switch pull-off distance, millimeters)
$28=5 (Spindle freq. 0 to 15) – 5 = 1.5kHz
$30=1000 (Maximum spindle speed, RPM)
$31=1 (Minimum spindle speed, RPM)
$32=1 (Laser-mode enable, boolean)
$100=157.000 (X-axis travel resolution, step/mm)
$101=157.000 (Y-axis travel resolution, step/mm)
$102=160.000 (Z-axis travel resolution, step/mm)
$110=12000.000 (X-axis maximum rate, mm/min)
(x:mm/min) (reduce this if default travel or G0 X0 Y0 is too fast)
$111=5000.000 (Y-axis maximum rate, mm/min)
$112=5000.000 (Z-axis maximum rate, mm/min)
$120=8000.000 (X-axis acceleration, mm/sec^2)
$121=3000.000 (Y-axis acceleration, mm/sec^2)
$122=3000.000 (Z-axis acceleration, mm/sec^2)
$130=320.000 (X-axis maximum travel, millimeters)
$131=230.000 (Y-axis maximum travel, millimeters)
$132=200.000 (Z-axis maximum travel, millimeters)
$133=200.000 (a:mm max)
$134=200.000 (b:mm max)
You can look up G-code reference websites to see settings for potential tweaking.
NOTE: $10 needs to be set to 1 (default used to be 31 but it seems not to be supported in LightBurn anymore)
Enjoy experimenting, and if you have not used LightBurn why not download a trial version to use with your Mini Gerbil G-code controller for lasers. You don’t have a Mini Gerbil? Okay head over to our purchase page…