printer: update

This commit is contained in:
Konstantin Koslowski 2023-01-22 13:53:32 +01:00
parent 991c3266e1
commit 8e18789e1c
2 changed files with 42 additions and 46 deletions

View file

@ -23,7 +23,7 @@ gcode:
{% set x0=250 %} {% set x0=250 %}
{% set x1=200 %} {% set x1=200 %}
{% set y0=printer.toolhead.axis_maximum.y %} {% set y0=printer.toolhead.axis_maximum.y %}
{% set z0=1.0 %} {% set z0=2.5 %}
# {% set z_hop = printer['gcode_macro _USER_VARIABLE'].z_hop|int %} # {% set z_hop = printer['gcode_macro _USER_VARIABLE'].z_hop|int %}
{% set z_hop = 10 %} {% set z_hop = 10 %}
{% if "xyz" in printer.toolhead.homed_axes %} {% if "xyz" in printer.toolhead.homed_axes %}
@ -85,25 +85,23 @@ gcode:
[gcode_macro PARK] [gcode_macro PARK]
gcode: gcode:
{% set Y=params.Y|default(295) %} {% set Y=params.Y|default(295) %}
{% set X=params.X|default(295) %}
{% set Z=params.Z|default(-1) %}
{% if "xyz" in printer.toolhead.homed_axes %} {% if "xyz" in printer.toolhead.homed_axes %}
# set park positon for x and y
## close to max
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
{% if Y != y_park %}
{% set y_park = Y %}
{% endif %}
# calculate save lift position # calculate save lift position
{% set z_max = printer.toolhead.axis_maximum.z|float %} {% set z_max = printer.toolhead.axis_maximum.z|float %}
{% set z_act = printer.toolhead.position.z|float %} {% set z_act = printer.toolhead.position.z|float %}
{% set z_safe = z_act + 10 %} {% set z_safe = z_act + 5 %}
{% if z_safe > z_max %} {% if z_safe > z_max %}
{% set z_safe = z_max %} {% set z_safe = z_max %}
{% endif %} {% endif %}
{% if Z != - 1 %}
{% set z_safe = Z %}
{% endif %}
G91 # use relative coordinates G91 # use relative coordinates
G0 Z{z_safe} F1200 G0 Z{z_safe} F1200
G90 # use absolute coordinates G90 # use absolute coordinates
G0 X{x_park} Y{y_park} F6000 G0 X{X} Y{Y} F6000
{% else %} {% else %}
M118 printer not homed M118 printer not homed
{% endif %} {% endif %}
@ -114,15 +112,6 @@ gcode:
rename_existing: _PAUSE_BASE rename_existing: _PAUSE_BASE
gcode: gcode:
{% if printer.pause_resume.is_paused|lower == 'false' %} {% if printer.pause_resume.is_paused|lower == 'false' %}
{% set x_park = printer.toolhead.axis_minimum.x|float + 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 5.0) %}
{% set z_safe = 5.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
G92 E0 G92 E0
{% if printer.extruder.can_extrude %} {% if printer.extruder.can_extrude %}
G1 E-1.0 F1500.0 G1 E-1.0 F1500.0
@ -130,10 +119,7 @@ gcode:
G90 # use absolute coordinates G90 # use absolute coordinates
SAVE_GCODE_STATE NAME=PAUSE_state SAVE_GCODE_STATE NAME=PAUSE_state
_PAUSE_BASE _PAUSE_BASE
G91 # use relative coordinates PARK
G1 Z{z_safe} F900
G90 # use absolute coordinates
G0 X{x_park} Y{y_park} F6000
{% else %} {% else %}
M117 already paused M117 already paused
M118 already paused M118 already paused
@ -145,6 +131,7 @@ gcode:
gcode: gcode:
{% set BED=params.BED|default(100)|int %} {% set BED=params.BED|default(100)|int %}
{% set EXTRUDER=params.EXTRUDER|default(250)|int %} {% set EXTRUDER=params.EXTRUDER|default(250)|int %}
{% set QGL=params.QGL|default(1)|int %}
{% set BMC=params.BMC|default(0)|int %} {% set BMC=params.BMC|default(0)|int %}
{% set SHEET=params.SHEET|default("default")|string %} {% set SHEET=params.SHEET|default("default")|string %}
{% set PURGE=params.PURGE|default(1)|int %} {% set PURGE=params.PURGE|default(1)|int %}
@ -167,10 +154,17 @@ gcode:
M117 HOME M117 HOME
M118 HOME M118 HOME
G28 G28
BRUSHIE
G28 Z
# QGL # QGL
{% if QGL %}
M117 QGL M117 QGL
M118 QGL M118 QGL
QUAD_GANTRY_LEVEL PARK=false QUAD_GANTRY_LEVEL
{% else %}
M117 NO QGL
M118 NO QGL
{% endif %}
# BMC # BMC
{% if BMC %} {% if BMC %}
M117 BED MESH CALIBRATE M117 BED MESH CALIBRATE
@ -181,11 +175,13 @@ gcode:
M118 BED MESH LOAD {SHEET} M118 BED MESH LOAD {SHEET}
BED_MESH_PROFILE LOAD={SHEET} BED_MESH_PROFILE LOAD={SHEET}
{% endif %} {% endif %}
PARK Z=10
G92 E0 # reset extruder G92 E0 # reset extruder
G90 # use absolute coordinates G90 # use absolute coordinates
NOTIFY_BED BED={BED} NOTIFY_BED BED={BED}
M190 S{BED} # set and wait for actual bed temperature M190 S{BED} # set and wait for actual bed temperature
NOTIFY_EXTRUDER EXTRUDER={BED}
M109 S{EXTRUDER} # set and wait for extruder temperature M109 S{EXTRUDER} # set and wait for extruder temperature
SET_GCODE_OFFSET Z_ADJUST={params.Z_ADJUST|default(0.0)|float} MOVE=1 SET_GCODE_OFFSET Z_ADJUST={params.Z_ADJUST|default(0.0)|float} MOVE=1
@ -196,9 +192,9 @@ gcode:
ERCF_CHANGE_TOOL_SLICER TOOL={ERCF_EXTRUDER} ERCF_CHANGE_TOOL_SLICER TOOL={ERCF_EXTRUDER}
{% endif %} {% endif %}
BRUSHIE BRUSHIE
{% if PURGE %} # {% if PURGE %}
PURGE_NOZZLE # PURGE_NOZZLE
{% endif %} # {% endif %}
M117 STARTING M117 STARTING
M118 STARTING M118 STARTING

View file

@ -107,8 +107,8 @@ microsteps: 32
full_steps_per_rotation: 400 # 200: 1.8 deg stepper, 400: 0.9 deg stepper full_steps_per_rotation: 400 # 200: 1.8 deg stepper, 400: 0.9 deg stepper
endstop_pin: PG9 endstop_pin: PG9
position_min: 0 position_min: 0
position_endstop: 303 position_endstop: 302.5
position_max: 305 position_max: 306
homing_speed: 30 # Max 100 homing_speed: 30 # Max 100
homing_retract_dist: 5 homing_retract_dist: 5
homing_positive_dir: true homing_positive_dir: true
@ -138,7 +138,7 @@ gear_ratio: 80:16
microsteps: 32 microsteps: 32
endstop_pin: probe:z_virtual_endstop endstop_pin: probe:z_virtual_endstop
position_max: 290 position_max: 290
position_min: -2 position_min: -3
homing_speed: 5.0 # speed: mm/sec, feedrate: mm/min homing_speed: 5.0 # speed: mm/sec, feedrate: mm/min
homing_retract_speed: 10 homing_retract_speed: 10
second_homing_speed: 2 second_homing_speed: 2
@ -333,7 +333,7 @@ samples_tolerance: 0.01
samples_tolerance_retries: 5 samples_tolerance_retries: 5
activate_gcode: activate_gcode:
{% set PROBE_TEMP = 150 %} {% set PROBE_TEMP = 200 %}
{% set MAX_TEMP = PROBE_TEMP + 5 %} {% set MAX_TEMP = PROBE_TEMP + 5 %}
{% set ACTUAL_TEMP = printer.extruder.temperature %} {% set ACTUAL_TEMP = printer.extruder.temperature %}
{% set TARGET_TEMP = printer.extruder.target %} {% set TARGET_TEMP = printer.extruder.target %}
@ -352,7 +352,7 @@ activate_gcode:
[bed_mesh] [bed_mesh]
speed: 500 speed: 500
horizontal_move_z: 12 horizontal_move_z: 10
# 40, 40 --> 40 + probe.x_offset, 40 + probe.y_offset # 40, 40 --> 40 + probe.x_offset, 40 + probe.y_offset
mesh_min: 40, 70 mesh_min: 40, 70
# 260, 260 --> 260 + probe.x_offset, 260 + probe.y_offset # 260, 260 --> 260 + probe.x_offset, 260 + probe.y_offset
@ -373,8 +373,8 @@ probe_count: 9,9
relative_reference_index: 40 relative_reference_index: 40
[quad_gantry_level] [quad_gantry_level]
speed: 150 speed: 500
horizontal_move_z: 12 horizontal_move_z: 10
gantry_corners: gantry_corners:
-60,-10 -60,-10
360,370 360,370
@ -426,4 +426,4 @@ max_adjust: 10
#*# max_x = 260.0 #*# max_x = 260.0
#*# #*#
#*# [probe] #*# [probe]
#*# z_offset = -0.710 #*# z_offset = -0.860