This page is an archive of iMAL's wiki that operated between 2012 and 2022. It documented projects, residencies and workshops mostly taking place at iMAL's Fablab.

Older & newer Fablab projects are now found at


You've look carefully at all the printer software's option, but you want to go further. You can directly write or edit the gcode. Those are human understandable commands.

For example, I want to print a model and insert something during the printing process. The printer need to stop at a certain point and wait for me to insert nuts and then go further in the printing. I think no software makes that possible.

Generate a gcode from your favorite slicing software then open the gcode file with a text editor.

The first part of the file is mostly comments with ;

There is a startup procedure with the defintion of units and the heating process. Then you see every commands send to each motors. They begin with G1 Xnumber Ynumber Znumber Enumber. G1 is for move. XYZ are the coordinates and E is for extruder. Some next lines are only with X Y and E because the Z doesn't move inside the same layer.

You can use a software to visualize the traveling produce by the gcode. A usefull link is There you can visualise each layer.

Find the layer where you want to modify the gcode. For that, use the slider on the right.

Then click on layer info. You'll find the layer height and other usefull informations. In my example the layer height is 4.9

Open your gcode and with the text editor use the find text command and type Z4.900 that will find the exact gcode when the head move to  that layer.

You can then modify your gcode: Here I want to move the head far from my model so I type G1 X190.000 Y190.000 and then I give a special command M0 wich is a command to wait for the user to press enter.

The head has move to the upper right with G1 X190.000 Y190.000 I have all the time to insert the nuts in the model.

The pannelolu wait for the push button to continue with the command M0.

You can find a lot of gcode commands on internet. Some commands like M0 are related to a specific device like the mendel90 :



Difficulty: ●●●●●


Last updated: April 2014