Site Navigation

Your Account

Choose Language

Setting up macro files for common tasks

Overview ¶ 

You can use macro files to automate common tasks. A macro file is simply a text file on the SD card containing a sequence of GCode commands.

If you want a macro file to appear in the list of macros shown by Duet Web Control and PanelDue, put it in the /macros folder of the SD card. If you don't want a macro to appear in the user interface, you can put it in the /sys folder. This folder already contains macros that are run automatically when certain events occur, for example the homing macros and the pause and resume macros.

The SD card shipped with your Duet may already contain some files with UPPER_CASE names in /macros. These are used by the factory for testing new Duets. You may delete them.

Creating macros ¶ 

You can create macros easily in Duet Web Control. To create a new macro file in the /macros folder, go to the '''Macros''' page of Duet Web Control and click on Make new. To create a new macro file in the /sys folder, go to the Settings page, then the System Editor tab, and click on New File.

Naming and ordering macros ¶ 

The name of a macro file in the /macros folder should be the text that you want to appear in the macro lists shown by Duet Web Control and PanelDue. You do not need a ".g" extension at the end.

By default the macros are listed in alphabetical order. You can change this by prefixing the macro names with one or more decimal digits followed by an underscore, for example:


2_Half On


The full filename will be used when the macros are sorted to display them in order, but only the text after the underscore will be displayed on the button. So the above will display as:


Half On


Note: versions of PanelDue prior to 1.20beta2 do not implement this feature.


Add Comment

View Statistics:

Past 24 Hours: 5

Past 7 Days: 26

Past 30 Days: 136

All Time: 270