Initial release of Flying Bear Generic Configs

This commit is contained in:
oducceu
2021-10-13 12:05:18 +03:00
parent 5aff234daf
commit 5935bfa7f1
18 changed files with 1962 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
################################################################################
# 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
################################################################################
[include print_management.cfg]
[include prime_line.cfg]
[include filament_management.cfg]
[include macros_marlin.cfg]
# Beeper #######################################################################
[gcode_macro BEEP]
gcode:
{% set S = params.S|default(1000)|int %} # frequency in Hz
{% set P = params.P|default(100)|int %} # duration in milliseconds
SET_PIN PIN=_BEEPER_pin VALUE=0.5 CYCLE_TIME={ 1.0/S if S > 0 else 1 }
G4 P{P}
SET_PIN PIN=_BEEPER_pin VALUE=0
# Other ########################################################################
################################################################################

View File

@@ -0,0 +1,143 @@
################################################################################
# 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
################################################################################
# Print Job Management #########################################################
[gcode_macro START_PRINT]
## PrusaSliser:
# M190 S0
# M109 S0
# START_PRINT EXTRUDER_TEMP={first_layer_temperature[0]} BED_TEMP={first_layer_bed_temperature}
## Cura:
# M190 S0
# M109 S0
# START_PRINT EXTRUDER_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0}
description: Start routine for the print
variable_retract: 10
gcode:
{% 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 %}
{% if bed_temp > 90 %}
{% set bed_temp_preheat = (bed_temp * 0.90)|int %}
{% else %}
{% set bed_temp_preheat = (bed_temp * 0.75)|int %}
{% endif %}
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_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
[gcode_macro END_PRINT]
gcode:
{% set E = printer["gcode_macro START_PRINT"].retract|float %}
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
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
[gcode_macro PARK]
gcode:
{% set x_park = params.X|default(printer.toolhead.axis_minimum.x)|float %}
{% set y_park = params.Y|default(printer.toolhead.axis_minimum.y)|float %}
{% set z_park = params.Z|default(10)|float + printer.toolhead.position.z|float %}
{% set x_max = printer.toolhead.axis_maximum.x|float %}
{% set y_max = printer.toolhead.axis_maximum.y|float %}
{% set z_max = printer.toolhead.axis_maximum.z|float %}
{% if x_park > x_max %}
{% set x_park = x_max %}
{% endif %}
{% if y_park > y_max %}
{% set y_park = y_max %}
{% endif %}
{% if z_park > z_max %}
{% set z_park = z_max %}
{% endif %}
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
RESTORE_GCODE_STATE name=PARK_STATE
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: BASE_PAUSE
gcode:
{% set E = printer["gcode_macro START_PRINT"].retract|float %}
SAVE_GCODE_STATE NAME=PAUSE_STATE
BASE_PAUSE
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E-{E} F2100 # retract
G90
{% else %}
{action_respond_info("Extruder is not hot enough")}
{% endif %}
PARK
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: BASE_RESUME
gcode:
{% set E = printer["gcode_macro START_PRINT"].retract|float %}
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
G90
{% else %}
{action_respond_info("Extruder is not hot enough")}
{% endif %}
RESTORE_GCODE_STATE NAME=PAUSE_STATE MOVE=1
BASE_RESUME {get_params}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: BASE_CANCEL_PRINT
gcode:
{% set E = printer["gcode_macro START_PRINT"].retract|float %}
CLEAR_PAUSE
TURN_OFF_HEATERS
M107 # turn off fan
{% if printer.extruder.can_extrude|lower == 'true' %}
G91 # relative positioning
G1 E-{E} F2100 # retract
G0 Z2 F1500 # raise Z
G90 # absolute positioning
{% else %}
{action_respond_info("Extruder is not hot enough")}
{% endif %}
SDCARD_RESET_FILE
BASE_CANCEL_PRINT
PARK Z=30
M84 # turn off all motors
# NORMAL_SPEED # reset stepper current
################################################################################