Printer.cfg(current)

From jenny3dprint opensource
Jump to: navigation, search
[include kiauh_macros.cfg]
[mcu]
serial:  /dev/ttyUSB0
restart_method: command
#[mcu rpi]
#serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:gpio11
#[resonance_tester]
#accel_chip: adxl345
#probe_points:
#    325,325,20  # middle of print bed


[pause_resume]
[display_status]
[virtual_sdcard]
path: ~/gcode_files
[printer]
kinematics: corexy
max_velocity: 260
max_accel:6000
#max_accel_to_decel:7000
max_z_velocity: 10
max_z_accel: 100
[stepper_x]
step_pin: PB2
dir_pin: !PA0
enable_pin: !PE2
step_distance: 0.0125
endstop_pin: PA11
position_endstop: 650
position_max: 650
homing_speed: 100
homing_retract_dist: 0 
[stepper_y]
step_pin: PC14
dir_pin: !PE6
enable_pin: !PC15
step_distance: 0.0125
endstop_pin: PD12
position_endstop: 650
position_max: 650
homing_speed: 100
homing_retract_dist: 0
## Z0 Stepper - Front Left
[stepper_z]
step_pin: PE5
dir_pin: PE4
enable_pin: !PC13
step_distance: 0.0025
endstop_pin: PE0
position_endstop: 12.7 #modfiy this when nozzle changed.more small more far.
position_max: 512
homing_speed: 15
position_min: -10
second_homing_speed: 3.0
homing_retract_dist: 3.0
##      Z1 Stepper - Rear Left
[stepper_z1]
step_pin: PA1
dir_pin: !PB0
enable_pin: !PC5
step_distance: 0.0025
##      Z2 Stepper - Rear Right
[stepper_z2]
step_pin: PC4
dir_pin: PE3
enable_pin: !PB1
step_distance: 0.0025
##      Z3 Stepper - Front Right
[stepper_z3]
step_pin: PB3
dir_pin: !PB4
enable_pin: !PB5
#step_distance: 0.0015625
step_distance: 0.0025
[extruder]
step_pin: PE8
dir_pin: PE7
enable_pin: !PE9
#step_distance: .00194
step_distance: .0048
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: !PC6 # Heat0
sensor_pin:  PC0 # T1 Header
#sensor_type: PT100 INA826
sensor_type: EPCOS 100K B57560G104F
control: pid
pid_Kp=18.731
pid_Ki=0.827 
pid_Kd=106.065 
min_temp: -20
max_temp: 350
max_extrude_cross_section:100
##      Try to keep pressure_advance below 1.0
pressure_advance: 0.046
##      Default is 0.040, leave stock
pressure_advance_smooth_time: 0.040
max_extrude_only_velocity:100
max_extrude_only_accel:3000
[heater_bed]
heater_pin: !PB13
sensor_pin: PC1
##      Thermistor Types
##   "EPCOS 100K B57560G104F"
##   "ATC Semitec 104GT-2"
##   "NTC 100K beta 3950"
##   "Honeywell 100K 135-104LAG-J01"
##   "NTC 100K MGB18-104F39050L32" (Keenovo Heater Pad)
##   "AD595"
##   "PT100 INA826"
sensor_type: EPCOS 100K B57560G104F
control: watermark
min_temp: 0
max_temp: 120
[probe]
pin: PC8
x_offset: 0
y_offset: 25.0
z_offset: 0
speed: 30.0
samples: 2
samples_result: average
sample_retract_dist: 3.0
samples_tolerance: 0.05
samples_tolerance_retries: 3
[fan]
pin: !PB8
kick_start_time: 0.5
off_below: 0.10
cycle_time: 0.001
[heater_fan fan1]
pin: !PB6
max_power: 1.0
kick_start_time: 0.5
heater: extruder
heater_temp: 50.0
[heater_fan controller_fan]
pin: !PB9
kick_start_time: 0.500
heater: heater_bed
heater_temp: 45.0
#[heater_fan exhaust_fan]
#pin: z:P2.7
#max_power: 1.0
#shutdown_speed: 0.0
#kick_start_time: 5.0
#heater: heater_bed
#heater_temp: 60 
#fan_speed: 1.0
#[heater_fan fan2]
#pin: PE6
[skew_correction]
#[idle_timeout]
#timeout: 1800
[force_move]
enable_force_move: true
#   Set to true to enable FORCE_MOVE and SET_KINEMATIC_POSITION
#   extended G-Code commands. The default is false.
[homing_override]
axes: z
set_position_z: 0
gcode:
   SET_PIN PIN=Z_ENABLE VALUE=100
   G90
   G0 Z50 F1200
   G28 X Y
   G0 X590 Y648  F4800
   G28 Z
   G0 Z50 F1200
   G0 X550  F4800


[quad_gantry_level]
gantry_corners:
       -60,-10
       750,800
#       Probe points
points:
       30,20
       30,560
       620,560
       620,20
speed: 100
horizontal_move_z: 50
retries: 5
retry_tolerance: 0.05
max_adjust: 90


#####################################################################
#       Macros
#####################################################################
[output_pin case_light]
pin: !PA3
pwm: true
shutdown_value: 0
cycle_time: 0.01
scale: 255
[output_pin Z_ENABLE]
pin: !PC7
pwm: true
shutdown_value: 0
cycle_time: 0.01
scale: 100
[gcode_button POWER_OFF_KEY]
pin:PA15
press_gcode:
        SET_PIN PIN=POWER_OFF VALUE=100
[output_pin POWER_OFF]
pin: !PB12
pwm: true
shutdown_value: 0
cycle_time: 0.01
scale: 100


[gcode_macro M355]
variable_light_before: 0
default_parameter_S: 0
default_parameter_P: 0
gcode:
        SET_PIN PIN=case_light VALUE={S|float * P|float}


[gcode_macro ENDSTOPS_PROBE_STATUS]
gcode:
       QUERY_ENDSTOPS
       QUERY_PROBE


[gcode_macro TEST_X]
gcode:        
       STEPPER_BUZZ STEPPER=stepper_x 
[gcode_macro TEST_Y]
gcode:        
       STEPPER_BUZZ STEPPER=stepper_y 
[gcode_macro TEST_Z0]
gcode:   
       STEPPER_BUZZ STEPPER=stepper_z
[gcode_macro TEST_Z1]
gcode:   
       STEPPER_BUZZ STEPPER=stepper_z1
[gcode_macro TEST_Z2]
gcode:   
       STEPPER_BUZZ STEPPER=stepper_z2
[gcode_macro TEST_Z3]
gcode:   
       STEPPER_BUZZ STEPPER=stepper_z3
[gcode_macro LIGHT_ON]
gcode:
       M355 S1 P255
[gcode_macro LIGHT_OFF]
gcode:
       M355 S0 P0
[gcode_macro MOUNT_PROBE]
gcode:
       G1 X473 Y597 F3600;
       G1 X473 Y649 F3600;
       G1 X434 Y649 F3600;
       G1 X434 Y597 F3600;
[gcode_macro UMOUNT_PROBE]
gcode:
       G1 X434 Y597 F3600;
       G1 X434 Y647 F3600;
       G1 X473 Y647 F3600;
       G1 X473 Y597 F3600;
[gcode_macro UNLOCK_Z_MOVE]
gcode:
       SET_PIN PIN=Z_ENABLE VALUE=100
[gcode_macro ENABLE_Z_MOVE]
gcode:        
       SET_STEPPER_ENABLE STEPPER=stepper_z ENABLE=1
       SET_STEPPER_ENABLE STEPPER=stepper_z1 ENABLE=1
       SET_STEPPER_ENABLE STEPPER=stepper_z2 ENABLE=1
       SET_STEPPER_ENABLE STEPPER=stepper_z3 ENABLE=1
       SET_PIN PIN=Z_ENABLE VALUE=100
[gcode_macro FORCE_POWER_OFF]
gcode:
       SET_PIN PIN=POWER_OFF VALUE=100
[gcode_macro G32]
gcode:
   #BED_MESH_CLEAR
   G28
   MOUNT_PROBE
   QUAD_GANTRY_LEVEL
   UMOUNT_PROBE
   G28
   G0 X250 Y250 Z20 F1200


[gcode_macro POWER_LOSS]
description: in the actual running print power loss happen
gcode:
   
   SET_PIN PIN=case_light VALUE=0.00 SAVE=0
   #SET_FAN_SPEED controller_fan=0
   #SET_FAN_SPEED fan=0
   #SET_FAN_SPEED fan1=0
   M106 S0
   #################
   ##### set defaults #####
   #{% set x = params.X|default(230) %}      #edit to your park position
   #{% set y = params.Y|default(230) %}      #edit to your park position
   #{% set z = params.Z|default(10)|float %} #edit to your park position
   #{% set e = params.E|default(1) %}        #edit to your retract length
   ##### calculate save lift position #####
 
   #{%set min_extrude_temp = printer.configfile.settings["extruder"]["min_extrude_temp"]|int %}
   #{%set act_extrude_temp = printer.extruder.temperature|int %}
   
   #SAVE_GCODE_STATE NAME=PAUSE_state
   
   
   PAUSE
   TURN_OFF_HEATERS
   ##### end of definitions #####
  
   
       
   M117 unexpected power off happened


[gcode_macro PRINT_START]
#   Use PRINT_START for the slicer starting script - please customise for your slicer of choice
gcode:
   #G28                            ; home all axes
   SET_SKEW XY=140.5,140.1,99.92
   G32
   G1 Z20 F1200                   ; move nozzle away from bed
   G1 X30 Y10 Z0.3 F3600
   G92 E0
   G1 X40 E20 F100
   G1 X50 F2100
   G92 E0
[gcode_macro PRINT_END]
#   Use PRINT_END for the slicer ending script - please customise for your slicer of choice
gcode:
   M400                           ; wait for buffer to clear
   G92 E0                         ; zero the extruder
   G1 E-10.0 F3600                ; retract filament
   G91                            ; relative positioning
   G0 Z1.00 X20.0 Y25.0 F20000    ; move nozzle to remove stringing
   TURN_OFF_HEATERS
   M107                           ; turn off fan
   G1 Z8 F3000                    ; move nozzle up 2mm
   G90                            ; absolute positioning
   G0  X125 Y250 F3600            ; park nozzle at rear
   SET_SKEW CLEAR=1