Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimum temp options for Probing and G12 Nozzle Clean #20383

Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1570559
Add safety temperature for nozzle as probe
InsanityAutomation Dec 5, 2020
bbdd481
Tweak comments
InsanityAutomation Dec 5, 2020
8394f0c
Generalize function out of nozzle as probe
InsanityAutomation Dec 6, 2020
3a7f17d
Add G12 minimum temp
InsanityAutomation Dec 6, 2020
438bae5
Set configs disabled, add tests
InsanityAutomation Dec 6, 2020
cfb1c4c
Update LPC1768-tests
InsanityAutomation Dec 6, 2020
1c0770e
Update nozzle.cpp
InsanityAutomation Dec 6, 2020
62b81dc
Update nozzle.cpp
InsanityAutomation Dec 6, 2020
e3982ca
Set configs disabled, add tests
InsanityAutomation Dec 6, 2020
26e61f6
Merge branch 'AddMinimumTempForNozzleAsProbe' of https://github.com/I…
InsanityAutomation Dec 6, 2020
647f776
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into PRR/20383_A…
sjasonsmith Dec 9, 2020
72cdf4a
Typos, comments.
sjasonsmith Dec 9, 2020
49b53a0
Wait for the same hotend that is heating.
sjasonsmith Dec 9, 2020
0c0f7ad
Clarify that PROBE_REQUIRES_MINTEMP_NOZZLE only works with first extr…
sjasonsmith Dec 9, 2020
88f1e63
Get all new PROBE_REQUIRES_MINTEMP code inside #ifs
sjasonsmith Dec 9, 2020
88613ca
Invert compare, use correct constants, add parens
sjasonsmith Dec 9, 2020
c393153
cleanup
sjasonsmith Dec 9, 2020
294a12e
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/20383
thinkyhead Dec 18, 2020
3cbf0c4
Style tweaks
thinkyhead Dec 18, 2020
838202c
Improve PREHEAT_BEFORE_LEVELING
thinkyhead Dec 18, 2020
63c540a
Fix setting_bed, use debug
thinkyhead Dec 18, 2020
e820d0f
One fewer option
thinkyhead Dec 18, 2020
47ea86e
Unify heatup for probing
thinkyhead Dec 19, 2020
9877e0d
Preheat almost last. Don't preheat for stow
thinkyhead Dec 19, 2020
80a882f
Prettify
thinkyhead Dec 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,10 @@
//#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors

// Require minimum nozzle or bed temperature for probing. Currently applies only to the first extruder.
//#define PROBE_REQUIRES_MINTEMP_NOZZLE 150
//#define PROBE_REQUIRES_MINTEMP_BED 50

// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
// :{ 0:'Low', 1:'High' }
#define X_ENABLE_ON 0
Expand Down Expand Up @@ -1646,6 +1650,13 @@
// For a purge/clean station mounted on the X axis
//#define NOZZLE_CLEAN_NO_Y

//#define NOZZLE_CLEAN_MIN_TEMP
#if ENABLED(NOZZLE_CLEAN_MIN_TEMP)
#define NOZZLE_CLEAN_TEMP 170
// Heat nozzle if temperature is too low. Default behavior is to skip cleaning.
//#define NOZZLE_CLEAN_HEAT_LOWTEMP
#endif

// Explicit wipe G-code script applies to a G12 with no arguments.
//#define WIPE_SEQUENCE_COMMANDS "G1 X-17 Y25 Z10 F4000\nG1 Z1\nM114\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 Z15\nM400\nG0 X-10.0 Y-9.0"

Expand Down
17 changes: 17 additions & 0 deletions Marlin/src/libs/nozzle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Nozzle nozzle;
#include "../MarlinCore.h"
#include "../module/motion.h"

#if ENABLED(NOZZLE_CLEAN_MIN_TEMP)
#include "../module/temperature.h"
#endif

#if ENABLED(NOZZLE_CLEAN_FEATURE)

/**
Expand Down Expand Up @@ -153,6 +157,19 @@ Nozzle nozzle;

const uint8_t arrPos = ANY(SINGLENOZZLE, MIXING_EXTRUDER) ? 0 : active_extruder;

#if ENABLED(NOZZLE_CLEAN_MIN_TEMP) && NOZZLE_CLEAN_TEMP > 0
if(thermalManager.degTargetHotend(arrPos) < NOZZLE_CLEAN_TEMP) {
#if ENABLED(NOZZLE_CLEAN_HEAT_LOWTEMP)
SERIAL_ECHOLNPGM("Nozzle too Cold - Heating");
thermalManager.setTargetHotend(NOZZLE_CLEAN_TEMP, arrPos);
thermalManager.wait_for_hotend(arrPos);
#else
SERIAL_ECHOLNPGM("Nozzle too cold - Skipping Wipe");
return;
#endif
}
#endif

#if HAS_SOFTWARE_ENDSTOPS

#define LIMIT_AXIS(A) do{ \
Expand Down
23 changes: 23 additions & 0 deletions Marlin/src/module/probe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,29 @@ bool Probe::set_deployed(const bool deploy) {
constexpr bool deploy_stow_condition = true;
#endif

#if defined(PROBE_REQUIRES_MINTEMP_NOZZLE) && (PROBE_REQUIRES_MINTEMP_NOZZLE) > 0 && HAS_TEMP_HOTEND
#define WAIT_FOR_NOZZLE_HEAT 1
bool setting_hotend = thermalManager.degTargetHotend(0) < (PROBE_REQUIRES_MINTEMP_NOZZLE);
if (setting_hotend) {
uint16_t hotendTemperature = (PROBE_REQUIRES_MINTEMP_NOZZLE);
SERIAL_ECHOLNPAIR("Preheating hotend to ", hotendTemperature);
thermalManager.setTargetHotend(hotendTemperature, 0);
}
#endif

#if defined(PROBE_REQUIRES_MINTEMP_BED) && (PROBE_REQUIRES_MINTEMP_BED) > 0 && HAS_HEATED_BED
#define WAIT_FOR_BED_HEAT 1
bool setting_bed = thermalManager.degBed() < (PROBE_REQUIRES_MINTEMP_BED);
if (setting_bed) {
uint16_t bedTemperature = (PROBE_REQUIRES_MINTEMP_BED);
SERIAL_ECHOLNPAIR("Preheating bed to ", bedTemperature);
thermalManager.setTargetBed(bedTemperature);
}
#endif

TERN_(WAIT_FOR_NOZZLE_HEAT, if (setting_hotend) thermalManager.wait_for_hotend(0));
TERN_(WAIT_FOR_BED_HEAT, if (setting_bed) thermalManager.wait_for_bed_heating());

// For beds that fall when Z is powered off only raise for trusted Z
#if ENABLED(UNKNOWN_Z_NO_RAISE)
const bool unknown_condition = axis_is_trusted(Z_AXIS);
Expand Down
3 changes: 2 additions & 1 deletion buildroot/tests/LPC1768-tests
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT ADAPTIVE_FAN_
NOZZLE_AS_PROBE AUTO_BED_LEVELING_BILINEAR G29_RETRY_AND_RECOVER Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \
BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET BABYSTEP_ZPROBE_GFX_OVERLAY \
PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE SLOW_PWM_HEATERS PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT \
Z_SAFE_HOMING ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE \
Z_SAFE_HOMING ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE NOZZLE_CLEAN_MIN_TEMP \
HOST_KEEPALIVE_FEATURE HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT \
LCD_INFO_MENU ARC_SUPPORT BEZIER_CURVE_SUPPORT EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES SDCARD_SORT_ALPHA EMERGENCY_PARSER
opt_set GRID_MAX_POINTS_X 16
opt_set NOZZLE_TO_PROBE_OFFSET "{ 0, 0, 0 }"
opt_set NOZZLE_CLEAN_TEMP 170
exec_test $1 $2 "Re-ARM with NOZZLE_AS_PROBE and many features." "$3"

# clean up
Expand Down
2 changes: 2 additions & 0 deletions buildroot/tests/rambo-tests
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ opt_add TEMP_CHAMBER_PIN 3
opt_add HEATER_CHAMBER_PIN 45
opt_set GRID_MAX_POINTS_X 16
opt_set FANMUX0_PIN 53
opt_set PROBE_REQUIRES_MINTEMP_NOZZLE 150
opt_set PROBE_REQUIRES_MINTEMP_BED 50
opt_disable USE_WATCHDOG
opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TEST \
FIX_MOUNTED_PROBE Z_SAFE_HOMING CODEPENDENT_XY_HOMING PIDTEMPBED PROBE_TEMP_COMPENSATION \
Expand Down