Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [include macros.cfg]
- [stepper_x]
- step_pin: PB13
- dir_pin: !PB12
- enable_pin: !PB14
- microsteps: 16
- rotation_distance: 40
- endstop_pin: ^PC0
- position_endstop: 260
- position_min: 0
- position_max: 260
- homing_speed: 50
- [tmc2209 stepper_x]
- uart_pin: PC11
- tx_pin: PC10
- uart_address: 0
- run_current: 0.580
- #stealthchop_threshold: 999999
- [stepper_y]
- step_pin: PB10
- dir_pin: PB2
- enable_pin: !PB11
- microsteps: 16
- rotation_distance: 40
- endstop_pin: ^PC1
- position_endstop: 260
- position_min: 0
- position_max: 260
- homing_speed: 50
- [tmc2209 stepper_y]
- uart_pin: PC11
- tx_pin: PC10
- uart_address: 2
- run_current: 0.580
- #stealthchop_threshold: 999999
- [stepper_z]
- step_pin: PB0
- dir_pin: !PC5
- enable_pin: !PB1
- microsteps: 16
- rotation_distance: 8
- endstop_pin: ^PC2
- position_endstop: 0.0
- position_max: 400
- [tmc2209 stepper_z]
- uart_pin: PC11
- tx_pin: PC10
- uart_address: 1
- run_current: 0.580
- #stealthchop_threshold: 999999
- [extruder]
- step_pin: PB3
- dir_pin: PB4
- enable_pin: !PD1
- microsteps: 16
- rotation_distance: 22.857
- nozzle_diameter: 0.400
- filament_diameter: 1.750
- heater_pin: PC8
- sensor_type: EPCOS 100K B57560G104F
- sensor_pin: PA0
- #control: pid
- #pid_Kp: 21.527
- #pid_Ki: 1.063
- #pid_Kd: 108.982
- min_temp: 0
- max_temp: 250
- [tmc2209 extruder]
- uart_pin: PC11
- tx_pin: PC10
- uart_address: 3
- run_current: 0.650
- #stealthchop_threshold: 999999
- [heater_bed]
- heater_pin: PC9
- sensor_type: ATC Semitec 104GT-2
- sensor_pin: PC4
- #control: pid
- #pid_Kp: 54.027
- #pid_Ki: 0.770
- #pid_Kd: 948.182
- min_temp: 0
- max_temp: 130
- [heater_fan heatbreak_cooling_fan]
- pin: PC7
- heater_temp: 50.0
- [heater_fan controller_fan]
- pin: PB15
- [fan]
- pin: PC6
- [mcu]
- serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_210027000150414D39343620-if00
- [temperature_sensor raspberry_pi]
- sensor_type: temperature_host
- min_temp: 5
- max_temp: 100
- [temperature_sensor mcu_temp]
- sensor_type: temperature_mcu
- min_temp: 0
- max_temp: 100
- [printer]
- kinematics: corexy
- max_velocity: 500
- max_accel: 2000
- max_z_velocity: 10
- max_z_accel: 100
- [bed_screws]
- screw1: 232, 15
- screw2: 232, 205
- screw3: 43, 205
- screw4: 43, 15
- [virtual_sdcard]
- path: ~/gcode_files
- [display_status]
- [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 = 5 %}
- {% set y_park = 5 %}
- ##### calculate save lift position #####
- {% set max_z = printer.toolhead.axis_maximum.z|float %}
- {% set act_z = printer.toolhead.position.z|float %}
- {% if act_z < (max_z - 2.0) %}
- {% set z_safe = 2.0 %}
- {% else %}
- {% set z_safe = max_z - act_z %}
- {% endif %}
- ##### end of definitions #####
- PAUSE_BASE
- G91
- {% 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} F900
- 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:
- ##### 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 %}
- ##### 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 CANCEL_PRINT]
- #description: Cancel the actual running print
- rename_existing: CANCEL_PRINT_BASE
- gcode:
- # Turn off bed, extruder, and fan
- M140 S0
- M104 S0
- M106 S0
- M107
- G91 ;Relative positioning
- G1 E-0.6 Z0.2 F4200 ;Retract and raise Z
- G1 X5 Y5 F3000 ;Wipe out
- G1 Z20 ;Raise Z more
- # Move Nozzle away and present print
- G90 ;Absolute positioning
- G1 X30 Y151 F3000
- M84 X Y E ; disable motors
- SET_LED LED=neo RED=0.5 GREEN=0.5 BLUE=0.5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement