Enable filament change feature

Adding support for headless M600/M108 filament change

Addressing #15
This commit is contained in:
David Ramiro 2019-02-05 15:24:00 +01:00
parent 79d00d560f
commit 5f7a252267
No known key found for this signature in database
GPG Key ID: 5B042737EBEEB736
5 changed files with 56 additions and 12 deletions

View File

@ -234,6 +234,12 @@ void AnycubicTFTClass::HandleSpecialMenu()
} else if (strcmp(SelectedDirectory, "<z down 0.1>")==0) {
SERIAL_PROTOCOLLNPGM("Special Menu: Z Down 0.1");
enqueue_and_echo_commands_P(PSTR("G91\nG1 Z-0.1\nG90"));
} else if (strcmp(SelectedDirectory, "<m600 pause>")==0) {
SERIAL_PROTOCOLLNPGM("Special Menu: M600 Pause");
enqueue_and_echo_commands_P(PSTR("M600"));
} else if (strcmp(SelectedDirectory, "<m108 resume>")==0) {
SERIAL_PROTOCOLLNPGM("Special Menu: M108 Resume");
enqueue_and_echo_commands_P(PSTR("M108"));
} else if (strcmp(SelectedDirectory, "<exit>")==0) {
SpecialMenu=false;
}
@ -276,6 +282,13 @@ void AnycubicTFTClass::Ls()
ANYCUBIC_SERIAL_PROTOCOLLNPGM("<Load FW Defaults>");
break;
case 12: // Fourth Page
ANYCUBIC_SERIAL_PROTOCOLLNPGM("<M600 Pause>");
ANYCUBIC_SERIAL_PROTOCOLLNPGM("<M600 Pause>");
ANYCUBIC_SERIAL_PROTOCOLLNPGM("<M108 Resume>");
ANYCUBIC_SERIAL_PROTOCOLLNPGM("<M108 Resume>");
break;
default:
break;
}

View File

@ -467,7 +467,7 @@
* Note: For Bowden Extruders make this large enough to allow load/unload.
*/
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
#define EXTRUDE_MAXLENGTH 600
//===========================================================================
//======================== Thermal Runaway Protection =======================
@ -1284,7 +1284,7 @@
* P1 Raise the nozzle always to Z-park height.
* P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
*/
//#define NOZZLE_PARK_FEATURE
#define NOZZLE_PARK_FEATURE
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z }

View File

@ -917,7 +917,7 @@
// enter the serial receive buffer, so they cannot be blocked.
// Currently handles M108, M112, M410
// Does not work on boards using AT90USB (USBCON) processors!
//#define EMERGENCY_PARSER
#define EMERGENCY_PARSER
// Bad Serial-connections can miss a received command by sending an 'ok'
// Therefore some clients abort after 30 seconds in a timeout.
@ -978,23 +978,23 @@
* Requires NOZZLE_PARK_FEATURE.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/
//#define ADVANCED_PAUSE_FEATURE
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
#define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
#define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
// This short retract is done immediately, before parking the nozzle.
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 30 // (mm/s) Unload filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
#define FILAMENT_CHANGE_UNLOAD_LENGTH 500 // (mm) The length of filament for a complete unload.
// For Bowden, the full length of the tube and nozzle.
// For direct drive, the full length of the nozzle.
// Set to 0 for manual unloading.
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
// 0 to disable start loading and skip to fast load only
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 30 // (mm/s) Load filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 500 // (mm) Load length of filament, from extruder gear to nozzle.
// For Bowden, the full length of the tube and nozzle.
// For direct drive, the full length of the nozzle.
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
@ -1009,11 +1009,11 @@
#define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
#define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
#define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
#define PAUSE_PARK_NOZZLE_TIMEOUT 300 // (seconds) Time limit before the nozzle is turned off for safety.
#define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
//#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
//#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.

View File

@ -48,7 +48,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
#define STRING_DISTRIBUTION_DATE "2019-02-02"
#define STRING_DISTRIBUTION_DATE "2019-02-05"
/**
* Required minimum Configuration.h and Configuration_adv.h file versions.

View File

@ -32,6 +32,7 @@ While the i3 Mega is a great printer for its price and produces fantastic result
- Very loud stock stepper motor drivers, easily replaced by Watterott or FYSETC TMC2208. To do that, you'd usually have to flip the connectors on the board, this is not necessary using this firmware.
- No need to slice and upload custom bed leveling tests, simply start one with a simple G26 command.
- Easily start an auto PID tune or mesh bed leveling via the special menu (insert SD card, select special menu and press the round arrow)
- M600 filament change feature enabled
## How to flash this?
@ -182,6 +183,35 @@ Note: These commands are tweaked for PLA printing at up to 210/60 °C. If you ru
**Reminder**: PID tuning sometimes fails. If you get fluctuating temperatures or the heater even fails to reach your desired temperature after tuning, you can always go back to the stock settings by sending `M301 P15.94 I1.17 D54.19` and save with `M500`.
## M600 Filament Change
**A USB host (OctoPrint, Pronterface, ...) is required to use this.**
#### Configuration:
- Send `M603 L0 U0` to use manual loading & unloading. (Recommended)
- Send `M603 L500 U500` to use automatic loading & unloading
- Save with `M500`
#### Filament change process (manual loading):
- Place `M600` in your GCode at the desired layer or send it manually
- The nozzle will park and your printer will beep
- Remove the filament from the bowden tube
- Insert the new filament right up to the nozzle, just until a bit of plastic oozes out
- Remove the excess filament from the nozzle with tweezers
- Send `M108` via your USB host.
- Note for OctoPrint users: After sending `M108`, enable the advanced options at the bottom of the terminal and press `Fake Acknowledgement`
#### Filament change process (automatic loading):
- Place `M600` in your GCode at the desired layer or send it manually
- The nozzle will park
- The printer will remove the filament right up to the extruder and beep when finished
- Insert the new filament just until where the bowden tube begins
- Send `M108` via your USB host.
- Note for OctoPrint users: After sending `M108`, enable the advanced options at the bottom of the terminal and press `Fake Acknowledgement`
- The printer will now pull in the new filament, watch out since it might ooze quite a bit from the nozzle
- Remove the excess filament from the nozzle with tweezers
## Updating
### Back up & restore your settings
@ -211,6 +241,7 @@ After flashing the new version, issue a `M502` and `M500`. After that, enter eve
- Some redundant code removed to save memory
- Minor tweaks on default jerk and acceleration
- Printcounter enabled (`M78`)
- M600 filament change feature enabled
## Changes by [derhopp](https://github.com/derhopp/):