SD Card Structure

One of the first steps of setting up your printer is getting access to and understanding the files stored on the microSD card. This guide will cover the basic structure of the files on the SD card. Follow the Accessing Your SD Card guide for more assistance on how to get to the files located on the microSD card.

File Structure

On the microSD card there are four different folders: gcodes, macros, sys and www. These folders contain all the information the Duet board needs to operate properly. Below is a list of the folders and their purpose.

  • gcodes: This folder contains .gcode files that can be run by the Duet. If you upload print files through the Duet Web Console or via a microSD card they should be placed in this folder.

  • macros: Any macro files that you create should be located in this folder. Macros are .gcode files that can be executed to perform a repetetive task more quickly.

  • sys: Configuration files of the printer. Contains important .gcode files such as config.g which are executed on startup. You will need to change files in this folder regularly.

  • www: Holds all files necessary for the operation of the Duet Web Console. It is recommended not to mess with the files here unless you are familiar with web development.

Sys Organization

As mentioned before, the sys/ folder contains all sorts of system files. The most important file is config.g. This file is executed on the start-up of the Duet Maestro board in order to configure the Promega settings. If you wanted to add a command to the start-up sequence, you should insert it in config.g. In the sys/ folder you will also notice a handful of other files with the machine prefix. These files are called from config.g with the M98 command and they represent part of the start-up sequence. The sys/ folder is structured to indicate which files are recommended to be changed and which are not.

Machine Files

Below is a list of files with the machine prefix. This prefix indicates that they should be opened and can be changed to your preferences.

  • A Instructions.txt: This file contains a further explanation and instructions of the files on the SD card.

  • machine_access.g: This file contains G-code commands to properly setup the network settings. Open and change this file in order to allow the Duet Maestro to connect to your local network. Follow the Network Setup guide in order to setup your network.

  • machine_axisdimensions.g: This file contains G-code commands to initialize the minimum and the maximum values of the coordinate axes. Change the values in this file in order to allow your gantry to move to the absolute limits of your buildspace. Use caution when changing the axes limits.

  • machine_axissteps.g: The axis steps per millimeter for the stepper motors are placed here. Changing these values should not be necessary as they are already properly configured.

  • machine_bedmesh.g: This file initializes the bed leveling mesh.

  • machine_extruderstep.g: Configure your extruder steps per millimeter here.

  • machine_maxtemp.g: Change the maximum temperature of your extruder in this file.

  • machine_steppercurrent.g: The stepper motor current is configured here. Changing stepper motor current is not without risk, riasing the current too high can cause damage to the stepper motors and the printer.

  • machine_stepperspeed.g: Contains the maximum speed, acceleration and jerk settings of the printer.

  • machine_zendstop.g: Change the offset of the Z-endstop on the bottom printer. This file must be manually configured for each printer depending on the printers configuration.

  • machine_zprobe.g: Change the Z-probe settings here. This file allows you to select the IR or limit switch probe and configure the offsets of the probes.

Other Files

In the sys folder you will find many other files which handle other important aspects of the printer. Observe the list below for an explanation of the different files.

  • config.g: This file is called upon the boot-up of the Duet board. Place G-code commands here in order for them to be executed on start-up. This file calls multiple machine files listed above with the M98 command.

  • homex.g, homey.g, homez.g and homeall.g: These files operate the homing procedure. Follow Homing the Printer for more help on homing the printer, and Adjusting Homing Macros in order to adjust the homing macros.