mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
feat(klipper): add a folder for that, hopefully we can manage it
properly some day
This commit is contained in:
parent
2053835016
commit
cebe05cfbe
5 changed files with 606 additions and 3 deletions
164
klipper/ender3v3se.cfg
Normal file
164
klipper/ender3v3se.cfg
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
[bltouch]
|
||||
control_pin:PC13
|
||||
pin_move_time:0.400000
|
||||
probe_with_touch_mode:true
|
||||
sensor_pin:^PC14
|
||||
speed:20
|
||||
stow_on_each_sample:false
|
||||
x_offset:-23.000000
|
||||
y_offset:-14.500000
|
||||
z_offset:2.1
|
||||
|
||||
[dirzctl]
|
||||
|
||||
[e3v3se_display]
|
||||
language:english
|
||||
logging:true
|
||||
|
||||
[extruder]
|
||||
control:pid
|
||||
dir_pin:PB3
|
||||
enable_pin:!PC3
|
||||
filament_diameter:1.750000
|
||||
heater_pin:PA1
|
||||
max_extrude_only_distance:100.000000
|
||||
max_temp:260
|
||||
microsteps:16
|
||||
min_temp:0
|
||||
nozzle_diameter:0.400000
|
||||
pid_Kd:134.351000
|
||||
pid_Ki:1.371000
|
||||
pid_Kp:27.142000
|
||||
rotation_distance:7.440000
|
||||
sensor_pin:PC5
|
||||
sensor_type:EPCOS 100K B57560G104F
|
||||
step_pin:PB4
|
||||
|
||||
[fan]
|
||||
pin:PA0
|
||||
|
||||
[filter]
|
||||
|
||||
[heater_bed]
|
||||
control:pid
|
||||
heater_pin:PB2
|
||||
max_temp:100
|
||||
min_temp:0
|
||||
pid_kd:1301.702000
|
||||
pid_ki:0.846000
|
||||
pid_kp:66.371000
|
||||
sensor_pin:PC4
|
||||
sensor_type:EPCOS 100K B57560G104F
|
||||
|
||||
[heater_fan hotend_fan]
|
||||
pin:PC1
|
||||
|
||||
[hx711s]
|
||||
sensor0_clk_pin:PA4
|
||||
sensor0_sdo_pin:PC6
|
||||
|
||||
[mcu]
|
||||
restart_method:command
|
||||
serial:/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
|
||||
|
||||
[printer]
|
||||
kinematics:cartesian
|
||||
max_accel:2500
|
||||
max_velocity:250
|
||||
max_z_accel:100
|
||||
max_z_velocity:5
|
||||
square_corner_velocity:5.000000
|
||||
|
||||
[prtouch]
|
||||
clr_noz_len_y:15
|
||||
clr_noz_start_x:15
|
||||
clr_noz_start_y:25
|
||||
s_bed_max_temp:60
|
||||
s_hot_max_temp:200
|
||||
s_hot_min_temp:160
|
||||
sensor_x:32
|
||||
sensor_y:30
|
||||
show_msg:true
|
||||
wipe_retract_distance:2
|
||||
|
||||
[safe_z_home]
|
||||
home_xy_position:134,123
|
||||
speed:150
|
||||
z_hop:10
|
||||
z_hop_speed:10
|
||||
|
||||
[screws_tilt_adjust]
|
||||
horizontal_move_z:10.000000
|
||||
screw1:54.5,45.5
|
||||
screw1_name:front left screw
|
||||
screw2:224.5,45.5
|
||||
screw2_name:front right screw
|
||||
screw3:224.5,215.5
|
||||
screw3_name:rear right screw
|
||||
screw4:54.5,215.5
|
||||
screw4_name:rear left screw
|
||||
screw_thread:CCW-M4
|
||||
speed:50.000000
|
||||
|
||||
[stepper_x]
|
||||
dir_pin:!PB9
|
||||
enable_pin:!PC3
|
||||
endstop_pin:~!PA5
|
||||
homing_speed:80
|
||||
microsteps:16
|
||||
position_endstop:-6
|
||||
position_max:230
|
||||
position_min:-6
|
||||
rotation_distance:40
|
||||
step_pin:PC2
|
||||
|
||||
[stepper_y]
|
||||
dir_pin:PB7
|
||||
enable_pin:!PC3
|
||||
endstop_pin:~!PA6
|
||||
homing_speed:80
|
||||
microsteps:16
|
||||
position_endstop:-14
|
||||
position_max:230
|
||||
position_min:-14
|
||||
rotation_distance:40
|
||||
step_pin:PB8
|
||||
|
||||
[stepper_z]
|
||||
dir_pin:!PB5
|
||||
enable_pin:!PC3
|
||||
endstop_pin:probe:z_virtual_endstop
|
||||
homing_retract_dist:2.000000
|
||||
homing_speed:4
|
||||
microsteps:16
|
||||
position_max:250
|
||||
position_min:-3
|
||||
rotation_distance:8
|
||||
second_homing_speed:1
|
||||
step_pin:PB6
|
||||
|
||||
[tmc2208 stepper_x]
|
||||
interpolate:true
|
||||
run_current:0.600000
|
||||
sense_resistor:0.150000
|
||||
uart_pin:PB12
|
||||
|
||||
[tmc2208 stepper_y]
|
||||
interpolate:true
|
||||
run_current:0.600000
|
||||
sense_resistor:0.150000
|
||||
uart_pin:PB13
|
||||
|
||||
[tmc2208 stepper_z]
|
||||
interpolate:true
|
||||
run_current:0.800000
|
||||
sense_resistor:0.150000
|
||||
uart_pin:PB14
|
||||
|
||||
[bed_mesh]
|
||||
algorithm:bicubic
|
||||
horizontal_move_z:5
|
||||
mesh_max:207,215.5
|
||||
mesh_min:30,30
|
||||
probe_count:5,5
|
||||
speed:120
|
||||
293
klipper/fluidd.cfg
Normal file
293
klipper/fluidd.cfg
Normal file
|
|
@ -0,0 +1,293 @@
|
|||
## Client klipper macro definitions
|
||||
##
|
||||
## Copyright (C) 2022 Alex Zellner <alexander.zellner@googlemail.com>
|
||||
##
|
||||
## This file may be distributed under the terms of the GNU GPLv3 license
|
||||
##
|
||||
## !!! This file is read-only. Maybe the used editor indicates that. !!!
|
||||
##
|
||||
## Customization:
|
||||
## 1) copy the gcode_macro _CLIENT_VARIABLE (see below) to your printer.cfg
|
||||
## 2) remove the comment mark (#) from all lines
|
||||
## 3) change any value in there to your needs
|
||||
##
|
||||
## Use the PAUSE macro direct in your M600:
|
||||
## e.g. with a different park position front left and a minimal height of 50
|
||||
## [gcode_macro M600]
|
||||
## description: Filament change
|
||||
## gcode: PAUSE X=10 Y=10 Z_MIN=50
|
||||
## Z_MIN will park the toolhead at a minimum of 50 mm above to bed to make it easier for you to swap filament.
|
||||
##
|
||||
## Client variable macro for your printer.cfg
|
||||
#[gcode_macro _CLIENT_VARIABLE]
|
||||
#variable_use_custom_pos : False ; use custom park coordinates for x,y [True/False]
|
||||
#variable_custom_park_x : 0.0 ; custom x position; value must be within your defined min and max of X
|
||||
#variable_custom_park_y : 0.0 ; custom y position; value must be within your defined min and max of Y
|
||||
#variable_custom_park_dz : 2.0 ; custom dz value; the value in mm to lift the nozzle when move to park position
|
||||
#variable_retract : 1.0 ; the value to retract while PAUSE
|
||||
#variable_cancel_retract : 5.0 ; the value to retract while CANCEL_PRINT
|
||||
#variable_speed_retract : 35.0 ; retract speed in mm/s
|
||||
#variable_unretract : 1.0 ; the value to unretract while RESUME
|
||||
#variable_speed_unretract : 35.0 ; unretract speed in mm/s
|
||||
#variable_speed_hop : 15.0 ; z move speed in mm/s
|
||||
#variable_speed_move : 100.0 ; move speed in mm/s
|
||||
#variable_park_at_cancel : False ; allow to move the toolhead to park while execute CANCEL_PRINT [True/False]
|
||||
#variable_park_at_cancel_x : None ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True
|
||||
#variable_park_at_cancel_y : None ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True
|
||||
## !!! Caution [firmware_retraction] must be defined in the printer.cfg if you set use_fw_retract: True !!!
|
||||
#variable_use_fw_retract : False ; use fw_retraction instead of the manual version [True/False]
|
||||
#variable_idle_timeout : 0 ; time in sec until idle_timeout kicks in. Value 0 means that no value will be set or restored
|
||||
#variable_runout_sensor : "" ; If a sensor is defined, it will be used to cancel the execution of RESUME in case no filament is detected.
|
||||
## Specify the config name of the runout sensor e.g "filament_switch_sensor runout". Hint use the same as in your printer.cfg
|
||||
## !!! Custom macros, please use with care and review the section of the corresponding macro.
|
||||
## These macros are for simple operations like setting a status LED. Please make sure your macro does not interfere with the basic macro functions.
|
||||
## Only single line commands are supported, please create a macro if you need more than one command.
|
||||
#variable_user_pause_macro : "" ; Everything inside the "" will be executed after the klipper base pause (PAUSE_BASE) function
|
||||
#variable_user_resume_macro: "" ; Everything inside the "" will be executed before the klipper base resume (RESUME_BASE) function
|
||||
#variable_user_cancel_macro: "" ; Everything inside the "" will be executed before the klipper base cancel (CANCEL_PRINT_BASE) function
|
||||
#gcode:
|
||||
|
||||
[virtual_sdcard]
|
||||
path: ~/printer_data/gcodes
|
||||
on_error_gcode: CANCEL_PRINT
|
||||
|
||||
[pause_resume]
|
||||
#recover_velocity: 50.
|
||||
# When capture/restore is enabled, the speed at which to return to
|
||||
# the captured position (in mm/s). Default is 50.0 mm/s.
|
||||
|
||||
[display_status]
|
||||
|
||||
[respond]
|
||||
|
||||
[gcode_macro CANCEL_PRINT]
|
||||
description: Cancel the actual running print
|
||||
rename_existing: CANCEL_PRINT_BASE
|
||||
gcode:
|
||||
##### get user parameters or use default #####
|
||||
{% set client = printer['gcode_macro _CLIENT_VARIABLE'] | default({}) %}
|
||||
{% set allow_park = client.park_at_cancel | default(false) | lower == 'true' %}
|
||||
{% set retract = client.cancel_retract | default(5.0) | abs %}
|
||||
##### define park position #####
|
||||
{% set park_x = "" if (client.park_at_cancel_x | default(none) is none)
|
||||
else "X=" ~ client.park_at_cancel_x %}
|
||||
{% set park_y = "" if (client.park_at_cancel_y | default(none) is none)
|
||||
else "Y=" ~ client.park_at_cancel_y %}
|
||||
{% set custom_park = park_x | length > 0 or park_y | length > 0 %}
|
||||
##### end of definitions #####
|
||||
# restore idle_timeout time if needed
|
||||
{% if printer['gcode_macro RESUME'].restore_idle_timeout > 0 %}
|
||||
SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro RESUME'].restore_idle_timeout}
|
||||
{% endif %}
|
||||
{% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
|
||||
_CLIENT_RETRACT LENGTH={retract}
|
||||
TURN_OFF_HEATERS
|
||||
M106 S0
|
||||
{client.user_cancel_macro | default("")}
|
||||
SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
|
||||
# clear pause_next_layer and pause_at_layer as preparation for next print
|
||||
SET_PAUSE_NEXT_LAYER ENABLE=0
|
||||
SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
|
||||
CANCEL_PRINT_BASE
|
||||
|
||||
[gcode_macro PAUSE]
|
||||
description: Pause the actual running print
|
||||
rename_existing: PAUSE_BASE
|
||||
gcode:
|
||||
##### get user parameters or use default #####
|
||||
{% set client = printer['gcode_macro _CLIENT_VARIABLE'] | default({}) %}
|
||||
{% set idle_timeout = client.idle_timeout | default(0) %}
|
||||
{% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0 %}
|
||||
{% set restore = False if printer.toolhead.extruder == ''
|
||||
else True if params.RESTORE | default(1) | int == 1 else False %}
|
||||
##### end of definitions #####
|
||||
SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}"
|
||||
# set a new idle_timeout value
|
||||
{% if idle_timeout > 0 %}
|
||||
SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout}
|
||||
SET_IDLE_TIMEOUT TIMEOUT={idle_timeout}
|
||||
{% endif %}
|
||||
PAUSE_BASE
|
||||
{client.user_pause_macro | default("")}
|
||||
_TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
|
||||
|
||||
[gcode_macro RESUME]
|
||||
description: Resume the actual running print
|
||||
rename_existing: RESUME_BASE
|
||||
variable_last_extruder_temp: {'restore': False, 'temp': 0}
|
||||
variable_restore_idle_timeout: 0
|
||||
variable_idle_state: False
|
||||
gcode:
|
||||
##### get user parameters or use default #####
|
||||
{% set client = printer['gcode_macro _CLIENT_VARIABLE'] | default({}) %}
|
||||
{% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
|
||||
{% set sp_move = client.speed_move | default(velocity) %}
|
||||
{% set runout_resume = True if client.runout_sensor | default("") == "" # no runout
|
||||
else True if not printer[client.runout_sensor].enabled # sensor is disabled
|
||||
else printer[client.runout_sensor].filament_detected %} # sensor status
|
||||
{% set can_extrude = True if printer.toolhead.extruder == '' # no extruder defined in config
|
||||
else printer[printer.toolhead.extruder].can_extrude %} # status of active extruder
|
||||
{% set do_resume = False %}
|
||||
{% set prompt_txt = [] %}
|
||||
##### end of definitions #####
|
||||
#### Printer comming from timeout idle state ####
|
||||
{% if printer.idle_timeout.state | upper == "IDLE" or idle_state %}
|
||||
SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
|
||||
{% if last_extruder_temp.restore %}
|
||||
# we need to use the unicode (\u00B0) for the ° as py2 env's would throw an error otherwise
|
||||
RESPOND TYPE=echo MSG='{"Restoring \"%s\" temperature to %3.1f\u00B0C, this may take some time" % (printer.toolhead.extruder, last_extruder_temp.temp) }'
|
||||
M109 S{last_extruder_temp.temp}
|
||||
{% set do_resume = True %}
|
||||
{% elif can_extrude %}
|
||||
{% set do_resume = True %}
|
||||
{% else %}
|
||||
RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
|
||||
{% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
|
||||
{% endif %}
|
||||
#### Printer comming out of regular PAUSE state ####
|
||||
{% elif can_extrude %}
|
||||
{% set do_resume = True %}
|
||||
{% else %}
|
||||
RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
|
||||
{% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
|
||||
{% endif %}
|
||||
{% if runout_resume %}
|
||||
{% if do_resume %}
|
||||
{% if restore_idle_timeout > 0 %} SET_IDLE_TIMEOUT TIMEOUT={restore_idle_timeout} {% endif %} # restore idle_timeout time
|
||||
{client.user_resume_macro | default("")}
|
||||
_CLIENT_EXTRUDE
|
||||
RESUME_BASE VELOCITY={params.VELOCITY | default(sp_move)}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]}'
|
||||
{% set _d = prompt_txt.append("\"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]) %}
|
||||
{% endif %}
|
||||
##### Generate User Information box in case of abort #####
|
||||
{% if not (runout_resume and do_resume) %}
|
||||
RESPOND TYPE=command MSG="action:prompt_begin RESUME aborted !!!"
|
||||
{% for element in prompt_txt %}
|
||||
RESPOND TYPE=command MSG='{"action:prompt_text %s" % element}'
|
||||
{% endfor %}
|
||||
RESPOND TYPE=command MSG="action:prompt_footer_button Ok|RESPOND TYPE=command MSG=action:prompt_end|info"
|
||||
RESPOND TYPE=command MSG="action:prompt_show"
|
||||
{% endif %}
|
||||
|
||||
# Usage: SET_PAUSE_NEXT_LAYER [ENABLE=[0 | 1]] [MACRO=<name>]
|
||||
[gcode_macro SET_PAUSE_NEXT_LAYER]
|
||||
description: Enable a pause if the next layer is reached
|
||||
gcode:
|
||||
{% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
|
||||
{% set ENABLE = params.ENABLE | default(1)|int != 0 %}
|
||||
{% set MACRO = params.MACRO | default(pause_next_layer.call, True) %}
|
||||
SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
|
||||
|
||||
# Usage: SET_PAUSE_AT_LAYER [ENABLE=[0 | 1]] [LAYER=<number>] [MACRO=<name>]
|
||||
[gcode_macro SET_PAUSE_AT_LAYER]
|
||||
description: Enable/disable a pause if a given layer number is reached
|
||||
gcode:
|
||||
{% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
|
||||
{% set ENABLE = params.ENABLE | int != 0 if params.ENABLE is defined
|
||||
else params.LAYER is defined %}
|
||||
{% set LAYER = params.LAYER | default(pause_at_layer.layer) | int %}
|
||||
{% set MACRO = params.MACRO | default(pause_at_layer.call, True) %}
|
||||
SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
|
||||
|
||||
# Usage: SET_PRINT_STATS_INFO [TOTAL_LAYER=<total_layer_count>] [CURRENT_LAYER= <current_layer>]
|
||||
[gcode_macro SET_PRINT_STATS_INFO]
|
||||
rename_existing: SET_PRINT_STATS_INFO_BASE
|
||||
description: Overwrite, to get pause_next_layer and pause_at_layer feature
|
||||
variable_pause_next_layer: { 'enable': False, 'call': "PAUSE" }
|
||||
variable_pause_at_layer : { 'enable': False, 'layer': 0, 'call': "PAUSE" }
|
||||
gcode:
|
||||
{% if pause_next_layer.enable %}
|
||||
RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}'
|
||||
{pause_next_layer.call} ; execute the given gcode to pause, should be either M600 or PAUSE
|
||||
SET_PAUSE_NEXT_LAYER ENABLE=0
|
||||
{% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER | int == pause_at_layer.layer %}
|
||||
RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}'
|
||||
{pause_at_layer.call} ; execute the given gcode to pause, should be either M600 or PAUSE
|
||||
SET_PAUSE_AT_LAYER ENABLE=0
|
||||
{% endif %}
|
||||
SET_PRINT_STATS_INFO_BASE {rawparams}
|
||||
|
||||
##### internal use #####
|
||||
[gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
|
||||
description: Helper: park toolhead used in PAUSE and CANCEL_PRINT
|
||||
gcode:
|
||||
##### get user parameters or use default #####
|
||||
{% set client = printer['gcode_macro _CLIENT_VARIABLE'] | default({}) %}
|
||||
{% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
|
||||
{% set use_custom = client.use_custom_pos | default(false) | lower == 'true' %}
|
||||
{% set custom_park_x = client.custom_park_x | default(0.0) %}
|
||||
{% set custom_park_y = client.custom_park_y | default(0.0) %}
|
||||
{% set park_dz = client.custom_park_dz | default(2.0) | abs %}
|
||||
{% set sp_hop = client.speed_hop | default(15) * 60 %}
|
||||
{% set sp_move = client.speed_move | default(velocity) * 60 %}
|
||||
##### get config and toolhead values #####
|
||||
{% set origin = printer.gcode_move.homing_origin %}
|
||||
{% set act = printer.gcode_move.gcode_position %}
|
||||
{% set max = printer.toolhead.axis_maximum %}
|
||||
{% set cone = printer.toolhead.cone_start_z | default(max.z) %} ; height as long the toolhead can reach max and min of an delta
|
||||
{% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
|
||||
else False %}
|
||||
##### define park position #####
|
||||
{% set z_min = params.Z_MIN | default(0) | float %}
|
||||
{% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)] | min %}
|
||||
{% set x_park = params.X if params.X is defined
|
||||
else custom_park_x if use_custom
|
||||
else 0.0 if round_bed
|
||||
else (max.x - 5.0) %}
|
||||
{% set y_park = params.Y if params.Y is defined
|
||||
else custom_park_y if use_custom
|
||||
else (max.y - 5.0) if round_bed and z_park < cone
|
||||
else 0.0 if round_bed
|
||||
else (max.y - 5.0) %}
|
||||
##### end of definitions #####
|
||||
_CLIENT_RETRACT
|
||||
{% if "xyz" in printer.toolhead.homed_axes %}
|
||||
G90
|
||||
G1 Z{z_park} F{sp_hop}
|
||||
G1 X{x_park} Y{y_park} F{sp_move}
|
||||
{% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
|
||||
{% else %}
|
||||
RESPOND TYPE=echo MSG='Printer not homed'
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro _CLIENT_EXTRUDE]
|
||||
description: Extrudes, if the extruder is hot enough
|
||||
gcode:
|
||||
##### get user parameters or use default #####
|
||||
{% set client = printer['gcode_macro _CLIENT_VARIABLE'] | default({}) %}
|
||||
{% set use_fw_retract = (client.use_fw_retract | default(false) | lower == 'true') and (printer.firmware_retraction is defined) %}
|
||||
{% set length = params.LENGTH | default(client.unretract) | default(1.0) | float %}
|
||||
{% set speed = params.SPEED | default(client.speed_unretract) | default(35) %}
|
||||
{% set absolute_extrude = printer.gcode_move.absolute_extrude %}
|
||||
##### end of definitions #####
|
||||
{% if printer.toolhead.extruder != '' %}
|
||||
{% if printer[printer.toolhead.extruder].can_extrude %}
|
||||
{% if use_fw_retract %}
|
||||
{% if length < 0 %}
|
||||
G10
|
||||
{% else %}
|
||||
G11
|
||||
{% endif %}
|
||||
{% else %}
|
||||
M83
|
||||
G1 E{length} F{(speed | float | abs) * 60}
|
||||
{% if absolute_extrude %}
|
||||
M82
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
RESPOND TYPE=echo MSG='{"\"%s\" not hot enough" % printer.toolhead.extruder}'
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro _CLIENT_RETRACT]
|
||||
description: Retracts, if the extruder is hot enough
|
||||
gcode:
|
||||
{% set client = printer['gcode_macro _CLIENT_VARIABLE'] | default({}) %}
|
||||
{% set length = params.LENGTH | default(client.retract) | default(1.0) | float %}
|
||||
{% set speed = params.SPEED | default(client.speed_retract) | default(35) %}
|
||||
|
||||
_CLIENT_EXTRUDE LENGTH=-{length | float | abs} SPEED={speed | float | abs}
|
||||
134
klipper/macros.cfg
Normal file
134
klipper/macros.cfg
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
[gcode_macro PID_EXTRUDER]
|
||||
gcode:
|
||||
PID_CALIBRATE HEATER=extruder TARGET=210
|
||||
SAVE_CONFIG
|
||||
|
||||
[gcode_macro PID_BED]
|
||||
gcode:
|
||||
PID_CALIBRATE HEATER=heater_bed TARGET=60
|
||||
SAVE_CONFIG
|
||||
|
||||
[gcode_macro FILAMENT_LOAD]
|
||||
gcode:
|
||||
{% set load = params.L|default(100)|float * 0.5 %}
|
||||
{% set extruder_temp = params.T|default(210)|float %}
|
||||
SAVE_GCODE_STATE NAME=FILAMENT_LOAD_STATE
|
||||
LOW_TEMP_CHECK T={extruder_temp}
|
||||
M118 Loading filament
|
||||
M83 # relative extrusion
|
||||
G1 E{load} F1500 # extrude fast
|
||||
G4 P1000 # wait 1 second
|
||||
G1 E{load} F200 # extrude slow
|
||||
RESTORE_GCODE_STATE NAME=FILAMENT_LOAD_STATE
|
||||
BEEP
|
||||
|
||||
|
||||
[gcode_macro FILAMENT_UNLOAD]
|
||||
gcode:
|
||||
{% set unload = params.U|default(100)|float %}
|
||||
{% set extruder_temp = params.T|default(200)|float %}
|
||||
SAVE_GCODE_STATE NAME=FILAMENT_UNLOAD_STATE
|
||||
LOW_TEMP_CHECK T={extruder_temp}
|
||||
M118 Unloading filament
|
||||
M83 # relative extrusion
|
||||
G1 E2 F200 # extrude a little
|
||||
G1 E-10 F200 # retract a little
|
||||
G1 E-{unload} F1500 # retract a lot
|
||||
RESTORE_GCODE_STATE NAME=FILAMENT_UNLOAD_STATE
|
||||
|
||||
[gcode_macro LOW_TEMP_CHECK]
|
||||
gcode:
|
||||
{% set extruder_temp = params.T|default(200)|float %}
|
||||
{% if printer.extruder.target > extruder_temp %} # if there is a setpoint for extruder
|
||||
{% set extruder_temp = printer.extruder.target %}
|
||||
{% endif %}
|
||||
{% if printer.extruder.temperature < extruder_temp %} # heat to the target
|
||||
M118 Heating to {extruder_temp}
|
||||
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={extruder_temp}
|
||||
TEMPERATURE_WAIT SENSOR=extruder MINIMUM={extruder_temp}
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro BEEP]
|
||||
gcode:
|
||||
{% set duration = params.P|default(100)|float %}
|
||||
SET_PIN PIN=beeper VALUE=1
|
||||
G4 P{duration}
|
||||
SET_PIN PIN=beeper VALUE=0
|
||||
|
||||
|
||||
[gcode_macro START_PRINT]
|
||||
gcode:
|
||||
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
|
||||
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
|
||||
M140 S{BED_TEMP}
|
||||
; Ender 3 Custom Start G-code
|
||||
G92 E0 ; Reset Extruder
|
||||
G28 ; Home all axes
|
||||
# Wait for bed to reach temperature
|
||||
M190 S{BED_TEMP}
|
||||
# Set and wait for nozzle to reach temperature
|
||||
M109 S{EXTRUDER_TEMP}
|
||||
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
|
||||
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
|
||||
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
|
||||
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
|
||||
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
|
||||
G92 E0 ; Reset Extruder
|
||||
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
|
||||
G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish
|
||||
BED_MESH_PROFILE LOAD=default
|
||||
|
||||
|
||||
[gcode_macro END_PRINT]
|
||||
description: End of printing
|
||||
variable_machine_depth: 220
|
||||
gcode:
|
||||
G91 ;Relative positioning
|
||||
G1 E-2 F2700 ;Retract a bit
|
||||
G1 E-2 Z0.2 F2400 ;Retract and raise Z
|
||||
G1 X5 Y5 F3000 ;Wipe out
|
||||
G1 z50 ;Raise Z more
|
||||
G90 ;Absolute positioning
|
||||
G1 X0 Y{machine_depth} ;Present print
|
||||
M106 S0 ;Turn-off fan
|
||||
M104 S0 ;Turn-off hotend
|
||||
M140 S0 ;Turn-off bed
|
||||
M84 X Y E ;Disable all steppers but Z
|
||||
BEEP
|
||||
|
||||
[gcode_macro PRINT_STOP]
|
||||
gcode:
|
||||
G91 ;Relative positioning
|
||||
G1 E-2 F2700 ;Retract a bit
|
||||
G1 E-2 Z0.2 F2400 ;Retract and raise Z
|
||||
G1 X5 Y5 F3000 ;Wipe out
|
||||
G1 Z50 ;Raise Z more
|
||||
G90 ;Absolute positionning
|
||||
|
||||
G1 X0 Y200 ;Present print
|
||||
M106 S0 ;Turn-off fan
|
||||
M104 S0 ;Turn-off hotend
|
||||
M140 S0 ;Turn-off bed
|
||||
|
||||
M84 X Y E ;Disable all steppers but Z
|
||||
|
||||
|
||||
[gcode_macro CANCEL_PRINT]
|
||||
description: Cancel the actual running print
|
||||
rename_existing: CANCEL_PRINT_BASE
|
||||
gcode:
|
||||
TURN_OFF_HEATERS
|
||||
CANCEL_PRINT_BASE
|
||||
G91 ;Relative positioning
|
||||
G1 E-2 F2700 ;Retract a bit
|
||||
G1 E-2 Z0.2 F2400 ;Retract and raise Z
|
||||
G1 X5 Y5 F3000 ;Wipe out
|
||||
G1 Z50 ;Raise Z more
|
||||
G90 ;Absolute positionning
|
||||
|
||||
G1 X0 Y200 ;Present print
|
||||
M106 S0 ;Turn-off fan
|
||||
M104 S0 ;Turn-off hotend
|
||||
M140 S0 ;Turn-off bed
|
||||
|
||||
M84 X Y E ;Disable all steppers but Z
|
||||
12
klipper/printer.cfg
Normal file
12
klipper/printer.cfg
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[include fluidd.cfg]
|
||||
[include ender3v3se.cfg]
|
||||
[include macros.cfg]
|
||||
|
||||
[display_status]
|
||||
|
||||
[pause_resume]
|
||||
|
||||
[print_stats]
|
||||
|
||||
[virtual_sdcard]
|
||||
path:/var/lib/moonraker/gcodes
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
moonraker_cfg: ENC[AES256_GCM,data:zoL9QcPYhalVMcVLqZK08mC0yisVbWpA0QKfMX4yY1QfQ8Q/FWAOVquUoqvv550hBkiL8+2VwLka1LKxITExWQQsqg8HgUyIPO7hz+Iq2gsX6lBUucAGU0QC4ju+D8juSQ2TKQqLrbSmiGa2hBIjzhzTA6qnlf85fsriE2PMC9BlKHkW62fICsmkpvONqNY8h5F10kKTSh+PoEYVjNoOlIQACFSGOYMWW5aJj5LP79gtp100U5SQm2pxW5BsVwo2j/ROMxfNop+BjDjQ80AfGqOA10TZzA/m0Opb+7RmJnSHO9yNRW9VCy8M9Jmrzv0WzWB4d49B+SccU4Q+k4Aeo4HF1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+96,8 @@ sops:
|
|||
UDZWWTd0c1VOTmhPaGZ6NHNXTVZxK28KFkJMsdYFfTJDwmgywhl6uj6oSqAsiSCk
|
||||
rzFV2k8DnbF8oCGISO5/jP2M2YYkWQOLsam1i1Qm0+G2iqjZKw4XIw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-08-08T20:35:55Z"
|
||||
mac: ENC[AES256_GCM,data:v08cQPUZBKz+PuecgcQdMb2nZvFgRhn3jdMWmwhRE5ThR8lvD43jBTbPtwqpibw2rNIW97UjXCzxuyXpOfimcqDV0yai36MaudAfG6vuvfSLT0KYZ0jZ1zvEBWwqRSgrNbQJJWT/pfYMxoWgSwEsnvYGVib6da3vuEG/Y61zc0Y=,iv:jAm/Y4zA2j3TkMr1WtKfyPm2aGa9aiHaMszglfmcSsU=,tag:XortGMIyiJWttQ6Gt1Fr/Q==,type:str]
|
||||
lastmodified: "2024-08-09T00:05:08Z"
|
||||
mac: ENC[AES256_GCM,data:UJUK6w8JRYlIZYnsukZW+e1ND2AcR0eW+mCSyRxJX0qTj3M7Yd3xQbWJkBFM20oKzdfmQ7nkMt5m1W9jEstU6RHh4tTtBrPGdrC8auSOqnYbV4+4xBEoOIsZx8Q4sOjmuossSJKi4UsL//ydwyKnNSg2Cvubrs2vVtAjeSYPbGY=,iv:05ROYqx7bhuvJi06rHxuPZ/W33/5ZeYi/qZ4la+Qerc=,tag:eReZDGAhnrv45ziK7AE8sQ==,type:str]
|
||||
pgp:
|
||||
- created_at: "2024-08-08T19:27:10Z"
|
||||
enc: |-
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue