Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Z calibration #31

Merged
merged 6 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions docs/Config_Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2104,6 +2104,89 @@ calibrate_y: 112.5
# be near the center of the bed
```

### ⚠️ [z_calibration]

Automatic Z offset calibration. One may define this section if the printer
is able to calibrate the nozzle's offset automatically. See
[Z-Calibration guide](Z_Calibration.md) and
[command reference](G-Codes.md#automatic-z-offset-calibration) for further
information.

```
[z_calibration]
nozzle_xy_position:
# A X, Y coordinate (e.g. 100,100) of the nozzle, clicking on the Z endstop.
switch_xy_position:
# A X, Y coordinate (e.g. 100,100) of the probe's switch body, clicking on
# the Z endstop.
bed_xy_position: default from relative_reference_index of bed_mesh
# a X, Y coordinate (e.g. 100,100) where the print surface (e.g. the center
# point) is probed. These coordinates will be adapted by the
# probe's X and Y offsets. The default is the relative_reference_index
# of the configured bed_mesh, if configured. It's possible to change the relative
# reference index at runtime or use the GCode argument BED_POSITION of CALIBRATE_Z.
switch_offset:
# The trigger point offset of the used mag-probe switch.
# Larger values will position the nozzle closer to the bed.
# This needs to be find out manually. More on this later
# in this section..
max_deviation: 1.0
# The maximum allowed deviation of the calculated offset.
# If the offset exceeds this value, it will stop!
# The default is 1.0 mm.
samples: default from "probe:samples" section
# The number of times to probe each point. The probed z-values
# will be averaged. The default is from the probe's configuration.
samples_tolerance: default from "probe:samples_tolerance" section
# The maximum Z distance (in mm) that a sample may differ from other
# samples. The default is from the probe's configuration.
samples_tolerance_retries: default from "probe:samples_tolerance_retries" section
# The number of times to retry if a sample is found that exceeds
# samples_tolerance. The default is from the probe's configuration.
samples_result: default from "probe:samples_result" section
# The calculation method when sampling more than once - either
# "median" or "average". The default is from the probe's configuration.
clearance: 2 * z_offset from the "probe:z_offset" section
# The distance in mm to move up before moving to the next
# position. The default is two times the z_offset from the probe's
# configuration.
position_min: default from "stepper_z:position_min" section.
# Minimum valid distance (in mm) used for probing move. The
# default is from the Z rail configuration.
speed: 50
# The moving speed in X and Y. The default is 50 mm/s.
lift_speed: default from "probe:lift_speed" section
# Speed (in mm/s) of the Z axis when lifting the probe between
# samples and clearance moves. The default is from the probe's
# configuration.
probing_speed: default from "stepper_z:homing_speed" section.
# The fast probing speed (in mm/s) used, when probing_first_fast
# is activated. The default is from the Z rail configuration.
probing_second_speed: default from "stepper_z:second_homing_speed" section.
# The slower speed (in mm/s) for probing the recorded samples.
# The default is second_homing_speed of the Z rail configuration.
probing_retract_dist: default from "stepper_z:homing_retract_dist" section.
# Distance to retract (in mm) before probing the next sample.
# The default is homing_retract_dist from the Z rail configuration.
probing_first_fast: false
# If true, the first probing is done faster by the probing speed.
# This is to get faster down and the result is not recorded as a
# probing sample. The default is false.
start_gcode:
# A list of G-Code commands to execute prior to each calibration command.
# See docs/Command_Templates.md for G-Code format. This can be used to
# attach the probe.
before_switch_gcode:
# A list of G-Code commands to execute prior to each probing on the
# mag-probe. See docs/Command_Templates.md for G-Code format. This can be
# used to attach the probe after probing on the nozzle and before probing
# on the mag-probe.
end_gcode:
# A list of G-Code commands to execute after each calibration command.
# See docs/Command_Templates.md for G-Code format. This can be used to
# detach the probe afterwards.
```

## Additional stepper motors and extruders

### [stepper_z1]
Expand Down
18 changes: 17 additions & 1 deletion docs/G-Codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ profile matching the supplied name from persistent memory. Note that
after SAVE or REMOVE operations have been run the SAVE_CONFIG gcode
must be run to make the changes to persistent memory permanent.

### [smart_effector]
### ⚠️ [smart_effector]

Several commands are available when a
[smart_effector config section](Config_Reference.md#smart_effector) is enabled.
Expand Down Expand Up @@ -1397,6 +1397,22 @@ the config. `REF_TEMP` manually overrides the reference temperature typically
set during homing (for use in e.g. non-standard homing routines) - will be reset
automatically upon homing.

### ⚠️ [z_calibration]

The following commands are available when a
[z_calibration config section](Config_Reference.md#z_calibration) is enabled
(also see the [Z-Calibration guide](Z_Calibration.md)):
- `CALIBRATE_Z`: This calibrates the current offset between the nozzle and
the print surface.
- `PROBE_Z_ACCURACY [PROBE_SPEED=<mm/s>] [LIFT_SPEED=<mm/s>] [SAMPLES=<count>]
[SAMPLE_RETRACT_DIST=<mm>]`: Calculate the maximum, minimum,
average, median, and standard deviation of multiple probe
samples. By default, 10 SAMPLES are taken. Otherwise the optional
parameters default to their equivalent setting in the z_calibration or probe
config section.
*Note* that appropriate macros and/or configurations are needed to attach
and detach a mag-probe for these commands!

### [z_tilt]

The following commands are available when the
Expand Down
Loading