Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: Make config more generic #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 39 additions & 103 deletions MKS Gen l/generic-mks-gen-l-v1.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
# MKS Gen l V1
# MKS Gen l V1/V2
# For MKS Gen L firmware should be compiled for the AVR ATmega 2560.
# See docs/Config_Reference.md for a description of parameters.

[mcu]
serial:/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

[printer]
kinematics: cartesian
max_velocity: 200
max_accel: 1500
max_z_velocity: 10
max_z_accel: 500
square_corner_velocity: 10.0

[stepper_x]
step_pin: PF0
dir_pin: !PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40 ##rotation_distance = ((360°/1.8°) * microsteps) / 80 # # 旋转距离 = (圆周360°/步距角)*细分/每MM脉冲值
endstop_pin:^PE5 #X-Min, PE4:X-Max
endstop_pin:^PE5 #X-Min, PE4:X-Max
position_endstop: 0
position_max: 235
homing_speed: 30
Expand All @@ -17,7 +30,7 @@ dir_pin: !PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^PJ1 #Y-Min, PJ0:Y-Max
endstop_pin: ^PJ1 #Y-Min, PJ0:Y-Max
position_endstop: 0
position_max: 235
homing_speed: 30
Expand All @@ -28,7 +41,7 @@ dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: ^PD3 #Z-Min, PD2:Z-Max
endstop_pin: ^PD3 #Z-Min, PD2:Z-Max
position_endstop: 0
position_max: 250
position_min: -3
Expand All @@ -42,7 +55,7 @@ rotation_distance: 33.500
nozzle_diameter: 0.4
filament_diameter: 1.750
heater_pin: PB4
sensor_type: ATC Semitec 104GT-2
sensor_type: Generic 3950
sensor_pin: PK5
min_temp: 0
max_temp: 250
Expand All @@ -61,7 +74,7 @@ pid_Kd: 114

[heater_bed]
heater_pin: PH5
sensor_type: ATC Semitec 104GT-2
sensor_type: Generic 3950
sensor_pin: PK6
min_temp: 0
max_temp: 130
Expand All @@ -70,12 +83,12 @@ pid_Kp: 325.10
pid_Ki: 63.35
pid_Kd: 417.10

########################################
# Fan configuration
########################################
[fan]
pin: PH6

[mcu]
serial:/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

########################################
# TMC UART configuration
########################################
Expand All @@ -88,8 +101,7 @@ serial:/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
#sense_resistor: 0.110
#stealthchop_threshold: 999999
#diag_pin: ^PE5 # Set to MCU pin connected to TMC DIAG pin
#driver_SGTHRS: 60 # 255 is most sensitive value, 0 is least sensitiv # Set to MCU pin connected to TMC DIAG pin

#driver_SGTHRS: 60 # 255 is most sensitive value, 0 is least sensitive

#[tmc2209 stepper_y]
#uart_pin: PK2
Expand All @@ -99,7 +111,7 @@ serial:/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
#sense_resistor: 0.110
#stealthchop_threshold: 999999
#diag_pin: ^PJ1 # Set to MCU pin connected to TMC DIAG pin
#driver_SGTHRS: 60 # 255 is most sensitive value, 0 is least sensitiv
#driver_SGTHRS: 60 # 255 is most sensitive value, 0 is least sensitive

#[tmc2209 stepper_z]
#uart_pin: PK3
Expand All @@ -109,7 +121,7 @@ serial:/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
#sense_resistor: 0.110
#stealthchop_threshold: 999999
#diag_pin: ^PD2 # Set to MCU pin connected to TMC DIAG pin
#driver_SGTHRS: 255 # 255 is most sensitive value, 0 is least sensitiv
#driver_SGTHRS: 255 # 255 is most sensitive value, 0 is least sensitive

#[tmc2209 extruder]
#uart_pin: PK4
Expand All @@ -127,47 +139,10 @@ serial:/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
#sense_resistor: 0.110
#stealthchop_threshold: 0


[printer]
kinematics: cartesian
max_velocity: 200
max_accel: 1500
max_z_velocity: 10
max_z_accel: 500
square_corner_velocity: 10.0


########################################
# EXP1 / EXP2 (display) pins
# BLtouch configuration
########################################

[board_pins]
aliases:
# EXP1 header
EXP1_1=PC0, EXP1_3=PH0, EXP1_5=PA1, EXP1_7=PA5, EXP1_9=<GND>,
EXP1_2=PC2, EXP1_4=PH1, EXP1_6=PA3, EXP1_8=PA7, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PB3, EXP2_3=PC6, EXP2_5=PC4, EXP2_7=PL0, EXP2_9=<GND>,
EXP2_2=PB1, EXP2_4=PB0, EXP2_6=PB2, EXP2_8=PG0, EXP2_10=<NC>
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "ssp1"
# See the MKS Lcd Config path file for definitions of common LCD displays.
[include mks_lcd_12864.cfg]

[virtual_sdcard]
path: ~/gcode_files

[pause_resume]

[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
CANCEL_PRINT_BASE


[display_status]

#[bltouch]
#sensor_pin: ^PD2
#control_pin:PB5
Expand All @@ -187,56 +162,17 @@ gcode:
#z_hop: 10 # Move up 10mm
#z_hop_speed: 5

########################################
# EXP1 / EXP2 (display) pins
########################################

[gcode_macro G29]
gcode:
BED_MESH_CLEAR
G28
BED_MESH_CALIBRATE
BED_MESH_PROFILE SAVE=name
SAVE_CONFIG
BED_MESH_PROFILE LOAD=name

[bed_mesh]
speed: 50
horizontal_move_z: 10
mesh_min:20,50
mesh_max:170,200
probe_count: 3,3

#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.052500, -0.032500, 0.186250
#*# 0.053750, -0.070000, 0.233750
#*# 0.182500, 0.037500, 0.240000
#*# tension = 0.2
#*# min_x = 20.0
#*# algo = lagrange
#*# y_count = 3
#*# mesh_y_pps = 2
#*# min_y = 50.0
#*# x_count = 3
#*# max_y = 200.0
#*# mesh_x_pps = 2
#*# max_x = 170.0
#*#
#*# [bed_mesh name]
#*# version = 1
#*# points =
#*# 0.052500, -0.032500, 0.186250
#*# 0.053750, -0.070000, 0.233750
#*# 0.182500, 0.037500, 0.240000
#*# tension = 0.2
#*# min_x = 20.0
#*# algo = lagrange
#*# y_count = 3
#*# mesh_y_pps = 2
#*# min_y = 50.0
#*# x_count = 3
#*# max_y = 200.0
#*# mesh_x_pps = 2
#*# max_x = 170.0
[board_pins]
aliases:
# EXP1 header
EXP1_1=PC0, EXP1_3=PH0, EXP1_5=PA1, EXP1_7=PA5, EXP1_9=<GND>,
EXP1_2=PC2, EXP1_4=PH1, EXP1_6=PA3, EXP1_8=PA7, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PB3, EXP2_3=PC6, EXP2_5=PC4, EXP2_7=PL0, EXP2_9=<GND>,
EXP2_2=PB1, EXP2_4=PB0, EXP2_6=PB2, EXP2_8=PG0, EXP2_10=<NC>
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "ssp1"
# See the MKS Lcd Config path file for definitions of common LCD displays.