mirror of
https://github.com/Dark98/Ender-3_V3_KE_Klipper.git
synced 2026-10-01 02:18:08 +00:00
update for open source
This commit is contained in:
@@ -0,0 +1,256 @@
|
||||
# Ender-3V3KE
|
||||
# Printer_size: 220x220x240
|
||||
# Version: v1.2.4
|
||||
# CreateDate: 2023/08/30
|
||||
# mcu: chip: GD32F303RET6
|
||||
# version: CR4NS200323C10
|
||||
[include sensorless.cfg]
|
||||
[include gcode_macro.cfg]
|
||||
[include printer_params.cfg]
|
||||
[mcu]
|
||||
serial:/dev/ttyS1
|
||||
baud:230400
|
||||
restart_method: command
|
||||
|
||||
[force_move]
|
||||
enable_force_move: True
|
||||
|
||||
[mcu rpi]
|
||||
serial: /tmp/klipper_host_mcu
|
||||
|
||||
[bl24c16f]
|
||||
i2c_mcu: rpi
|
||||
i2c_bus: i2c.2
|
||||
i2c_speed: 400000
|
||||
|
||||
######################################################
|
||||
[prtouch_v2]
|
||||
pres_cnt: 1 #探点次数
|
||||
pres0_clk_pins: PA4 #压力检测时钟引脚配置
|
||||
pres0_sdo_pins: PC6 #压力检测数据引脚配置
|
||||
step_swap_pin: PA15
|
||||
pres_swap_pin: PA15
|
||||
step_base:2
|
||||
# show_msg: True
|
||||
tri_min_hold: 1000
|
||||
tri_max_hold: 1500 #压力检测信息展示
|
||||
speed: 1
|
||||
# tri_wave_ip: 172.22.30.204
|
||||
#####################################################
|
||||
|
||||
|
||||
[z_compensate]
|
||||
tri_min_hold: 1400
|
||||
tri_max_hold: 2000 #压力检测信息展示
|
||||
tri_expand_mm = 0.13
|
||||
# tri_min_hold: 3
|
||||
speed: 5
|
||||
hot_start_temp: 180#擦喷嘴是最小温度
|
||||
hot_rub_temp: 200#擦喷嘴是最小温度
|
||||
hot_end_temp: 140#擦喷嘴是最小温度
|
||||
bed_add_temp: 60#调平时的热床温度
|
||||
clr_noz_start_x: -3 #擦喷头区域的起始x坐标(默认在热床后方正中心位置)
|
||||
clr_noz_start_y: 20 #擦喷头区域的起始y坐标
|
||||
clr_noz_len_x: 3 #擦喷头区域的x方向的长度
|
||||
clr_noz_len_y: 50 #擦喷头区域的y方向的长度
|
||||
pa_clr_dis_mm_x = 0
|
||||
pa_clr_dis_mm_y =30
|
||||
# show_msg = True
|
||||
bl_offset: 0,27
|
||||
noz_pos_center: 20,25
|
||||
noz_pos_offset: 3,7
|
||||
pumpback_mm: 10
|
||||
vs_start_z_pos: 3
|
||||
pr_probe_cnt: 3
|
||||
pr_clear_probe_cnt: 3
|
||||
type_nozz = 0
|
||||
|
||||
|
||||
[printer]
|
||||
kinematics: cartesian
|
||||
max_velocity: 500
|
||||
max_accel: 8000
|
||||
max_accel_to_decel: 2500
|
||||
max_z_velocity: 30
|
||||
square_corner_velocity: 5.0
|
||||
max_z_accel: 300
|
||||
|
||||
[idle_timeout]
|
||||
timeout: 99999999
|
||||
|
||||
[stepper_x]
|
||||
step_pin: PC2
|
||||
dir_pin: !PB9
|
||||
enable_pin: !PC3
|
||||
microsteps: 16
|
||||
rotation_distance: 40
|
||||
endstop_pin: !PA5
|
||||
position_endstop: -13
|
||||
position_min: -13
|
||||
position_max: 220
|
||||
homing_speed: 30
|
||||
homing_retract_dist:0 #10
|
||||
|
||||
[tmc2208 stepper_x]
|
||||
uart_pin:PB12
|
||||
interpolate: True
|
||||
run_current:0.75
|
||||
sense_resistor: 0.150
|
||||
stealthchop_threshold: 0
|
||||
|
||||
|
||||
[stepper_y]
|
||||
step_pin: PB8
|
||||
dir_pin: PB7
|
||||
enable_pin: !PC3
|
||||
microsteps: 16
|
||||
rotation_distance: 60
|
||||
endstop_pin: !PA6
|
||||
position_endstop: -20
|
||||
position_min: -20
|
||||
position_max: 225
|
||||
homing_speed: 30
|
||||
homing_retract_dist:0
|
||||
|
||||
[tmc2208 stepper_y]
|
||||
uart_pin:PB13
|
||||
interpolate: True
|
||||
run_current:0.8
|
||||
sense_resistor: 0.150
|
||||
stealthchop_threshold: 0
|
||||
|
||||
[stepper_z]
|
||||
step_pin: PB6
|
||||
dir_pin: !PB5
|
||||
enable_pin: !PC3
|
||||
microsteps: 16
|
||||
rotation_distance:8
|
||||
endstop_pin:probe:z_virtual_endstop#PA15 #probe:z_virtual_endstop
|
||||
position_max: 245
|
||||
position_min: -5
|
||||
|
||||
[tmc2208 stepper_z]
|
||||
uart_pin: PB14
|
||||
interpolate: True
|
||||
run_current: 0.8
|
||||
stealthchop_threshold: 0
|
||||
sense_resistor: 0.150
|
||||
|
||||
|
||||
[bltouch]
|
||||
sensor_pin:PC14
|
||||
control_pin: PC13
|
||||
x_offset: 0
|
||||
y_offset: 27
|
||||
z_offset: 0
|
||||
probe_with_touch_mode: true
|
||||
stow_on_each_sample: false
|
||||
speed:5
|
||||
lift_speed:20
|
||||
|
||||
|
||||
[filament_switch_sensor filament_sensor]
|
||||
switch_pin: !PC15
|
||||
pause_on_runout: true
|
||||
|
||||
[output_pin MainBoardFan]
|
||||
pin: !PB1
|
||||
|
||||
[extruder]
|
||||
max_extrude_only_distance:1000
|
||||
max_extrude_cross_section:80
|
||||
pressure_advance = 0.036
|
||||
step_pin: PB4
|
||||
dir_pin: PB3
|
||||
enable_pin: !PC3
|
||||
microsteps: 16
|
||||
rotation_distance: 7.53
|
||||
nozzle_diameter: 0.400
|
||||
filament_diameter: 1.750
|
||||
heater_pin: PA1
|
||||
sensor_type: EPCOS 100K B57560G104F
|
||||
sensor_pin: PC5
|
||||
control = pid
|
||||
pid_Kp=20.584
|
||||
pid_Ki=1.737
|
||||
pid_Kd=60.981
|
||||
min_temp: 0
|
||||
max_temp: 320 # Set to 300 for S1 Pro
|
||||
|
||||
|
||||
[heater_bed]
|
||||
heater_pin: PB2
|
||||
sensor_type: EPCOS 100K B57560G104F
|
||||
sensor_pin: PC4
|
||||
control = pid
|
||||
pid_kp = 70.652
|
||||
pid_ki = 1.798
|
||||
pid_kd = 694.157
|
||||
min_temp: 0
|
||||
max_temp: 120 #
|
||||
temp_offset_flag = True
|
||||
|
||||
[verify_heater extruder]
|
||||
[verify_heater heater_bed]
|
||||
check_gain_time: 120
|
||||
heating_gain: 1.0
|
||||
hysteresis: 10
|
||||
|
||||
[temperature_sensor mcu_temp]
|
||||
sensor_type: temperature_mcu
|
||||
min_temp: 0
|
||||
max_temp: 100
|
||||
|
||||
[output_pin fan0]
|
||||
pin:PA0
|
||||
pwm: True
|
||||
cycle_time: 0.0100
|
||||
hardware_pwm: false
|
||||
value: 0.00
|
||||
scale: 255
|
||||
shutdown_value: 0.0
|
||||
|
||||
[heater_fan nozzle_fan]
|
||||
pin: PC1
|
||||
max_power: 1.0
|
||||
shutdown_speed: 0
|
||||
cycle_time: 0.010
|
||||
hardware_pwm: False
|
||||
kick_start_time: 0.100
|
||||
off_below: 0.0
|
||||
heater: extruder
|
||||
fan_speed: 1.0
|
||||
heater_temp: 60.0
|
||||
|
||||
|
||||
[bed_mesh]
|
||||
speed: 350
|
||||
mesh_min: 5,10 #need to handle head distance with bl_touch
|
||||
mesh_max: 215,215 #max probe range
|
||||
probe_count: 5,5
|
||||
fade_start: 1
|
||||
fade_end: 10
|
||||
fade_target: 0
|
||||
horizontal_move_z: 8
|
||||
|
||||
[input_shaper]
|
||||
shaper_type_y = mzv
|
||||
shaper_freq_y = 32.0
|
||||
|
||||
shaper_type_x = mzv
|
||||
shaper_freq_x = 27.5
|
||||
|
||||
[mcu rpi]
|
||||
serial: /tmp/klipper_host_mcu
|
||||
|
||||
[adxl345]
|
||||
cs_pin: rpi:None
|
||||
spi_speed: 2000000
|
||||
spi_bus: spidev2.0
|
||||
axes_map: z,y,x
|
||||
|
||||
[resonance_tester]
|
||||
accel_chip: adxl345
|
||||
accel_per_hz: 70
|
||||
probe_points: 117.5,117.5,100
|
||||
max_freq: 90
|
||||
Executable
+406
@@ -0,0 +1,406 @@
|
||||
# Ender-3V3 KE
|
||||
|
||||
[exclude_object]
|
||||
|
||||
[virtual_sdcard]
|
||||
#path: /home/rock/gcode_files
|
||||
path: /usr/data/printer_data/gcodes
|
||||
|
||||
[pause_resume]
|
||||
|
||||
[display_status]
|
||||
[gcode_macro CANCEL_PRINT]
|
||||
description: Cancel the actual running print
|
||||
rename_existing: CANCEL_PRINT_BASE
|
||||
gcode:
|
||||
TURN_OFF_HEATERS
|
||||
{% if "xyz" in printer.toolhead.homed_axes %}
|
||||
G91
|
||||
G1 Z2
|
||||
G90
|
||||
{% else %}
|
||||
{action_respond_info("Printer not homed")}
|
||||
G28 X Y
|
||||
{% endif %}
|
||||
G1 F3000X0Y222
|
||||
M104 S0
|
||||
M140 S0
|
||||
M107
|
||||
M84
|
||||
CANCEL_PRINT_BASE
|
||||
FINISH_INIT
|
||||
|
||||
|
||||
|
||||
[gcode_macro PRINT_CALIBRATION]
|
||||
# This part of the command is replaced by the application side without passing parameters
|
||||
gcode:
|
||||
CX_PRINT_LEVELING_CALIBRATION
|
||||
|
||||
[gcode_macro FIRST_FLOOR_PAUSE_POSITION]
|
||||
gcode:
|
||||
{% set extruder_temp = printer.custom_macro.g28_ext_temp %}
|
||||
M104 S{extruder_temp}
|
||||
{% set y_park = printer.toolhead.axis_maximum.y/2 %}
|
||||
{% set x_park = printer['gcode_macro PRINTER_PARAM'].max_x_position|float %}
|
||||
G90
|
||||
G1 Z2 F600
|
||||
G1 X{x_park} Y{y_park} F6000
|
||||
G1 Z0.2 F600
|
||||
|
||||
[gcode_macro FIRST_FLOOR_RESUME]
|
||||
description: Resume the first floor print
|
||||
gcode:
|
||||
##### read E from pause macro #####
|
||||
{% set E = printer["gcode_macro FIRST_FLOOR_PAUSE"].extrude|float + 1.0 %}
|
||||
#### get VELOCITY parameter if specified ####
|
||||
{% if 'VELOCITY' in params|upper %}
|
||||
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
|
||||
{%else %}
|
||||
{% set get_params = "" %}
|
||||
{% endif %}
|
||||
##### end of definitions #####
|
||||
{% if printer.extruder.can_extrude|lower == 'true' %}
|
||||
G91
|
||||
G1 E{E} F2100
|
||||
{% else %}
|
||||
{action_respond_info("Extruder not hot enough")}
|
||||
{% endif %}
|
||||
RESUME_BASE {get_params}
|
||||
|
||||
[gcode_macro FIRST_FLOOR_PAUSE]
|
||||
description: Pause the first floor print
|
||||
# change this if you need more or less extrusion
|
||||
variable_extrude: 2.0
|
||||
gcode:
|
||||
##### read E from pause macro #####
|
||||
{% set E = printer["gcode_macro FIRST_FLOOR_PAUSE"].extrude|float %}
|
||||
##### set park positon for x and y #####
|
||||
# default is your max posion from your printer.cfg
|
||||
{% set y_park = printer.toolhead.axis_maximum.y/2 %}
|
||||
{% set x_park = printer.toolhead.axis_maximum.x|float - 10.0 %}
|
||||
##### calculate save lift position #####
|
||||
{% set max_z = printer["gcode_macro PRINTER_PARAM"].max_z_position|float %}
|
||||
{% set act_z = printer.toolhead.position.z|float %}
|
||||
{% set z_safe = 0.0 %}
|
||||
{% if act_z < (max_z - 2.0) %}
|
||||
{% set z_safe = 2.0 %}
|
||||
{% elif act_z < max_z %}
|
||||
{% set z_safe = max_z - act_z %}
|
||||
{% endif %}
|
||||
##### end of definitions #####
|
||||
SET_GCODE_VARIABLE MACRO=PRINTER_PARAM VARIABLE=z_safe_pause VALUE={z_safe|float}
|
||||
PAUSE_BASE
|
||||
G91
|
||||
{% if "xyz" in printer.toolhead.homed_axes %}
|
||||
{% if printer.extruder.can_extrude|lower == 'true' %}
|
||||
G1 E-1.0 F180
|
||||
G1 E-{E} F4000
|
||||
{% else %}
|
||||
{action_respond_info("Extruder not hot enough")}
|
||||
{% endif %}
|
||||
G1 Z{z_safe} F600
|
||||
G90
|
||||
G1 X{x_park} Y{y_park} F30000
|
||||
{% else %}
|
||||
{action_respond_info("Printer not homed")}
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro PAUSE]
|
||||
description: Pause the actual running print
|
||||
rename_existing: PAUSE_BASE
|
||||
# change this if you need more or less extrusion
|
||||
variable_extrude: 1.0
|
||||
gcode:
|
||||
##### read E from pause macro #####
|
||||
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
|
||||
##### set park positon for x and y #####
|
||||
# default is your max posion from your printer.cfg
|
||||
# {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
|
||||
# {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
|
||||
|
||||
{% set x_park = 0 %}
|
||||
{% set y_park = 222 %}
|
||||
##### calculate save lift position #####
|
||||
{% set max_z = printer.toolhead.axis_maximum.z|float %}
|
||||
{% set act_z = printer.toolhead.position.z|float %}
|
||||
{% if act_z < 48.0 %}
|
||||
{% set z_safe = 50.0 - act_z %}
|
||||
{% elif act_z < (max_z - 2.0) %}
|
||||
{% set z_safe = 2.0 %}
|
||||
{% else %}
|
||||
{% set z_safe = max_z - act_z %}
|
||||
{% endif %}
|
||||
SET_GCODE_VARIABLE MACRO=PRINTER_PARAM VARIABLE=z_safe_pause VALUE={z_safe|float}
|
||||
##### end of definitions #####
|
||||
PAUSE_BASE
|
||||
G91
|
||||
SET_GCODE_VARIABLE MACRO=PRINTER_PARAM VARIABLE=hotend_temp VALUE={printer.extruder.target}
|
||||
M104 S140
|
||||
{% if printer.extruder.can_extrude|lower == 'true' %}
|
||||
G1 E-{E} F2100
|
||||
{% else %}
|
||||
{action_respond_info("Extruder not hot enough")}
|
||||
{% endif %}
|
||||
{% if "xyz" in printer.toolhead.homed_axes %}
|
||||
G1 Z{z_safe} F600
|
||||
M400
|
||||
G90
|
||||
G1 X{x_park} Y{y_park} F6000
|
||||
{% else %}
|
||||
{action_respond_info("Printer not homed")}
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro RESUME]
|
||||
description: Resume the actual running print
|
||||
rename_existing: RESUME_BASE
|
||||
gcode:
|
||||
{% if printer['gcode_macro PRINTER_PARAM'].hotend_temp|int != 0 %}
|
||||
{% if printer['gcode_macro PRINTER_PARAM'].hotend_temp|int > printer.extruder.temperature %}
|
||||
M109 S{printer['gcode_macro PRINTER_PARAM'].hotend_temp|int}
|
||||
{% else %}
|
||||
M104 S{printer['gcode_macro PRINTER_PARAM'].hotend_temp|int}
|
||||
{% endif %}
|
||||
SET_GCODE_VARIABLE MACRO=PRINTER_PARAM VARIABLE=hotend_temp VALUE=0
|
||||
{% endif %}
|
||||
##### read E from pause macro #####
|
||||
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
|
||||
#### get VELOCITY parameter if specified ####
|
||||
{% if 'VELOCITY' in params|upper %}
|
||||
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
|
||||
{%else %}
|
||||
{% set get_params = "" %}
|
||||
{% endif %}
|
||||
{% set z_resume_move = printer['gcode_macro PRINTER_PARAM'].z_safe_pause|int %}
|
||||
{% if z_resume_move > 2 %}
|
||||
{% set z_resume_move = z_resume_move - 2 %}
|
||||
G91
|
||||
G1 Z-{z_resume_move} F600
|
||||
M400
|
||||
{% endif %}
|
||||
|
||||
##### end of definitions #####
|
||||
{% if printer.extruder.can_extrude|lower == 'true' %}
|
||||
G91
|
||||
G1 E{E} F2100
|
||||
{% else %}
|
||||
{action_respond_info("Extruder not hot enough")}
|
||||
{% endif %}
|
||||
RESUME_BASE {get_params}
|
||||
|
||||
|
||||
[gcode_macro PRINTER_PARAM]
|
||||
variable_z_safe_pause: 0.0
|
||||
variable_max_x_position: 220.0
|
||||
variable_max_y_position: 220.0
|
||||
variable_max_z_position: 240.0
|
||||
variable_fans: 3
|
||||
variable_auto_g29: 0
|
||||
variable_default_bed_temp: 50
|
||||
variable_default_extruder_temp: 240
|
||||
variable_g28_extruder_temp: 140
|
||||
variable_print_calibration: 0
|
||||
variable_fan0_min: 140
|
||||
variable_hotend_temp: 200
|
||||
gcode:
|
||||
|
||||
[gcode_macro STRUCTURE_PARAM]
|
||||
variable_bed_length: 220
|
||||
variable_bed_width: 220
|
||||
variable_bed_hight: 240
|
||||
variable_laser_x_offset: 45.0
|
||||
variable_laser_y_offset: -8.0
|
||||
variable_laser_z_offset: 3.0
|
||||
variable_cali_x_offset: 204.0
|
||||
variable_cali_y_offset: 14.0
|
||||
variable_cali_z_offset: 3.0
|
||||
gcode:
|
||||
|
||||
|
||||
[gcode_macro M900]
|
||||
gcode:
|
||||
{% if 'K' in params %}
|
||||
{% if 'E' in params %}
|
||||
SET_PRESSURE_ADVANCE EXTRUDER={params.E} ADVANCE={params.K}
|
||||
{% else %}
|
||||
SET_PRESSURE_ADVANCE ADVANCE={params.K}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
[gcode_arcs]#打印圆
|
||||
resolution: 1.0
|
||||
|
||||
[gcode_macro M204]
|
||||
rename_existing: M204.1
|
||||
gcode:
|
||||
# {% if printer['gcode_macro Qmode'].flag|int == 0 %}
|
||||
{% set get_params = "" %}
|
||||
{% if 'S' in params|upper %}
|
||||
{% set get_params = (get_params + ' ' + 'S' + params.S) %}
|
||||
{% endif %}
|
||||
{% if 'P' in params|upper %}
|
||||
{% set get_params = (get_params + ' ' + 'P' + params.P) %}
|
||||
{% endif %}
|
||||
{% if 'T' in params|upper %}
|
||||
{% set get_params = (get_params + ' ' + 'T' + params.T) %}
|
||||
{% endif %}
|
||||
M204.1 {get_params}
|
||||
# {% endif %}
|
||||
|
||||
[gcode_macro M205]
|
||||
gcode:
|
||||
{% if 'X' in params %}
|
||||
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={params.X}
|
||||
{% elif 'Y' in params %}
|
||||
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={params.Y}
|
||||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro G29]
|
||||
gcode:
|
||||
M204 S5000
|
||||
G90
|
||||
M104S0
|
||||
M107
|
||||
G28
|
||||
BED_MESH_CALIBRATE
|
||||
G1 X110Y110Z10
|
||||
M140S0
|
||||
CXSAVE_CONFIG
|
||||
|
||||
[gcode_macro INPUTSHAPER_X]
|
||||
gcode:
|
||||
M84
|
||||
G90
|
||||
G28
|
||||
SHAPER_CALIBRATE AXIS=x
|
||||
CXSAVE_CONFIG
|
||||
|
||||
[gcode_macro INPUTSHAPER_Y]
|
||||
gcode:
|
||||
M84
|
||||
G90
|
||||
G28
|
||||
SHAPER_CALIBRATE AXIS=y
|
||||
CXSAVE_CONFIG
|
||||
|
||||
[gcode_macro INPUTSHAPER]
|
||||
gcode:
|
||||
G90
|
||||
{% if "xyz" not in printer.toolhead.homed_axes %}
|
||||
G28
|
||||
{% endif %}
|
||||
{% if 'X' in params.AXES|upper %}
|
||||
SHAPER_CALIBRATE AXIS=X
|
||||
{% elif 'Y' in params.AXES|upper %}
|
||||
SHAPER_CALIBRATE AXIS=Y
|
||||
{% else %}
|
||||
SHAPER_CALIBRATE
|
||||
{% endif %}
|
||||
CXSAVE_CONFIG
|
||||
|
||||
|
||||
[gcode_macro AUTOTUNE_SHAPERS]
|
||||
variable_autotune_shapers: 'mzv'
|
||||
gcode:
|
||||
|
||||
[gcode_macro Z_OFFSET_TEST]
|
||||
gcode:
|
||||
G28
|
||||
Z_OFFSET_CALIBRATION
|
||||
CXSAVE_CONFIG
|
||||
|
||||
[gcode_macro ZZ_OFFSET_TEST]
|
||||
gcode:
|
||||
G28
|
||||
Z_OFFSET_AUTO
|
||||
CXSAVE_CONFIG
|
||||
|
||||
[gcode_macro Z_COMPENSATE_TEST]
|
||||
gcode:
|
||||
G28
|
||||
CRTENSE_NOZZLE_CLEAR
|
||||
Z_OFFSET_CALIBRATION
|
||||
|
||||
[gcode_macro M106]
|
||||
gcode:
|
||||
{% set fan = 0 %}
|
||||
{% set value = 255 %}
|
||||
{% if params.S is defined %}
|
||||
{% set tmp = params.S|int %}
|
||||
{% if tmp <= 255 %}
|
||||
{% set value = tmp %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if params.P is defined %}
|
||||
{% if params.P|int == 0 %}
|
||||
{% set value = printer["gcode_macro PRINTER_PARAM"].fan0_min + (255 - printer["gcode_macro PRINTER_PARAM"].fan0_min) / 255 * tmp %}
|
||||
{% if tmp < 1 %}
|
||||
{% set value = tmp %}
|
||||
{% endif %}
|
||||
SET_PIN PIN=fan0 VALUE={value}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set value = printer["gcode_macro PRINTER_PARAM"].fan0_min + (255 - printer["gcode_macro PRINTER_PARAM"].fan0_min) / 255 * tmp %}
|
||||
{% if tmp < 1 %}
|
||||
{% set value = tmp %}
|
||||
{% endif %}
|
||||
SET_PIN PIN=fan0 VALUE={value}
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro M107]
|
||||
gcode:
|
||||
{% if params.P is defined %}
|
||||
SET_PIN PIN=fan0 VALUE=0
|
||||
{% else %}
|
||||
SET_PIN PIN=fan0 VALUE=0
|
||||
# SET_PIN PIN=fan2 VALUE=0
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro LOAD_MATERIAL]
|
||||
gcode:
|
||||
SAVE_GCODE_STATE NAME=myMoveState
|
||||
M109 S{printer.custom_macro.default_extruder_temp}
|
||||
G91
|
||||
G1 E150 F180
|
||||
RESTORE_GCODE_STATE NAME=myMoveState
|
||||
|
||||
[gcode_macro QUIT_MATERIAL]
|
||||
gcode:
|
||||
SAVE_GCODE_STATE NAME=myMoveState
|
||||
M109 S{printer.custom_macro.default_extruder_temp}
|
||||
G91
|
||||
G1 E20 F180
|
||||
G1 E-30 F180
|
||||
G1 E-50 F2000
|
||||
RESTORE_GCODE_STATE NAME=myMoveState
|
||||
|
||||
[gcode_macro M600]
|
||||
gcode:
|
||||
PAUSE
|
||||
{% set act_e = printer.toolhead.position.e|float %}
|
||||
G91
|
||||
G1 E20 F180
|
||||
G1 E-30 F180
|
||||
G1 E-50 F2000
|
||||
G90
|
||||
G92 E{act_e}
|
||||
|
||||
[gcode_macro FINISH_INIT]
|
||||
gcode:
|
||||
{% set extruder = printer.configfile.settings['extruder'] %}
|
||||
{% set printer = printer.configfile.settings['printer'] %}
|
||||
SET_PRESSURE_ADVANCE ADVANCE={extruder.pressure_advance}
|
||||
SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.max_accel_to_decel}
|
||||
#转角速度:5mm/s
|
||||
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=5
|
||||
#加速度:5000mm/s²
|
||||
M204 S5000
|
||||
#减速加速度:5000mm/s²
|
||||
SET_VELOCITY_LIMIT ACCEL_TO_DECEL=5000
|
||||
#移动速率:100%
|
||||
M220 S100
|
||||
#挤出流量:100%
|
||||
M221 S100
|
||||
|
||||
|
||||
Executable
+256
@@ -0,0 +1,256 @@
|
||||
# Ender-3V3KE
|
||||
# Printer_size: 220x220x240
|
||||
# Version: v1.2.8
|
||||
# CreateDate: 2023/11/06
|
||||
# mcu: chip: GD32F303RET6
|
||||
# version: CR4NS200323C10
|
||||
[include sensorless.cfg]
|
||||
[include gcode_macro.cfg]
|
||||
[include printer_params.cfg]
|
||||
[mcu]
|
||||
serial:/dev/ttyS1
|
||||
baud:230400
|
||||
restart_method: command
|
||||
|
||||
[force_move]
|
||||
enable_force_move: True
|
||||
|
||||
[mcu rpi]
|
||||
serial: /tmp/klipper_host_mcu
|
||||
|
||||
[bl24c16f]
|
||||
i2c_mcu: rpi
|
||||
i2c_bus: i2c.2
|
||||
i2c_speed: 400000
|
||||
|
||||
######################################################
|
||||
[prtouch_v2]
|
||||
pres_cnt: 1 #探点次数
|
||||
pres0_clk_pins: PA4 #压力检测时钟引脚配置
|
||||
pres0_sdo_pins: PC6 #压力检测数据引脚配置
|
||||
step_swap_pin: PA15
|
||||
pres_swap_pin: PA15
|
||||
step_base:2
|
||||
# show_msg: True
|
||||
tri_min_hold: 1000
|
||||
tri_max_hold: 1500 #压力检测信息展示
|
||||
speed: 1
|
||||
# tri_wave_ip: 172.22.30.204
|
||||
#####################################################
|
||||
|
||||
|
||||
[z_compensate]
|
||||
tri_min_hold: 1400
|
||||
tri_max_hold: 2000 #压力检测信息展示
|
||||
tri_expand_mm = 0.10
|
||||
# tri_min_hold: 3
|
||||
speed: 5
|
||||
hot_start_temp: 180#擦喷嘴是最小温度
|
||||
hot_rub_temp: 200#擦喷嘴是最小温度
|
||||
hot_end_temp: 140#擦喷嘴是最小温度
|
||||
bed_add_temp: 60#调平时的热床温度
|
||||
clr_noz_start_x: -3 #擦喷头区域的起始x坐标(默认在热床后方正中心位置)
|
||||
clr_noz_start_y: 20 #擦喷头区域的起始y坐标
|
||||
clr_noz_len_x: 3 #擦喷头区域的x方向的长度
|
||||
clr_noz_len_y: 50 #擦喷头区域的y方向的长度
|
||||
pa_clr_dis_mm_x = 0
|
||||
pa_clr_dis_mm_y =30
|
||||
# show_msg = True
|
||||
bl_offset: 0,27
|
||||
noz_pos_center: 20,25
|
||||
noz_pos_offset: 3,7
|
||||
pumpback_mm: 10
|
||||
vs_start_z_pos: 3
|
||||
pr_probe_cnt: 3
|
||||
pr_clear_probe_cnt: 3
|
||||
type_nozz = 0
|
||||
|
||||
|
||||
[printer]
|
||||
kinematics: cartesian
|
||||
max_velocity: 500
|
||||
max_accel: 8000
|
||||
max_accel_to_decel: 2500
|
||||
max_z_velocity: 30
|
||||
square_corner_velocity: 5.0
|
||||
max_z_accel: 300
|
||||
|
||||
[idle_timeout]
|
||||
timeout: 99999999
|
||||
|
||||
[stepper_x]
|
||||
step_pin: PC2
|
||||
dir_pin: !PB9
|
||||
enable_pin: !PC3
|
||||
microsteps: 16
|
||||
rotation_distance: 40
|
||||
endstop_pin: !PA5
|
||||
position_endstop: -12
|
||||
position_min: -12
|
||||
position_max: 221
|
||||
homing_speed: 30
|
||||
homing_retract_dist:0 #10
|
||||
|
||||
[tmc2208 stepper_x]
|
||||
uart_pin:PB12
|
||||
interpolate: True
|
||||
run_current:0.75
|
||||
sense_resistor: 0.150
|
||||
stealthchop_threshold: 0
|
||||
|
||||
|
||||
[stepper_y]
|
||||
step_pin: PB8
|
||||
dir_pin: PB7
|
||||
enable_pin: !PC3
|
||||
microsteps: 16
|
||||
rotation_distance: 60
|
||||
endstop_pin: !PA6
|
||||
position_endstop: -20
|
||||
position_min: -20
|
||||
position_max: 223
|
||||
homing_speed: 30
|
||||
homing_retract_dist:0
|
||||
|
||||
[tmc2208 stepper_y]
|
||||
uart_pin:PB13
|
||||
interpolate: True
|
||||
run_current:0.75
|
||||
sense_resistor: 0.150
|
||||
stealthchop_threshold: 0
|
||||
|
||||
[stepper_z]
|
||||
step_pin: PB6
|
||||
dir_pin: !PB5
|
||||
enable_pin: !PC3
|
||||
microsteps: 16
|
||||
rotation_distance:8
|
||||
endstop_pin:probe:z_virtual_endstop#PA15 #probe:z_virtual_endstop
|
||||
position_max: 246
|
||||
position_min: -5
|
||||
|
||||
[tmc2208 stepper_z]
|
||||
uart_pin: PB14
|
||||
interpolate: True
|
||||
run_current: 0.8
|
||||
stealthchop_threshold: 0
|
||||
sense_resistor: 0.150
|
||||
|
||||
|
||||
[bltouch]
|
||||
sensor_pin:PC14
|
||||
control_pin: PC13
|
||||
x_offset: 0
|
||||
y_offset: 27
|
||||
z_offset: 0
|
||||
probe_with_touch_mode: true
|
||||
stow_on_each_sample: false
|
||||
speed:5
|
||||
lift_speed:20
|
||||
|
||||
|
||||
[filament_switch_sensor filament_sensor]
|
||||
switch_pin: !PC15
|
||||
pause_on_runout: true
|
||||
|
||||
[output_pin MainBoardFan]
|
||||
pin: !PB1
|
||||
|
||||
[extruder]
|
||||
max_extrude_only_distance:1000
|
||||
max_extrude_cross_section:80
|
||||
pressure_advance = 0.036
|
||||
step_pin: PB4
|
||||
dir_pin: PB3
|
||||
enable_pin: !PC3
|
||||
microsteps: 16
|
||||
rotation_distance: 7.53
|
||||
nozzle_diameter: 0.400
|
||||
filament_diameter: 1.750
|
||||
heater_pin: PA1
|
||||
sensor_type: EPCOS 100K B57560G104F
|
||||
sensor_pin: PC5
|
||||
control = pid
|
||||
pid_Kp=20.584
|
||||
pid_Ki=1.737
|
||||
pid_Kd=60.981
|
||||
min_temp: 0
|
||||
max_temp: 320 # Set to 300 for S1 Pro
|
||||
|
||||
|
||||
[heater_bed]
|
||||
heater_pin: PB2
|
||||
sensor_type: EPCOS 100K B57560G104F
|
||||
sensor_pin: PC4
|
||||
control = pid
|
||||
pid_kp = 70.652
|
||||
pid_ki = 1.798
|
||||
pid_kd = 694.157
|
||||
min_temp: 0
|
||||
max_temp: 120 #
|
||||
temp_offset_flag = True
|
||||
|
||||
[verify_heater extruder]
|
||||
[verify_heater heater_bed]
|
||||
check_gain_time: 120
|
||||
heating_gain: 1.0
|
||||
hysteresis: 10
|
||||
|
||||
[temperature_sensor mcu_temp]
|
||||
sensor_type: temperature_mcu
|
||||
min_temp: 0
|
||||
max_temp: 100
|
||||
|
||||
[output_pin fan0]
|
||||
pin:PA0
|
||||
pwm: True
|
||||
cycle_time: 0.0100
|
||||
hardware_pwm: false
|
||||
value: 0.00
|
||||
scale: 255
|
||||
shutdown_value: 0.0
|
||||
|
||||
[heater_fan nozzle_fan]
|
||||
pin: PC1
|
||||
max_power: 1.0
|
||||
shutdown_speed: 0
|
||||
cycle_time: 0.010
|
||||
hardware_pwm: False
|
||||
kick_start_time: 0.100
|
||||
off_below: 0.0
|
||||
heater: extruder
|
||||
fan_speed: 1.0
|
||||
heater_temp: 60.0
|
||||
|
||||
|
||||
[bed_mesh]
|
||||
speed: 350
|
||||
mesh_min: 5,10 #need to handle head distance with bl_touch
|
||||
mesh_max: 215,215 #max probe range
|
||||
probe_count: 5,5
|
||||
fade_start: 1
|
||||
fade_end: 10
|
||||
fade_target: 0
|
||||
horizontal_move_z: 8
|
||||
|
||||
[input_shaper]
|
||||
shaper_type_y = mzv
|
||||
shaper_freq_y = 32.0
|
||||
|
||||
shaper_type_x = mzv
|
||||
shaper_freq_x = 38.5
|
||||
|
||||
[mcu rpi]
|
||||
serial: /tmp/klipper_host_mcu
|
||||
|
||||
[adxl345]
|
||||
cs_pin: rpi:None
|
||||
spi_speed: 2000000
|
||||
spi_bus: spidev2.0
|
||||
axes_map: z,y,x
|
||||
|
||||
[resonance_tester]
|
||||
accel_chip: adxl345
|
||||
accel_per_hz: 70
|
||||
probe_points: 117.5,117.5,100
|
||||
max_freq: 90
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#Ender-3V3 KE
|
||||
########################################################
|
||||
[custom_macro]
|
||||
default_bed_temp: 60
|
||||
default_extruder_temp: 220
|
||||
g28_ext_temp: 140
|
||||
temp_diff: 40
|
||||
calibration_zoffset_flags:0
|
||||
Executable
+170
@@ -0,0 +1,170 @@
|
||||
# Createdate: 2023/08/09
|
||||
# Ender-3V3 KE
|
||||
|
||||
[gcode_macro PRINTER_PARAM]
|
||||
variable_z_safe_pause: 0.0
|
||||
variable_z_safe_g28: 5.0
|
||||
variable_max_x_position: 220.0
|
||||
variable_max_y_position: 220.0
|
||||
variable_max_z_position: 240.0
|
||||
variable_auto_g29: 0
|
||||
variable_x_home_pos: -3
|
||||
variable_y_home_pos: -5
|
||||
gcode:
|
||||
|
||||
[force_move]
|
||||
enable_force_move: true
|
||||
|
||||
[gcode_macro xyz_ready]
|
||||
variable_x_ready: 0
|
||||
variable_y_ready: 0
|
||||
variable_z_ready: 0
|
||||
variable_x_moved: 0
|
||||
variable_y_moved: 0
|
||||
variable_z_moved: 0
|
||||
variable_safe_z: 5
|
||||
gcode:
|
||||
|
||||
[gcode_macro _IF_HOME_Z]
|
||||
gcode:
|
||||
{% if printer['gcode_macro xyz_ready'].z_ready|int == 1 %}
|
||||
{% if printer.toolhead.position.z|int < 10 %}
|
||||
{% set z_park = 10.0 - printer.toolhead.position.z|int %}
|
||||
G91
|
||||
G1 z{z_park} F600
|
||||
G90
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if printer['gcode_macro xyz_ready'].z_moved|int == 0 %}
|
||||
SET_GCODE_VARIABLE MACRO=xyz_ready VARIABLE=z_moved VALUE=1
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro _IF_MOVE_X]
|
||||
gcode:
|
||||
{% if printer['gcode_macro xyz_ready'].x_moved|int == 0 %}
|
||||
{% if printer['gcode_macro xyz_ready'].y_moved|int == 0 %}
|
||||
{% set SAFE_Z = printer['gcode_macro xyz_ready'].safe_z|int%}
|
||||
FORCE_MOVE STEPPER=stepper_z DISTANCE={SAFE_Z} VELOCITY=20
|
||||
{% endif %}
|
||||
# FORCE_MOVE STEPPER=stepper_x DISTANCE=10 VELOCITY=20
|
||||
SET_GCODE_VARIABLE MACRO=xyz_ready VARIABLE=x_moved VALUE=1
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro _IF_MOVE_Y]
|
||||
gcode:
|
||||
{% if printer['gcode_macro xyz_ready'].y_moved|int == 0 %}
|
||||
{% if printer['gcode_macro xyz_ready'].x_moved|int == 0 %}
|
||||
{% set SAFE_Z =printer['gcode_macro xyz_ready'].safe_z|int%}
|
||||
FORCE_MOVE STEPPER=stepper_z DISTANCE={SAFE_Z} VELOCITY=20
|
||||
{% endif %}
|
||||
# FORCE_MOVE STEPPER=stepper_y DISTANCE=10 VELOCITY=20
|
||||
SET_GCODE_VARIABLE MACRO=xyz_ready VARIABLE=y_moved VALUE=1
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro _HOME_X]
|
||||
gcode:
|
||||
_IF_MOVE_X
|
||||
{% if printer['gcode_macro xyz_ready'].z_moved|int == 1 %}
|
||||
{% if printer.toolhead.position.z|int < 10 %}
|
||||
{% set z_park = 10.0 - printer.toolhead.position.z|int %}
|
||||
G91
|
||||
G1 z{z_park} F600
|
||||
G90
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
G28 X
|
||||
SET_GCODE_VARIABLE MACRO=xyz_ready VARIABLE=x_ready VALUE=1
|
||||
G1 x10 F4800
|
||||
G28 x
|
||||
G91 X5 F2000
|
||||
G90
|
||||
|
||||
|
||||
[gcode_macro _HOME_Y]
|
||||
gcode:
|
||||
_IF_MOVE_Y
|
||||
{% if printer['gcode_macro xyz_ready'].z_moved|int == 1 %}
|
||||
{% if printer.toolhead.position.z|int < 10 %}
|
||||
{% set z_park = 10.0 - printer.toolhead.position.z|int %}
|
||||
G91
|
||||
G1 z{z_park} F600
|
||||
G90
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
G28 Y
|
||||
SET_GCODE_VARIABLE MACRO=xyz_ready VARIABLE=y_ready VALUE=1
|
||||
G1 Y10 F4800
|
||||
G28 Y
|
||||
G91
|
||||
G1 y5 F2000
|
||||
G90
|
||||
|
||||
[gcode_macro _HOME_Z]
|
||||
gcode:
|
||||
{% if printer['gcode_macro xyz_ready'].y_ready|int == 1 %}
|
||||
{% if printer['gcode_macro xyz_ready'].x_ready|int == 1 %}
|
||||
_IF_HOME_Z
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if printer['gcode_macro xyz_ready'].x_ready|int == 0 %}
|
||||
_HOME_X
|
||||
{% endif %}
|
||||
{% if printer['gcode_macro xyz_ready'].y_ready|int == 0 %}
|
||||
_HOME_Y
|
||||
{% endif %}
|
||||
G90
|
||||
{% set bl_offset = printer.configfile.settings['bltouch'] %}
|
||||
{% set x_park = printer['gcode_macro PRINTER_PARAM'].max_x_position/2 - bl_offset.x_offset %}
|
||||
{% set y_park = printer['gcode_macro PRINTER_PARAM'].max_y_position/2 - bl_offset.y_offset %}
|
||||
{action_respond_info("x_park = %s \n" % (x_park))}
|
||||
{action_respond_info("y_park = %s \n" % (y_park))}
|
||||
G1 x{x_park} y{y_park} F6000
|
||||
G4 P500 # P1000
|
||||
|
||||
G28 Z
|
||||
SET_GCODE_VARIABLE MACRO=xyz_ready VARIABLE=z_ready VALUE=1
|
||||
G1 X110Y110Z5 F2400
|
||||
|
||||
|
||||
[homing_override]
|
||||
axes: xyz
|
||||
gcode:
|
||||
BED_MESH_SAVE
|
||||
BED_MESH_CLEAR
|
||||
{% set x_axes = printer.toolhead.homed_axes %}
|
||||
{% if x_axes is defined and x_axes[0] is defined %}
|
||||
{action_respond_info(
|
||||
"x_axes: %s \n"
|
||||
% (x_axes))}
|
||||
{% else %}
|
||||
SET_GCODE_VARIABLE MACRO=xyz_ready VARIABLE=x_ready VALUE=0
|
||||
SET_GCODE_VARIABLE MACRO=xyz_ready VARIABLE=y_ready VALUE=0
|
||||
SET_GCODE_VARIABLE MACRO=xyz_ready VARIABLE=z_ready VALUE=0
|
||||
SET_GCODE_VARIABLE MACRO=xyz_ready VARIABLE=x_moved VALUE=0
|
||||
SET_GCODE_VARIABLE MACRO=xyz_ready VARIABLE=y_moved VALUE=0
|
||||
SET_GCODE_VARIABLE MACRO=xyz_ready VARIABLE=z_moved VALUE=0
|
||||
{action_respond_info(
|
||||
"axes is NULL\n")}
|
||||
{% endif %}
|
||||
{% set home_all = 'X' not in params and 'Y' not in params %}
|
||||
{% if 'Z' in params and 'X' not in params and 'Y' not in params %}
|
||||
{% if x_axes[0] is defined and x_axes[1] is defined %}
|
||||
{% set home_all = 0 %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% set home_all = 'X' not in params and 'Y' not in params and 'Z' not in params %} # G28
|
||||
{% if home_all or 'X' in params %} # G28 / G28 X / G28 X Y / G28 X Y Z
|
||||
_HOME_X
|
||||
{% endif %}
|
||||
|
||||
{% if home_all or 'Y' in params %} # G28 / G28 Y / G28 X Y / G28 X Y Z
|
||||
_HOME_Y
|
||||
{% endif %}
|
||||
|
||||
{% if home_all or 'Z' in params %} # G28 / G28 Z / G28 X Y Z
|
||||
_HOME_Z
|
||||
BED_MESH_PROFILE LOAD="default"
|
||||
{% endif %}
|
||||
G4 P500
|
||||
Reference in New Issue
Block a user