Compare commits

...

2 Commits

Author SHA1 Message Date
Siwat Sirichai a2a3361d6c pause/resume macro 2023-12-26 00:33:44 +07:00
Siwat Sirichai d239eb8ccb Update printer.cfg 2023-12-26 00:21:22 +07:00
1 changed files with 59 additions and 15 deletions

View File

@ -256,7 +256,9 @@ activate_gcode:
{% if TARGET_TEMP > PROBE_TEMP %} {% if TARGET_TEMP > PROBE_TEMP %}
{ action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) } { action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) }
M106 S255
M109 S{ PROBE_TEMP } M109 S{ PROBE_TEMP }
M106 S0
{% else %} {% else %}
# Temperature target is already low enough, but nozzle may still be too hot. # Temperature target is already low enough, but nozzle may still be too hot.
{% if ACTUAL_TEMP > MAX_TEMP %} {% if ACTUAL_TEMP > MAX_TEMP %}
@ -272,11 +274,11 @@ activate_gcode:
[fan] [fan]
## Print Cooling Fan - CNC_FAN0 ## Print Cooling Fan - CNC_FAN0
pin: !PA4 pin: !PA4
kick_start_time: 0.5 kick_start_time: 0
## Depending on your fan, you may need to increase this value ## Depending on your fan, you may need to increase this value
## if your fan will not start. Can change cycle_time (increase) ## if your fan will not start. Can change cycle_time (increase)
## if your fan is not able to slow down effectively ## if your fan is not able to slow down effectively
off_below: 0.10 off_below: 0.28
[heater_fan hotend_fan] [heater_fan hotend_fan]
## Hotend Fan - CNC_FAN1 ## Hotend Fan - CNC_FAN1
@ -352,7 +354,7 @@ points:
50,275 50,275
300,275 300,275
300,25 300,25
speed: 100 speed: 300
horizontal_move_z: 10 horizontal_move_z: 10
retries: 10 retries: 10
retry_tolerance: 0.01 retry_tolerance: 0.01
@ -398,11 +400,25 @@ gcode:
gcode: gcode:
G0 X345 Y345 F3600 G0 X345 Y345 F3600
[gcode_macro PARK_NOZZLE_FRONT]
gcode:
G0 X15 Y15 F3600
[gcode_macro PRINT_START] [gcode_macro PRINT_START]
gcode: gcode:
M140 S{ params.BED | float } ; set bed temperture M140 S{ params.BED | float } ; set bed temperature
M109 S150 ; get nozzle to probing temperture
{% set PROBE_TEMP = 150 %}
{% set ACTUAL_TEMP = printer.extruder.temperature %}
{% if ACTUAL_TEMP > PROBE_TEMP %}
M106 S255
M109 S{ PROBE_TEMP }
M106 S0
{% else %}
M109 S{ PROBE_TEMP }
{% endif %}
; get nozzle to probing temperture
M190 S{ params.BED | float } ; wait for bed to reach temperture M190 S{ params.BED | float } ; wait for bed to reach temperture
G32 ; home all axes G32 ; home all axes
G1 Z20 F3000 ; move nozzle away from bed G1 Z20 F3000 ; move nozzle away from bed
@ -426,9 +442,45 @@ gcode:
G90 ; absolute positioning G90 ; absolute positioning
PARK_NOZZLE_REAR ; park nozzle PARK_NOZZLE_REAR ; park nozzle
M84 ; disable motors M84 ; disable motors
BED_MESH_CLEAR ; clear bed mesh
SET_LED LED="hotend_rgb" RED=1 GREEN=1 BLUE=1 SYNC=0 TRANSMIT=1 ; turn on hotend LED SET_LED LED="hotend_rgb" RED=1 GREEN=1 BLUE=1 SYNC=0 TRANSMIT=1 ; turn on hotend LED
[gcode_macro LOAD_FILAMENT]
gcode:
M83
G1 E50 F300
G1 E30 F150
[gcode_macro UNLOAD_FILAMENT]
gcode:
M83
G1 E-50 F3000
G1 E-50 F3000
G1 E-50 F3000
[gcode_macro PAUSE]
gcode:
{ action_respond_info('Pausing printer') }
SAVE_GCODE_STATE NAME=PAUSE
M83 ; relative extrusion
G1 E-5 F3600 ; retract filament
G91 ; relative positioning
G1 Z5 F3600 ; move nozzle up 5mm
G90 ; absolute positioning
PARK_NOZZLE_FRONT ; park nozzle
PAUSE_PRINT
[gcode_macro RESUME]
gcode:
{ action_respond_info('Resuming printer') }
{ % set IS_PAUSED = false % }
G91 ; relative positioning
G1 Z-5 F3600 ; move nozzle down 5mm
G90 ; absolute positioning
G1 E5 F3600 ; unretract filament
G1 E3 F1500 ; prime the nozzle
RESTORE_GCODE_STATE NAME=PAUSE MOVE=1 ; restore the state and move nozzle back to where it was
#*# <---------------------- SAVE_CONFIG ----------------------> #*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*# #*#
@ -439,16 +491,8 @@ gcode:
#*# shaper_freq_y = 62.0 #*# shaper_freq_y = 62.0
#*# #*#
#*# [probe] #*# [probe]
#*# z_offset = -1.910 #*# z_offset = -1.875
#*# #*#
#*# [extruder] #*# [extruder]
#*# control = pid
#*# pid_kp = 23.189
#*# pid_ki = 1.562
#*# pid_kd = 86.089
#*# #*#
#*# [heater_bed] #*# [heater_bed]
#*# control = pid
#*# pid_kp = 62.274
#*# pid_ki = 3.218
#*# pid_kd = 301.250