diff --git a/config/tap_QGL.cfg b/config/tap_QGL.cfg new file mode 100644 index 0000000..ad6f7a8 --- /dev/null +++ b/config/tap_QGL.cfg @@ -0,0 +1,6 @@ +[gcode_macro QUAD_GANTRY_LEVEL] +rename_existing: QUAD_GANTRY_LEVEL_REAL +gcode: + QUAD_GANTRY_LEVEL_REAL + _POST_PROBE + SET_GCODE_VARIABLE MACRO=_TAP_VARIABLES VARIABLE=brushed VALUE=0 diff --git a/config/tap_klipper_instructions.md b/config/tap_klipper_instructions.md index 86d4839..e690b09 100644 --- a/config/tap_klipper_instructions.md +++ b/config/tap_klipper_instructions.md @@ -1,44 +1,22 @@ # Updating your Klipper config for Tap -There are a few changes you'll need to make in order to get Tap working properly. - -1. Update your Z endstop: - - - Under the `[stepper_z]` block, you'll want to comment out your `position_endstop` and change your `endstop_pin` so that it uses the virtual Z endstop for Tap. - - - Example: `endstop_pin: probe:z_virtual_endstop` - - - Be sure to *also* remove any automatically saved `[stepper_z] position_endstop: ...` value that may be found at the **bottom** of your `printer.cfg`file. - -2. Update your Z homing position: - - - If you use `[safe_z_home]`, change the location to the center of the bed. If you have a `[homing_override]` make sure that it moves the toolhead to the center of the bed before calling `G28 Z`. - -3. Update your probe's offsets: - - - Remember, with Tap, your nozzle IS the probe, so your `[probe] x_offset` and `[probe] y_offset` values should be 0 now. You'll need to manually calibrate the probe's Z offset by using `PROBE_CALIBRATE`. - -4. Add Tap's `activate_gcode:` - - - This G-code will allow you to probe cold, but will also prevent you from probing with a nozzle at printing temperature (to try to preserve your build surface). This goes in the `[probe]` section of your config. - -```jinja - -activate_gcode: - {% set PROBE_TEMP = 150 %} - {% set MAX_TEMP = PROBE_TEMP + 5 %} - {% set ACTUAL_TEMP = printer.extruder.temperature %} - {% set TARGET_TEMP = printer.extruder.target %} - - {% if TARGET_TEMP > PROBE_TEMP %} - { action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) } - M109 S{ PROBE_TEMP } - {% else %} - # Temperature target is already low enough, but nozzle may still be too hot. - {% if ACTUAL_TEMP > MAX_TEMP %} - { action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) } - TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP } - {% endif %} - {% endif %} - -``` +There are some changes you'll need to make to get Tap working properly. + +1. import all the cfg files and include `tap_settings.cfg` into your `printer.cfg`. + +2. add the activate and deactivate gcode found at the bottom of the `tap_settings.cfg` to the `[probe]` section in your `printer.cfg`. + +3. add `[save_variables]` to your config. + +4. replace any instance of `BED_MESH_CALIBRATE` with `BED_MESH_CALIBRATE_PROPER`, this is largely for KAMP compatibility. + +After that, you can configure the Z acceleration when probing, the homing position; and the speed multiplier thereof, and turn on the z tilt and QGL macros so that `NOZZLE_BRUSH` works properly. One thing you need to put in as a copy of your config is the default Z acceleration. + +## Note make sure to run `SET_PROBE_TEMP` at least once. This sets the minimum probe temp for your print surface and saves it to the variables file. This varies by print surface but there are some general values below + +|Surface|Temp range(C)| +|--|--| +|PEI (any)|150-155| +|Polyploplene|100-110| +|Galorite (G10)|130-150| +|Borosilicate Glass|200-230| diff --git a/config/tap_macros.cfg b/config/tap_macros.cfg new file mode 100644 index 0000000..031d850 --- /dev/null +++ b/config/tap_macros.cfg @@ -0,0 +1,79 @@ +[gcode_macro _TAP_VARIABLES] +variable_probing: 0 +variable_brushed: 0 +gcode: + +[homing_override] +axes: xyz +gcode: + {% if 'x' not in printer.toolhead.homed_axes %} + G28 X + {% endif %} + {% if 'y' not in printer.toolhead.homed_axes %} + G28 Y + {% endif %} + {% if 'z' not in printer.toolhead.homed_axes %} + G90 + M220 S{printer["gcode_macro _TAP_SETTINGS"].home_speed} + G0 X{printer["gcode_macro _TAP_SETTINGS"].home_x} Y{printer["gcode_macro _TAP_SETTINGS"].home_y} + G28 Z + M220 S100 + G91 + {% endif %} + +[gcode_macro _PRE_PROBE_CHECK] +gcode: + {% set svv = printer.save_variables.variables %} + {% set PROBE_TEMP = svv.probe_temp %} + {% set MAX_TEMP = PROBE_TEMP + 5 %} + {% set ACTUAL_TEMP = printer.extruder.temperature %} + {% set TARGET_TEMP = printer.extruder.target %} + {% set PROBE_ACCEL = printer["gcode_macro _TAP_SETTINGS"].probe_accel %} + {% set BRUSHED = printer["gcode_macro _TAP_VARIABLES"].brushed %} + {% if BRUSHED == 1 %} + _PROBE_TEMP_CHECK + {% else %} + NOZZLE_BRUSH + SET_GCODE_VARIABLE MACRO=_TAP_VARIABLES VARIABLE=brushed VALUE=1 + _PROBE_TEMP_CHECK + {% endif %} + +[gcode_macro _PROBE_TEMP_CHECK] +gcode: + {% set svv = printer.save_variables.variables %} + {% set PROBE_TEMP = svv.probe_temp %} + {% set MAX_TEMP = PROBE_TEMP + 5 %} + {% set ACTUAL_TEMP = printer.extruder.temperature %} + {% set TARGET_TEMP = printer.extruder.target %} + {% set PROBE_ACCEL = printer["gcode_macro _TAP_SETTINGS"].probe_accel %} + SET_KINEMATICS_LIMIT Z_ACCEL={PROBE_ACCEL} + {% if TARGET_TEMP > PROBE_TEMP %} + { action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) } + M109 S{PROBE_TEMP} + {% else %} + # Temperature target is already low enough, but nozzle may still be too hot. + {% if ACTUAL_TEMP > MAX_TEMP %} + { action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) } + TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={MAX_TEMP} + {% endif %} + {% endif %} + +[gcode_macro _POST_PROBING] +gcode: + SET_KINEMATICS_LIMIT Z_ACCEL={printer["gcode_macro _TAP_SETTINGS"].max_z_accel} + +[gcode_macro _POST_PROBE] +gcode: + POST_PROBE + SET_GCODE_VARIABLE MACRO=_TAP_VARIABLES VARIABLE=brushed VALUE=0 + +[gcode_macro BED_MESH_CALIBRATE_PROPER] +gcode: + BED_MESH_CALIBRATE + _POST_PROBE + SET_GCODE_VARIABLE MACRO=_TAP_VARIABLES VARIABLE=brushed VALUE=0 + +[gcode_macro SET_PROBE_TEMP] +gcode: + {% set temp = params.TEMP|int %} + SAVE_VARIABLE VARIABLE=probe_temp VALUE={TEMP} diff --git a/config/tap_settings.cfg b/config/tap_settings.cfg new file mode 100644 index 0000000..1a5da9f --- /dev/null +++ b/config/tap_settings.cfg @@ -0,0 +1,25 @@ +[include tap_macros.cfg] + +######################## +#settings for tap below# +######################## + +#includes for Z_tilt and QGL +[include tap_z_tilt.cfg] +#[include tap_QGL.cfg] + +[gcode_macro _TAP_SETTINGS] +variable_probe_accel: 15 # Z acceleration for probe +variable_home_x: 175 # homing position for Z +variable_home_y: 175 +variable_home_speed: 300 #M220 S multiplier +variable_max_z_accel: 500 #accel of your Z axis +gcode: + +#make sure to add this to your probe section +# +# activate_gcode: +# _PRE_PROBE_CHECK +# deactivate_gcode: +# _POST_PROBING +# diff --git a/config/tap_z_tilt.cfg b/config/tap_z_tilt.cfg new file mode 100644 index 0000000..e7e86e2 --- /dev/null +++ b/config/tap_z_tilt.cfg @@ -0,0 +1,6 @@ +[gcode_macro Z_TILT_ADJUST] +rename_existing: Z_TILT_ADJUST_REAL +gcode: + Z_TILT_ADJUST_REAL + _POST_PROBE + SET_GCODE_VARIABLE MACRO=_TAP_VARIABLES VARIABLE=brushed VALUE=0