G30: Commands the printer to perform a single z-probe. The z-height of your printer will then be set to the Z-offset as defined in
G30 S-1will cause the printer to perform a z-probe and print the trigger height but will not change the z-height of the printer, this can be used to find probe offset.
G31: Sets the z-probe status and offset, this changes depending on which probe you wish to use.
M558: Defines the z-probe type.
G29: Executes bed leveling as defined by
M557 Pnnn Xmmm Ylll: Defines the pattern that will be probed when
nnnrepresents the point number if you wish to perform single point probing. A better option is to define a mesh with
lllare the minimum values for each axis and
kkkare the maximum values.
jjjrepresents the interval over the area you just defined. A working
M557command for the Promega is:
M557 X50:370 Y10:350 S30.
G32will execute the bed.g file located in sys/ on the microSD card.
Warning: This limit switch is manually deployable. Remember to put the limit switch on the mount prior to probing, and remove the limit switch prior to printing or moving the bed to the nozzle.
G30with an unmounted z-probe, you will get an error: "Error: Probe already triggered during move" instead of a crash of the bed against the nozzle.
G31are the most important here. If you wish to enable the limit switch as your z-probe you have to enter the following commands into your config.g file:
M558command above sets the Z-probe type.
P4parameter informs the firmware that the z-probe is a switch that is connected to the E0 endstop detection port.
I1inverts the reading on this port, the switch is wired as normally closed and therefore always outputs a value of 1000.
X0 Y0 Z1ensures that this limit switch is only used for homing the z-axis. Any non-zero value will enable homing on that axis.
H5sets the dive height of the probe. This defines the distance in mm that the probe will move after contact.
F100is the feedrate of the homed axis. Reduce this value to slow down the bed more as it moves to make contact with the limit switch.
T5000is the travel speed between probe points.
P999sets the trigger value to 999. Whenever the z-probe trigger value is reached the board will register a detection. For the limit switch this value should not need to change.
X40 Y-28.5 Z5.8Represents the offset of the z-probe to the nozzle, this value changes depending on which extruder you have mounted. If you have the K'Tana, the offsets of the z-probe to the nozzle are going to be different than the compound nozzle. It is also worth noting that the offset for the K'Tana nozzle is based on the right nozzle. The Z-offset to the z-limit switch varies per printer. We recommend that you tune your z-probe Z offset before printing. Follow the section below for calibrating the Z-offset of the limit switch.
G1 X187 Y1543. Heat up the bed to the preferred printing temperature. You can do this by sending the command
nnnis your temperature in °C. You can always look up the recommended bed temperatures for specific materials online. For PLA, a bed temperature of 50°C will work well. For ABS-R, a bed temperature of 60°C is recommended. 4. Wait until the heated bed has reached temperature before continuing. 5. Set the Z-probe offset to 0 by entering the command
G31 G31 P999 X-40 Y28.5 Z0. This will make it easier to gauge the distance between the Z-probe and the nozzle in the following steps. 6. Run the command
G29 S2. This clears any active bed leveling compensation. This is very important as it will conflict with your updated Z-probe offset and induce a 0.1 - 0.3mm error depending on the magnitude of your bed leveling compensation at that point. 7. Deploy your Z-probe 8. Check whether the Z-probe is functioning correctly. This is a great step to perform before using your Z-probe in order to prevent crashes. Press your Z-probe limit switch and observe the change in value from 0 to 1000 in the Duet Web Console Machine Status table in the Z-Probe box. If the value does not change the Z-probe is wired or configured wrong, do not continue to the next step!
G1 Z20. When you send the command
G30the bed will move slowly and precisely to the Z-probe, if you send
G30while the bed is at
Z100or greater you will have to wait for a long time for the Z-probe to trigger.
G30. This will move the bed toward the z-probe until the limit switch triggers.
M564 S0to disable the axis limits. To learn more about this command visit the RepRap G-code wiki.
G31 P999 X-40 Y28.5 Znnnwhere
nnnis your Z-probe offset.
M558command above sets the z-probe type:
P1sets the z-probe type.
X0 Y0 Z1defines which axis this probe homes, any non-zero value enables that axis. In this case this probe only zeroes the z-axis.
H5configures the dive height to 5mm. The dive height is the vertical distance the bed moves between probe moves
F120sets the feedrate of the probe move.
T5000sets the travel feedrate, the speed of travel in between probe moves.
G31command sets the z-probe status:
P450sets the trigger value, for the IR probe this has to be less than ~500 or the z-probe will not trigger. Manually test the z-probe trigger value before changing!
X-30.4 Y-30.7defines the offset from the nozzle to the IR probe.
Z2.6sets the z offset of the IR probe. This will have to be changed whenever you change the mounting height of the z-probe or whenever you change print bed material.
X200 Y200 Z50, probing in the center of the bed is the best idea as that is where the most printing occurs.
G29 S2, bed leveling can interfere with probing the bed.
Always disable bed leveling before probing or bed leveling, they will interfere with each other!!! <
G31 Pn Z1.0where
nis a value less than what you recorded in the previous step. The z-probe will trigger whenever it detects a value greater than
Z1.0represents a stop gap to prevent a crash if you do send
G92 Z0. This will set the current z-height of the printer to 0.
G1 Z20. 7. Send the command
G30 S-1this will print out the z-height of the bed when the probe is triggered. It will not update your z-height value. Record the value that is printed out. To ensure that you are getting consistent values, you can repeat this step multiple times. Move the bed to
Z20between every probe or you will get an error.
G31command with your z-probe offset value set to the value you obtained in the step above.
G31 P450 X-30.4 Y-30.7 Znnn,
nnnis the value from the step above.
G31commands or comment them.
G30in order to probe the z axis. You can then move your bed up to your nozzle manually and verify that at
Z0the nozzle is touching the bed.
Be careful with the amount of force you apply as you can break the belts or belt clamps.
M557command. The config.g file should already have configured a working mesh:
M557 X50:370 Y10:350 S30. You can change the maximum and minimum values of the mesh as well as the interval but be careful as running G29 with a wrong mesh can crash your printer. Be sure to take the offsets of the z-probe as defined in
M561, they accomplish the same goal. If you do not disable previous bed leveling you will find that your next heightmap will be off by around +- 0.3mm.
G29 S0to execute bed leveling immediately or
G32which will execute bed.g. bed.g can be a simpler option in the long run as it can automatically heat up your nozzle and bed and define your mesh grid before.
G29 S1enables compensation from heightmap.csv by default and
G29 S2disables compensation. In config.g you should have the command
G29 S1which enables bed compensation so you don't have to re-run the bed leveling procedure everytime.