|
228 | 228 | * M867 - Enable/disable or toggle error correction for position encoder modules.
|
229 | 229 | * M868 - Report or set position encoder module error correction threshold.
|
230 | 230 | * M869 - Report position encoder module error.
|
| 231 | + * M888 - Ultrabase cooldown: Let the parts cooling fan hover above the finished print to cool down the bed. EXPERIMENTAL FEATURE! |
231 | 232 | * M900 - Get or Set Linear Advance K-factor. (Requires LIN_ADVANCE)
|
232 | 233 | * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. (Requires at least one _DRIVER_TYPE defined as TMC2130/TMC2208/TMC2660)
|
233 | 234 | * M907 - Set digital trimpot motor current using axis codes. (Requires a board with digital trimpots)
|
@@ -11403,6 +11404,56 @@ inline void gcode_M502() {
|
11403 | 11404 | }
|
11404 | 11405 | #endif // MAX7219_GCODE
|
11405 | 11406 |
|
| 11407 | + /** |
| 11408 | + * M888: Cooldown routine for the Anycubic Ultrabase (EXPERIMENTAL): |
| 11409 | + * This is meant to be placed at the end Gcode of your slicer. |
| 11410 | + * It hovers over the print bed and does circular movements while |
| 11411 | + * running the fan. Works best with custom fan ducts. |
| 11412 | + * |
| 11413 | + * T<int> Target bed temperature (min 15°C), 30°C if not specified |
| 11414 | + * S<int> Fan speed between 0 and 255, full speed if not specified |
| 11415 | + */ |
| 11416 | + inline void gcode_M888() { |
| 11417 | + // don't do this if the machine is not homed |
| 11418 | + if (axis_unhomed_error()) return; |
| 11419 | + |
| 11420 | + const float cooldown_arc[2] = { 50, 50 }; |
| 11421 | + const uint8_t cooldown_target = MAX((parser.ushortval('T', 30)), 15); |
| 11422 | + |
| 11423 | + // set hotbed temperate to zero |
| 11424 | + thermalManager.setTargetBed(0); |
| 11425 | + SERIAL_PROTOCOLLNPGM("Ultrabase cooldown started"); |
| 11426 | + |
| 11427 | + // set fan to speed <S>, if undefined blast at full speed |
| 11428 | + uint8_t cooldown_fanspeed = parser.ushortval('S', 255); |
| 11429 | + fanSpeeds[0] = MIN(cooldown_fanspeed, 255U); |
| 11430 | + |
| 11431 | + // raise z by 2mm and move to X50, Y50 |
| 11432 | + do_blocking_move_to_z(MIN(current_position[Z_AXIS] + 2, Z_MAX_POS), 5); |
| 11433 | + do_blocking_move_to_xy(50, 50, 100); |
| 11434 | + |
| 11435 | + while ((thermalManager.degBed() > cooldown_target)) { |
| 11436 | + // queue arc movement |
| 11437 | + gcode_get_destination(); |
| 11438 | + plan_arc(destination, cooldown_arc, true); |
| 11439 | + SERIAL_PROTOCOLLNPGM("Target not reached, queued an arc"); |
| 11440 | + |
| 11441 | + // delay while arc is in progress |
| 11442 | + while (planner.movesplanned()) { |
| 11443 | + idle(); |
| 11444 | + } |
| 11445 | + idle(); |
| 11446 | + } |
| 11447 | + // the bed should be under <T> now |
| 11448 | + fanSpeeds[0]=0; |
| 11449 | + do_blocking_move_to_xy(MAX(X_MIN_POS, 10), MIN(Y_MAX_POS, 190), 100); |
| 11450 | + BUZZ(100, 659); |
| 11451 | + BUZZ(150, 1318); |
| 11452 | + enqueue_and_echo_commands_P(PSTR("M84")); |
| 11453 | + SERIAL_PROTOCOLLNPGM("M888 cooldown routine done"); |
| 11454 | + } |
| 11455 | + |
| 11456 | + |
11406 | 11457 | #if ENABLED(LIN_ADVANCE)
|
11407 | 11458 | /**
|
11408 | 11459 | * M900: Get or Set Linear Advance K-factor
|
@@ -13138,6 +13189,8 @@ void process_parsed_command() {
|
13138 | 13189 | case 869: gcode_M869(); break; // M869: Report axis error
|
13139 | 13190 | #endif
|
13140 | 13191 |
|
| 13192 | + case 888: gcode_M888(); break; // M888: Ultrabase cooldown (EXPERIMENTAL) |
| 13193 | + |
13141 | 13194 | #if ENABLED(LIN_ADVANCE)
|
13142 | 13195 | case 900: gcode_M900(); break; // M900: Set Linear Advance K factor
|
13143 | 13196 | #endif
|
|
0 commit comments