Skip to content

Warning

MillMage is in active development and in a prerelease state. Many operations and functions are not feature complete. Please report any unexpected behavior by searching for and reporting the issue or question in the MillMage Beta User Forum. Please include screenshots and as much detail as possible.

Beta Users: Finding Help

Find help and download the latest release candidate of MillMage in the MillMage Beta User Forum.

Users new to MillMage should follow the Getting Started guide.

Warning

This documentation is in active development and in a prerelease state. These documents are not complete and may include missing pages, broken links, and placeholders. Content is being updated as feedback is reviewed. Your patience is appreciated.

Custom GCode

The Custom GCode tab of Device Settings allows for advanced GCode customization when using the Custom GCode device type.

The Custom GCode tab of Device Settings

Custom GCode Options

In this section, you can set some baseline options for your custom GCode profile. Some options are only available in LightBurn and others are only available in MillMage.

Name Description
Dwell Units Whether pause times are given in seconds or milliseconds
Comment Characters What character(s) are used to indicate comments
Suppress Comments Enabling this will strip all comments from the GCode MillMage generates
Verbose Output Check this box to output all modal GCode states such as G0/G1
Save File Extension Custom or default file extension to use when saving GCode files
Output Tool Change Enable if your machine supports tool change options, including manual changes
Has Automatic Tool Changer Enable if your machine supports automatic tool changes
Has Tool Length Proble Enable if your machine has a tool length probe and corresponding GCode should be emitted after a tool change
Spindle Manual Start / Stop Enable if your spindle is not controlled by the device and must be turned on and off manually
Stop Vacuum Enable to emit GCode to turn off vacuum when cancelling/stopping a job
Stop Coolant Enable to emit GCode to turn off coolant when cancelling/stopping a job

GCode Commands

This section lists each command that can be customized. Leaving a command blank will leave it unchanged from the default based on your Custom GCode Options.

  • The title indicates what command you're working with.
  • The text box contains the default value in gray text, if there is a default. If there is no default value, the text box is blank.
  • Below the text box is a preview of what the output for the command would look like, based on current settings.

Hover over a section for more detailed information. For information on variables to use in the commands, see Custom GCode Variables.

Custom GCode Variables

These variables can be used in your GCode templates.

Variable Description
x X Axis position
y Y Axis position
z Z Axis position
r, a, u, rot, rotation Rotary axis position
x_probe X probe offset
y_probe Y probe offset
z_probe Z probe offset
s, speed Movement speed
feed, feedrate Movement speed
rpms, spindlespeed Spindle speed or RPM/s
dwell Dwell time
tool Tool number

Custom GCode Macros

Relative and absolute mode are controlled by the software, so if you need to change it within your GCode template, use the following macros to prevent the software overriding your changes. You must always use |RESTORE| when you're done to ensure a return to the previous mode.

Macro Description
|REL| Enter relative mode
|ABS| Enter absolute mode
|RESTORE| Restore previous mode

Optional and Required Values

Surrounding the letter before a variable with [] will tell MillMage that this portion of the command has not changed since the last emit. Putting a * in front of any variable will tell MillMage to skip the entire line if it has not been changed.

  • G1 X{x} Y{y} Z{z} will always output the X, Y, and Z values.
  • G1 [X]{x} [Y]{y} [Z]{z} will skip any values that have not changed.
  • M106 S{*power} this will output the M106 command only if it has been changed.

Non-Printable / Non-Typeable Characters

Control characters can be output by using \x followed by the two digit hex value of the character. For instance, \x18 represents an immediate job abort on a GRBL device.

Troubleshooting

  • If you aren't seeing a setting you expected to see, check which tab you're in and make sure it's applicable to your laser.

For more help using MillMage, please visit our forum to talk with MillMage staff and users, or email support.