Cooler (for Laser) - M143, M193 (#21255)

This commit is contained in:
Mike La Spina
2021-03-06 14:13:28 -06:00
committed by GitHub
parent 87bef13a4c
commit b95e548ddb
41 changed files with 1041 additions and 125 deletions

View File

@ -36,17 +36,7 @@
#include "../../module/temperature.h"
#include "../../module/probe.h"
#include "../../feature/probe_temp_comp.h"
#include "../../lcd/marlinui.h"
#include "../../MarlinCore.h" // for wait_for_heatup, idle()
#if ENABLED(PRINTJOB_TIMER_AUTOSTART)
#include "../../module/printcounter.h"
#endif
#if ENABLED(PRINTER_EVENTS_LEDS)
#include "../../feature/leds/leds.h"
#endif
/**
* G76: calibrate probe and/or bed temperature offsets
@ -173,7 +163,6 @@ void GcodeSuite::G76() {
remember_feedrate_scaling_off();
/******************************************
* Calibrate bed temperature offsets
******************************************/

View File

@ -539,6 +539,11 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
case 191: M191(); break; // M191: Wait for chamber temperature to reach target
#endif
#if HAS_COOLER
case 143: M143(); break; // M143: Set cooler temperature
case 193: M193(); break; // M193: Wait for cooler temperature to reach target
#endif
#if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR)
case 155: M155(); break; // M155: Set temperature auto-report interval
#endif

View File

@ -153,6 +153,7 @@
* M129 - EtoP Closed. (Requires BARICUDA)
* M140 - Set bed target temp. S<temp>
* M141 - Set heated chamber target temp. S<temp> (Requires a chamber heater)
* M143 - Set cooler target temp. S<temp> (Requires a laser cooling device)
* M145 - Set heatup values for materials on the LCD. H<hotend> B<bed> F<fan speed> for S<material> (0=PLA, 1=ABS)
* M149 - Set temperature units. (Requires TEMPERATURE_UNITS_SUPPORT)
* M150 - Set Status LED Color as R<red> U<green> B<blue> W<white> P<bright>. Values 0-255. (Requires BLINKM, RGB_LED, RGBW_LED, NEOPIXEL_LED, PCA9533, or PCA9632).
@ -163,6 +164,7 @@
* M166 - Set the Gradient Mix for the mixing extruder. (Requires GRADIENT_MIX)
* M190 - S<temp> Wait for bed current temp to reach target temp. ** Wait only when heating! **
* R<temp> Wait for bed current temp to reach target temp. ** Wait for heating or cooling. **
* M193 - R<temp> Wait for cooler temp to reach target temp. ** Wait for cooling. **
* M200 - Set filament diameter, D<diameter>, setting E axis units to cubic. (Use S0 to revert to linear units.)
* M201 - Set max acceleration in units/s^2 for print moves: "M201 X<accel> Y<accel> Z<accel> E<accel>"
* M202 - Set max acceleration in units/s^2 for travel moves: "M202 X<accel> Y<accel> Z<accel> E<accel>" ** UNUSED IN MARLIN! **
@ -632,6 +634,11 @@ private:
static void M191();
#endif
#if HAS_COOLER
static void M143();
static void M193();
#endif
#if PREHEAT_COUNT
static void M145();
#endif

View File

@ -141,6 +141,9 @@ void GcodeSuite::M115() {
// CHAMBER_TEMPERATURE (M141, M191)
cap_line(PSTR("CHAMBER_TEMPERATURE"), ENABLED(HAS_HEATED_CHAMBER));
// COOLER_TEMPERATURE (M143, M193)
cap_line(PSTR("COOLER_TEMPERATURE"), ENABLED(HAS_COOLER));
// MEATPACK Compresson
cap_line(PSTR("MEATPACK"), ENABLED(MEATPACK));

View File

@ -32,19 +32,8 @@
#include "../gcode.h"
#include "../../module/temperature.h"
#include "../../module/motion.h"
#include "../../lcd/marlinui.h"
#if ENABLED(PRINTJOB_TIMER_AUTOSTART)
#include "../../module/printcounter.h"
#endif
#if ENABLED(PRINTER_EVENT_LEDS)
#include "../../feature/leds/leds.h"
#endif
#include "../../MarlinCore.h" // for wait_for_heatup, idle, startOrResumeJob
/**
* M140: Set bed temperature
*

View File

@ -32,20 +32,8 @@
#include "../gcode.h"
#include "../../module/temperature.h"
#include "../../module/motion.h"
#include "../../lcd/marlinui.h"
#if ENABLED(PRINTJOB_TIMER_AUTOSTART)
#include "../../module/printcounter.h"
#endif
#if ENABLED(PRINTER_EVENT_LEDS)
#include "../../feature/leds/leds.h"
#endif
#include "../../MarlinCore.h" // for wait_for_heatup, idle, startOrResumeJob
/**
* M141: Set chamber temperature
*/

View File

@ -0,0 +1,67 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* gcode/temp/M143_M193.cpp
*
* Laser Cooler target temperature control
*/
#include "../../inc/MarlinConfig.h"
#if HAS_COOLER
#include "../../feature/cooler.h"
extern Cooler cooler;
#include "../gcode.h"
#include "../../module/temperature.h"
#include "../../lcd/marlinui.h"
/**
* M143: Set cooler temperature
*/
void GcodeSuite::M143() {
if (DEBUGGING(DRYRUN)) return;
if (parser.seenval('S')) {
thermalManager.setTargetCooler(parser.value_celsius());
parser.value_celsius() ? cooler.enable() : cooler.disable();
}
}
/**
* M193: Sxxx Wait for laser current temp to reach target temp. Waits only when cooling.
*/
void GcodeSuite::M193() {
if (DEBUGGING(DRYRUN)) return;
if (parser.seenval('S')) {
cooler.enable();
thermalManager.setTargetCooler(parser.value_celsius());
if (thermalManager.isLaserCooling()) {
ui.set_status_P(GET_TEXT(MSG_LASER_COOLING));
thermalManager.wait_for_cooler(true);
}
}
}
#endif // HAS_COOLER