diff --git a/Flying Bear Generic Configs/board/mks-rn-s-13.cfg b/Flying Bear Generic Configs/board/mks-rn-s-13.cfg index 84c697e..0db4595 100644 --- a/Flying Bear Generic Configs/board/mks-rn-s-13.cfg +++ b/Flying Bear Generic Configs/board/mks-rn-s-13.cfg @@ -120,15 +120,11 @@ aliases: ## Controls #################################################################### MT_DET1_PIN=PA4, MT_DET2_PIN=PE6, PW_DET_PIN=PA2, AUTO_OFF_PIN=PB2, - BEEPER_PIN=PC5, ## BLTouch ##################################################################### BLTOUCH_SENSOR_PIN=PE6, # MT_DET2 BLTOUCH_CONTROL_PIN=PA8, # SERVO ## TMC2209 UART ################################################################ - X_UART_PIN=PA1, X_TX_PIN=PA6, - Y_UART_PIN=PA1, Y_TX_PIN=PA6, - Z_UART_PIN=PA1, Z_TX_PIN=PA6, - E0_UART_PIN=PA1, E0_TX_PIN=PA6, + TMC_UART_PIN=PA1, TMC_TX_PIN=PA6, ################################################################################ # MCU @@ -148,7 +144,7 @@ min_temp: 0 max_temp: 100 [filament_switch_sensor filament_sensor] -switch_pin: MT_DET1_PIN +switch_pin: PA4 runout_gcode: BEEP P=1500 @@ -157,7 +153,7 @@ runout_gcode: ################################################################################ [output_pin _BEEPER_pin] -pin: BEEPER_PIN +pin: PC5 pwm: True value: 0 shutdown_value: 0 diff --git a/Flying Bear Generic Configs/fb-ghost4s-printer.cfg b/Flying Bear Generic Configs/fb-ghost4s-printer.cfg index f7566d1..ad3ff25 100644 --- a/Flying Bear Generic Configs/fb-ghost4s-printer.cfg +++ b/Flying Bear Generic Configs/fb-ghost4s-printer.cfg @@ -61,7 +61,7 @@ position_endstop: 0.5 ################################################################################ [extruder] -rotation_distance: 7.600 # CAUTION! Calibrate using https://www.klipper3d.org/Rotation_Distance.html; FBG5: 7.880, FBG4S: 7.600 +rotation_distance: 7.600 # CAUTION! Calibrate using https://www.klipper3d.org/Rotation_Distance.html nozzle_diameter: 0.400 pressure_advance: 0.000 # CAUTION! Calibrate using https://www.klipper3d.org/Pressure_Advance.html control: pid # CAUTION! Calibrate using PID_CALIBRATE https://www.klipper3d.org/G-Codes.html#extended-g-code-commands diff --git a/Flying Bear Generic Configs/fb-ghost5-printer.cfg b/Flying Bear Generic Configs/fb-ghost5-printer.cfg index c7a4531..55b7548 100644 --- a/Flying Bear Generic Configs/fb-ghost5-printer.cfg +++ b/Flying Bear Generic Configs/fb-ghost5-printer.cfg @@ -65,7 +65,7 @@ position_endstop: 0.5 ################################################################################ [extruder] -rotation_distance: 7.600 # CAUTION! Calibrate using https://www.klipper3d.org/Rotation_Distance.html; FBG5: 7.880, FBG4S: 7.600 +rotation_distance: 7.600 # CAUTION! Calibrate using https://www.klipper3d.org/Rotation_Distance.html nozzle_diameter: 0.400 pressure_advance: 0.000 # CAUTION! Calibrate using https://www.klipper3d.org/Pressure_Advance.html control: pid # CAUTION! Calibrate using PID_CALIBRATE https://www.klipper3d.org/G-Codes.html#extended-g-code-commands diff --git a/Flying Bear Generic Configs/fb-reborn-printer.cfg b/Flying Bear Generic Configs/fb-reborn-printer.cfg index 7f2015a..6755055 100644 --- a/Flying Bear Generic Configs/fb-reborn-printer.cfg +++ b/Flying Bear Generic Configs/fb-reborn-printer.cfg @@ -68,7 +68,7 @@ position_endstop: 0.5 ################################################################################ [extruder] -rotation_distance: 7.600 # CAUTION! Calibrate using https://www.klipper3d.org/Rotation_Distance.html; FBG5: 7.880, FBG4S: 7.600 +rotation_distance: 7.600 # CAUTION! Calibrate using https://www.klipper3d.org/Rotation_Distance.html nozzle_diameter: 0.400 pressure_advance: 0.000 # CAUTION! Calibrate using https://www.klipper3d.org/Pressure_Advance.html control: pid # CAUTION! Calibrate using PID_CALIBRATE https://www.klipper3d.org/G-Codes.html#extended-g-code-commands diff --git a/Flying Bear Generic Configs/macros/filament_management.cfg b/Flying Bear Generic Configs/macros/filament_management.cfg new file mode 100644 index 0000000..f7e1e66 --- /dev/null +++ b/Flying Bear Generic Configs/macros/filament_management.cfg @@ -0,0 +1,111 @@ +################################################################################ +# Board: MKS Robin Nano v1.1 (Flying Bear Reborn 2.0) / MKS Robin Nano v1.3 / MKS Robin Nano-S v1.3 +# Printer: Flying Bear Ghost 4S / Ghost 5 / Reborn +# G-code Macros by ODUCCEU +################################################################################ +# WARNING! DO NOT EDIT THIS FILE! +# To override settings from this file, you can copy and paste the relevant +# sections into your printer.cfg and change it there. +################################################################################ + +# Filament Change ############################################################## + +[gcode_macro FILAMENT_CHANGE] +# Unloads filament, waites 5 minutes for manual filament switch and loads again +gcode: + SAVE_GCODE_STATE NAME=FILAMENT_CHANGE_STATE + {% set timer = params.T|default(300)|float %} + {% set unload = params.U|default(100)|float %} + {% set load = params.L|default(100)|float %} + {% if printer.pause_resume.is_paused %} + M118 Already paused + {% else %} + {% if printer.toolhead.homed_axes != "xyz" %} + M118 Homing + G28 # home if not homed + {% else %} + M118 Pausing print + PAUSE + {% endif %} + {% endif %} + M118 Changing filament... + SET_IDLE_TIMEOUT TIMEOUT=7200 + FILAMENT_UNLOAD U={unload} + COUNTDOWN TIME={timer} MSG="Change filament! Time left: " + FILAMENT_LOAD L={load} + RESTORE_GCODE_STATE NAME=FILAMENT_CHANGE_STATE + +[gcode_macro FILAMENT_LOAD] +gcode: + {% set load = params.L|default(100)|float * 0.5 %} + {% set extruder_temp = params.T|default(220)|float %} + SAVE_GCODE_STATE NAME=FILAMENT_LOAD_STATE + LOW_TEMP_CHECK T={extruder_temp} + M118 Loading filament... + M83 # relative extrusion + G0 E{load} F600 # load the filament into the hotend area + G4 P1000 # wait 1 second + G1 E50 F100 # purge + M400 # wait until all moves are completed + M118 Filament loaded! + BEEP + RESTORE_GCODE_STATE NAME=FILAMENT_LOAD_STATE + +[gcode_macro FILAMENT_UNLOAD] +gcode: + {% set unload = params.U|default(100)|float %} + {% set extruder_temp = params.T|default(220)|float %} + SAVE_GCODE_STATE NAME=FILAMENT_UNLOAD_STATE + LOW_TEMP_CHECK T={extruder_temp} + M118 Unloading filament + M83 # relative extrusion + G0 E-5 F3600 # extract filament to the coldend zone + G4 P3000 # wait for 3 seconds + G0 E5 F3600 # push back the filament to smash any stringing + G0 E-15 F3600 # extract back fast to the coldend zone + G0 E-{unload} F300 # extract a lot + M400 # wait until all moves are completed + M118 Filament unloaded! + BEEP + RESTORE_GCODE_STATE NAME=FILAMENT_UNLOAD_STATE + +[gcode_macro LOW_TEMP_CHECK] +gcode: + {% set extruder_temp = params.T|default(220)|float %} + {% if printer.extruder.target > extruder_temp %} # check for a setpoint for extruder + {% set extruder_temp = printer.extruder.target %} + {% endif %} + {% if printer.extruder.temperature < extruder_temp %} # heat to the target temp + M118 Heating to {extruder_temp} + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={extruder_temp} + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={extruder_temp} + {% endif %} + +[gcode_macro COUNTDOWN] +gcode: + {% set timer = params.TIME|default(10)|int %} + {% set message = params.MSG|default("Time: ") %} + # countdown + {% if timer > 60 %} + {% for s in range(timer, 60, -10) %} + M118 {message} {s}s + G4 P10000 # wait 10 seconds + {% endfor %} + {% set timer = 60 %} + {% endif %} + {% if timer > 10 %} + {% for s in range(timer, 10, -5) %} + M118 {message} {s}s + G4 P5000 # wait 5 seconds + {% endfor %} + {% set timer = 10 %} + {% endif %} + {% if timer > 0 %} + {% for s in range(timer, 0, -1) %} + M118 {message} {s}s + G4 P1000 # wait 1 second + {% endfor %} + {% endif %} + BEEP + +################################################################################ diff --git a/Flying Bear Generic Configs/macros/macros.cfg b/Flying Bear Generic Configs/macros/macros.cfg index 7033b75..a1f111b 100644 --- a/Flying Bear Generic Configs/macros/macros.cfg +++ b/Flying Bear Generic Configs/macros/macros.cfg @@ -3,6 +3,18 @@ # Printer: Flying Bear Ghost 4S / Ghost 5 / Reborn # G-code Macros by ODUCCEU ################################################################################ +# WARNING! DO NOT EDIT THIS FILE! +# To override settings from this file, you can copy and paste the relevant +# sections into your printer.cfg and change it there. +################################################################################ + +# Documentation +# https://www.klipper3d.org/G-Codes.html +# https://www.klipper3d.org/Command_Templates.html + +################################################################################ +# Included macros +################################################################################ [include print_management.cfg] [include prime_line.cfg] diff --git a/Flying Bear Generic Configs/macros/macros_marlin.cfg b/Flying Bear Generic Configs/macros/macros_marlin.cfg new file mode 100644 index 0000000..779dced --- /dev/null +++ b/Flying Bear Generic Configs/macros/macros_marlin.cfg @@ -0,0 +1,123 @@ +################################################################################ +# Board: MKS Robin Nano v1.1 (Flying Bear Reborn 2.0) / MKS Robin Nano v1.3 / MKS Robin Nano-S v1.3 +# Printer: Flying Bear Ghost 4S / Ghost 5 / Reborn +# G-code Macros by ODUCCEU +################################################################################ +# WARNING! DO NOT EDIT THIS FILE! +# To override settings from this file, you can copy and paste the relevant +# sections into your printer.cfg and change it there. +################################################################################ + +# Marlin Compatibility ######################################################### + +[gcode_macro G27] +gcode: + PARK + +[gcode_macro M125] +gcode: + PARK + +[gcode_macro M76] # Marlin Compatibility +gcode: + PAUSE + +[gcode_macro M601] # Marlin Compatibility +gcode: + PAUSE + +[gcode_macro M300] # Marlin Compatibility +gcode: + BEEP + +[gcode_macro M600] # Marlin Compatibility +gcode: + FILAMENT_CHANGE + +[gcode_macro M701] # Marlin Compatibility +gcode: + FILAMENT_LOAD + +[gcode_macro M702] # Marlin Compatibility +gcode: + FILAMENT_UNLOAD + +[gcode_macro M92] +gcode: + {% set extruder_steps = params.E|default(0.0025)|float %} + SET_EXTRUDER_STEP_DISTANCE DISTANCE={extruder_steps} + +[gcode_macro M204] # Set Acceleration +# Klipper accepts M204 S OR M204 P T where both P and T must be specified +# PrusaSliser sends M204 P without T and Klipper shows an error +# This macro makes M204 command more versatile +rename_existing: M204.1 +gcode: + {% set factor = params.F|default(0.5)|float %} + {% if 'S' in params %} + SET_VELOCITY_LIMIT ACCEL={S} ACCEL_TO_DECEL={ S|float * factor } + {% else %} + {% if 'P' in params %} + {% if 'T' in params %} + {% if P|int < T|int %} + SET_VELOCITY_LIMIT ACCEL={P} ACCEL_TO_DECEL={ P|float * factor } + {% else %} + SET_VELOCITY_LIMIT ACCEL={T} ACCEL_TO_DECEL={ T|float * factor } + {% endif %} + {% else %} + SET_VELOCITY_LIMIT ACCEL={P} ACCEL_TO_DECEL={ P|float * factor } + {% endif %} + {% elif 'T' in params %} + SET_VELOCITY_LIMIT ACCEL={T} ACCEL_TO_DECEL={ T|float * factor } + {% endif %} + {% endif %} + +[gcode_macro M205] # Set Junction deviation or Jerk +gcode: + {% if 'J' in params %} + SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={J} + {% elif 'X' in params %} + SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={X} + {% elif 'Y' in params %} + SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={Y} + {% endif %} + +[gcode_macro M207] # Set Firmware Retraction +gcode: + {% set length = params.S|default(0.5)|float %} + {% set speed = params.F|default(25)|float %} + SET_RETRACTION RETRACT_LENGTH={length} RETRACT_SPEED={speed} + +[gcode_macro M303] # PID Autotune +gcode: + {% if 'E' in params %} + {% set heater = params.E|default(0)|int %} + {% set temp = params.T|default(0)|float %} + {% if heater == 0 %} # extruder + {% if temp >= printer.configfile.settings.extruder.min_extrude_temp|float %} + {% if temp <= printer.configfile.settings.extruder.max_temp|float %} + PID_CALIBRATE HEATER=extruder TARGET={T} + {% endif %} + {% endif %} + {% elif heater == -1 %} # bed + {% if temp <= printer.configfile.settings.heater_bed.max_temp|float %} + PID_CALIBRATE HEATER=heater_bed TARGET={T} + {% endif %} + {% endif %} + {% endif %} + +[gcode_macro M486] # Label Objects +# M486 has no realization in Klipper yet +# This empty macro stops M486-error terminal messages +gcode: + # Do nothing + +[gcode_macro M500] # Save Settings +gcode: + SAVE_CONFIG + +[gcode_macro M900] # Set Pressure Advance +gcode: + {% if 'K' in params %} + SET_PRESSURE_ADVANCE ADVANCE={ params.K|float } + {% endif %} diff --git a/Flying Bear Generic Configs/macros/prime_line.cfg b/Flying Bear Generic Configs/macros/prime_line.cfg new file mode 100644 index 0000000..31979d3 --- /dev/null +++ b/Flying Bear Generic Configs/macros/prime_line.cfg @@ -0,0 +1,45 @@ +################################################################################ +# Board: MKS Robin Nano v1.1 (Flying Bear Reborn 2.0) / MKS Robin Nano v1.3 / MKS Robin Nano-S v1.3 +# Printer: Flying Bear Ghost 4S / Ghost 5 / Reborn +# G-code Macros by ODUCCEU +################################################################################ +# WARNING! DO NOT EDIT THIS FILE! +# To override settings from this file, you can copy and paste the relevant +# sections into your printer.cfg and change it there. +################################################################################ + +# Wipe the nozzle ############################################################## + +[gcode_macro PRIME_LINE] +gcode: + {% set feedrate = params.F|default(10)|float * 60 %} + {% set length = 100.0 %} + {% set width = printer.configfile.settings.extruder.nozzle_diameter|float * 1.1 %} + {% set height = ( (width / 0.04)|int - (width / 0.04 / 4)|int )|float * 0.04 %} + {% set extrude = 2 * length * width * height / 2.4 %} + {% if 'Y' in params %} + {% set x_start = 1.0 %} + {% set y_start = (printer.toolhead.axis_maximum.y|float - 100) / 2 %} + {% else %} + {% set x_start = (printer.toolhead.axis_maximum.x|float - 100) / 2 %} + {% set y_start = 1.0 %} + {% endif %} + SAVE_GCODE_STATE NAME=PRIME_LINE_STATE + SET_IDLE_TIMEOUT TIMEOUT=7200 + G0 Z0 F600 + G0 Y1 F12000 # cut the crap + G0 Z10 F600 + G0 X{x_start} Y{y_start} F6000 # move to start position + G0 Z{height} F600 + G91 # relative positioning + {% if 'Y' in params %} + G1 Y100 E{extrude} F{feedrate} # prime + G1 Y-100 F12000 # wipe + {% else %} + G1 X100 E{extrude} F{feedrate} # prime + G1 X-100 F12000 # wipe + {% endif %} + G0 Z10 F600 + RESTORE_GCODE_STATE NAME=PRIME_LINE_STATE + +################################################################################ diff --git a/Flying Bear Generic Configs/macros/print_management.cfg b/Flying Bear Generic Configs/macros/print_management.cfg index 59b9a71..632cd1c 100644 --- a/Flying Bear Generic Configs/macros/print_management.cfg +++ b/Flying Bear Generic Configs/macros/print_management.cfg @@ -3,14 +3,18 @@ # Printer: Flying Bear Ghost 4S / Ghost 5 / Reborn # G-code Macros by ODUCCEU ################################################################################ +# WARNING! DO NOT EDIT THIS FILE! +# To override settings from this file, you can copy and paste the relevant +# sections into your printer.cfg and change it there. +################################################################################ # Print Job Management ######################################################### [gcode_macro START_PRINT] -## PrusaSliser: +## PrusaSliser/SuperSlicer: # M190 S0 # M109 S0 -# START_PRINT EXTRUDER_TEMP={first_layer_temperature[0]} BED_TEMP={first_layer_bed_temperature} +# START_PRINT EXTRUDER_TEMP={first_layer_temperature[0]} BED_TEMP={first_layer_bed_temperature[0]} ## Cura: # M190 S0 # M109 S0 @@ -30,17 +34,15 @@ gcode: M220 S100 # reset feedrate M221 S100 # reset flowrate G90 # absolute positioning - M82 # relative extrusion mode + M83 # relative extrusion mode SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={bed_temp} # set bed temp TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={bed_temp_preheat} # wait until bed is partially heated SET_HEATER_TEMPERATURE HEATER=extruder TARGET={extruder_temp} # set extruder temp TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={bed_temp} # wait for bed temp TEMPERATURE_WAIT SENSOR=extruder MINIMUM={extruder_temp} # wait for extruder temp G28 # home - G0 Z10 F1500 # raise Z - G92 E0 # reset extruder - G1 E{E} F1500 # prime - G92 E0 # reset extruder + G0 Z10 F600 # raise Z + G1 E{E} F2100 # prime [gcode_macro END_PRINT] gcode: @@ -48,15 +50,14 @@ gcode: TURN_OFF_HEATERS M107 # turn off fan G91 # relative positioning - G1 E-{E} F1500 # retract - G0 X1 Y1 F5000 # wipe - G0 Z2 F1500 # raise Z + G1 E-{E} F2100 # retract + G0 X1 Y1 F6000 # wipe + G0 Z2 F600 # raise Z G90 # absolute positioning PARK Z=30 M84 # turn off all motors BEEP P=200 S=250 - # NORMAL_SPEED # reset stepper current - # SAVE_IF_SET # SAVE_CONFIG + SAVE_UPDATES [gcode_macro PARK] gcode: @@ -78,8 +79,8 @@ gcode: SAVE_GCODE_STATE NAME=PARK_STATE {% if printer.toolhead.homed_axes != "xyz" %} G28 {% endif %} # home if not homed G90 # absolute positioning - G0 Z{z_park} F1500 - G0 X{x_park} Y{y_park} F5000 + G0 Z{z_park} F600 + G0 X{x_park} Y{y_park} F6000 RESTORE_GCODE_STATE name=PARK_STATE [gcode_macro PAUSE] @@ -113,7 +114,7 @@ gcode: G1 E{E} F2100 G90 {% else %} - {action_respond_info("Extruder is not hot enough")} + {action_respond_info("Extruder is not hot enough")} {% endif %} RESTORE_GCODE_STATE NAME=PAUSE_STATE MOVE=1 BASE_RESUME {get_params} @@ -129,7 +130,7 @@ gcode: {% if printer.extruder.can_extrude|lower == 'true' %} G91 # relative positioning G1 E-{E} F2100 # retract - G0 Z2 F1500 # raise Z + G0 Z2 F600 # raise Z G90 # absolute positioning {% else %} {action_respond_info("Extruder is not hot enough")} @@ -138,6 +139,16 @@ gcode: BASE_CANCEL_PRINT PARK Z=30 M84 # turn off all motors - # NORMAL_SPEED # reset stepper current + +# Save to Config ########################################################## + +[gcode_macro SAVE_UPDATES] +description: Run SAVE_CONFIG if there are updates that it may persist to disk +gcode: + {% if printer.configfile.save_config_pending %} + M118 Saving and restarting now + G4 P2000 # wait 2 seconds + SAVE_CONFIG + {% endif %} ################################################################################ diff --git a/Flying Bear Generic Configs/printer/fb-ghost4s-bltouch.cfg b/Flying Bear Generic Configs/printer/fb-ghost4s-bltouch.cfg index a9b100f..e183e03 100644 --- a/Flying Bear Generic Configs/printer/fb-ghost4s-bltouch.cfg +++ b/Flying Bear Generic Configs/printer/fb-ghost4s-bltouch.cfg @@ -62,7 +62,7 @@ home_xy_position: 127.5,105 speed: 100 z_hop: 10 z_hop_speed: 12 -# move_to_previous: True # return back to previous X/Y after Z-home +# move_to_previous: True # return back to previous X/Y after Z-home ################################################################################ # Bed leveling @@ -87,8 +87,8 @@ screw3: 229,206 screw3_name: back right screw screw4: 26,206 screw4_name: back left screw -horizontal_move_z: 10 speed: 100 +horizontal_move_z: 10 screw_thread: CW-M3 ################################################################################ @@ -100,7 +100,6 @@ gcode: {% if printer.toolhead.homed_axes != "xyz" %} G28 {% endif %} # home if not homed BED_MESH_CALIBRATE G0 X0 Y0 F6000 - SAVE_AFTER_ALL [gcode_macro PROBE_CALIBRATE] # Calibrate Z-offset rename_existing: BASE_PROBE_CALIBRATE @@ -108,19 +107,45 @@ gcode: {% if printer.toolhead.homed_axes != "xyz" %} G28 {% endif %} # home if not homed BASE_PROBE_CALIBRATE -# Save Mesh to Config ########################################################## +## Replace START_PRINT macro ################################################### -[gcode_macro SAVE_AFTER_ALL] -variable_save: 0 +[gcode_macro START_PRINT] +## PrusaSliser: +# M190 S0 +# M109 S0 +# START_PRINT EXTRUDER_TEMP={first_layer_temperature[0]} BED_TEMP={first_layer_bed_temperature} MESH_DO=<1|0> +## Cura: +# M190 S0 +# M109 S0 +# START_PRINT EXTRUDER_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0} MESH_DO=<1|0> +description: Start routine for the print +variable_retract: 10 gcode: - SET_GCODE_VARIABLE MACRO=SAVE_AFTER_ALL VARIABLE=save VALUE=1 - -[gcode_macro SAVE_IF_SET] -gcode: - {% if printer["gcode_macro SAVE_AFTER_ALL"].save == 1 %} - G4 P2000 # dwell 2 seconds - {action_respond_info("Saving and restarting now")} - SAVE_CONFIG + {% set extruder_temp = params.EXTRUDER_TEMP|default(240)|float %} + {% set bed_temp = params.BED_TEMP|default(70)|float %} + {% set E = printer["gcode_macro START_PRINT"].retract|float %} + {% set mesh = params.MESH_DO|default(0)|int %} + CLEAR_PAUSE + M220 S100 # reset feedrate + M221 S100 # reset flowrate + G90 # absolute positioning + M82 # relative extrusion mode + SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={bed_temp} # set bed temp + TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={bed_temp} # wait for bed temp + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={extruder_temp} # set extruder temp + G28 # home + {% if 'MESH_DO' in params %} + {% if mesh == 0 %} + BED_MESH_PROFILE LOAD={bed_temp} # load existing mesh + {% else %} + G29 # do G29 while heating extruder + BED_MESH_PROFILE SAVE={bed_temp} + {% endif %} {% endif %} + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={extruder_temp} # wait for extruder temp + G0 Z10 F1500 # raise Z + G92 E0 # reset extruder + G1 E{E} F1500 # prime + G92 E0 # reset extruder ################################################################################ diff --git a/Flying Bear Generic Configs/printer/fb-ghost4s.cfg b/Flying Bear Generic Configs/printer/fb-ghost4s.cfg index 9540d46..dccedd2 100644 --- a/Flying Bear Generic Configs/printer/fb-ghost4s.cfg +++ b/Flying Bear Generic Configs/printer/fb-ghost4s.cfg @@ -30,7 +30,7 @@ homing_retract_dist: 0 [stepper_y] step_pin: Y_STEP_PIN -dir_pin: !Y_DIR_PIN +dir_pin: Y_DIR_PIN enable_pin: !Y_ENABLE_PIN rotation_distance: 40 microsteps: 16 @@ -42,12 +42,12 @@ homing_speed: 100 homing_retract_dist: 0 # disable for head retraction after homing [stepper_z] # left stepper -step_pin: Z1_STEP_PIN -dir_pin: !Z1_DIR_PIN -enable_pin: !Z1_ENABLE_PIN +step_pin: Z_STEP_PIN +dir_pin: !Z_DIR_PIN +enable_pin: !Z_ENABLE_PIN rotation_distance: 8 microsteps: 16 -endstop_pin: !Z1_STOP_PIN +endstop_pin: !Z_STOP_PIN position_max: 200 # Z-axis print volume size homing_speed: 20 second_homing_speed: 5 diff --git a/Flying Bear Generic Configs/printer/fb-ghost5-bltouch.cfg b/Flying Bear Generic Configs/printer/fb-ghost5-bltouch.cfg index f989c02..506816d 100644 --- a/Flying Bear Generic Configs/printer/fb-ghost5-bltouch.cfg +++ b/Flying Bear Generic Configs/printer/fb-ghost5-bltouch.cfg @@ -62,7 +62,7 @@ home_xy_position: 127.5,105 speed: 100 z_hop: 10 z_hop_speed: 12 -# move_to_previous: True # return back to previous X/Y after Z-home +# move_to_previous: True # return back to previous X/Y after Z-home ################################################################################ # Bed leveling @@ -87,8 +87,8 @@ screw3: 230,180 screw3_name: back right screw screw4: 25,180 screw4_name: back left screw -horizontal_move_z: 10 speed: 100 +horizontal_move_z: 10 screw_thread: CW-M4 ################################################################################ @@ -100,7 +100,6 @@ gcode: {% if printer.toolhead.homed_axes != "xyz" %} G28 {% endif %} # home if not homed BED_MESH_CALIBRATE G0 X0 Y0 F6000 - SAVE_AFTER_ALL [gcode_macro PROBE_CALIBRATE] # Calibrate Z-offset rename_existing: BASE_PROBE_CALIBRATE @@ -108,19 +107,45 @@ gcode: {% if printer.toolhead.homed_axes != "xyz" %} G28 {% endif %} # home if not homed BASE_PROBE_CALIBRATE -# Save Mesh to Config ########################################################## +## Replace START_PRINT macro ################################################### -[gcode_macro SAVE_AFTER_ALL] -variable_save: 0 +[gcode_macro START_PRINT] +## PrusaSliser: +# M190 S0 +# M109 S0 +# START_PRINT EXTRUDER_TEMP={first_layer_temperature[0]} BED_TEMP={first_layer_bed_temperature} MESH_DO=<1|0> +## Cura: +# M190 S0 +# M109 S0 +# START_PRINT EXTRUDER_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0} MESH_DO=<1|0> +description: Start routine for the print +variable_retract: 10 gcode: - SET_GCODE_VARIABLE MACRO=SAVE_AFTER_ALL VARIABLE=save VALUE=1 - -[gcode_macro SAVE_IF_SET] -gcode: - {% if printer["gcode_macro SAVE_AFTER_ALL"].save == 1 %} - G4 P2000 # dwell 2 seconds - {action_respond_info("Saving and restarting now")} - SAVE_CONFIG + {% set extruder_temp = params.EXTRUDER_TEMP|default(240)|float %} + {% set bed_temp = params.BED_TEMP|default(70)|float %} + {% set E = printer["gcode_macro START_PRINT"].retract|float %} + {% set mesh = params.MESH_DO|default(0)|int %} + CLEAR_PAUSE + M220 S100 # reset feedrate + M221 S100 # reset flowrate + G90 # absolute positioning + M82 # relative extrusion mode + SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={bed_temp} # set bed temp + TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={bed_temp} # wait for bed temp + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={extruder_temp} # set extruder temp + G28 # home + {% if 'MESH_DO' in params %} + {% if mesh == 0 %} + BED_MESH_PROFILE LOAD={bed_temp} # load existing mesh + {% else %} + G29 # do G29 while heating extruder + BED_MESH_PROFILE SAVE={bed_temp} + {% endif %} {% endif %} + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={extruder_temp} # wait for extruder temp + G0 Z10 F1500 # raise Z + G92 E0 # reset extruder + G1 E{E} F1500 # prime + G92 E0 # reset extruder ################################################################################ diff --git a/Flying Bear Generic Configs/printer/fb-ghost5.cfg b/Flying Bear Generic Configs/printer/fb-ghost5.cfg index 1560704..9616f71 100644 --- a/Flying Bear Generic Configs/printer/fb-ghost5.cfg +++ b/Flying Bear Generic Configs/printer/fb-ghost5.cfg @@ -30,7 +30,7 @@ homing_retract_dist: 0 [stepper_y] step_pin: Y_STEP_PIN -dir_pin: !Y_DIR_PIN +dir_pin: Y_DIR_PIN enable_pin: !Y_ENABLE_PIN rotation_distance: 40 microsteps: 16 @@ -42,12 +42,12 @@ homing_speed: 100 homing_retract_dist: 0 # disable for head retraction after homing [stepper_z] # left stepper -step_pin: Z1_STEP_PIN -dir_pin: !Z1_DIR_PIN -enable_pin: !Z1_ENABLE_PIN +step_pin: Z_STEP_PIN +dir_pin: !Z_DIR_PIN +enable_pin: !Z_ENABLE_PIN rotation_distance: 8 microsteps: 16 -endstop_pin: !Z1_STOP_PIN +endstop_pin: !Z_STOP_PIN position_max: 200 # Z-axis print volume size homing_speed: 20 second_homing_speed: 5 diff --git a/Flying Bear Generic Configs/printer/fb-reborn-bltouch.cfg b/Flying Bear Generic Configs/printer/fb-reborn-bltouch.cfg index 1167448..1091d0b 100644 --- a/Flying Bear Generic Configs/printer/fb-reborn-bltouch.cfg +++ b/Flying Bear Generic Configs/printer/fb-reborn-bltouch.cfg @@ -65,7 +65,7 @@ home_xy_position: 175,155 speed: 100 z_hop: 10 z_hop_speed: 12 -# move_to_previous: True # return back to previous X/Y after Z-home +# move_to_previous: True # return back to previous X/Y after Z-home ################################################################################ # Bed leveling @@ -102,8 +102,8 @@ screw3: 305,267.5 screw3_name: back right screw screw4: 45,267.5 screw4_name: back left screw -horizontal_move_z: 10 speed: 100 +horizontal_move_z: 10 screw_thread: CW-M4 ################################################################################ @@ -115,7 +115,6 @@ gcode: {% if printer.toolhead.homed_axes != "xyz" %} G28 {% endif %} # home if not homed BED_MESH_CALIBRATE G0 X0 Y0 F6000 - SAVE_AFTER_ALL [gcode_macro PROBE_CALIBRATE] # Calibrate Z-offset rename_existing: BASE_PROBE_CALIBRATE @@ -123,19 +122,45 @@ gcode: {% if printer.toolhead.homed_axes != "xyz" %} G28 {% endif %} # home if not homed BASE_PROBE_CALIBRATE -# Save Mesh to Config ########################################################## +## Replace START_PRINT macro ################################################### -[gcode_macro SAVE_AFTER_ALL] -variable_save: 0 +[gcode_macro START_PRINT] +## PrusaSliser: +# M190 S0 +# M109 S0 +# START_PRINT EXTRUDER_TEMP={first_layer_temperature[0]} BED_TEMP={first_layer_bed_temperature} MESH_DO=<1|0> +## Cura: +# M190 S0 +# M109 S0 +# START_PRINT EXTRUDER_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0} MESH_DO=<1|0> +description: Start routine for the print +variable_retract: 10 gcode: - SET_GCODE_VARIABLE MACRO=SAVE_AFTER_ALL VARIABLE=save VALUE=1 - -[gcode_macro SAVE_IF_SET] -gcode: - {% if printer["gcode_macro SAVE_AFTER_ALL"].save == 1 %} - G4 P2000 # dwell 2 seconds - {action_respond_info("Saving and restarting now")} - SAVE_CONFIG + {% set extruder_temp = params.EXTRUDER_TEMP|default(240)|float %} + {% set bed_temp = params.BED_TEMP|default(70)|float %} + {% set E = printer["gcode_macro START_PRINT"].retract|float %} + {% set mesh = params.MESH_DO|default(0)|int %} + CLEAR_PAUSE + M220 S100 # reset feedrate + M221 S100 # reset flowrate + G90 # absolute positioning + M82 # relative extrusion mode + SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={bed_temp} # set bed temp + TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={bed_temp} # wait for bed temp + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={extruder_temp} # set extruder temp + G28 # home + {% if 'MESH_DO' in params %} + {% if mesh == 0 %} + BED_MESH_PROFILE LOAD={bed_temp} # load existing mesh + {% else %} + G29 # do G29 while heating extruder + BED_MESH_PROFILE SAVE={bed_temp} + {% endif %} {% endif %} + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={extruder_temp} # wait for extruder temp + G0 Z10 F1500 # raise Z + G92 E0 # reset extruder + G1 E{E} F1500 # prime + G92 E0 # reset extruder ################################################################################