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.
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 Crane settings. If you wanted to add a command to the start-up sequence, you should insert it in config.g. If you take a look at the config.g file you will see the following:
; Configuration file for Duet Maestro (firmware version 2.02RC2 or newer); executed by the firmware on start-up; Created by PrintM3D; for the Crane Bowden;M98 Pgeneral.g ; Call General Configuration ModuleM98 Pnetwork.g ; Call Network ModuleM98 Pmotion.g ; Call Kinematics/Motor ModuleM98 Pthermal.g ; Call Heater/Fan/Sensing ModuleM98 Ptools.g ; Call Toolhead Module
; general.g; Created by PrintM3D; for the Crane Bowden;; The file sets initial movement phases and sets compatibility to RRFW.;; Logging Settings;;M929 P"eventlog.txt" S1 ; Uncomment This Line to Enable Event Logging;; General preferencesG90 ; Send absolute coordinates...M83 ; Set relative extruder movesM555 P1 ; Set firmware compatibility Mode to RRFWM501
; Network Settings for Duet Maestro;; For Crane Bowden; by PrintM3D;; Machine name and PasswordM550 PCraneBowden ; Set machine nameM551 Pconductor ; Set password; Ethernet ConfigurationM552 P0.0.0.0 S1 ; Enable Network and use Automatic DHCP;M553 P0.0.0.0 ; If necessary, set this to your netmask.;M554 P0.0.0.0 ; If necessary, set your network gateway.; Enable/Disable ServicesM586 P0 S1 ; Enable HTTPM586 P1 S1 ; Enable FTPM586 P2 S0 ; Disable Telnet
; motion.g; Created by PrintM3D; for the Crane Bowden;; This file declares drive kinematics, axis limits, and endstop settings.; DrivesM569 P0 S1 D3 V0 ; Drive 0 goes forwardsM569 P1 S0 D3 V0 ; Drive 1 goes backwardsM569 P2 S0 D3 V0 ; Drive 2 goes backwardsM569 P3 S1 D3 V0 ; Drive 3 goes forwardsM350 X32 Y32 Z16 E16 I1 ; Set MicrosteppingM92 X160 Y160 Z400 E96 ; Set steps per mmM566 X900 Y900 Z90 E240 ; Set Maximum Jerk (mm/min)M203 X9000 Y9000 Z1200 E12000 ; Set maximum speeds (mm/min)M201 X1200 Y1200 Z90 E120 ; Set accelerations (mm/s^2)M906 X1000 Y1000 Z1000 E1100 I30 ; Set motor currents (mA) and idleM84 S60 ; Set idle timeout; Axis LimitsM208 X0 Y0 Z0 S1 ; Set axis minimaM208 X230 Y230 Z250 S0 ; Set axis maxima; EndstopsM574 X1 Y1 Z1 S1 ; Set active high endstops
; thermal.g; Created by PrintM3D; for the Crane Bowden;; This file declares heater and fan settings.; HeatersM305 P0 T100000 B4006 ; Thermistor Config for NTC 100kM143 H0 S120 ; Set temperature limit for heater 0 to 120CM305 P1 T100000 B4006 ; Thermistor Config for NTC 100kM143 H1 S265 ; Set temperature limit for heater 1 to 265C; Fans; For Crane Bowden: F0 is Heatsink Fan, F1 is Part Cooling fans, F2 is Case FanM106 P0 T45 H1 F50 ; Set Heatsink Fan F0 to ThermostaticM106 P1 H-1 F50 ; Set Part Cooler Fans F1 to Gcode ControlM106 P2 S0.8 F50 ; Set case fan always on at 80%
; tools.g; Created by PrintM3D; for the Crane Bowden;; This file declares tools, bed leveling, and flags settings for override.M563 P1 D0 H1 ; Define tool 0G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsetsG10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C; Manual Bed LevelingM558 P0T0
Sets coordinates to absolute relative to the origin of the machine.
Sets extrusion values as relative positions.
Sets firmware so as it's input and output is similar to other established firmware. In this case the P argument is 1, for RepRap_firmware.
This allows the stored parameters to be loaded at startup. It can also revert parameters to stored values after experimenting with them.
This sets your Machine's Name.
This sets your Machine's Password.
Sets the IP address as well as enable/disables the network interface and allows Automatic for Dynamic Host Configuration Protocol.
This will set up your netmask.
This will set your network gateway.
Enables Hyper Text Transfer Protocol.
Enables File Transfer Protocol.
This Disables Telnet, or the network protocol that allows a user on one computer to log onto another computer that is part of the same network.
This will set the motor driver direction, enable polarity and step pulse timing. For in depth explanations of the P, S, D, and V values click Here.
This sets your micro-stepping mode, X, Y, and Z represent the axis, E is the extruder, and I is the micro-step interpolation mode for the specified drivers.
This sets axis steps per unit, allowing programming of steps per mm for motor drives.
This sets the allowable instantaneous speed change, or "max Jerk" of each motor when changing direction.
This will set the maximum feed-rates that your machine can do in mm/min.
This sets the max acceleration that axes can do in mm/second^2 for print moves.
This will set the motor currents. Here X, Y, Z, and E, are the drive motor current and I is the motor current idle factor.
This will set the number of seconds of inactivity allowed before the stepper motors will go into idle mode.
This will set the minimum limits for axis travel.
This will set the max limits for axis travel, these limits when set, are also the assumed positions when an endstop is triggered.
This allows for Endstop configuration, which will define the type of endstop the printer has for each axis. 1=low end, 2=high end and the S parameter defines if the input is active high S1 or low S2.
This sets the temperature sensor parameters. P is the heater number, T is the thermistor resistance, and B is the Beta value of the thermistor.
This sets the maximum heater temperature. H is the neater number and S is the max temp.
This will set the Fan On configuration. P is the fan number, T is the temperature control range, H enables thermostatic mode and select hearers monitored. F is the Fan PWM frequency.
This will set the Fan On configuration. P is the fan number, T is the temperature control range, H enables thermostatic mode and select hearers monitored. H-1 disables thermostatic mode. F is the Fan PWM frequency.
This will Define or remove a tool. P is the tool number, D is the extruder drive, and H is the heater.
This defines Tool Offsets. P is the tool number, X is the X axis offset, Y is the Y axis offset, and Z is the Z offset squared.
This defines Tool Offsets. P is the tool number, R is the Standby temperature and S is the Active temperature.
This will set the Z probe type where P is the probe type.
This is the activation of tool head Zero
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
M25 will pause your print at it's current position.
stop.g when the firmware finishes the moves left in it's buffer, the macro
M0 stop.g is called this will lift z axis to make clearance for your print, move the bed forward so the print can be removed, then will turn off the heaters, motors, and any part cooling fan that is in use.
M23 will select your file and
M24 will set your printer to start printing the selected file.
M24 this will resume a print that was previously paused. It will resume printing from the point at which it was paused. Use
M23 to restart the print from the beginning.
bed.g is executed when a
G32 is called. This command is more widely explained in our Bed Leveling Guide.
sleep.g when the printer has shut down and all the motors and heaters are turned off, sleep.g
M1 can be send which will wake it up again.
If you would like to learn more about gcode and it's various commands, we recommend starting HERE.