Skip to content

Commit

Permalink
Merge pull request #26 from Thinkersbluff/NewAt1.3.0
Browse files Browse the repository at this point in the history
Updated the Mainsail printer config files
  • Loading branch information
Thinkersbluff authored Mar 16, 2024
2 parents 20989db + 5092e66 commit d167eab
Show file tree
Hide file tree
Showing 33 changed files with 541 additions and 2,441 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,13 @@ gcode:
{% set Z = params.Z|default(0)|float %}

# BEEP for attention
# NOTE: DGUS-Reloaded implements a custom M300 macro, which sets limits of 255 Max for P and S
# TODO: Remove this restriction
M300 S235 P255
M300 S245 P255
M300 S255 P255
# NOTE: DGUS-Reloaded implements a custom M300 macro, which sets limits of 255 Max for P and S.
# It uses the P value to govern the duration of the sound
# The S value is an address pointer (index defined in t5uid1/dgus-reloaded/__init___.py) to the sound stored in the display's memory
# TODO: Learn how to vary the frequency of the sound (i.e. how to load the desired sounds into the display's memory)
M300 P255
M300 P255
M300 P255

# Save the current gcode state of the printer (eityher G90 or G91), so that we can restore it to that state after positioning the head for a filament change
SAVE_GCODE_STATE NAME=M600_state
Expand Down Expand Up @@ -168,16 +170,20 @@ gcode:
[gcode_macro RUN_ABL_COLD]
description: Run G29 with all heaters off. Save result as the default profile.:
gcode:
G28
M140 S0
M104 S0
BED_MESH_CLEAR
BED_MESH_CALIBRATE PROFILE=default
SAVE_CONFIG
M300
G28
M140 S0
M104 S0
BED_MESH_CLEAR
BED_MESH_CALIBRATE PROFILE=default
SAVE_CONFIG
M300
M300

[gcode_macro RUN_ABL_BED_60]
description: Run G29 with bed at 60C. Save result as the BED_MESH_PLA profile.
gcode:
M300
G28
G90
G0 Z20
Expand All @@ -191,10 +197,13 @@ gcode:
BED_MESH_CALIBRATE PROFILE=BED_MESH_PLA
SAVE_CONFIG
M140 S0 #Turn off bed heater, when finished
M300
M300

[gcode_macro RUN_ABL_BED_80]
description: Run G29 with bed at 80C. Save result as the BED_MESH_PETG profile.
gcode:
M300
G28
G90
G0 Z20
Expand All @@ -209,20 +218,44 @@ gcode:
BED_MESH_CALIBRATE PROFILE=BED_MESH_PETG
SAVE_CONFIG
M140 S0 #Turn off bed heater, when finished
M300
M300

[gcode_macro RUN_ABL_BED_95]
description: Run G29 with bed at 95C. Save result as the BED_MESH_WOOD profile.
gcode:
M300
G28
G90
G0 Z20
G0 X0 Y0 F3500
M140 S95
M104 S0 #Ignore any nozzle expansion factor until homing before print. Make sure nozzle is clean before probing, though!
M190 S95 # Heat bed before proceeding

# Heat-soak bed for 5 minutes, before probing
G4 P300000
BED_MESH_CLEAR
BED_MESH_CALIBRATE PROFILE=BED_MESH_WOOD
SAVE_CONFIG
M140 S0 #Turn off bed heater, when finished
M300
M300

[gcode_macro START_PRINT]
# put the following in the Cura start code and remove everything else: (Remove the # marks, if you copy/paste these lines!)
# If you use Cura as your slicer, put the following in the Cura start code and remove everything else: (Remove the # marks, if you copy/paste these lines!)
# NOTE: IF YOU DO NOT USE CURA, look here instead for the recommended start gcode: https://github.com/rootiest/zippy_guides/blob/main/guides/macros.md#orcaslicer-start-g-code
# ;Nozzle diameter = {machine_nozzle_size}
# ;Filament type = {material_type}
# ;Filament name = {material_name}
# ;Filament weight = {filament_weight}
# ; M190 S{material_bed_temperature_layer_0}
# ; M109 S{material_print_temperature_layer_0}
# start_print HOTEND_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0}
# start_print EXTRUDER_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0}
description: Set printer config parameters. Load BED_MESH profile and Z Offset based on nozzle target temperature.
gcode:
# Use SETUP menu to Disable|Enable Runout Sensor before starting print.

M300
DGUS_PRINT_START # Causes DGUS-Reloaded to switch to the Print Status screen

SET_DISABLE_PAUSE_STOP # Tell DGUS-Feloaded to disable the PAUSE and STOP buttons until the purge line is being drawn. (Solves Issue#31)
Expand All @@ -231,7 +264,7 @@ gcode:
{% if printer.homed_axes != 'XYZ' %} # If axes are already homed, skip the G28
G28 ; Must start by homing all axes, or PAUSE or STOP commands issued prior to the printer heating up will fail with "Printer Must be Homed"
{% endif %}
{% set toolTemp = params.HOTEND_TEMP|int %}
{% set toolTemp = params.EXTRUDER_TEMP|int %}
{% set bedTemp = params.BED_TEMP|int %}
M82 # absolute extrusion mode
M220 S100 # Reset Feedrate
Expand All @@ -240,7 +273,9 @@ gcode:
# Clear the bed mesh and then load the best bed mesh profile for the current print job
# NOTE: If you print at even higher bed temps, use the following code as a model & insert the if/elif options you need. (Will also require adding a corresponding RUN_ABL_BED_xx macro)
BED_MESH_CLEAR
{% if bedTemp >= 70 %} # If printing PETG...
{% if bedTemp >= 90 %} # If printing WOOD or ABS or ASA...
BED_MESH_PROFILE LOAD=BED_MESH_WOOD # ...load the bed mesh profile saved after using RUN_ABL_BED_95
{% elif bedTemp >= 70 %} # If printing PETG...
BED_MESH_PROFILE LOAD=BED_MESH_PETG # ...load the bed mesh profile saved after using RUN_ABL_BED_80
{% elif bedTemp >= 50 %} # If printing PLA...
BED_MESH_PROFILE LOAD=BED_MESH_PLA # ... load the bed mesh profile saved after using RUN_ABL_BED_60
Expand All @@ -254,18 +289,19 @@ gcode:
G0 X0 Y0 F5000 # Home X&Y axes.
# Ignore Z height until PrintBed is at Target Temp.
# Saves time by eliminating a redundant homing & reduces the risk of forgetting to clear any residue off the cold nozzle before STABLE_Z_HOME starts.
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={145}
# If mean to print without heating bed, need to prevent software waiting for bed to cool to zero!
{% if bedTemp >0 %}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={bedTemp}
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={bedTemp-2} MAXIMUM={bedTemp+2}
{% endif %}
# Specifying both min and max also covers those cases where a print is started while the bed is already above the target temperature

# Home with a cold nozzle (avoids any drool getting trapped between nozzle and bed while probing,
TEMPERATURE_WAIT SENSOR=extruder MINIMUM={143} MAXIMUM={147} # Wait for extruder to achieve 145+/-2deg
# Homing with a nozzle at 145 avoids creating drool, while still minimizing the Offset error created by heating the brass nozzle to print temperature.
# as long as nozzle has been cleaned while waiting for bed to heat up...
STABLE_Z_HOME

# Return to left front corner after homing Z, with Z height at 20mm
# Return to left front corner after homing Z, with Z height at 20mm
G0 Z20
G0 X0 Y0 F5000
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={toolTemp}
Expand Down Expand Up @@ -323,13 +359,16 @@ gcode:
[gcode_macro clear_message]
gcode:
M117
M300
M300

##################### The following macros were already in CR6.cfg when it was forked. ##############
############### They are not used by Tninkersbluff and may or may not work as-is ####################

[gcode_macro LOAD_FILAMENT]
description: MUST HEAT NOZZLE BEFORE RUNNING THIS. Ensures Z>=30mm. Loads filament, then retracts 0.5mm.
gcode:
M300
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < 30.0 %}
G0 Z30
Expand All @@ -344,10 +383,13 @@ gcode:
#G1 E-1 F5 ; retract a bit
#M82 ; set extruder to absolute
RESTORE_GCODE_STATE NAME=before_load_filament_state
M300
M300

[gcode_macro UNLOAD_FILAMENT]
description: MUST HEAT NOZZLE BEFORE RUNNING THIS. Ensures Z>=30mm. Pushes a little out, then retracts all.
gcode:
M300
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < 30.0 %}
G0 Z30
Expand All @@ -358,10 +400,13 @@ gcode:
G1 E-100 F1000 ; retract filament completely, set to E380 for Bowden
#M82 ; set extruder to absolute
RESTORE_GCODE_STATE NAME=before_unload_filament_state
M300
M300

[gcode_macro Hotend_Cleaning]
description: MUST HEAT NOZZLE BEFORE RUNNING THIS. Just pushes filament in, extrudes some, then retracts all
gcode:
M300
SAVE_GCODE_STATE NAME=before_hot_end_cleaning_state
M83 ; set extruder to relative
G1 E45 F1000 ; quickly load filament set for direct drive, for bowden set to E280
Expand All @@ -370,6 +415,8 @@ gcode:
G1 E-100 F1000 ; retract filament completely, set to E380 for Bowden
#M82 ; set extruder to absolute
RESTORE_GCODE_STATE NAME=before_hot_end_cleaning_state
M300
M300

[gcode_macro M204]
rename_existing: M204.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ machine_name: CR6-SE_Klipper
# The machine name shown on the information page.
brightness: 100
# The default brightness for the touchscreen (as a value from 0 to 100).
boot_sound: -1
# Disable music playback (The CR6 DWIN display has a buzzer, not a speaker, it can not support music playback)
volume: 100
# The default volume for the touchscreen buzzer (as a value from 0 to 100).
x_min: -2 # My printer's nozzle happens to be ~2mm to the left of the bed, when homed.
# This can be used to provide a lower limit (in mm) to X moves done using the
# touschreen. Movements will still be limited by your [stepper_x]
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit d167eab

Please sign in to comment.