From 4c3736ed43914273738bb92c2617bb6d8bb6c00e Mon Sep 17 00:00:00 2001 From: Richard Miles Date: Thu, 9 Apr 2015 16:32:56 +0100 Subject: [PATCH 001/126] Feature: Add RAMPS CNC Controller Board Created a new board to make using RAMPS as a CNC machine controller easier. It maps pin 8 to the spindle and pin 9 to the controller fan. --- Marlin/boards.h | 1 + Marlin/pins.h | 2 +- Marlin/pins_RAMPS_13.h | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Marlin/boards.h b/Marlin/boards.h index 8a60f011d..e59f6b95d 100644 --- a/Marlin/boards.h +++ b/Marlin/boards.h @@ -14,6 +14,7 @@ #define BOARD_RAMPS_13_EEB 34 // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed) #define BOARD_RAMPS_13_EFF 35 // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan) #define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan) +#define BOARD_RAMPS_13_SF 38 // RAMPS 1.3 / 1.4 (Power outputs: Spindle, Controller Fan) #define BOARD_FELIX2 37 // Felix 2.0+ Electronics Board (RAMPS like) #define BOARD_DUEMILANOVE_328P 4 // Duemilanove w/ ATMega328P pin assignments #define BOARD_GEN6 5 // Gen6 diff --git a/Marlin/pins.h b/Marlin/pins.h index e5af0af17..22ac1830b 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -34,7 +34,7 @@ #include "pins_SETHI.h" #elif MB(RAMPS_OLD) #include "pins_RAMPS_OLD.h" -#elif MB(RAMPS_13_EFB) || MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF) +#elif MB(RAMPS_13_EFB) || MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF) #include "pins_RAMPS_13.h" #elif MB(DUEMILANOVE_328P) #include "pins_DUEMILANOVE_328P.h" diff --git a/Marlin/pins_RAMPS_13.h b/Marlin/pins_RAMPS_13.h index af1d2d3bb..2a23cf694 100644 --- a/Marlin/pins_RAMPS_13.h +++ b/Marlin/pins_RAMPS_13.h @@ -7,6 +7,7 @@ * RAMPS_13_EEB (Extruder, Extruder, Bed) * RAMPS_13_EFF (Extruder, Fan, Fan) * RAMPS_13_EEF (Extruder, Extruder, Fan) + * RAMPS_13_SF (Spindle, Controller Fan) * * Other pins_MYBOARD.h files may override these defaults */ @@ -81,7 +82,7 @@ #if MB(RAMPS_13_EFF) #define CONTROLLERFAN_PIN -1 // Pin used for the fan to cool controller #endif -#elif MB(RAMPS_13_EEF) +#elif MB(RAMPS_13_EEF) || MB(RAMPS_13_SF) #define FAN_PIN 8 #else #define FAN_PIN 4 // IO pin. Buffer needed @@ -101,7 +102,7 @@ #define HEATER_0_PIN 10 // EXTRUDER 1 #endif -#if MB(RAMPS_13_EFB) +#if MB(RAMPS_13_EFB) || MB(RAMPS_13_SF) #define HEATER_1_PIN -1 #else #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter) @@ -113,7 +114,7 @@ #define TEMP_1_PIN 15 // ANALOG NUMBERING #define TEMP_2_PIN -1 // ANALOG NUMBERING -#if MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF) +#if MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF) #define HEATER_BED_PIN -1 // NO BED #else #define HEATER_BED_PIN 8 // BED From 574e2d856ec1f80aab347c12afc6e7b7f1618d11 Mon Sep 17 00:00:00 2001 From: wurstnase Date: Thu, 16 Apr 2015 13:07:20 +0200 Subject: [PATCH 002/126] remove config --- Marlin/Marlin_main.cpp | 10 +++++++++- Marlin/language.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 64d3d1f35..b66f90095 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -263,6 +263,7 @@ static millis_t max_inactive_time = 0; static millis_t stepper_inactive_time = DEFAULT_STEPPER_DEACTIVE_TIME * 1000L; millis_t print_job_start_ms = 0; ///< Print job start time millis_t print_job_stop_ms = 0; ///< Print job stop time +static millis_t last_command_time = 0; static uint8_t target_extruder; bool no_wait_for_cooling = true; bool target_direction; @@ -724,8 +725,15 @@ void get_command() { if (drain_queued_commands_P()) return; // priority is given to non-serial commands + millis_t ms = millis(); + + if (!MYSERIAL.available() && commands_in_queue == 0 && ms - last_command_time > 1000) { + SERIAL_ECHOLNPGM(MSG_WAIT); + last_command_time = ms; + } + while (MYSERIAL.available() > 0 && commands_in_queue < BUFSIZE) { - + last_command_time = ms; serial_char = MYSERIAL.read(); if (serial_char == '\n' || serial_char == '\r' || diff --git a/Marlin/language.h b/Marlin/language.h index ba5f3f700..220f715e6 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -121,6 +121,7 @@ #define MSG_FREE_MEMORY " Free Memory: " #define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: " #define MSG_OK "ok" +#define MSG_WAIT "wait" #define MSG_FILE_SAVED "Done saving file." #define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: " #define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: " From d69da22f7c81073432c3e8e6ce5355dd7f7d40e4 Mon Sep 17 00:00:00 2001 From: wurstnase Date: Thu, 16 Apr 2015 16:20:23 +0200 Subject: [PATCH 003/126] last_command_time inside get_command() --- Marlin/Marlin_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index b66f90095..6cc012081 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -263,7 +263,6 @@ static millis_t max_inactive_time = 0; static millis_t stepper_inactive_time = DEFAULT_STEPPER_DEACTIVE_TIME * 1000L; millis_t print_job_start_ms = 0; ///< Print job start time millis_t print_job_stop_ms = 0; ///< Print job stop time -static millis_t last_command_time = 0; static uint8_t target_extruder; bool no_wait_for_cooling = true; bool target_direction; @@ -725,6 +724,7 @@ void get_command() { if (drain_queued_commands_P()) return; // priority is given to non-serial commands + static millis_t last_command_time = 0; millis_t ms = millis(); if (!MYSERIAL.available() && commands_in_queue == 0 && ms - last_command_time > 1000) { From b09a957fcea37019356d4c679eb3d0e74446fe17 Mon Sep 17 00:00:00 2001 From: Wurstnase Date: Thu, 16 Apr 2015 21:42:54 +0200 Subject: [PATCH 004/126] make 'wait' optional and mark as workaround --- Marlin/Configuration_adv.h | 4 ++++ Marlin/Marlin_main.cpp | 18 +++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 6478eb923..c7a3de5f9 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -374,6 +374,10 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define MAX_CMD_SIZE 96 #define BUFSIZE 4 +// Some Hosts doesn't have a timeout for resend a command. +// This is a workaround for them. If your printer sometimes stuck and stop printing this could help. +// #define NO_TIMEOUTS + // @section fwretract // Firmware based and LCD controlled retract diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 6cc012081..9a9fe6086 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -724,16 +724,20 @@ void get_command() { if (drain_queued_commands_P()) return; // priority is given to non-serial commands - static millis_t last_command_time = 0; - millis_t ms = millis(); + #ifdef NO_TIMEOUTS + static millis_t last_command_time = 0; + millis_t ms = millis(); - if (!MYSERIAL.available() && commands_in_queue == 0 && ms - last_command_time > 1000) { - SERIAL_ECHOLNPGM(MSG_WAIT); - last_command_time = ms; - } + if (!MYSERIAL.available() && commands_in_queue == 0 && ms - last_command_time > 1000) { + SERIAL_ECHOLNPGM(MSG_WAIT); + last_command_time = ms; + } + #endif while (MYSERIAL.available() > 0 && commands_in_queue < BUFSIZE) { - last_command_time = ms; + #ifdef NO_TIMEOUTS + last_command_time = ms; + #endif serial_char = MYSERIAL.read(); if (serial_char == '\n' || serial_char == '\r' || From 92575cecca064e18441dc40f3568b4f3706d203c Mon Sep 17 00:00:00 2001 From: Wurstnase Date: Mon, 20 Apr 2015 00:22:40 +0200 Subject: [PATCH 005/126] new timout/add adv_ok --- Marlin/Configuration_adv.h | 10 +++++++--- Marlin/Marlin_main.cpp | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index c7a3de5f9..f2b5c7dd2 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -374,9 +374,13 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define MAX_CMD_SIZE 96 #define BUFSIZE 4 -// Some Hosts doesn't have a timeout for resend a command. -// This is a workaround for them. If your printer sometimes stuck and stop printing this could help. -// #define NO_TIMEOUTS +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. +// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. +// #define NO_TIMEOUTS 1000 + +// Some clients will have this feature soon. This should make the NO_TIMEOUTS unnecessary. +// #define ADVANCED_OK // @section fwretract diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 9a9fe6086..4d915a2c7 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -728,7 +728,7 @@ void get_command() { static millis_t last_command_time = 0; millis_t ms = millis(); - if (!MYSERIAL.available() && commands_in_queue == 0 && ms - last_command_time > 1000) { + if (!MYSERIAL.available() && commands_in_queue == 0 && ms - last_command_time > NO_TIMEOUTS) { SERIAL_ECHOLNPGM(MSG_WAIT); last_command_time = ms; } @@ -5299,7 +5299,11 @@ void ClearToSend() { #ifdef SDSUPPORT if (fromsd[cmd_queue_index_r]) return; #endif - SERIAL_PROTOCOLLNPGM(MSG_OK); + SERIAL_PROTOCOLPGM(MSG_OK); + #ifdef ADVANCED_OK + SERIAL_PROTOCOLPGM(" N"); SERIAL_PROTOCOL(gcode_LastN); + SERIAL_PROTOCOLPGM(" S"); SERIAL_PROTOCOLLN(commands_in_queue); + #endif } void get_coordinates() { From 2610b8d047d6116a9dd0853f5281d35383aabb8e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 28 Apr 2015 17:40:29 -0700 Subject: [PATCH 006/126] Enable thermal runaway protection by default --- Marlin/Configuration.h | 4 ++-- Marlin/configurator/config/Configuration.h | 4 ++-- Marlin/example_configurations/Felix/Configuration.h | 4 ++-- Marlin/example_configurations/Felix/Configuration_DUAL.h | 4 ++-- Marlin/example_configurations/Hephestos/Configuration.h | 4 ++-- Marlin/example_configurations/K8200/Configuration.h | 4 ++-- Marlin/example_configurations/SCARA/Configuration.h | 4 ++-- Marlin/example_configurations/WITBOX/Configuration.h | 4 ++-- Marlin/example_configurations/delta/generic/Configuration.h | 4 ++-- .../example_configurations/delta/kossel_mini/Configuration.h | 4 ++-- Marlin/example_configurations/makibox/Configuration.h | 4 ++-- Marlin/example_configurations/tvrrug/Round2/Configuration.h | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 455e46a19..25e0f3897 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -298,8 +298,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for all extruder heaters -//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius // If you want to enable this feature for your bed heater, // uncomment the 2 defines below: diff --git a/Marlin/configurator/config/Configuration.h b/Marlin/configurator/config/Configuration.h index 1d85de926..8252d9654 100644 --- a/Marlin/configurator/config/Configuration.h +++ b/Marlin/configurator/config/Configuration.h @@ -298,8 +298,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for all extruder heaters -//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius // If you want to enable this feature for your bed heater, // uncomment the 2 defines below: diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 63b3660d5..b0e74391e 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -264,8 +264,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for all extruder heaters -//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius // If you want to enable this feature for your bed heater, // uncomment the 2 defines below: diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h index 085d95b27..eddffd06f 100644 --- a/Marlin/example_configurations/Felix/Configuration_DUAL.h +++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h @@ -264,8 +264,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for all extruder heaters -//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius // If you want to enable this feature for your bed heater, // uncomment the 2 defines below: diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index c9c079ebe..e0ba6e998 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -285,8 +285,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for all extruder heaters -//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius // If you want to enable this feature for your bed heater, // uncomment the 2 defines below: diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index d0abbcbe7..1b6bbd4ea 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -314,8 +314,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for all extruder heaters -//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius // If you want to enable this feature for your bed heater, // uncomment the 2 defines below: diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index cdc036cb2..2fcb7da40 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -316,8 +316,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for all extruder heaters -//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius // If you want to enable this feature for your bed heater, // uncomment the 2 defines below: diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 343c3093a..189903dec 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -284,8 +284,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for all extruder heaters -//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius // If you want to enable this feature for your bed heater, // uncomment the 2 defines below: diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 9a1fe4875..b4ca29c83 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -314,8 +314,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for all extruder heaters -//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius // If you want to enable this feature for your bed heater, // uncomment the 2 defines below: diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 33391863e..d0fda1e06 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -314,8 +314,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for all extruder heaters -//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius // If you want to enable this feature for your bed heater, // uncomment the 2 defines below: diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 918d5fa8b..27a73231a 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -284,8 +284,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for all extruder heaters -//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius // If you want to enable this feature for your bed heater, // uncomment the 2 defines below: diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 2fff0f21e..9332513ba 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -286,8 +286,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for all extruder heaters -//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius // If you want to enable this feature for your bed heater, // uncomment the 2 defines below: From a235dca79cb8ac8798a0a3c99185f4f67891273c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 28 Apr 2015 19:10:07 -0700 Subject: [PATCH 007/126] Stow z on M402 without extra raise --- Marlin/Marlin_main.cpp | 76 ++++++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 33 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 996bd60b9..1a4152bc5 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1266,13 +1266,14 @@ inline void set_destination_to_current() { memcpy(destination, current_position, // Engage Z Servo endstop if enabled if (servo_endstops[Z_AXIS] >= 0) { + Servo *srv = &servo[servo_endstops[Z_AXIS]]; #if SERVO_LEVELING - servo[servo_endstops[Z_AXIS]].attach(0); + srv->attach(0); #endif - servo[servo_endstops[Z_AXIS]].write(servo_endstop_angles[Z_AXIS * 2]); + srv->write(servo_endstop_angles[Z_AXIS * 2]); #if SERVO_LEVELING delay(PROBE_SERVO_DEACTIVATION_DELAY); - servo[servo_endstops[Z_AXIS]].detach(); + srv->detach(); #endif } @@ -1318,7 +1319,7 @@ inline void set_destination_to_current() { memcpy(destination, current_position, } - static void stow_z_probe() { + static void stow_z_probe(bool doRaise=true) { #ifdef SERVO_ENDSTOPS @@ -1326,19 +1327,21 @@ inline void set_destination_to_current() { memcpy(destination, current_position, if (servo_endstops[Z_AXIS] >= 0) { #if Z_RAISE_AFTER_PROBING > 0 - do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING); // this also updates current_position - st_synchronize(); + if (doRaise) { + do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING); // this also updates current_position + st_synchronize(); + } #endif + // Change the Z servo angle + Servo *srv = &servo[servo_endstops[Z_AXIS]]; #if SERVO_LEVELING - servo[servo_endstops[Z_AXIS]].attach(0); + srv->attach(0); #endif - - servo[servo_endstops[Z_AXIS]].write(servo_endstop_angles[Z_AXIS * 2 + 1]); - + srv->write(servo_endstop_angles[Z_AXIS * 2 + 1]); #if SERVO_LEVELING delay(PROBE_SERVO_DEACTIVATION_DELAY); - servo[servo_endstops[Z_AXIS]].detach(); + srv->detach(); #endif } @@ -1522,19 +1525,20 @@ static void homeaxis(AxisEnum axis) { current_position[axis] = 0; sync_plan_position(); - // Engage Servo endstop if enabled - #if defined(SERVO_ENDSTOPS) && !defined(Z_PROBE_SLED) + #if SERVO_LEVELING && !defined(Z_PROBE_SLED) - #if SERVO_LEVELING - if (axis == Z_AXIS) deploy_z_probe(); else - #endif - { - if (servo_endstops[axis] > -1) - servo[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]); - } + // Deploy a probe if there is one, and homing towards the bed + if (axis == Z_AXIS && axis_home_dir < 0) deploy_z_probe(); - #endif // SERVO_ENDSTOPS && !Z_PROBE_SLED + #elif defined(SERVO_ENDSTOPS) + // Engage Servo endstop if enabled + if (servo_endstops[axis] > -1) + servo[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]); + + #endif + + // Set a flag for Z motor locking #ifdef Z_DUAL_ENDSTOPS if (axis == Z_AXIS) In_Homing_Process(true); #endif @@ -1612,14 +1616,17 @@ static void homeaxis(AxisEnum axis) { endstops_hit_on_purpose(); // clear endstop hit flags axis_known_position[axis] = true; - // Retract Servo endstop if enabled - #ifdef SERVO_ENDSTOPS + #if SERVO_LEVELING && !defined(Z_PROBE_SLED) + + // Stow the Z probe if it had been deployed + if (axis == Z_AXIS && axis_home_dir < 0) stow_z_probe(); + + #elif defined(SERVO_ENDSTOPS) + + // Retract Servo endstop if enabled if (servo_endstops[axis] > -1) servo[servo_endstops[axis]].write(servo_endstop_angles[axis * 2 + 1]); - #endif - #if SERVO_LEVELING && !defined(Z_PROBE_SLED) - if (axis == Z_AXIS) stow_z_probe(); #endif } @@ -2996,7 +3003,7 @@ inline void gcode_M42() { current_position[E_AXIS] = E_current = st_get_position_mm(E_AXIS); // - // OK, do the inital probe to get us close to the bed. + // OK, do the initial probe to get us close to the bed. // Then retrace the right amount and use that in subsequent probes // @@ -3105,12 +3112,14 @@ inline void gcode_M42() { plan_buffer_line(X_probe_location, Y_probe_location, Z_start_location, current_position[E_AXIS], homing_feedrate[Z_AXIS]/60, active_extruder); st_synchronize(); + // Stow between if (deploy_probe_for_each_reading) { stow_z_probe(); delay(1000); } } + // Stow after if (!deploy_probe_for_each_reading) { stow_z_probe(); delay(1000); @@ -4062,13 +4071,14 @@ inline void gcode_M226() { if (code_seen('S')) { servo_position = code_value(); if ((servo_index >= 0) && (servo_index < NUM_SERVOS)) { + Servo *srv = &servo[servo_index]; #if SERVO_LEVELING - servo[servo_index].attach(0); + srv->attach(0); #endif - servo[servo_index].write(servo_position); + srv->write(servo_position); #if SERVO_LEVELING delay(PROBE_SERVO_DEACTIVATION_DELAY); - servo[servo_index].detach(); + srv->detach(); #endif } else { @@ -4372,12 +4382,12 @@ inline void gcode_M303() { */ inline void gcode_M400() { st_synchronize(); } -#if defined(ENABLE_AUTO_BED_LEVELING) && (defined(SERVO_ENDSTOPS) || defined(Z_PROBE_ALLEN_KEY)) && not defined(Z_PROBE_SLED) +#if defined(ENABLE_AUTO_BED_LEVELING) && !defined(Z_PROBE_SLED) && (defined(SERVO_ENDSTOPS) || defined(Z_PROBE_ALLEN_KEY)) #ifdef SERVO_ENDSTOPS void raise_z_for_servo() { float zpos = current_position[Z_AXIS], z_dest = Z_RAISE_BEFORE_HOMING; - if (!axis_known_position[Z_AXIS]) z_dest += zpos; + z_dest += axis_known_position[Z_AXIS] ? -zprobe_zoffset : zpos; if (zpos < z_dest) do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z_dest); // also updates current_position } @@ -4400,7 +4410,7 @@ inline void gcode_M400() { st_synchronize(); } #ifdef SERVO_ENDSTOPS raise_z_for_servo(); #endif - stow_z_probe(); + stow_z_probe(false); } #endif From ce3caf447bd64035ac612d6c7d6358d0e7844691 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 28 Apr 2015 19:17:48 -0700 Subject: [PATCH 008/126] Tweak how homeaxis deploys and stows --- Marlin/Marlin_main.cpp | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 1a4152bc5..8637b1684 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1528,14 +1528,19 @@ static void homeaxis(AxisEnum axis) { #if SERVO_LEVELING && !defined(Z_PROBE_SLED) // Deploy a probe if there is one, and homing towards the bed - if (axis == Z_AXIS && axis_home_dir < 0) deploy_z_probe(); + if (axis == Z_AXIS) { + if (axis_home_dir < 0) deploy_z_probe(); + } + else - #elif defined(SERVO_ENDSTOPS) - - // Engage Servo endstop if enabled - if (servo_endstops[axis] > -1) - servo[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]); + #endif + #ifdef SERVO_ENDSTOPS + { + // Engage Servo endstop if enabled + if (servo_endstops[axis] > -1) + servo[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]); + } #endif // Set a flag for Z motor locking @@ -1618,15 +1623,20 @@ static void homeaxis(AxisEnum axis) { #if SERVO_LEVELING && !defined(Z_PROBE_SLED) - // Stow the Z probe if it had been deployed - if (axis == Z_AXIS && axis_home_dir < 0) stow_z_probe(); + // Deploy a probe if there is one, and homing towards the bed + if (axis == Z_AXIS) { + if (axis_home_dir < 0) stow_z_probe(); + } + else - #elif defined(SERVO_ENDSTOPS) - - // Retract Servo endstop if enabled - if (servo_endstops[axis] > -1) - servo[servo_endstops[axis]].write(servo_endstop_angles[axis * 2 + 1]); + #endif + #ifdef SERVO_ENDSTOPS + { + // Retract Servo endstop if enabled + if (servo_endstops[axis] > -1) + servo[servo_endstops[axis]].write(servo_endstop_angles[axis * 2 + 1]); + } #endif } From 514d8ac4607b2f05f9db5967e5ac00f9d2d5fd4f Mon Sep 17 00:00:00 2001 From: AnHardt Date: Wed, 29 Apr 2015 08:47:01 +0200 Subject: [PATCH 009/126] Enable TRP for the bed in all Configurations. --- Marlin/Configuration.h | 4 ++-- Marlin/configurator/config/Configuration.h | 5 ++--- Marlin/example_configurations/Felix/Configuration.h | 5 ++--- Marlin/example_configurations/Felix/Configuration_DUAL.h | 5 ++--- Marlin/example_configurations/Hephestos/Configuration.h | 5 ++--- Marlin/example_configurations/K8200/Configuration.h | 5 ++--- Marlin/example_configurations/SCARA/Configuration.h | 5 ++--- Marlin/example_configurations/WITBOX/Configuration.h | 5 ++--- Marlin/example_configurations/delta/generic/Configuration.h | 5 ++--- .../example_configurations/delta/kossel_mini/Configuration.h | 5 ++--- Marlin/example_configurations/makibox/Configuration.h | 5 ++--- Marlin/example_configurations/tvrrug/Round2/Configuration.h | 5 ++--- 12 files changed, 24 insertions(+), 35 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index e3d0c339a..77dc404c8 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -306,8 +306,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for the bed heater -//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== diff --git a/Marlin/configurator/config/Configuration.h b/Marlin/configurator/config/Configuration.h index 59d13ab64..3c7d737ea 100644 --- a/Marlin/configurator/config/Configuration.h +++ b/Marlin/configurator/config/Configuration.h @@ -306,9 +306,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for the bed heater -//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius - +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 558ee3bb0..d0a2f24d3 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -272,9 +272,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for the bed heater -//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius - +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h index 2e5633b8c..d40d69d95 100644 --- a/Marlin/example_configurations/Felix/Configuration_DUAL.h +++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h @@ -272,9 +272,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for the bed heater -//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius - +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 69841816f..39347ed3f 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -293,9 +293,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for the bed heater -//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius - +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 2987552f6..3764de4a9 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -317,9 +317,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for the bed heater -//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius - +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 6d70fa244..2f63437e2 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -324,9 +324,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for the bed heater -//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius - +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 7022f7888..b42ee3cd5 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -292,9 +292,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for the bed heater -//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius - +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index ae094ccac..25f1c961c 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -322,9 +322,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for the bed heater -//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius - +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index f6b6a1e03..dfd6a86a4 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -322,9 +322,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for the bed heater -//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius - +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 500f47fe8..9fc6c5ffc 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -292,9 +292,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for the bed heater -//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius - +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 314faf2d6..2d3601219 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -294,9 +294,8 @@ your extruder heater takes 2 minutes to hit the target on heating. // uncomment the 2 defines below: // Parameters for the bed heater -//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds -//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius - +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== //============================= Mechanical Settings ========================= From 4dcc0fd55a34b8079979df299c149fa7ebb5c83f Mon Sep 17 00:00:00 2001 From: paclema Date: Wed, 29 Apr 2015 21:32:27 +0200 Subject: [PATCH 010/126] Fixed sintaxis error of filament runout --- Marlin/Marlin_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 996bd60b9..f5dcedbe4 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -500,7 +500,7 @@ void setup_filrunoutpin() { #if HAS_FILRUNOUT pinMode(FILRUNOUT_PIN, INPUT); #ifdef ENDSTOPPULLUP_FIL_RUNOUT - WRITE(FILLRUNOUT_PIN, HIGH); + WRITE(FILRUNOUT_PIN, HIGH); #endif #endif } @@ -5975,7 +5975,7 @@ void disable_all_steppers() { void manage_inactivity(bool ignore_stepper_queue/*=false*/) { #if HAS_FILRUNOUT - if (card.sdprinting && !(READ(FILRUNOUT_PIN) ^ FIL_RUNOUT_INVERTING)) + if (IS_SD_PRINTING && !(READ(FILRUNOUT_PIN) ^ FIL_RUNOUT_INVERTING)) filrunout(); #endif From 013a09dbe632fad0b6342a43fdc1dec59e53b2c2 Mon Sep 17 00:00:00 2001 From: paclema Date: Wed, 29 Apr 2015 21:38:40 +0200 Subject: [PATCH 011/126] Added configurable script for filrunout form configuration.h --- Marlin/Configuration.h | 7 +++++-- Marlin/Marlin_main.cpp | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 455e46a19..ce5933319 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -417,8 +417,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. // It is assumed that when logic high = filament available // when logic low = filament ran out -//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned -//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. +#ifdef FILAMENT_RUNOUT_SENSOR + const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned + #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif //=========================================================================== //============================ Mesh Bed Leveling ============================ diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 996bd60b9..4f12d6498 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -6140,10 +6140,10 @@ void kill() void filrunout() { if (!filrunoutEnqueued) { filrunoutEnqueued = true; - enqueuecommand("M600"); + enqueuecommands_P(PSTR(FILAMENT_RUNOUT_SCRIPT)); + st_synchronize(); } } - #endif void Stop() { From d065d378222480a248cfe7c14ed22c316276a8d2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 29 Apr 2015 18:26:16 -0700 Subject: [PATCH 012/126] Add M428 to set home_offset logically --- Marlin/Marlin_main.cpp | 30 ++++++++++++++++++++++++++++++ Marlin/configuration_store.cpp | 2 +- Marlin/language.h | 1 + Marlin/ultralcd.cpp | 15 +++++---------- 4 files changed, 37 insertions(+), 11 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 996bd60b9..6e41e1335 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -189,6 +189,7 @@ * M410 - Quickstop. Abort all the planned moves * M420 - Enable/Disable Mesh Leveling (with current values) S1=enable S0=disable * M421 - Set a single Z coordinate in the Mesh Leveling grid. X Y Z + * M428 - Set the home_offset logically based on the current_position * M500 - Store parameters in EEPROM * M501 - Read parameters from EEPROM (if you need reset them after you changed them temporarily). * M502 - Revert to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. @@ -4504,6 +4505,31 @@ inline void gcode_M410() { quickStop(); } #endif +/** + * M428: Set home_offset based on the distance between the + * current_position and the nearest "reference position." + * If an axis is past center the endstop position + * is the reference-point. Otherwise it uses 0. This allows + * the Z offset to be set near the bed when using a max endstop. + * + * Use M206 to set these values directly. + */ +inline void gcode_M428() { + for (int8_t i = X_AXIS; i <= Z_AXIS; i++) { + float base = (current_position[i] > (min_pos[i] + max_pos[i]) / 2) ? base_home_pos(i) : 0, + diff = current_position[i] - base; + if (diff > -20 && diff < 20) { + home_offset[i] -= diff; + current_position[i] = base; + } + else { + SERIAL_ERROR_START; + SERIAL_ERRORLNPGM(MSG_ERR_M428_TOO_FAR); + } + } + sync_plan_position(); +} + /** * M500: Store settings in EEPROM */ @@ -5353,6 +5379,10 @@ void process_commands() { break; #endif + case 428: // M428 Apply current_position to home_offset + gcode_M428(); + break; + case 500: // M500 Store settings in EEPROM gcode_M500(); break; diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index 782b5d320..362749a10 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -676,7 +676,7 @@ void Config_PrintSettings(bool forReplay) { SERIAL_ECHOLNPGM("Mesh bed leveling:"); CONFIG_ECHO_START; } - SERIAL_ECHOPAIR(" M420 S", (int32_t)mbl.active); + SERIAL_ECHOPAIR(" M420 S", (unsigned long)mbl.active); SERIAL_ECHOPAIR(" X", MESH_NUM_X_POINTS); SERIAL_ECHOPAIR(" Y", MESH_NUM_Y_POINTS); SERIAL_EOL; diff --git a/Marlin/language.h b/Marlin/language.h index 252ee595a..31239658e 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -162,6 +162,7 @@ #define MSG_ERR_MATERIAL_INDEX "M145 S out of range (0-1)" #define MSG_ERR_M421_REQUIRES_XYZ "M421 requires XYZ parameters" #define MSG_ERR_MESH_INDEX_OOB "Mesh XY index is out of bounds" +#define MSG_ERR_M428_TOO_FAR "Too far from home or origin position" #define MSG_M119_REPORT "Reporting endstop status" #define MSG_ENDSTOP_HIT "TRIGGERED" #define MSG_ENDSTOP_OPEN "open" diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 4dd32eb0d..57e511361 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -438,17 +438,12 @@ static void lcd_main_menu() { } #endif +/** + * Set the home offset based on the current_position + */ void lcd_set_home_offsets() { - for (int8_t i=0; i < NUM_AXIS; i++) { - if (i != E_AXIS) { - home_offset[i] -= current_position[i]; - current_position[i] = 0.0; - } - } - plan_set_position(0.0, 0.0, 0.0, current_position[E_AXIS]); - - // Audio feedback - enqueuecommands_P(PSTR("M300 S659 P200\nM300 S698 P200")); + // Command with Audio feedback + enqueuecommands_P(PSTR("M428\nM300 S659 P200\nM300 S698 P200")); lcd_return_to_status(); } From d4c74b8f8cb67190f62e29bc256b8b85e940efee Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 29 Apr 2015 19:05:48 -0700 Subject: [PATCH 013/126] Don't apply M428 if an error occurs - Also move audio feedback into the command - Added shorthand for `lcd_buzz` availability --- Marlin/Marlin_main.cpp | 56 +++++++++++++++++++-------- Marlin/configurator/config/language.h | 1 + Marlin/language.h | 2 +- Marlin/ultralcd.cpp | 12 +++--- Marlin/ultralcd.h | 2 +- 5 files changed, 49 insertions(+), 24 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 6e41e1335..637ebc5a7 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -36,6 +36,7 @@ #endif #endif // ENABLE_AUTO_BED_LEVELING +#define HAS_LCD_BUZZ (defined(ULTRALCD) || (defined(BEEPER) && BEEPER >= 0) || defined(LCD_USE_I2C_BUZZER)) #define SERVO_LEVELING (defined(ENABLE_AUTO_BED_LEVELING) && PROBE_SERVO_DEACTIVATION_DELAY > 0) #ifdef MESH_BED_LEVELING @@ -4091,7 +4092,7 @@ inline void gcode_M226() { #endif // NUM_SERVOS > 0 -#if BEEPER > 0 || defined(ULTRALCD) || defined(LCD_USE_I2C_BUZZER) +#if HAS_LCD_BUZZ /** * M300: Play beep sound S P @@ -4103,7 +4104,7 @@ inline void gcode_M226() { lcd_buzz(beepP, beepS); } -#endif // BEEPER>0 || ULTRALCD || LCD_USE_I2C_BUZZER +#endif // HAS_LCD_BUZZ #ifdef PIDTEMP @@ -4507,27 +4508,50 @@ inline void gcode_M410() { quickStop(); } /** * M428: Set home_offset based on the distance between the - * current_position and the nearest "reference position." - * If an axis is past center the endstop position + * current_position and the nearest "reference point." + * If an axis is past center its endstop position * is the reference-point. Otherwise it uses 0. This allows * the Z offset to be set near the bed when using a max endstop. * + * M428 can't be used more than 2cm away from 0 or an endstop. + * * Use M206 to set these values directly. */ inline void gcode_M428() { + bool err = false; + float new_offs[3], new_pos[3]; + memcpy(new_pos, current_position, sizeof(new_pos)); + memcpy(new_offs, home_offset, sizeof(new_offs)); for (int8_t i = X_AXIS; i <= Z_AXIS; i++) { - float base = (current_position[i] > (min_pos[i] + max_pos[i]) / 2) ? base_home_pos(i) : 0, - diff = current_position[i] - base; - if (diff > -20 && diff < 20) { - home_offset[i] -= diff; - current_position[i] = base; - } - else { - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM(MSG_ERR_M428_TOO_FAR); + if (axis_known_position[i]) { + float base = (new_pos[i] > (min_pos[i] + max_pos[i]) / 2) ? base_home_pos(i) : 0, + diff = new_pos[i] - base; + if (diff > -20 && diff < 20) { + new_offs[i] -= diff; + new_pos[i] = base; + } + else { + SERIAL_ERROR_START; + SERIAL_ERRORLNPGM(MSG_ERR_M428_TOO_FAR); + LCD_ALERTMESSAGEPGM("Err: Too far!"); + #if HAS_LCD_BUZZ + enqueuecommands_P(PSTR("M300 S40 P200")); + #endif + err = true; + break; + } } } - sync_plan_position(); + + if (!err) { + memcpy(current_position, new_pos, sizeof(new_pos)); + memcpy(home_offset, new_offs, sizeof(new_offs)); + sync_plan_position(); + LCD_ALERTMESSAGEPGM("Offset applied."); + #if HAS_LCD_BUZZ + enqueuecommands_P(PSTR("M300 S659 P200\nM300 S698 P200")); + #endif + } } /** @@ -5277,11 +5301,11 @@ void process_commands() { break; #endif // NUM_SERVOS > 0 - #if BEEPER > 0 || defined(ULTRALCD) || defined(LCD_USE_I2C_BUZZER) + #if HAS_LCD_BUZZ case 300: // M300 - Play beep tone gcode_M300(); break; - #endif // BEEPER > 0 || ULTRALCD || LCD_USE_I2C_BUZZER + #endif // HAS_LCD_BUZZ #ifdef PIDTEMP case 301: // M301 diff --git a/Marlin/configurator/config/language.h b/Marlin/configurator/config/language.h index d8ceafb1a..a56ee522f 100644 --- a/Marlin/configurator/config/language.h +++ b/Marlin/configurator/config/language.h @@ -161,6 +161,7 @@ #define MSG_ERR_MATERIAL_INDEX "M145 S out of range (0-1)" #define MSG_ERR_M421_REQUIRES_XYZ "M421 requires XYZ parameters" #define MSG_ERR_MESH_INDEX_OOB "Mesh XY index is out of bounds" +#define MSG_ERR_M428_TOO_FAR "Too far from reference point" #define MSG_M119_REPORT "Reporting endstop status" #define MSG_ENDSTOP_HIT "TRIGGERED" #define MSG_ENDSTOP_OPEN "open" diff --git a/Marlin/language.h b/Marlin/language.h index 31239658e..02cd675c8 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -162,7 +162,7 @@ #define MSG_ERR_MATERIAL_INDEX "M145 S out of range (0-1)" #define MSG_ERR_M421_REQUIRES_XYZ "M421 requires XYZ parameters" #define MSG_ERR_MESH_INDEX_OOB "Mesh XY index is out of bounds" -#define MSG_ERR_M428_TOO_FAR "Too far from home or origin position" +#define MSG_ERR_M428_TOO_FAR "Too far from reference point" #define MSG_M119_REPORT "Reporting endstop status" #define MSG_ENDSTOP_HIT "TRIGGERED" #define MSG_ENDSTOP_OPEN "open" diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 57e511361..5ca094337 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -442,8 +442,8 @@ static void lcd_main_menu() { * Set the home offset based on the current_position */ void lcd_set_home_offsets() { - // Command with Audio feedback - enqueuecommands_P(PSTR("M428\nM300 S659 P200\nM300 S698 P200")); + // M428 Command + enqueuecommands_P(PSTR("M428")); lcd_return_to_status(); } @@ -1285,7 +1285,7 @@ void lcd_quick_feedback() { #define LCD_FEEDBACK_FREQUENCY_DURATION_MS (1000/6) #endif lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ); - #elif defined(BEEPER) && BEEPER > -1 + #elif defined(BEEPER) && BEEPER >= 0 #ifndef LCD_FEEDBACK_FREQUENCY_HZ #define LCD_FEEDBACK_FREQUENCY_HZ 5000 #endif @@ -1718,12 +1718,12 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; } void lcd_buzz(long duration, uint16_t freq) { if (freq > 0) { - #if BEEPER > 0 + #ifdef LCD_USE_I2C_BUZZER + lcd.buzz(duration, freq); + #elif defined(BEEPER) && BEEPER >= 0 SET_OUTPUT(BEEPER); tone(BEEPER, freq, duration); delay(duration); - #elif defined(LCD_USE_I2C_BUZZER) - lcd.buzz(duration, freq); #else delay(duration); #endif diff --git a/Marlin/ultralcd.h b/Marlin/ultralcd.h index 8f96f008b..956b72828 100644 --- a/Marlin/ultralcd.h +++ b/Marlin/ultralcd.h @@ -106,7 +106,7 @@ FORCE_INLINE void lcd_setstatuspgm(const char* message, const uint8_t level=0) {} FORCE_INLINE void lcd_buttons_update() {} FORCE_INLINE void lcd_reset_alert_level() {} - FORCE_INLINE void lcd_buzz(long duration,uint16_t freq) {} + FORCE_INLINE void lcd_buzz(long duration, uint16_t freq) {} FORCE_INLINE bool lcd_detected(void) { return true; } #define LCD_MESSAGEPGM(x) do{}while(0) From 2db384a21d680a9c8708f1675594732bcf46655d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 1 May 2015 21:15:26 -0700 Subject: [PATCH 014/126] Fix compile error in configuration_store.cpp --- Marlin/configuration_store.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index 362749a10..b950b88cd 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -677,8 +677,8 @@ void Config_PrintSettings(bool forReplay) { CONFIG_ECHO_START; } SERIAL_ECHOPAIR(" M420 S", (unsigned long)mbl.active); - SERIAL_ECHOPAIR(" X", MESH_NUM_X_POINTS); - SERIAL_ECHOPAIR(" Y", MESH_NUM_Y_POINTS); + SERIAL_ECHOPAIR(" X", (unsigned long)MESH_NUM_X_POINTS); + SERIAL_ECHOPAIR(" Y", (unsigned long)MESH_NUM_Y_POINTS); SERIAL_EOL; for (int y=0; y Date: Fri, 1 May 2015 21:38:32 -0700 Subject: [PATCH 015/126] Cleanup of language.h --- Marlin/configurator/config/language.h | 17 +++++++++-------- Marlin/language.h | 16 ++++++++-------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Marlin/configurator/config/language.h b/Marlin/configurator/config/language.h index a56ee522f..02235aac7 100644 --- a/Marlin/configurator/config/language.h +++ b/Marlin/configurator/config/language.h @@ -30,6 +30,7 @@ // eu Basque-Euskera // kana Japanese // kana_utf Japanese +// cn Chinese #ifndef LANGUAGE_INCLUDE // pick your language from the list above @@ -130,13 +131,15 @@ #define MSG_FILE_PRINTED "Done printing file" #define MSG_BEGIN_FILE_LIST "Begin file list" #define MSG_END_FILE_LIST "End file list" -#define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder " -#define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder " -#define MSG_M200_INVALID_EXTRUDER "M200 Invalid extruder " -#define MSG_M218_INVALID_EXTRUDER "M218 Invalid extruder " -#define MSG_M221_INVALID_EXTRUDER "M221 Invalid extruder " +#define MSG_INVALID_EXTRUDER "Invalid extruder" +#define MSG_INVALID_SOLENOID "Invalid solenoid" +#define MSG_M104_INVALID_EXTRUDER "M104 " MSG_INVALID_EXTRUDER " " +#define MSG_M105_INVALID_EXTRUDER "M105 " MSG_INVALID_EXTRUDER " " +#define MSG_M109_INVALID_EXTRUDER "M109 " MSG_INVALID_EXTRUDER " " +#define MSG_M200_INVALID_EXTRUDER "M200 " MSG_INVALID_EXTRUDER " " +#define MSG_M218_INVALID_EXTRUDER "M218 " MSG_INVALID_EXTRUDER " " +#define MSG_M221_INVALID_EXTRUDER "M221 " MSG_INVALID_EXTRUDER " " #define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature" -#define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder " #define MSG_HEATING "Heating..." #define MSG_HEATING_COMPLETE "Heating done." #define MSG_BED_HEATING "Bed Heating." @@ -148,8 +151,6 @@ #define MSG_RESEND "Resend: " #define MSG_UNKNOWN_COMMAND "Unknown command: \"" #define MSG_ACTIVE_EXTRUDER "Active Extruder: " -#define MSG_INVALID_EXTRUDER "Invalid extruder" -#define MSG_INVALID_SOLENOID "Invalid solenoid" #define MSG_X_MIN "x_min: " #define MSG_X_MAX "x_max: " #define MSG_Y_MIN "y_min: " diff --git a/Marlin/language.h b/Marlin/language.h index 02cd675c8..02235aac7 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -131,13 +131,15 @@ #define MSG_FILE_PRINTED "Done printing file" #define MSG_BEGIN_FILE_LIST "Begin file list" #define MSG_END_FILE_LIST "End file list" -#define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder " -#define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder " -#define MSG_M200_INVALID_EXTRUDER "M200 Invalid extruder " -#define MSG_M218_INVALID_EXTRUDER "M218 Invalid extruder " -#define MSG_M221_INVALID_EXTRUDER "M221 Invalid extruder " +#define MSG_INVALID_EXTRUDER "Invalid extruder" +#define MSG_INVALID_SOLENOID "Invalid solenoid" +#define MSG_M104_INVALID_EXTRUDER "M104 " MSG_INVALID_EXTRUDER " " +#define MSG_M105_INVALID_EXTRUDER "M105 " MSG_INVALID_EXTRUDER " " +#define MSG_M109_INVALID_EXTRUDER "M109 " MSG_INVALID_EXTRUDER " " +#define MSG_M200_INVALID_EXTRUDER "M200 " MSG_INVALID_EXTRUDER " " +#define MSG_M218_INVALID_EXTRUDER "M218 " MSG_INVALID_EXTRUDER " " +#define MSG_M221_INVALID_EXTRUDER "M221 " MSG_INVALID_EXTRUDER " " #define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature" -#define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder " #define MSG_HEATING "Heating..." #define MSG_HEATING_COMPLETE "Heating done." #define MSG_BED_HEATING "Bed Heating." @@ -149,8 +151,6 @@ #define MSG_RESEND "Resend: " #define MSG_UNKNOWN_COMMAND "Unknown command: \"" #define MSG_ACTIVE_EXTRUDER "Active Extruder: " -#define MSG_INVALID_EXTRUDER "Invalid extruder" -#define MSG_INVALID_SOLENOID "Invalid solenoid" #define MSG_X_MIN "x_min: " #define MSG_X_MAX "x_max: " #define MSG_Y_MIN "y_min: " From aedd58091162ced31f6b1336268b4e4f4b01f531 Mon Sep 17 00:00:00 2001 From: paclema Date: Sun, 3 May 2015 02:28:43 +0200 Subject: [PATCH 016/126] Updated all configuration.h examples --- Marlin/Configuration.h | 2 +- Marlin/example_configurations/Felix/Configuration.h | 9 ++++++--- Marlin/example_configurations/Felix/Configuration_DUAL.h | 9 ++++++--- Marlin/example_configurations/Hephestos/Configuration.h | 9 ++++++--- Marlin/example_configurations/K8200/Configuration.h | 7 +++++-- Marlin/example_configurations/SCARA/Configuration.h | 9 ++++++--- Marlin/example_configurations/WITBOX/Configuration.h | 9 ++++++--- .../example_configurations/delta/generic/Configuration.h | 9 ++++++--- .../delta/kossel_mini/Configuration.h | 9 ++++++--- Marlin/example_configurations/makibox/Configuration.h | 8 +++++--- .../example_configurations/tvrrug/Round2/Configuration.h | 7 +++++-- 11 files changed, 58 insertions(+), 29 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index ce5933319..535d1319d 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1,4 +1,4 @@ -#ifndef CONFIGURATION_H +f#ifndef CONFIGURATION_H #define CONFIGURATION_H #include "boards.h" diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 63b3660d5..7ef5228fe 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -356,9 +356,12 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. // It is assumed that when logic high = filament available // when logic low = filament ran out -//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned -//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - +#ifdef FILAMENT_RUNOUT_SENSOR + const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned + #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif + //=========================================================================== //============================ Manual Bed Leveling ========================== //=========================================================================== diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h index 085d95b27..425608da5 100644 --- a/Marlin/example_configurations/Felix/Configuration_DUAL.h +++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h @@ -356,9 +356,12 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. // It is assumed that when logic high = filament available // when logic low = filament ran out -//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned -//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - +#ifdef FILAMENT_RUNOUT_SENSOR + const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned + #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif + //=========================================================================== //============================ Manual Bed Leveling ========================== //=========================================================================== diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index c9c079ebe..a25e8f3f2 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -377,9 +377,12 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. // It is assumed that when logic high = filament available // when logic low = filament ran out -//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned -//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - +#ifdef FILAMENT_RUNOUT_SENSOR + const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned + #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif + //=========================================================================== //============================ Manual Bed Leveling ========================== //=========================================================================== diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index d0abbcbe7..2cd07ec73 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -433,8 +433,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. // It is assumed that when logic high = filament available // when logic low = filament ran out -//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned -//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. +#ifdef FILAMENT_RUNOUT_SENSOR + const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned + #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif //=========================================================================== //============================ Mesh Bed Leveling ============================ diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index cdc036cb2..d88aea6c9 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -408,9 +408,12 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. // It is assumed that when logic high = filament available // when logic low = filament ran out -//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned -//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - +#ifdef FILAMENT_RUNOUT_SENSOR + const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned + #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif + //=========================================================================== //============================ Manual Bed Leveling ========================== //=========================================================================== diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 343c3093a..1925522bc 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -376,9 +376,12 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. // It is assumed that when logic high = filament available // when logic low = filament ran out -//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned -//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - +#ifdef FILAMENT_RUNOUT_SENSOR + const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned + #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif + //=========================================================================== //============================ Manual Bed Leveling ========================== //=========================================================================== diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 9a1fe4875..4324bb4bf 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -406,9 +406,12 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. // It is assumed that when logic high = filament available // when logic low = filament ran out -//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned -//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - +#ifdef FILAMENT_RUNOUT_SENSOR + const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned + #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif + //=========================================================================== //============================ Manual Bed Leveling ========================== //=========================================================================== diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 33391863e..fb2f3aca2 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -406,9 +406,12 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. // It is assumed that when logic high = filament available // when logic low = filament ran out -//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned -//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - +#ifdef FILAMENT_RUNOUT_SENSOR + const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned + #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif + //=========================================================================== //============================ Manual Bed Leveling ========================== //=========================================================================== diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 918d5fa8b..6e8286f3a 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -376,9 +376,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. // It is assumed that when logic high = filament available // when logic low = filament ran out -//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned -//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - +#ifdef FILAMENT_RUNOUT_SENSOR + const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned + #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif //=========================================================================== //============================ Manual Bed Leveling ========================== //=========================================================================== diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 2fff0f21e..43be3262c 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -378,8 +378,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. // It is assumed that when logic high = filament available // when logic low = filament ran out -//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned -//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. +#ifdef FILAMENT_RUNOUT_SENSOR + const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned + #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif //=========================================================================== //============================ Manual Bed Leveling ========================== From 26015b02d8b153b4d583f3838ffdd65cd1258831 Mon Sep 17 00:00:00 2001 From: paclema Date: Sun, 3 May 2015 02:39:34 +0200 Subject: [PATCH 017/126] Fixed typo and updated Configuration.h of configurator --- Marlin/Configuration.h | 2 +- Marlin/configurator/config/Configuration.h | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 535d1319d..ce5933319 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1,4 +1,4 @@ -f#ifndef CONFIGURATION_H +#ifndef CONFIGURATION_H #define CONFIGURATION_H #include "boards.h" diff --git a/Marlin/configurator/config/Configuration.h b/Marlin/configurator/config/Configuration.h index 1d85de926..24c602103 100644 --- a/Marlin/configurator/config/Configuration.h +++ b/Marlin/configurator/config/Configuration.h @@ -417,8 +417,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. // It is assumed that when logic high = filament available // when logic low = filament ran out -//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned -//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. +#ifdef FILAMENT_RUNOUT_SENSOR + const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned + #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif //=========================================================================== //============================ Manual Bed Leveling ========================== From 35493e1af9d722893a6061bfe01b9b34ded83a65 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 3 May 2015 16:03:05 -0700 Subject: [PATCH 018/126] Tweak to planner.cpp position.debug --- Marlin/planner.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index a8558d6c4..0b9efb8d7 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -959,7 +959,7 @@ float junction_deviation = 0.1; vector_3 position = vector_3(st_get_position_mm(X_AXIS), st_get_position_mm(Y_AXIS), st_get_position_mm(Z_AXIS)); //position.debug("in plan_get position"); - //plan_bed_level_matrix.debug("in plan_get bed_level"); + //plan_bed_level_matrix.debug("in plan_get_position"); matrix_3x3 inverse = matrix_3x3::transpose(plan_bed_level_matrix); //inverse.debug("in plan_get inverse"); position.apply_rotation(inverse); @@ -981,10 +981,10 @@ float junction_deviation = 0.1; apply_rotation_xyz(plan_bed_level_matrix, x, y, z); #endif - float nx = position[X_AXIS] = lround(x * axis_steps_per_unit[X_AXIS]); - float ny = position[Y_AXIS] = lround(y * axis_steps_per_unit[Y_AXIS]); - float nz = position[Z_AXIS] = lround(z * axis_steps_per_unit[Z_AXIS]); - float ne = position[E_AXIS] = lround(e * axis_steps_per_unit[E_AXIS]); + float nx = position[X_AXIS] = lround(x * axis_steps_per_unit[X_AXIS]), + ny = position[Y_AXIS] = lround(y * axis_steps_per_unit[Y_AXIS]), + nz = position[Z_AXIS] = lround(z * axis_steps_per_unit[Z_AXIS]), + ne = position[E_AXIS] = lround(e * axis_steps_per_unit[E_AXIS]); st_set_position(nx, ny, nz, ne); previous_nominal_speed = 0.0; // Resets planner junction speeds. Assumes start from rest. From 1285784a49da80e7f37a8568a6d44bbbf03e918f Mon Sep 17 00:00:00 2001 From: Brian Gilbert Date: Mon, 4 May 2015 09:10:42 +1000 Subject: [PATCH 019/126] Add Boots Industries V2.5 example configuration --- .../delta/biv2.5/Configuration.h | 822 ++++++++++++++++++ .../delta/biv2.5/Configuration_adv.h | 552 ++++++++++++ 2 files changed, 1374 insertions(+) create mode 100644 Marlin/example_configurations/delta/biv2.5/Configuration.h create mode 100644 Marlin/example_configurations/delta/biv2.5/Configuration_adv.h diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h new file mode 100644 index 000000000..65983b360 --- /dev/null +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -0,0 +1,822 @@ +#ifndef CONFIGURATION_H +#define CONFIGURATION_H + +#include "boards.h" + +//=========================================================================== +//============================= Getting Started ============================= +//=========================================================================== +/* +Here are some standard links for getting your machine calibrated: + * http://reprap.org/wiki/Calibration + * http://youtu.be/wAL9d7FgInk + * http://calculator.josefprusa.cz + * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide + * http://www.thingiverse.com/thing:5573 + * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap + * http://www.thingiverse.com/thing:298812 +*/ + +// This configuration file contains the basic settings. +// Advanced settings can be found in Configuration_adv.h +// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration + +//=========================================================================== +//============================= DELTA Printer =============================== +//=========================================================================== +// For a Delta printer replace the configuration files with the files in the +// example_configurations/delta directory. +// + +//=========================================================================== +//============================= SCARA Printer =============================== +//=========================================================================== +// For a Delta printer replace the configuration files with the files in the +// example_configurations/SCARA directory. +// + +// User-specified version info of this build to display in [Pronterface, etc] terminal window during +// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this +// build by the user have been successfully uploaded into firmware. +#define STRING_VERSION "1.0.3 dev" +#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time +#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. +#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1 +//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2 + +// SERIAL_PORT selects which serial port should be used for communication with the host. +// This allows the connection of wireless adapters (for instance) to non-default port pins. +// Serial port 0 is still used by the Arduino bootloader regardless of this setting. +#define SERIAL_PORT 0 + +// This determines the communication speed of the printer +#define BAUDRATE 250000 + +// This enables the serial port associated to the Bluetooth interface +//#define BTENABLED // Enable BT interface on AT90USB devices + +// The following define selects which electronics board you have. +// Please choose the name from boards.h that matches your setup +#ifndef MOTHERBOARD + #define MOTHERBOARD BOARD_RUMBA +#endif + +// Optional custom name for your RepStrap or other custom machine +// Displayed in the LCD "Ready" message +#define CUSTOM_MACHINE_NAME "BI V2.5" + +// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) +// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) +// #define MACHINE_UUID "00000000-0000-0000-0000-000000000000" + +// This defines the number of extruders +#define EXTRUDERS 2 + +//// The following define selects which power supply you have. Please choose the one that matches your setup +// 1 = ATX +// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) + +#define POWER_SUPPLY 1 + +// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. +// #define PS_DEFAULT_OFF + + +//=========================================================================== +//============================== Delta Settings ============================= +//=========================================================================== +// Enable DELTA kinematics and most of the default configuration for Deltas +#define DELTA + +// Make delta curves from many straight lines (linear interpolation). +// This is a trade-off between visible corners (not enough segments) +// and processor overload (too many expensive sqrt calls). +#define DELTA_SEGMENTS_PER_SECOND 100 + +// NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them + +// Center-to-center distance of the holes in the diagonal push rods. +#define DELTA_DIAGONAL_ROD 440.0 // mm + +// Horizontal offset from middle of printer to smooth rod center. +#define DELTA_SMOOTH_ROD_OFFSET 330.0 // mm + +// Horizontal offset of the universal joints on the end effector. +#define DELTA_EFFECTOR_OFFSET 50.0 // mm + +// Horizontal offset of the universal joints on the carriages. +#define DELTA_CARRIAGE_OFFSET 20.0 // mm + +// Horizontal distance bridged by diagonal push rods when effector is centered. +#define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-DELTA_EFFECTOR_OFFSET-DELTA_CARRIAGE_OFFSET) + +// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). +#define DELTA_PRINTABLE_RADIUS 160 + + +//=========================================================================== +//============================= Thermal Settings ============================ +//=========================================================================== +// +//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table +// +//// Temperature sensor settings: +// -2 is thermocouple with MAX6675 (only for sensor 0) +// -1 is thermocouple with AD595 +// 0 is not used +// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) +// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) +// 3 is Mendel-parts thermistor (4.7k pullup) +// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! +// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) +// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) +// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) +// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) +// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) +// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) +// 10 is 100k RS thermistor 198-961 (4.7k pullup) +// 11 is 100k beta 3950 1% thermistor (4.7k pullup) +// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) +// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" +// 20 is the PT100 circuit found in the Ultimainboard V2.x +// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 +// +// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k +// (but gives greater accuracy and more stable PID) +// 51 is 100k thermistor - EPCOS (1k pullup) +// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) +// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) +// +// 1047 is Pt1000 with 4k7 pullup +// 1010 is Pt1000 with 1k pullup (non standard) +// 147 is Pt100 with 4k7 pullup +// 110 is Pt100 with 1k pullup (non standard) +// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. +// Use it for Testing or Development purposes. NEVER for production machine. +// #define DUMMY_THERMISTOR_998_VALUE 25 +// #define DUMMY_THERMISTOR_999_VALUE 100 +// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" } +#define TEMP_SENSOR_0 5 +#define TEMP_SENSOR_1 5 +#define TEMP_SENSOR_2 0 +#define TEMP_SENSOR_3 0 +#define TEMP_SENSOR_BED 1 + +// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. +//#define TEMP_SENSOR_1_AS_REDUNDANT +#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 + +// Actual temperature must be close to target for this long before M109 returns success +#define TEMP_RESIDENCY_TIME 10 // (seconds) +#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one +#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. + +// The minimal temperature defines the temperature below which the heater will not be enabled It is used +// to check that the wiring to the thermistor is not broken. +// Otherwise this would lead to the heater being powered on all the time. +#define HEATER_0_MINTEMP 5 +#define HEATER_1_MINTEMP 5 +#define HEATER_2_MINTEMP 5 +#define HEATER_3_MINTEMP 5 +#define BED_MINTEMP 5 + +// When temperature exceeds max temp, your heater will be switched off. +// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! +// You should use MINTEMP for thermistor short/failure protection. +#define HEATER_0_MAXTEMP 275 +#define HEATER_1_MAXTEMP 275 +#define HEATER_2_MAXTEMP 275 +#define HEATER_3_MAXTEMP 275 +#define BED_MAXTEMP 150 + +// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the +// average current. The value should be an integer and the heat bed will be turned on for 1 interval of +// HEATER_BED_DUTY_CYCLE_DIVIDER intervals. +//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4 + +// If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS +//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=I^2/R +//#define BED_WATTS (12.0*12.0/1.1) // P=I^2/R + +//=========================================================================== +//============================= PID Settings ================================ +//=========================================================================== +// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning + +// Comment the following line to disable PID and enable bang-bang. +#define PIDTEMP +#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current +#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current +#ifdef PIDTEMP + //#define PID_DEBUG // Sends debug data to the serial port. + //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX + //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay + //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders) + // Set/get with gcode: M301 E[extruder number, 0-2] + #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature + // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. + #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term + #define K1 0.95 //smoothing factor within the PID + +// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it +// Ultimaker + #define DEFAULT_Kp 22.2 + #define DEFAULT_Ki 1.08 + #define DEFAULT_Kd 114 + +// MakerGear +// #define DEFAULT_Kp 7.0 +// #define DEFAULT_Ki 0.1 +// #define DEFAULT_Kd 12 + +// Mendel Parts V9 on 12V +// #define DEFAULT_Kp 63.0 +// #define DEFAULT_Ki 2.25 +// #define DEFAULT_Kd 440 +#endif // PIDTEMP + +//=========================================================================== +//============================= PID > Bed Temperature Control =============== +//=========================================================================== +// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis +// +// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. +// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, +// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. +// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. +// If your configuration is significantly different than this and you don't understand the issues involved, you probably +// shouldn't use bed PID until someone else verifies your hardware works. +// If this is enabled, find your own PID constants below. +//#define PIDTEMPBED +// +//#define BED_LIMIT_SWITCHING + +// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. +// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) +// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, +// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current + +//#define PID_BED_DEBUG // Sends debug data to the serial port. + +#ifdef PIDTEMPBED +//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) +//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) + #define DEFAULT_bedKp 10.00 + #define DEFAULT_bedKi .023 + #define DEFAULT_bedKd 305.4 + +//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) +//from pidautotune +// #define DEFAULT_bedKp 97.1 +// #define DEFAULT_bedKi 1.41 +// #define DEFAULT_bedKd 1675.16 + +// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. +#endif // PIDTEMPBED + + +//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit +//can be software-disabled for whatever purposes by +#define PREVENT_DANGEROUS_EXTRUDE +//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. +#define PREVENT_LENGTHY_EXTRUDE + +#define EXTRUDE_MINTEMP 170 +#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. + +//=========================================================================== +//============================= Thermal Runaway Protection ================== +//=========================================================================== +/* +This is a feature to protect your printer from burn up in flames if it has +a thermistor coming off place (this happened to a friend of mine recently and +motivated me writing this feature). + +The issue: If a thermistor come off, it will read a lower temperature than actual. +The system will turn the heater on forever, burning up the filament and anything +else around. + +After the temperature reaches the target for the first time, this feature will +start measuring for how long the current temperature stays below the target +minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). + +If it stays longer than _PERIOD, it means the thermistor temperature +cannot catch up with the target, so something *may be* wrong. Then, to be on the +safe side, the system will he halt. + +Bear in mind the count down will just start AFTER the first time the +thermistor temperature is over the target, so you will have no problem if +your extruder heater takes 2 minutes to hit the target on heating. + +*/ +// If you want to enable this feature for all your extruder heaters, +// uncomment the 2 defines below: + +// Parameters for all extruder heaters +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius + +// If you want to enable this feature for your bed heater, +// uncomment the 2 defines below: + +// Parameters for the bed heater +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 120 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 4 // in degree Celsius + +//=========================================================================== +//============================= Mechanical Settings ========================= +//=========================================================================== + +// Uncomment this option to enable CoreXY kinematics +// #define COREXY + +// Enable this option for Toshiba steppers +// #define CONFIG_STEPPERS_TOSHIBA + +// coarse Endstop Settings +#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors + +#ifndef ENDSTOPPULLUPS + // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // #define ENDSTOPPULLUP_XMAX + // #define ENDSTOPPULLUP_YMAX + // #define ENDSTOPPULLUP_ZMAX + // #define ENDSTOPPULLUP_XMIN + // #define ENDSTOPPULLUP_YMIN + // #define ENDSTOPPULLUP_ZMIN +#endif + +// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). +const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. +const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. +const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. +const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. +const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. +const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. +const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +//#define DISABLE_MAX_ENDSTOPS +#define DISABLE_MIN_ENDSTOPS // Deltas only use min endstops for probing + +// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 +#define X_ENABLE_ON 0 +#define Y_ENABLE_ON 0 +#define Z_ENABLE_ON 0 +#define E_ENABLE_ON 0 // For all extruders + +// Disables axis when it's not being used. +// WARNING: When motors turn off there is a chance of losing position accuracy! +#define DISABLE_X false +#define DISABLE_Y false +#define DISABLE_Z false +#define DISABLE_E false // For all extruders +#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled + +// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. +#define INVERT_X_DIR false // DELTA does not invert +#define INVERT_Y_DIR false +#define INVERT_Z_DIR false +#define INVERT_E0_DIR false +#define INVERT_E1_DIR false +#define INVERT_E2_DIR false +#define INVERT_E3_DIR false + +// ENDSTOP SETTINGS: +// Sets direction of endstops when homing; 1=MAX, -1=MIN +#define X_HOME_DIR 1 // deltas always home to max +#define Y_HOME_DIR 1 +#define Z_HOME_DIR 1 + +#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. +#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. + +// Travel limits after homing (units are in mm) +#define X_MIN_POS -DELTA_PRINTABLE_RADIUS +#define Y_MIN_POS -DELTA_PRINTABLE_RADIUS +#define Z_MIN_POS 0 +#define X_MAX_POS DELTA_PRINTABLE_RADIUS +#define Y_MAX_POS DELTA_PRINTABLE_RADIUS +#define Z_MAX_POS MANUAL_Z_HOME_POS + +//=========================================================================== +//============================= Filament Runout Sensor ====================== +//=========================================================================== +//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament + // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. + // It is assumed that when logic high = filament available + // when logic low = filament ran out +//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned +//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + +//=========================================================================== +//============================ Manual Bed Leveling ========================== +//=========================================================================== + +// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling +// #define MESH_BED_LEVELING // Enable mesh bed leveling + +#ifdef MANUAL_BED_LEVELING + #define MBL_Z_STEP 0.025 +#endif // MANUAL_BED_LEVELING + +#ifdef MESH_BED_LEVELING + #define MESH_MIN_X 10 + #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) + #define MESH_MIN_Y 10 + #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y) + #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited + #define MESH_NUM_Y_POINTS 3 + #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0 +#endif // MESH_BED_LEVELING + +//=========================================================================== +//============================= Bed Auto Leveling =========================== +//=========================================================================== + +//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) +//#define Z_PROBE_REPEATABILITY_TEST // Z-Probe Repeatability test is not supported in Deltas yet. + +#ifdef ENABLE_AUTO_BED_LEVELING + + // There are 2 different ways to specify probing locations + // + // - "grid" mode + // Probe several points in a rectangular grid. + // You specify the rectangle and the density of sample points. + // This mode is preferred because there are more measurements. + // + // - "3-point" mode + // Probe 3 arbitrary points on the bed (that aren't colinear) + // You specify the XY coordinates of all 3 points. + + // Enable this to sample the bed in a grid (least squares solution) + // Note: this feature generates 10KB extra code size + #define AUTO_BED_LEVELING_GRID // Deltas only support grid mode + + #ifdef AUTO_BED_LEVELING_GRID + + #define DELTA_PROBABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10) + + #define LEFT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS + #define RIGHT_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS + #define FRONT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS + #define BACK_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS + + #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this + + // Non-linear bed leveling will be used. + // Compensate by interpolating between the nearest four Z probe values for each point. + // Useful for deltas where the print surface may appear like a bowl or dome shape. + // Works best with ACCURATE_BED_LEVELING_POINTS 5 or higher. + #define AUTO_BED_LEVELING_GRID_POINTS 9 + + #else // !AUTO_BED_LEVELING_GRID + + // Arbitrary points to probe. A simple cross-product + // is used to estimate the plane of the bed. + #define ABL_PROBE_PT_1_X 15 + #define ABL_PROBE_PT_1_Y 180 + #define ABL_PROBE_PT_2_X 15 + #define ABL_PROBE_PT_2_Y 20 + #define ABL_PROBE_PT_3_X 170 + #define ABL_PROBE_PT_3_Y 20 + + #endif // AUTO_BED_LEVELING_GRID + + // Offsets to the probe relative to the extruder tip (Hotend - Probe) + // X and Y offsets must be integers + #define X_PROBE_OFFSET_FROM_EXTRUDER 0 // Probe on: -left +right + #define Y_PROBE_OFFSET_FROM_EXTRUDER -10 // Probe on: -front +behind + #define Z_PROBE_OFFSET_FROM_EXTRUDER -3.5 // -below (always!) + + #define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. + // Be sure you have this distance over your Z_MAX_POS in case + + #define XY_TRAVEL_SPEED 4000 // X and Y axis travel speed between probes, in mm/min + + #define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point. + #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points + #define Z_RAISE_AFTER_PROBING 50 //How much the extruder will be raised after the last probing point. + +// #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine. + //Useful to retract a deployable probe. + + //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell + //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. + + // Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe + // Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN. + //#define Z_PROBE_ALLEN_KEY + #ifdef Z_PROBE_ALLEN_KEY + #define Z_PROBE_ALLEN_KEY_DEPLOY_X 30 + #define Z_PROBE_ALLEN_KEY_DEPLOY_Y DELTA_PRINTABLE_RADIUS + #define Z_PROBE_ALLEN_KEY_DEPLOY_Z 100 + + #define Z_PROBE_ALLEN_KEY_STOW_X -64 + #define Z_PROBE_ALLEN_KEY_STOW_Y 56 + #define Z_PROBE_ALLEN_KEY_STOW_Z 23 + #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20 + #endif + + //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk + //The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it. + // You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile. + +// #define PROBE_SERVO_DEACTIVATION_DELAY 300 + + +//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing, +//it is highly recommended you let this Z_SAFE_HOMING enabled!!! + + #define Z_SAFE_HOMING // This feature is meant to avoid Z homing with probe outside the bed area. + // When defined, it will: + // - Allow Z homing only after X and Y homing AND stepper drivers still enabled + // - If stepper drivers timeout, it will need X and Y homing again before Z homing + // - Position the probe in a defined XY point before Z Homing when homing all axis (G28) + // - Block Z homing only when the probe is outside bed area. + + #ifdef Z_SAFE_HOMING + + #define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28) + #define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28) + + #endif + + // Support for a dedicated Z PROBE endstop separate from the Z MIN endstop. + // If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below. + // If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28. + // WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print. + // To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board. + // If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below. + // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32 + // for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed. + // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works. + // D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file. + // WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework. + + //#define Z_PROBE_ENDSTOP + +#endif // ENABLE_AUTO_BED_LEVELING + + +// The position of the homing switches +#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used +//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) + +// Manual homing switch locations: +// For deltabots this means top and center of the Cartesian print volume. +#ifdef MANUAL_HOME_POSITIONS + #define MANUAL_X_HOME_POS 0 + #define MANUAL_Y_HOME_POS 0 + #define MANUAL_Z_HOME_POS 405 // For delta: Distance between nozzle and print surface after homing. +#endif + +/** + * MOVEMENT SETTINGS + */ + + +// delta homing speeds must be the same on xyz +#define HOMING_FEEDRATE {200*30, 200*30, 200*30, 0} // set the homing speeds (mm/min) + +// default settings +// delta speeds must be the same on xyz +#define DEFAULT_AXIS_STEPS_PER_UNIT {72.9, 72.9, 72.9, 291} // default steps per unit for BI v2.5 (cable drive) +#define DEFAULT_MAX_FEEDRATE {500, 500, 500, 150} // (mm/sec) +#define DEFAULT_MAX_ACCELERATION {9000,9000,9000,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot. + +#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves +#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts +#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves + +// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). +// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). +// For the other hotends it is their distance from the extruder 0 hotend. +// #define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis +// #define EXTRUDER_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis + +// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) +#define DEFAULT_XYJERK 15.0 // (mm/sec) +#define DEFAULT_ZJERK 15.0 // (mm/sec) Must be same as XY for delta +#define DEFAULT_EJERK 5.0 // (mm/sec) + + +//============================================================================= +//============================= Additional Features =========================== +//============================================================================= + +// Custom M code points +#define CUSTOM_M_CODES +#ifdef CUSTOM_M_CODES + #ifdef ENABLE_AUTO_BED_LEVELING + #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 + #define Z_PROBE_OFFSET_RANGE_MIN -20 + #define Z_PROBE_OFFSET_RANGE_MAX 20 + #endif +#endif + + +// EEPROM +// The microcontroller can store settings in the EEPROM, e.g. max velocity... +// M500 - stores parameters in EEPROM +// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). +// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. +//define this to enable EEPROM support +//#define EEPROM_SETTINGS + +#ifdef EEPROM_SETTINGS + // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: + #define EEPROM_CHITCHAT // please keep turned on if you can. +#endif + +// Preheat Constants +#define PLA_PREHEAT_HOTEND_TEMP 180 +#define PLA_PREHEAT_HPB_TEMP 70 +#define PLA_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255 + +#define ABS_PREHEAT_HOTEND_TEMP 240 +#define ABS_PREHEAT_HPB_TEMP 100 +#define ABS_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255 + +//==============================LCD and SD support============================= + +// Define your display language below. Replace (en) with your language code and uncomment. +// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test +// See also language.h +#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) + +// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display. +// To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset. +// See also documentation/LCDLanguageFont.md + #define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware + //#define DISPLAY_CHARSET_HD44780_WESTERN + //#define DISPLAY_CHARSET_HD44780_CYRILLIC + +//#define ULTRA_LCD //general LCD support, also 16x2 +//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) +//#define SDSUPPORT // Enable SD Card Support in Hardware Console +//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error) +//#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication +//#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder +//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking +//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store. +//#define ULTIPANEL //the UltiPanel as on Thingiverse +//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click +//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click + // 0 to disable buzzer feedback. Test with M300 S P + +// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) +// http://reprap.org/wiki/PanelOne +//#define PANEL_ONE + +// The MaKr3d Makr-Panel with graphic controller and SD support +// http://reprap.org/wiki/MaKr3d_MaKrPanel +//#define MAKRPANEL + +// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD +// http://panucatt.com +// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib +//#define VIKI2 +//#define miniVIKI + +// The RepRapDiscount Smart Controller (white PCB) +// http://reprap.org/wiki/RepRapDiscount_Smart_Controller +//#define REPRAP_DISCOUNT_SMART_CONTROLLER + +// The GADGETS3D G3D LCD/SD Controller (blue PCB) +// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel +//#define G3D_PANEL + +// The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB) +// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller +// +// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib +#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + +// The RepRapWorld REPRAPWORLD_KEYPAD v1.1 +// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 +//#define REPRAPWORLD_KEYPAD +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // how much should be moved when a key is pressed, eg 10.0 means 10mm per click + +// The Elefu RA Board Control Panel +// http://www.elefu.com/index.php?route=product/product&product_id=53 +// REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C +//#define RA_CONTROL_PANEL + +// Delta calibration menu +// uncomment to add three points calibration menu option. +// See http://minow.blogspot.com/index.html#4918805519571907051 +// If needed, adjust the X, Y, Z calibration coordinates +// in ultralcd.cpp@lcd_delta_calibrate_menu() +// #define DELTA_CALIBRATION_MENU + +/** + * I2C Panels + */ + +//#define LCD_I2C_SAINSMART_YWROBOT + +// PANELOLU2 LCD with status LEDs, separate encoder and click inputs +//#define LCD_I2C_PANELOLU2 + +// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs +//#define LCD_I2C_VIKI + +// Shift register panels +// --------------------- +// 2 wire Non-latching LCD SR from: +// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection + +//#define SAV_3DLCD + +// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino +//#define FAST_PWM_FAN + +// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency +// which is not as annoying as with the hardware PWM. On the other hand, if this frequency +// is too low, you should also increment SOFT_PWM_SCALE. +//#define FAN_SOFT_PWM + +// Incrementing this by 1 will double the software PWM frequency, +// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. +// However, control resolution will be halved for each increment; +// at zero value, there are 128 effective control positions. +#define SOFT_PWM_SCALE 0 + +// Temperature status LEDs that display the hotend and bet temperature. +// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. +// Otherwise the RED led is on. There is 1C hysteresis. +//#define TEMP_STAT_LEDS + +// M240 Triggers a camera by emulating a Canon RC-1 Remote +// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ +// #define PHOTOGRAPH_PIN 23 + +// SF send wrong arc g-codes when using Arc Point as fillet procedure +//#define SF_ARC_FIX + +// Support for the BariCUDA Paste Extruder. +//#define BARICUDA + +//define BlinkM/CyzRgb Support +//#define BLINKM + +/*********************************************************************\ +* R/C SERVO support +* Sponsored by TrinityLabs, Reworked by codexmas +**********************************************************************/ + +// Number of servos +// +// If you select a configuration below, this will receive a default value and does not need to be set manually +// set it manually if you have more servos than extruders and wish to manually control some +// leaving it undefined or defining as 0 will disable the servo subsystem +// If unsure, leave commented / disabled +// +//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command + +// Servo Endstops +// +// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. +// Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500. +// +//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 +//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles + +/**********************************************************************\ + * Support for a filament diameter sensor + * Also allows adjustment of diameter at print time (vs at slicing) + * Single extruder only at this point (extruder 0) + * + * Motherboards + * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector + * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) + * 301 - Rambo - uses Analog input 3 + * Note may require analog pins to be defined for different motherboards + **********************************************************************/ +// Uncomment below to enable +//#define FILAMENT_SENSOR + +#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) +#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel + +#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation +#define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm +#define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm +#define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) + +//defines used in the code +#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially + +//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. +//#define FILAMENT_LCD_DISPLAY + + + + + + +#include "Configuration_adv.h" +#include "thermistortables.h" + +#endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h new file mode 100644 index 000000000..d035073b8 --- /dev/null +++ b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h @@ -0,0 +1,552 @@ +#ifndef CONFIGURATION_ADV_H +#define CONFIGURATION_ADV_H + +#include "Conditionals.h" + +// @section temperature + +//=========================================================================== +//=============================Thermal Settings ============================ +//=========================================================================== + +#ifdef BED_LIMIT_SWITCHING + #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS +#endif +#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control + +//// Heating sanity check: +// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature +// If the temperature has not increased at the end of that period, the target temperature is set to zero. +// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature +// differ by at least 2x WATCH_TEMP_INCREASE +#define WATCH_TEMP_PERIOD 40000 //40 seconds +#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds + +#ifdef PIDTEMP + // this adds an experimental additional term to the heating power, proportional to the extrusion speed. + // if Kc is chosen well, the additional required power due to increased melting should be compensated. + #define PID_ADD_EXTRUSION_RATE + #ifdef PID_ADD_EXTRUSION_RATE + #define DEFAULT_Kc (1) //heating power=Kc*(e_speed) + #endif +#endif + + +//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode. +//The maximum buffered steps/sec of the extruder motor are called "se". +//You enter the autotemp mode by a M109 S B F +// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp +// you exit the value by any M109 without F* +// Also, if the temperature is set to a value Z2 (yes, it is.. think about it) and the Z adjust would be positive. + // Play a little bit with small adjustments (0.5mm) and check the behaviour. + // The M119 (endstops report) will start reporting the Z2 Endstop as well. + + #define Z_DUAL_ENDSTOPS + + #ifdef Z_DUAL_ENDSTOPS + #define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis. + #define Z2_DIR_PIN E2_DIR_PIN + #define Z2_ENABLE_PIN E2_ENABLE_PIN + #define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36) + const bool Z2_MAX_ENDSTOP_INVERTING = false; + #define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis. + #endif + +#endif // Z_DUAL_STEPPER_DRIVERS + +// Same again but for Y Axis. +//#define Y_DUAL_STEPPER_DRIVERS + +// Define if the two Y drives need to rotate in opposite directions +#define INVERT_Y2_VS_Y_DIR true + +// Enable this for dual x-carriage printers. +// A dual x-carriage design has the advantage that the inactive extruder can be parked which +// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage +// allowing faster printing speeds. +//#define DUAL_X_CARRIAGE +#ifdef DUAL_X_CARRIAGE + // Configuration for second X-carriage + // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; + // the second x-carriage always homes to the maximum endstop. + #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage + #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed + #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position + #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position + // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software + // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops + // without modifying the firmware (through the "M218 T1 X???" command). + // Remember: you should set the second extruder x-offset to 0 in your slicer. + + // Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h) + #define X2_ENABLE_PIN 29 + #define X2_STEP_PIN 25 + #define X2_DIR_PIN 23 + + // There are a few selectable movement modes for dual x-carriages using M605 S + // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results + // as long as it supports dual x-carriages. (M605 S0) + // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so + // that additional slicer support is not required. (M605 S1) + // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all + // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at + // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) + + // This is the default power-up mode which can be later using M605. + #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 + + // Default settings in "Auto-park Mode" + #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder + #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder + + // Default x offset in duplication mode (typically set to half print bed width) + #define DEFAULT_DUPLICATION_X_OFFSET 100 + +#endif //DUAL_X_CARRIAGE + +// @section homing + +//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: +#define X_HOME_BUMP_MM 5 +#define Y_HOME_BUMP_MM 5 +#define Z_HOME_BUMP_MM 5 // deltas need the same for all three axis +#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate) +//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. + +// When G28 is called, this option will make Y home before X +// #define HOME_Y_BEFORE_X + +// @section machine + +#define AXIS_RELATIVE_MODES {false, false, false, false} + +// @section machine + +//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +#define INVERT_X_STEP_PIN false +#define INVERT_Y_STEP_PIN false +#define INVERT_Z_STEP_PIN false +#define INVERT_E_STEP_PIN false + +// Default stepper release if idle. Set to 0 to deactivate. +#define DEFAULT_STEPPER_DEACTIVE_TIME 0 + +#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate +#define DEFAULT_MINTRAVELFEEDRATE 0.0 + +// @section lcd + +#ifdef ULTIPANEL + #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel + #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder +#endif + +// @section extras + +// minimum time in microseconds that a movement needs to take if the buffer is emptied. +#define DEFAULT_MINSEGMENTTIME 20000 + +// If defined the movements slow down when the look ahead buffer is only half full +// (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) +//#define SLOWDOWN + +// Frequency limit +// See nophead's blog for more info +// Not working O +//#define XY_FREQUENCY_LIMIT 15 + +// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end +// of the buffer and all stops. This should not be much greater than zero and should only be changed +// if unwanted behavior is observed on a user's machine when running at very slow speeds. +#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) + +// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. +#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] + +// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) +#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) + +// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro +//#define DIGIPOT_I2C +// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 +#define DIGIPOT_I2C_NUM_CHANNELS 8 +// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} + +//=========================================================================== +//=============================Additional Features=========================== +//=========================================================================== + +#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly +#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value +#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value + +//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ +#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again + +// @section lcd + +#ifdef SDSUPPORT + + // If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted + // You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT + // in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should + // be commented out otherwise + #define SDCARDDETECTINVERTED + + #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? + #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. + + #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. + // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. + // using: + //#define MENU_ADDAUTOSTART + + // Show a progress bar on HD44780 LCDs for SD printing + //#define LCD_PROGRESS_BAR + + #ifdef LCD_PROGRESS_BAR + // Amount of time (ms) to show the bar + #define PROGRESS_BAR_BAR_TIME 2000 + // Amount of time (ms) to show the status message + #define PROGRESS_BAR_MSG_TIME 3000 + // Amount of time (ms) to retain the status message (0=forever) + #define PROGRESS_MSG_EXPIRE 0 + // Enable this to show messages for MSG_TIME then hide them + //#define PROGRESS_MSG_ONCE + #endif + +#endif // SDSUPPORT + +// @section more + +// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation. +//#define USE_WATCHDOG + +#ifdef USE_WATCHDOG +// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. +// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. +// However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. +//#define WATCHDOG_RESET_MANUAL +#endif + +// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled. +//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + +// @section lcd + +// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process +// it can e.g. be used to change z-positions in the print startup phase in real-time +// does not respect endstops! +//#define BABYSTEPPING +#ifdef BABYSTEPPING + #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions + #define BABYSTEP_INVERT_Z false //true for inverse movements in Z + #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements +#endif + +// @section extruder + +// extruder advance constant (s2/mm3) +// +// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 +// +// Hooke's law says: force = k * distance +// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant +// so: v ^ 2 is proportional to number of steps we advance the extruder +//#define ADVANCE + +#ifdef ADVANCE + #define EXTRUDER_ADVANCE_K .0 + #define D_FILAMENT 2.85 + #define STEPS_MM_E 836 +#endif + +// @section extras + +// Arc interpretation settings: +#define MM_PER_ARC_SEGMENT 1 +#define N_ARC_CORRECTION 25 + +const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement + +// @section temperature + +// Control heater 0 and heater 1 in parallel. +//#define HEATERS_PARALLEL + +//=========================================================================== +//================================= Buffers ================================= +//=========================================================================== + +// @section hidden + +// The number of linear motions that can be in the plan at any give time. +// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. +#ifdef SDSUPPORT + #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller +#else + #define BLOCK_BUFFER_SIZE 16 // maximize block buffer +#endif + +// @section more + +//The ASCII buffer for receiving from the serial: +#define MAX_CMD_SIZE 96 +#define BUFSIZE 4 + +// @section fwretract + +// Firmware based and LCD controlled retract +// M207 and M208 can be used to define parameters for the retraction. +// The retraction can be called by the slicer using G10 and G11 +// until then, intended retractions can be detected by moves that only extrude and the direction. +// the moves are than replaced by the firmware controlled ones. + +#define FWRETRACT //ONLY PARTIALLY TESTED +#ifdef FWRETRACT + #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt + #define RETRACT_LENGTH 5 //default retract length (positive mm) + #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change + #define RETRACT_FEEDRATE 100 //default feedrate for retracting (mm/s) + #define RETRACT_ZLIFT 0 //default retract Z-lift + #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) + #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) + #define RETRACT_RECOVER_FEEDRATE 100 //default feedrate for recovering from retraction (mm/s) +#endif + +// Add support for experimental filament exchange support M600; requires display +#ifdef ULTIPANEL + //#define FILAMENTCHANGEENABLE + #ifdef FILAMENTCHANGEENABLE + #define FILAMENTCHANGE_XPOS 3 + #define FILAMENTCHANGE_YPOS 3 + #define FILAMENTCHANGE_ZADD 10 + #define FILAMENTCHANGE_FIRSTRETRACT -2 + #define FILAMENTCHANGE_FINALRETRACT -100 + #endif +#endif + +/******************************************************************************\ + * enable this section if you have TMC26X motor drivers. + * you need to import the TMC26XStepper library into the arduino IDE for this + ******************************************************************************/ + +// @section tmc + +//#define HAVE_TMCDRIVER +#ifdef HAVE_TMCDRIVER + +// #define X_IS_TMC + #define X_MAX_CURRENT 1000 //in mA + #define X_SENSE_RESISTOR 91 //in mOhms + #define X_MICROSTEPS 16 //number of microsteps + +// #define X2_IS_TMC + #define X2_MAX_CURRENT 1000 //in mA + #define X2_SENSE_RESISTOR 91 //in mOhms + #define X2_MICROSTEPS 16 //number of microsteps + +// #define Y_IS_TMC + #define Y_MAX_CURRENT 1000 //in mA + #define Y_SENSE_RESISTOR 91 //in mOhms + #define Y_MICROSTEPS 16 //number of microsteps + +// #define Y2_IS_TMC + #define Y2_MAX_CURRENT 1000 //in mA + #define Y2_SENSE_RESISTOR 91 //in mOhms + #define Y2_MICROSTEPS 16 //number of microsteps + +// #define Z_IS_TMC + #define Z_MAX_CURRENT 1000 //in mA + #define Z_SENSE_RESISTOR 91 //in mOhms + #define Z_MICROSTEPS 16 //number of microsteps + +// #define Z2_IS_TMC + #define Z2_MAX_CURRENT 1000 //in mA + #define Z2_SENSE_RESISTOR 91 //in mOhms + #define Z2_MICROSTEPS 16 //number of microsteps + +// #define E0_IS_TMC + #define E0_MAX_CURRENT 1000 //in mA + #define E0_SENSE_RESISTOR 91 //in mOhms + #define E0_MICROSTEPS 16 //number of microsteps + +// #define E1_IS_TMC + #define E1_MAX_CURRENT 1000 //in mA + #define E1_SENSE_RESISTOR 91 //in mOhms + #define E1_MICROSTEPS 16 //number of microsteps + +// #define E2_IS_TMC + #define E2_MAX_CURRENT 1000 //in mA + #define E2_SENSE_RESISTOR 91 //in mOhms + #define E2_MICROSTEPS 16 //number of microsteps + +// #define E3_IS_TMC + #define E3_MAX_CURRENT 1000 //in mA + #define E3_SENSE_RESISTOR 91 //in mOhms + #define E3_MICROSTEPS 16 //number of microsteps + +#endif + +/******************************************************************************\ + * enable this section if you have L6470 motor drivers. + * you need to import the L6470 library into the arduino IDE for this + ******************************************************************************/ + +// @section l6470 + +//#define HAVE_L6470DRIVER +#ifdef HAVE_L6470DRIVER + +// #define X_IS_L6470 + #define X_MICROSTEPS 16 //number of microsteps + #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define X2_IS_L6470 + #define X2_MICROSTEPS 16 //number of microsteps + #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define Y_IS_L6470 + #define Y_MICROSTEPS 16 //number of microsteps + #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define Y2_IS_L6470 + #define Y2_MICROSTEPS 16 //number of microsteps + #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define Z_IS_L6470 + #define Z_MICROSTEPS 16 //number of microsteps + #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define Z2_IS_L6470 + #define Z2_MICROSTEPS 16 //number of microsteps + #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define E0_IS_L6470 + #define E0_MICROSTEPS 16 //number of microsteps + #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define E1_IS_L6470 + #define E1_MICROSTEPS 16 //number of microsteps + #define E1_MICROSTEPS 16 //number of microsteps + #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define E2_IS_L6470 + #define E2_MICROSTEPS 16 //number of microsteps + #define E2_MICROSTEPS 16 //number of microsteps + #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +// #define E3_IS_L6470 + #define E3_MICROSTEPS 16 //number of microsteps + #define E3_MICROSTEPS 16 //number of microsteps + #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be carefull not to go too high + #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off + #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall + +#endif + +#include "Conditionals.h" +#include "SanityCheck.h" + +#endif //CONFIGURATION_ADV_H From 59529b755d6d77671f82c4b3921dd67dab153d06 Mon Sep 17 00:00:00 2001 From: Ivan Galvez Junquera Date: Mon, 4 May 2015 09:44:34 +0200 Subject: [PATCH 020/126] Fixed lowercase change missing on commit a22a228b. Servo.cpp and Servo.h were changed to lowercase in Makefile but not their actual filenames. --- Marlin/Marlin_main.cpp | 2 +- Marlin/{Servo.cpp => servo.cpp} | 2 +- Marlin/{Servo.h => servo.h} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename Marlin/{Servo.cpp => servo.cpp} (99%) rename Marlin/{Servo.h => servo.h} (100%) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 9541fc8a7..3130870e9 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -61,7 +61,7 @@ #endif #if NUM_SERVOS > 0 - #include "Servo.h" + #include "servo.h" #endif #if HAS_DIGIPOTSS diff --git a/Marlin/Servo.cpp b/Marlin/servo.cpp similarity index 99% rename from Marlin/Servo.cpp rename to Marlin/servo.cpp index 576b394fb..81d73ae87 100644 --- a/Marlin/Servo.cpp +++ b/Marlin/servo.cpp @@ -48,7 +48,7 @@ #include #include -#include "Servo.h" +#include "servo.h" #define usToTicks(_us) (( clockCyclesPerMicrosecond()* _us) / 8) // converts microseconds to tick (assumes prescale of 8) // 12 Aug 2009 #define ticksToUs(_ticks) (( (unsigned)_ticks * 8)/ clockCyclesPerMicrosecond() ) // converts from ticks back to microseconds diff --git a/Marlin/Servo.h b/Marlin/servo.h similarity index 100% rename from Marlin/Servo.h rename to Marlin/servo.h From ab246ab032d1ea1706d03fb044429a8938271575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 4 May 2015 15:03:00 +0200 Subject: [PATCH 021/126] Reverting changes to error messages on serial console This reverts the changes done to the error message for line number mismatches done in commit d43cc2dd5f52c9b71b486e7778d7fb44ea67fad6 --- Marlin/Marlin_main.cpp | 7 +++---- Marlin/configurator/config/language.h | 3 +-- Marlin/language.h | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 9541fc8a7..759a0fea9 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -757,10 +757,9 @@ void get_command() { gcode_N = (strtol(strchr_pointer + 1, NULL, 10)); if (gcode_N != gcode_LastN + 1 && strstr_P(command, PSTR("M110")) == NULL) { SERIAL_ERROR_START; - SERIAL_ERRORPGM(MSG_ERR_LINE_NO1); - SERIAL_ERROR(gcode_LastN + 1); - SERIAL_ERRORPGM(MSG_ERR_LINE_NO2); - SERIAL_ERRORLN(gcode_N); + SERIAL_ERRORPGM(MSG_ERR_LINE_NO); + SERIAL_ERRORLN(gcode_LastN); + //Serial.println(gcode_N); FlushSerialRequestResend(); serial_count = 0; return; diff --git a/Marlin/configurator/config/language.h b/Marlin/configurator/config/language.h index 02235aac7..40d8dbe66 100644 --- a/Marlin/configurator/config/language.h +++ b/Marlin/configurator/config/language.h @@ -123,8 +123,7 @@ #define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: " #define MSG_OK "ok" #define MSG_FILE_SAVED "Done saving file." -#define MSG_ERR_LINE_NO1 "Line Number out of sequence. Expected: " -#define MSG_ERR_LINE_NO2 " Got: " +#define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: " #define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: " #define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: " #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: " diff --git a/Marlin/language.h b/Marlin/language.h index 02235aac7..40d8dbe66 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -123,8 +123,7 @@ #define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: " #define MSG_OK "ok" #define MSG_FILE_SAVED "Done saving file." -#define MSG_ERR_LINE_NO1 "Line Number out of sequence. Expected: " -#define MSG_ERR_LINE_NO2 " Got: " +#define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: " #define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: " #define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: " #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: " From 150a35eff8e8b171101c76d76d0e493f9b811c3e Mon Sep 17 00:00:00 2001 From: fmalpartida Date: Mon, 4 May 2015 19:48:49 +0200 Subject: [PATCH 022/126] Bug corrected: Persistent homing message. Message was declared as an alert, therefore it was persistent. Updated to message. --- Marlin/Marlin_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 759a0fea9..63958bf83 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -6095,7 +6095,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { if (!READ(HOME_PIN)) { if (!homeDebounceCount) { enqueuecommands_P(PSTR("G28")); - LCD_ALERTMESSAGEPGM(MSG_AUTO_HOME); + LCD_MESSAGEPGM(MSG_AUTO_HOME); } if (homeDebounceCount < HOME_DEBOUNCE_DELAY) homeDebounceCount++; From 8f8bf3a897621c08afd42e9b854a28ac5f0ac287 Mon Sep 17 00:00:00 2001 From: brupje Date: Tue, 5 May 2015 11:03:20 +0200 Subject: [PATCH 023/126] Make Marlin actually compile when #define REPRAPWORLD_KEYPAD is uncommented --- Marlin/ultralcd.cpp | 8 ++++---- Marlin/ultralcd_implementation_hitachi_HD44780.h | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 5ca094337..15c20fff3 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -212,11 +212,11 @@ static void lcd_status_screen(); } } while(0) /** Used variables to keep track of the menu */ - #ifndef REPRAPWORLD_KEYPAD - volatile uint8_t buttons; // Bits of the pressed buttons. - #else - volatile uint8_t buttons_reprapworld_keypad; // The reprapworld_keypad shift register values + volatile uint8_t buttons; //the last checked buttons in a bit array. + #ifdef REPRAPWORLD_KEYPAD + volatile uint8_t buttons_reprapworld_keypad; // to store the keypad shift register values #endif + #ifdef LCD_HAS_SLOW_BUTTONS volatile uint8_t slow_buttons; // Bits of the pressed buttons. #endif diff --git a/Marlin/ultralcd_implementation_hitachi_HD44780.h b/Marlin/ultralcd_implementation_hitachi_HD44780.h index eb1f525cc..b5b046da3 100644 --- a/Marlin/ultralcd_implementation_hitachi_HD44780.h +++ b/Marlin/ultralcd_implementation_hitachi_HD44780.h @@ -6,11 +6,11 @@ * When selecting the Russian language, a slightly different LCD implementation is used to handle UTF8 characters. **/ -#ifndef REPRAPWORLD_KEYPAD - extern volatile uint8_t buttons; //the last checked buttons in a bit array. -#else - extern volatile uint16_t buttons; //an extended version of the last checked buttons in a bit array. -#endif +//#ifndef REPRAPWORLD_KEYPAD +// extern volatile uint8_t buttons; //the last checked buttons in a bit array. +//#else + extern volatile uint8_t buttons; //an extended version of the last checked buttons in a bit array. +//#endif //////////////////////////////////// // Setup button and encode mappings for each panel (into 'buttons' variable From df4d50579a07eb61159e80eea30637b72103e494 Mon Sep 17 00:00:00 2001 From: brupje Date: Tue, 5 May 2015 12:47:24 +0200 Subject: [PATCH 024/126] This is conflicting with the settings in ultralcd.h. Not sure why it' s redefined here anyway. --- Marlin/ultralcd_implementation_hitachi_HD44780.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/ultralcd_implementation_hitachi_HD44780.h b/Marlin/ultralcd_implementation_hitachi_HD44780.h index b5b046da3..2d84b7673 100644 --- a/Marlin/ultralcd_implementation_hitachi_HD44780.h +++ b/Marlin/ultralcd_implementation_hitachi_HD44780.h @@ -83,7 +83,7 @@ #define BLEN_REPRAPWORLD_KEYPAD_DOWN 6 #define BLEN_REPRAPWORLD_KEYPAD_LEFT 7 - #define REPRAPWORLD_BTN_OFFSET 3 // bit offset into buttons for shift register values + #define REPRAPWORLD_BTN_OFFSET 0 // bit offset into buttons for shift register values #define EN_REPRAPWORLD_KEYPAD_F3 BIT((BLEN_REPRAPWORLD_KEYPAD_F3+REPRAPWORLD_BTN_OFFSET)) #define EN_REPRAPWORLD_KEYPAD_F2 BIT((BLEN_REPRAPWORLD_KEYPAD_F2+REPRAPWORLD_BTN_OFFSET)) @@ -94,10 +94,10 @@ #define EN_REPRAPWORLD_KEYPAD_DOWN BIT((BLEN_REPRAPWORLD_KEYPAD_DOWN+REPRAPWORLD_BTN_OFFSET)) #define EN_REPRAPWORLD_KEYPAD_LEFT BIT((BLEN_REPRAPWORLD_KEYPAD_LEFT+REPRAPWORLD_BTN_OFFSET)) - #define LCD_CLICKED ((buttons&EN_C) || (buttons&EN_REPRAPWORLD_KEYPAD_F1)) - #define REPRAPWORLD_KEYPAD_MOVE_Y_DOWN (buttons&EN_REPRAPWORLD_KEYPAD_DOWN) - #define REPRAPWORLD_KEYPAD_MOVE_Y_UP (buttons&EN_REPRAPWORLD_KEYPAD_UP) - #define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons&EN_REPRAPWORLD_KEYPAD_MIDDLE) + //#define LCD_CLICKED ((buttons&EN_C) || (buttons&EN_REPRAPWORLD_KEYPAD_F1)) + //#define REPRAPWORLD_KEYPAD_MOVE_Y_DOWN (buttons&EN_REPRAPWORLD_KEYPAD_DOWN) + //#define REPRAPWORLD_KEYPAD_MOVE_Y_UP (buttons&EN_REPRAPWORLD_KEYPAD_UP) + //#define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons&EN_REPRAPWORLD_KEYPAD_MIDDLE) #elif defined(NEWPANEL) #define LCD_CLICKED (buttons&EN_C) From 816aa19861344e3d5ceaed07a0ce9e1d5b833444 Mon Sep 17 00:00:00 2001 From: brupje Date: Tue, 5 May 2015 13:04:46 +0200 Subject: [PATCH 025/126] Up/down buttons were reversed, swapped the assignments --- Marlin/ultralcd_implementation_hitachi_HD44780.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/ultralcd_implementation_hitachi_HD44780.h b/Marlin/ultralcd_implementation_hitachi_HD44780.h index 2d84b7673..7f9a88e5b 100644 --- a/Marlin/ultralcd_implementation_hitachi_HD44780.h +++ b/Marlin/ultralcd_implementation_hitachi_HD44780.h @@ -77,10 +77,10 @@ #define BLEN_REPRAPWORLD_KEYPAD_F3 0 #define BLEN_REPRAPWORLD_KEYPAD_F2 1 #define BLEN_REPRAPWORLD_KEYPAD_F1 2 - #define BLEN_REPRAPWORLD_KEYPAD_UP 3 + #define BLEN_REPRAPWORLD_KEYPAD_UP 6 #define BLEN_REPRAPWORLD_KEYPAD_RIGHT 4 #define BLEN_REPRAPWORLD_KEYPAD_MIDDLE 5 - #define BLEN_REPRAPWORLD_KEYPAD_DOWN 6 + #define BLEN_REPRAPWORLD_KEYPAD_DOWN 3 #define BLEN_REPRAPWORLD_KEYPAD_LEFT 7 #define REPRAPWORLD_BTN_OFFSET 0 // bit offset into buttons for shift register values From 22e0d2afcb5828b3a62099f786c0cdd45406b4de Mon Sep 17 00:00:00 2001 From: brupje Date: Tue, 5 May 2015 14:01:20 +0200 Subject: [PATCH 026/126] Default configuration for megatronics. --- Marlin/rrw/Configuration_megatronics.h | 817 +++++++++++++++++++++++++ 1 file changed, 817 insertions(+) create mode 100644 Marlin/rrw/Configuration_megatronics.h diff --git a/Marlin/rrw/Configuration_megatronics.h b/Marlin/rrw/Configuration_megatronics.h new file mode 100644 index 000000000..c62845989 --- /dev/null +++ b/Marlin/rrw/Configuration_megatronics.h @@ -0,0 +1,817 @@ +#ifndef CONFIGURATION_H +#define CONFIGURATION_H + +#include "boards.h" + +//=========================================================================== +//============================= Getting Started ============================= +//=========================================================================== +/* +Here are some standard links for getting your machine calibrated: + * http://reprap.org/wiki/Calibration + * http://youtu.be/wAL9d7FgInk + * http://calculator.josefprusa.cz + * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide + * http://www.thingiverse.com/thing:5573 + * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap + * http://www.thingiverse.com/thing:298812 +*/ + +// This configuration file contains the basic settings. +// Advanced settings can be found in Configuration_adv.h +// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration + +//=========================================================================== +//============================= DELTA Printer =============================== +//=========================================================================== +// For a Delta printer replace the configuration files with the files in the +// example_configurations/delta directory. +// + +//=========================================================================== +//============================= SCARA Printer =============================== +//=========================================================================== +// For a Scara printer replace the configuration files with the files in the +// example_configurations/SCARA directory. +// + +// @section info + +// User-specified version info of this build to display in [Pronterface, etc] terminal window during +// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this +// build by the user have been successfully uploaded into firmware. +#define STRING_VERSION "1.0.3 dev" +#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time +#define STRING_CONFIG_H_AUTHOR "RepRapWorld.com" // Who made the changes. +#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1 +//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2 + +// @section machine + +// SERIAL_PORT selects which serial port should be used for communication with the host. +// This allows the connection of wireless adapters (for instance) to non-default port pins. +// Serial port 0 is still used by the Arduino bootloader regardless of this setting. +// :[0,1,2,3,4,5,6,7] +#define SERIAL_PORT 0 + +// This determines the communication speed of the printer +// :[2400,9600,19200,38400,57600,115200,250000] +#define BAUDRATE 250000 + +// This enables the serial port associated to the Bluetooth interface +//#define BTENABLED // Enable BT interface on AT90USB devices + +// The following define selects which electronics board you have. +// Please choose the name from boards.h that matches your setup +#ifndef MOTHERBOARD + #define MOTHERBOARD BOARD_MEGATRONICS_3 +#endif + +// Optional custom name for your RepStrap or other custom machine +// Displayed in the LCD "Ready" message +// #define CUSTOM_MACHINE_NAME "3D Printer" + +// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) +// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) +// #define MACHINE_UUID "00000000-0000-0000-0000-000000000000" + +// This defines the number of extruders +// :[1,2,3,4] +#define EXTRUDERS 1 + +// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). +// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). +// For the other hotends it is their distance from the extruder 0 hotend. +//#define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis +//#define EXTRUDER_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis + +//// The following define selects which power supply you have. Please choose the one that matches your setup +// 1 = ATX +// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) +// :{1:'ATX',2:'X-Box 360'} + +#define POWER_SUPPLY 1 + +// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. +// #define PS_DEFAULT_OFF + +// @section temperature + +//=========================================================================== +//============================= Thermal Settings ============================ +//=========================================================================== +// +//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table +// +//// Temperature sensor settings: +// -2 is thermocouple with MAX6675 (only for sensor 0) +// -1 is thermocouple with AD595 +// 0 is not used +// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) +// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) +// 3 is Mendel-parts thermistor (4.7k pullup) +// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! +// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) +// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) +// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) +// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) +// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) +// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) +// 10 is 100k RS thermistor 198-961 (4.7k pullup) +// 11 is 100k beta 3950 1% thermistor (4.7k pullup) +// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) +// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" +// 20 is the PT100 circuit found in the Ultimainboard V2.x +// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 +// +// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k +// (but gives greater accuracy and more stable PID) +// 51 is 100k thermistor - EPCOS (1k pullup) +// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) +// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) +// +// 1047 is Pt1000 with 4k7 pullup +// 1010 is Pt1000 with 1k pullup (non standard) +// 147 is Pt100 with 4k7 pullup +// 110 is Pt100 with 1k pullup (non standard) +// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. +// Use it for Testing or Development purposes. NEVER for production machine. +// #define DUMMY_THERMISTOR_998_VALUE 25 +// #define DUMMY_THERMISTOR_999_VALUE 100 +// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" } +#define TEMP_SENSOR_0 1 +#define TEMP_SENSOR_1 0 +#define TEMP_SENSOR_2 0 +#define TEMP_SENSOR_3 0 +#define TEMP_SENSOR_BED 1 + +// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. +//#define TEMP_SENSOR_1_AS_REDUNDANT +#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 + +// Actual temperature must be close to target for this long before M109 returns success +#define TEMP_RESIDENCY_TIME 10 // (seconds) +#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one +#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. + +// The minimal temperature defines the temperature below which the heater will not be enabled It is used +// to check that the wiring to the thermistor is not broken. +// Otherwise this would lead to the heater being powered on all the time. +#define HEATER_0_MINTEMP 5 +#define HEATER_1_MINTEMP 5 +#define HEATER_2_MINTEMP 5 +#define HEATER_3_MINTEMP 5 +#define BED_MINTEMP 5 + +// When temperature exceeds max temp, your heater will be switched off. +// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! +// You should use MINTEMP for thermistor short/failure protection. +#define HEATER_0_MAXTEMP 275 +#define HEATER_1_MAXTEMP 275 +#define HEATER_2_MAXTEMP 275 +#define HEATER_3_MAXTEMP 275 +#define BED_MAXTEMP 150 + +// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the +// average current. The value should be an integer and the heat bed will be turned on for 1 interval of +// HEATER_BED_DUTY_CYCLE_DIVIDER intervals. +//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4 + +// If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS +//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=I^2/R +//#define BED_WATTS (12.0*12.0/1.1) // P=I^2/R + +//=========================================================================== +//============================= PID Settings ================================ +//=========================================================================== +// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning + +// Comment the following line to disable PID and enable bang-bang. +#define PIDTEMP +#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current +#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current +#ifdef PIDTEMP + //#define PID_DEBUG // Sends debug data to the serial port. + //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX + //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay + //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders) + // Set/get with gcode: M301 E[extruder number, 0-2] + #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature + // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. + #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term + #define K1 0.95 //smoothing factor within the PID + #define PID_dT ((16.0 * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine + +// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it +// Ultimaker + #define DEFAULT_Kp 22.2 + #define DEFAULT_Ki 1.08 + #define DEFAULT_Kd 114 + +// MakerGear +// #define DEFAULT_Kp 7.0 +// #define DEFAULT_Ki 0.1 +// #define DEFAULT_Kd 12 + +// Mendel Parts V9 on 12V +// #define DEFAULT_Kp 63.0 +// #define DEFAULT_Ki 2.25 +// #define DEFAULT_Kd 440 +#endif // PIDTEMP + +//=========================================================================== +//============================= PID > Bed Temperature Control =============== +//=========================================================================== +// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis +// +// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. +// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, +// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. +// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. +// If your configuration is significantly different than this and you don't understand the issues involved, you probably +// shouldn't use bed PID until someone else verifies your hardware works. +// If this is enabled, find your own PID constants below. +//#define PIDTEMPBED +// +//#define BED_LIMIT_SWITCHING + +// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. +// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) +// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, +// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current + +//#define PID_BED_DEBUG // Sends debug data to the serial port. + +#ifdef PIDTEMPBED +//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) +//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) + #define DEFAULT_bedKp 10.00 + #define DEFAULT_bedKi .023 + #define DEFAULT_bedKd 305.4 + +//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) +//from pidautotune +// #define DEFAULT_bedKp 97.1 +// #define DEFAULT_bedKi 1.41 +// #define DEFAULT_bedKd 1675.16 + +// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. +#endif // PIDTEMPBED + +// @section extruder + +//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit +//can be software-disabled for whatever purposes by +#define PREVENT_DANGEROUS_EXTRUDE +//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. +#define PREVENT_LENGTHY_EXTRUDE + +#define EXTRUDE_MINTEMP 170 +#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. + +//=========================================================================== +//============================= Thermal Runaway Protection ================== +//=========================================================================== +/* +This is a feature to protect your printer from burn up in flames if it has +a thermistor coming off place (this happened to a friend of mine recently and +motivated me writing this feature). + +The issue: If a thermistor come off, it will read a lower temperature than actual. +The system will turn the heater on forever, burning up the filament and anything +else around. + +After the temperature reaches the target for the first time, this feature will +start measuring for how long the current temperature stays below the target +minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). + +If it stays longer than _PERIOD, it means the thermistor temperature +cannot catch up with the target, so something *may be* wrong. Then, to be on the +safe side, the system will he halt. + +Bear in mind the count down will just start AFTER the first time the +thermistor temperature is over the target, so you will have no problem if +your extruder heater takes 2 minutes to hit the target on heating. + +*/ +// If you want to enable this feature for all your extruder heaters, +// uncomment the 2 defines below: + +// Parameters for all extruder heaters +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius + +// If you want to enable this feature for your bed heater, +// uncomment the 2 defines below: + +// Parameters for the bed heater +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius + + +//=========================================================================== +//============================= Mechanical Settings ========================= +//=========================================================================== + +// @section machine + +// Uncomment this option to enable CoreXY kinematics +// #define COREXY + +// Enable this option for Toshiba steppers +// #define CONFIG_STEPPERS_TOSHIBA + +// @section homing + +// coarse Endstop Settings +#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors + +#ifndef ENDSTOPPULLUPS + // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // #define ENDSTOPPULLUP_XMAX + // #define ENDSTOPPULLUP_YMAX + // #define ENDSTOPPULLUP_ZMAX + // #define ENDSTOPPULLUP_XMIN + // #define ENDSTOPPULLUP_YMIN + // #define ENDSTOPPULLUP_ZMIN + // #define ENDSTOPPULLUP_ZPROBE +#endif + +// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). +const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. +//#define DISABLE_MAX_ENDSTOPS +//#define DISABLE_MIN_ENDSTOPS + +// @section machine +// If you want to enable the Z Probe pin, but disable its use, uncomment the line below. +// This only affects a Z Probe Endstop if you have separate Z min endstop as well and have +// activated Z_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z Probe, +// this has no effect. +//#define DISABLE_Z_PROBE_ENDSTOP + +// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 +// :{0:'Low',1:'High'} +#define X_ENABLE_ON 0 +#define Y_ENABLE_ON 0 +#define Z_ENABLE_ON 0 +#define E_ENABLE_ON 0 // For all extruders + +// Disables axis when it's not being used. +// WARNING: When motors turn off there is a chance of losing position accuracy! +#define DISABLE_X false +#define DISABLE_Y false +#define DISABLE_Z false + +// @section extruder + +#define DISABLE_E false // For all extruders +#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled + +// @section machine + +// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. +#define INVERT_X_DIR false +#define INVERT_Y_DIR false +#define INVERT_Z_DIR false + +// @section extruder + +// For direct drive extruder v9 set to true, for geared extruder set to false. +#define INVERT_E0_DIR false +#define INVERT_E1_DIR false +#define INVERT_E2_DIR false +#define INVERT_E3_DIR false + +// @section homing + +// ENDSTOP SETTINGS: +// Sets direction of endstops when homing; 1=MAX, -1=MIN +// :[-1,1] +#define X_HOME_DIR -1 +#define Y_HOME_DIR -1 +#define Z_HOME_DIR -1 + +#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. +#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. + +// @section machine + +// Travel limits after homing (units are in mm) +#define X_MIN_POS 0 +#define Y_MIN_POS 0 +#define Z_MIN_POS 0 +#define X_MAX_POS 200 +#define Y_MAX_POS 200 +#define Z_MAX_POS 200 + +//=========================================================================== +//============================= Filament Runout Sensor ====================== +//=========================================================================== +//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament + // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. + // It is assumed that when logic high = filament available + // when logic low = filament ran out +//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned +//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + +//=========================================================================== +//============================ Mesh Bed Leveling ============================ +//=========================================================================== + +// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling +// #define MESH_BED_LEVELING // Enable mesh bed leveling + +#ifdef MANUAL_BED_LEVELING + #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis +#endif // MANUAL_BED_LEVELING + +#ifdef MESH_BED_LEVELING + #define MESH_MIN_X 10 + #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) + #define MESH_MIN_Y 10 + #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y) + #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited + #define MESH_NUM_Y_POINTS 3 + #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0 +#endif // MESH_BED_LEVELING + +//=========================================================================== +//============================= Bed Auto Leveling =========================== +//=========================================================================== + +// @section bedlevel + +//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) +#define Z_PROBE_REPEATABILITY_TEST // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled. + +#ifdef ENABLE_AUTO_BED_LEVELING + + // There are 2 different ways to specify probing locations + // + // - "grid" mode + // Probe several points in a rectangular grid. + // You specify the rectangle and the density of sample points. + // This mode is preferred because there are more measurements. + // + // - "3-point" mode + // Probe 3 arbitrary points on the bed (that aren't colinear) + // You specify the XY coordinates of all 3 points. + + // Enable this to sample the bed in a grid (least squares solution) + // Note: this feature generates 10KB extra code size + #define AUTO_BED_LEVELING_GRID + + #ifdef AUTO_BED_LEVELING_GRID + + #define LEFT_PROBE_BED_POSITION 15 + #define RIGHT_PROBE_BED_POSITION 170 + #define FRONT_PROBE_BED_POSITION 20 + #define BACK_PROBE_BED_POSITION 170 + + #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this + + // Set the number of grid points per dimension + // You probably don't need more than 3 (squared=9) + #define AUTO_BED_LEVELING_GRID_POINTS 2 + + #else // !AUTO_BED_LEVELING_GRID + + // Arbitrary points to probe. A simple cross-product + // is used to estimate the plane of the bed. + #define ABL_PROBE_PT_1_X 15 + #define ABL_PROBE_PT_1_Y 180 + #define ABL_PROBE_PT_2_X 15 + #define ABL_PROBE_PT_2_Y 20 + #define ABL_PROBE_PT_3_X 170 + #define ABL_PROBE_PT_3_Y 20 + + #endif // AUTO_BED_LEVELING_GRID + + // Offsets to the probe relative to the extruder tip (Hotend - Probe) + // X and Y offsets must be integers + #define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right + #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Probe on: -front +behind + #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!) + + #define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. + // Be sure you have this distance over your Z_MAX_POS in case + + #define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min + + #define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point. + #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points + #define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point. + +// #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine. + //Useful to retract a deployable probe. + + //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell + //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. + + //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk + //The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it. + // You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile. + +// #define PROBE_SERVO_DEACTIVATION_DELAY 300 + + +//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing, +//it is highly recommended you let this Z_SAFE_HOMING enabled!!! + + #define Z_SAFE_HOMING // This feature is meant to avoid Z homing with probe outside the bed area. + // When defined, it will: + // - Allow Z homing only after X and Y homing AND stepper drivers still enabled + // - If stepper drivers timeout, it will need X and Y homing again before Z homing + // - Position the probe in a defined XY point before Z Homing when homing all axis (G28) + // - Block Z homing only when the probe is outside bed area. + + #ifdef Z_SAFE_HOMING + + #define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28) + #define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28) + + #endif + + // Support for a dedicated Z PROBE endstop separate from the Z MIN endstop. + // If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below. + // If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28. + // WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print. + // To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board. + // If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below. + // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32 + // for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed. + // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works. + // D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file. + // WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework. + + //#define Z_PROBE_ENDSTOP + +#endif // ENABLE_AUTO_BED_LEVELING + + +// @section homing + +// The position of the homing switches +//#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used +//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) + +// Manual homing switch locations: +// For deltabots this means top and center of the Cartesian print volume. +#ifdef MANUAL_HOME_POSITIONS + #define MANUAL_X_HOME_POS 0 + #define MANUAL_Y_HOME_POS 0 + #define MANUAL_Z_HOME_POS 0 + //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. +#endif + +// @section movement + +/** + * MOVEMENT SETTINGS + */ + +#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min) + +// default settings + +#define DEFAULT_AXIS_STEPS_PER_UNIT {78.7402*2,78.7402*2,5120.00,760*1*1.5} // default steps per unit for Ultimaker +#define DEFAULT_MAX_FEEDRATE {300, 300, 5, 25} // (mm/sec) +#define DEFAULT_MAX_ACCELERATION {3000,3000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. + +#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves +#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts +#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves + +// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) +#define DEFAULT_XYJERK 20.0 // (mm/sec) +#define DEFAULT_ZJERK 0.4 // (mm/sec) +#define DEFAULT_EJERK 5.0 // (mm/sec) + + +//============================================================================= +//============================= Additional Features =========================== +//============================================================================= + +// @section more + +// Custom M code points +#define CUSTOM_M_CODES +#ifdef CUSTOM_M_CODES + #ifdef ENABLE_AUTO_BED_LEVELING + #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 + #define Z_PROBE_OFFSET_RANGE_MIN -20 + #define Z_PROBE_OFFSET_RANGE_MAX 20 + #endif +#endif + +// @section extras + +// EEPROM +// The microcontroller can store settings in the EEPROM, e.g. max velocity... +// M500 - stores parameters in EEPROM +// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). +// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. +//define this to enable EEPROM support +//#define EEPROM_SETTINGS + +#ifdef EEPROM_SETTINGS + // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: + #define EEPROM_CHITCHAT // please keep turned on if you can. +#endif + + +// @section temperature + +// Preheat Constants +#define PLA_PREHEAT_HOTEND_TEMP 180 +#define PLA_PREHEAT_HPB_TEMP 70 +#define PLA_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255 + +#define ABS_PREHEAT_HOTEND_TEMP 240 +#define ABS_PREHEAT_HPB_TEMP 110 +#define ABS_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255 + +//==============================LCD and SD support============================= +// @section lcd + +// Define your display language below. Replace (en) with your language code and uncomment. +// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test +// See also language.h +#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) + +// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display. +// To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset. +// See also documentation/LCDLanguageFont.md + #define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware + //#define DISPLAY_CHARSET_HD44780_WESTERN + //#define DISPLAY_CHARSET_HD44780_CYRILLIC + +#define ULTRA_LCD //general LCD support, also 16x2 +//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) +#define SDSUPPORT // Enable SD Card Support in Hardware Console +//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error) +#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication +//#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder +//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking +//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store. +//#define ULTIPANEL //the UltiPanel as on Thingiverse +//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click +//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click + // 0 to disable buzzer feedback. Test with M300 S P +// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) +// http://reprap.org/wiki/PanelOne +//#define PANEL_ONE + +// The MaKr3d Makr-Panel with graphic controller and SD support +// http://reprap.org/wiki/MaKr3d_MaKrPanel +//#define MAKRPANEL + +// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD +// http://panucatt.com +// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib +//#define VIKI2 +//#define miniVIKI + +// The RepRapDiscount Smart Controller (white PCB) +// http://reprap.org/wiki/RepRapDiscount_Smart_Controller +//#define REPRAP_DISCOUNT_SMART_CONTROLLER + +// The GADGETS3D G3D LCD/SD Controller (blue PCB) +// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel +//#define G3D_PANEL + +// The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB) +// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller +// +// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib +//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + +// The RepRapWorld REPRAPWORLD_KEYPAD v1.1 +// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 +#define REPRAPWORLD_KEYPAD +#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // how much should be moved when a key is pressed, eg 10.0 means 10mm per click + +// The Elefu RA Board Control Panel +// http://www.elefu.com/index.php?route=product/product&product_id=53 +// REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C +//#define RA_CONTROL_PANEL + +/** + * I2C Panels + */ + +//#define LCD_I2C_SAINSMART_YWROBOT + +// PANELOLU2 LCD with status LEDs, separate encoder and click inputs +//#define LCD_I2C_PANELOLU2 + +// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs +//#define LCD_I2C_VIKI + +// Shift register panels +// --------------------- +// 2 wire Non-latching LCD SR from: +// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection + +//#define SAV_3DLCD + +// @section extras + +// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino +//#define FAST_PWM_FAN + +// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency +// which is not as annoying as with the hardware PWM. On the other hand, if this frequency +// is too low, you should also increment SOFT_PWM_SCALE. +//#define FAN_SOFT_PWM + +// Incrementing this by 1 will double the software PWM frequency, +// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. +// However, control resolution will be halved for each increment; +// at zero value, there are 128 effective control positions. +#define SOFT_PWM_SCALE 0 + +// Temperature status LEDs that display the hotend and bet temperature. +// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. +// Otherwise the RED led is on. There is 1C hysteresis. +//#define TEMP_STAT_LEDS + +// M240 Triggers a camera by emulating a Canon RC-1 Remote +// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ +// #define PHOTOGRAPH_PIN 23 + +// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure +//#define SF_ARC_FIX + +// Support for the BariCUDA Paste Extruder. +//#define BARICUDA + +//define BlinkM/CyzRgb Support +//#define BLINKM + +/*********************************************************************\ +* R/C SERVO support +* Sponsored by TrinityLabs, Reworked by codexmas +**********************************************************************/ + +// Number of servos +// +// If you select a configuration below, this will receive a default value and does not need to be set manually +// set it manually if you have more servos than extruders and wish to manually control some +// leaving it undefined or defining as 0 will disable the servo subsystem +// If unsure, leave commented / disabled +// +//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command + +// Servo Endstops +// +// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. +// Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500. +// +//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 +//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles + +/**********************************************************************\ + * Support for a filament diameter sensor + * Also allows adjustment of diameter at print time (vs at slicing) + * Single extruder only at this point (extruder 0) + * + * Motherboards + * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector + * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) + * 301 - Rambo - uses Analog input 3 + * Note may require analog pins to be defined for different motherboards + **********************************************************************/ +// Uncomment below to enable +//#define FILAMENT_SENSOR + +#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) +#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel + +#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation +#define MEASURED_UPPER_LIMIT 3.3 //upper limit factor used for sensor reading validation in mm +#define MEASURED_LOWER_LIMIT 1.9 //lower limit factor for sensor reading validation in mm +#define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) + +//defines used in the code +#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially + +//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. +//#define FILAMENT_LCD_DISPLAY + + + + + + +#include "Configuration_adv.h" +#include "thermistortables.h" + +#endif //CONFIGURATION_H From ba9741139ed1b662c8b93bcf7e154d9485db107f Mon Sep 17 00:00:00 2001 From: brupje Date: Tue, 5 May 2015 14:01:52 +0200 Subject: [PATCH 027/126] Clean up pins file for megatronics --- Marlin/pins_MEGATRONICS_3.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Marlin/pins_MEGATRONICS_3.h b/Marlin/pins_MEGATRONICS_3.h index 04a730670..6b4016bf4 100644 --- a/Marlin/pins_MEGATRONICS_3.h +++ b/Marlin/pins_MEGATRONICS_3.h @@ -26,19 +26,19 @@ #define X_DIR_PIN 57 #define X_ENABLE_PIN 59 #define X_MIN_PIN 37 -#define X_MAX_PIN 40 // 2 // Max endstops default to disabled "-1", set to commented value to enable. +#define X_MAX_PIN 40 // put to -1 to disable -#define Y_STEP_PIN 5 // A6 -#define Y_DIR_PIN 17 // A0 +#define Y_STEP_PIN 5 +#define Y_DIR_PIN 17 #define Y_ENABLE_PIN 4 #define Y_MIN_PIN 41 -#define Y_MAX_PIN 38 // 15 +#define Y_MAX_PIN 38 // put to -1 to disable -#define Z_STEP_PIN 16 // A2 -#define Z_DIR_PIN 11 // A6 -#define Z_ENABLE_PIN 3 // A1 +#define Z_STEP_PIN 16 +#define Z_DIR_PIN 11 +#define Z_ENABLE_PIN 3 #define Z_MIN_PIN 18 -#define Z_MAX_PIN 19 +#define Z_MAX_PIN 19 // put to -1 to disable #define E0_STEP_PIN 28 #define E0_DIR_PIN 27 From 79633a74aba2ddef3c7a8fa76d4aa285ca6d1037 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 6 May 2015 14:25:13 -0700 Subject: [PATCH 028/126] Fix MBL compile error --- Marlin/Marlin_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 9305e67d0..a8bedb841 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -4520,7 +4520,7 @@ inline void gcode_M410() { quickStop(); } err = true; } - if (!err) mbl.set_z(select_x_index(x), select_y_index(y), z); + if (!err) mbl.set_z(mbl.select_x_index(x), mbl.select_y_index(y), z); } #endif From 26c53634e16fe1e2ad0d3ad2cc74e35da72c465d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 6 May 2015 18:24:10 -0700 Subject: [PATCH 029/126] Add a TOC --- Documentation/GCodes.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/GCodes.md b/Documentation/GCodes.md index c05be6198..d9e51d611 100644 --- a/Documentation/GCodes.md +++ b/Documentation/GCodes.md @@ -1,5 +1,22 @@ ## Implemented G Codes +- [Movement F and M Codes](#movement-g-and-m-codes) +- [SD Card M Codes](#sd-card-m-codes) +- [Hardware Control](#hardware-control) +- [Temperature M Codes](#temperature-m-codes) +- [Message M Codes](#message-m-codes) +- [Endstops M Codes](#endstops-m-codes) +- [Special Features M Codes](#special-features-m-codes) +- [Units and Measures G and M Codes](#units-and-measures-g-and-m-codes) +- [Firmware Retraction G and M Codes](#firmware-retraction-g-and-m-codes) +- [Z Probe G and M Codes](#z-probe-g-and-m-codes) +- [Filament Diameter M Codes](#filament-diameter-m-codes) +- [EEPROM Settings M Codes](#eeprom-settings-m-codes) +- [Delta M Codes](#delta-m-codes) +- [Stepper Driver M Codes](#stepper-driver-m-codes) +- [SCARA M Codes](#scara-m-codes) +- [GCode Comments](#comments) + ### Movement G and M Codes ``` G0 -> G1 From b492391fa79fc4b8d437bfbef427690a2546d9b0 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 6 May 2015 18:30:10 -0700 Subject: [PATCH 030/126] Initial Hardware.md to fix 404 error - Addressing issue #1935 --- Documentation/Hardware.md | 154 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 Documentation/Hardware.md diff --git a/Documentation/Hardware.md b/Documentation/Hardware.md new file mode 100644 index 000000000..78f910913 --- /dev/null +++ b/Documentation/Hardware.md @@ -0,0 +1,154 @@ +## Marlin Supported Hardware + +### 10 BOARD_GEN7_CUSTOM +Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics" + +### 11 BOARD_GEN7_12 +Gen7 v1.1, v1.2 + +### 12 BOARD_GEN7_13 +Gen7 v1.3 + +### 13 BOARD_GEN7_14 +Gen7 v1.4 + +### 2 BOARD_CHEAPTRONIC +Cheaptronic v1.0 + +### 20 BOARD_SETHI +Sethi 3D_1 + +### 3 BOARD_RAMPS_OLD +MEGA/RAMPS up to 1.2 + +### 33 BOARD_RAMPS_13_EFB +RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed) + +### 34 BOARD_RAMPS_13_EEB +RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed) + +### 35 BOARD_RAMPS_13_EFF +RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan) + +### 36 BOARD_RAMPS_13_EEF +RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan) + +### 37 BOARD_FELIX2 +Felix 2.0+ Electronics Board (RAMPS like) + +### 4 BOARD_DUEMILANOVE_328P +Duemilanove w/ ATMega328P pin assignments + +### 5 BOARD_GEN6 +Gen6 + +### 51 BOARD_GEN6_DELUXE +Gen6 deluxe + +### 6 BOARD_SANGUINOLOLU_11 +Sanguinololu < 1.2 + +### 62 BOARD_SANGUINOLOLU_12 +Sanguinololu 1.2 and above + +### 63 BOARD_MELZI +Melzi + +### 64 BOARD_STB_11 +STB V1.1 + +### 65 BOARD_AZTEEG_X1 +Azteeg X1 + +### 66 BOARD_MELZI_1284 +Melzi with ATmega1284 (MaKr3d version) + +### 67 BOARD_AZTEEG_X3 +Azteeg X3 + +### 68 BOARD_AZTEEG_X3_PRO +Azteeg X3 Pro + +### 7 BOARD_ULTIMAKER +Ultimaker + +### 71 BOARD_ULTIMAKER_OLD +Ultimaker (Older electronics. Pre 1.5.4. This is rare) + +### 72 BOARD_ULTIMAIN_2 +Ultimainboard 2.x (Uses TEMP_SENSOR 20) + +### 77 BOARD_3DRAG +3Drag Controller + +### 78 BOARD_K8200 +Vellemann K8200 Controller (derived from 3Drag Controller) + +### 8 BOARD_TEENSYLU +Teensylu + +### 80 BOARD_RUMBA +Rumba + +### 81 BOARD_PRINTRBOARD +Printrboard (AT90USB1286) + +### 82 BOARD_BRAINWAVE +Brainwave (AT90USB646) + +### 83 BOARD_SAV_MKI +SAV Mk-I (AT90USB1286) + +### 84 BOARD_TEENSY2 +Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make + +### 85 BOARD_BRAINWAVE_PRO +Brainwave Pro (AT90USB1286) + +### 9 BOARD_GEN3_PLUS +Gen3+ + +### 22 BOARD_GEN3_MONOLITHIC +Gen3 Monolithic Electronics + +### 70 BOARD_MEGATRONICS +Megatronics + +### 701 BOARD_MEGATRONICS_2 +Megatronics v2.0 + +### 702 BOARD_MEGATRONICS_1 +Minitronics v1.0 + +### 703 BOARD_MEGATRONICS_3 +Megatronics v3.0 + +### 90 BOARD_OMCA_A +Alpha OMCA board + +### 91 BOARD_OMCA +Final OMCA board + +### 301 BOARD_RAMBO +Rambo + +### 21 BOARD_ELEFU_3 +Elefu Ra Board (v3) + +### 88 BOARD_5DPRINT +5DPrint D8 Driver Board + +### 999 BOARD_LEAPFROG +Leapfrog + +### 41 BOARD_WITBOX +bq WITBOX + +### 42 BOARD_HEPHESTOS +bq Prusa i3 Hephestos + +### 401 BOARD_BAM_DICE +2PrintBeta BAM&DICE with STK drivers + +### 402 BOARD_BAM_DICE_DUE +2PrintBeta BAM&DICE Due with STK drivers From 69655205f509d535d4ff13df20533d52c9f30b12 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 6 May 2015 19:04:54 -0700 Subject: [PATCH 031/126] Demote headers, add TOC --- Documentation/Hardware.md | 154 +++++++++++++++++++++++++------------- 1 file changed, 103 insertions(+), 51 deletions(-) diff --git a/Documentation/Hardware.md b/Documentation/Hardware.md index 78f910913..21620efde 100644 --- a/Documentation/Hardware.md +++ b/Documentation/Hardware.md @@ -1,154 +1,206 @@ ## Marlin Supported Hardware -### 10 BOARD_GEN7_CUSTOM +- [Gen 7 Custom](#10-board_gen7_custom) +- [Gen 7 <=1.2](#11-board_gen7_12) +- [Gen 7 v1.3](#12-board_gen7_13) +- [Gen 7 v1.4](#13-board_gen7_14) +- [Cheaptronic v1.0](#2-board_cheaptronic) +- [Sethi 3D_1](#20-board_sethi) +- [RAMPS <=1.2](#3-board_ramps_old) +- [RAMPS 1.3 Extruder-Fan-Bed](#33-board_ramps_13_efb) +- [RAMPS 1.3 Extruder-Extruder-Bed](#34-board_ramps_13_eeb) +- [RAMPS 1.3 Extruder-Fan-Fan](#35-board_ramps_13_eff) +- [RAMPS 1.3 Extruder-Extruder-Fan](#36-board_ramps_13_eef) +- [Felix 2](#37-board_felix2) +- [Duemilanove 328P](#4-board_duemilanove_328p) +- [Gen 6](#5-board_gen6) +- [Gen 6 Deluxe](#51-board_gen6_deluxe) +- [Sanguinololu <=1.1](#6-board_sanguinololu_11) +- [Sanguinololu 1.2](#62-board_sanguinololu_12) +- [Melzi](#63-board_melzi) +- [STB v1.1](#64-board_stb_11) +- [Azteeg X1](#65-board_azteeg_x1) +- [Melzi 1284](#66-board_melzi_1284) +- [Azteeg X3](#67-board_azteeg_x3) +- [Azteeg X3 Pro](#68-board_azteeg_x3_pro) +- [Ultimaker](#7-board_ultimaker) +- [Legacy Ultimaker](#71-board_ultimaker_old) +- [Ultimainboard 2.x](#72-board_ultimain_2) +- [3DRAG](#77-board_3drag) +- [Vellemann K8200](#78-board_k8200) +- [Teensylu](#8-board_teensylu) +- [Rumba](#80-board_rumba) +- [Printrboard](#81-board_printrboard) +- [Brainwave](#82-board_brainwave) +- [SAV Mk-I](#83-board_sav_mki) +- [Teensy++2.0](#84-board_teensy2) +- [Brainwave Pro](#85-board_brainwave_pro) +- [Gen3+](#9-board_gen3_plus) +- [Gen3 Monolithic](#22-board_gen3_monolithic) +- [Megatronics](#70-board_megatronics) +- [Megatronics 2.0](#701-board_megatronics_2) +- [Minitronics 1.0](#702-board_megatronics_1) +- [Megatronics 3.0](#703-board_megatronics_3) +- [OMCA Alpha](#90-board_omca_a) +- [OMCA Final](#91-board_omca) +- [RAMBo](#301-board_rambo) +- [Elefu Ra](#21-board_elefu_3) +- [5DPrint D8](#88-board_5dprint) +- [Leapfrog](#999-board_leapfrog) +- [bq Witbox](#41-board_witbox) +- [bq Prusa i3 Hephestos](#42-board_hephestos) +- [2PrintBeta BAM&DICE](#401-board_bam_dice) +- [2PrintBeta BAM&DICE DUE](#402-board_bam_dice_due) + +#### 10 BOARD_GEN7_CUSTOM Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics" -### 11 BOARD_GEN7_12 +#### 11 BOARD_GEN7_12 Gen7 v1.1, v1.2 -### 12 BOARD_GEN7_13 +#### 12 BOARD_GEN7_13 Gen7 v1.3 -### 13 BOARD_GEN7_14 +#### 13 BOARD_GEN7_14 Gen7 v1.4 -### 2 BOARD_CHEAPTRONIC +#### 2 BOARD_CHEAPTRONIC Cheaptronic v1.0 -### 20 BOARD_SETHI +#### 20 BOARD_SETHI Sethi 3D_1 -### 3 BOARD_RAMPS_OLD +#### 3 BOARD_RAMPS_OLD MEGA/RAMPS up to 1.2 -### 33 BOARD_RAMPS_13_EFB +#### 33 BOARD_RAMPS_13_EFB RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed) -### 34 BOARD_RAMPS_13_EEB +#### 34 BOARD_RAMPS_13_EEB RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed) -### 35 BOARD_RAMPS_13_EFF +#### 35 BOARD_RAMPS_13_EFF RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan) -### 36 BOARD_RAMPS_13_EEF +#### 36 BOARD_RAMPS_13_EEF RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan) -### 37 BOARD_FELIX2 +#### 37 BOARD_FELIX2 Felix 2.0+ Electronics Board (RAMPS like) -### 4 BOARD_DUEMILANOVE_328P +#### 4 BOARD_DUEMILANOVE_328P Duemilanove w/ ATMega328P pin assignments -### 5 BOARD_GEN6 +#### 5 BOARD_GEN6 Gen6 -### 51 BOARD_GEN6_DELUXE +#### 51 BOARD_GEN6_DELUXE Gen6 deluxe -### 6 BOARD_SANGUINOLOLU_11 +#### 6 BOARD_SANGUINOLOLU_11 Sanguinololu < 1.2 -### 62 BOARD_SANGUINOLOLU_12 +#### 62 BOARD_SANGUINOLOLU_12 Sanguinololu 1.2 and above -### 63 BOARD_MELZI +#### 63 BOARD_MELZI Melzi -### 64 BOARD_STB_11 +#### 64 BOARD_STB_11 STB V1.1 -### 65 BOARD_AZTEEG_X1 +#### 65 BOARD_AZTEEG_X1 Azteeg X1 -### 66 BOARD_MELZI_1284 +#### 66 BOARD_MELZI_1284 Melzi with ATmega1284 (MaKr3d version) -### 67 BOARD_AZTEEG_X3 +#### 67 BOARD_AZTEEG_X3 Azteeg X3 -### 68 BOARD_AZTEEG_X3_PRO +#### 68 BOARD_AZTEEG_X3_PRO Azteeg X3 Pro -### 7 BOARD_ULTIMAKER +#### 7 BOARD_ULTIMAKER Ultimaker -### 71 BOARD_ULTIMAKER_OLD +#### 71 BOARD_ULTIMAKER_OLD Ultimaker (Older electronics. Pre 1.5.4. This is rare) -### 72 BOARD_ULTIMAIN_2 +#### 72 BOARD_ULTIMAIN_2 Ultimainboard 2.x (Uses TEMP_SENSOR 20) -### 77 BOARD_3DRAG +#### 77 BOARD_3DRAG 3Drag Controller -### 78 BOARD_K8200 +#### 78 BOARD_K8200 Vellemann K8200 Controller (derived from 3Drag Controller) -### 8 BOARD_TEENSYLU +#### 8 BOARD_TEENSYLU Teensylu -### 80 BOARD_RUMBA +#### 80 BOARD_RUMBA Rumba -### 81 BOARD_PRINTRBOARD +#### 81 BOARD_PRINTRBOARD Printrboard (AT90USB1286) -### 82 BOARD_BRAINWAVE +#### 82 BOARD_BRAINWAVE Brainwave (AT90USB646) -### 83 BOARD_SAV_MKI +#### 83 BOARD_SAV_MKI SAV Mk-I (AT90USB1286) -### 84 BOARD_TEENSY2 +#### 84 BOARD_TEENSY2 Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make -### 85 BOARD_BRAINWAVE_PRO +#### 85 BOARD_BRAINWAVE_PRO Brainwave Pro (AT90USB1286) -### 9 BOARD_GEN3_PLUS +#### 9 BOARD_GEN3_PLUS Gen3+ -### 22 BOARD_GEN3_MONOLITHIC +#### 22 BOARD_GEN3_MONOLITHIC Gen3 Monolithic Electronics -### 70 BOARD_MEGATRONICS +#### 70 BOARD_MEGATRONICS Megatronics -### 701 BOARD_MEGATRONICS_2 +#### 701 BOARD_MEGATRONICS_2 Megatronics v2.0 -### 702 BOARD_MEGATRONICS_1 +#### 702 BOARD_MEGATRONICS_1 Minitronics v1.0 -### 703 BOARD_MEGATRONICS_3 +#### 703 BOARD_MEGATRONICS_3 Megatronics v3.0 -### 90 BOARD_OMCA_A +#### 90 BOARD_OMCA_A Alpha OMCA board -### 91 BOARD_OMCA +#### 91 BOARD_OMCA Final OMCA board -### 301 BOARD_RAMBO +#### 301 BOARD_RAMBO Rambo -### 21 BOARD_ELEFU_3 +#### 21 BOARD_ELEFU_3 Elefu Ra Board (v3) -### 88 BOARD_5DPRINT +#### 88 BOARD_5DPRINT 5DPrint D8 Driver Board -### 999 BOARD_LEAPFROG +#### 999 BOARD_LEAPFROG Leapfrog -### 41 BOARD_WITBOX +#### 41 BOARD_WITBOX bq WITBOX -### 42 BOARD_HEPHESTOS +#### 42 BOARD_HEPHESTOS bq Prusa i3 Hephestos -### 401 BOARD_BAM_DICE +#### 401 BOARD_BAM_DICE 2PrintBeta BAM&DICE with STK drivers -### 402 BOARD_BAM_DICE_DUE +#### 402 BOARD_BAM_DICE_DUE 2PrintBeta BAM&DICE Due with STK drivers From 8f8174dc93580b1a3385ea227fefce48cc59174a Mon Sep 17 00:00:00 2001 From: brupje Date: Thu, 7 May 2015 13:12:17 +0200 Subject: [PATCH 032/126] Revert "Default configuration for megatronics." This reverts commit 22e0d2afcb5828b3a62099f786c0cdd45406b4de. --- Marlin/rrw/Configuration_megatronics.h | 817 ------------------------- 1 file changed, 817 deletions(-) delete mode 100644 Marlin/rrw/Configuration_megatronics.h diff --git a/Marlin/rrw/Configuration_megatronics.h b/Marlin/rrw/Configuration_megatronics.h deleted file mode 100644 index c62845989..000000000 --- a/Marlin/rrw/Configuration_megatronics.h +++ /dev/null @@ -1,817 +0,0 @@ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -#include "boards.h" - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== -/* -Here are some standard links for getting your machine calibrated: - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 -*/ - -// This configuration file contains the basic settings. -// Advanced settings can be found in Configuration_adv.h -// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_VERSION "1.0.3 dev" -#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time -#define STRING_CONFIG_H_AUTHOR "RepRapWorld.com" // Who made the changes. -#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1 -//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2 - -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// This enables the serial port associated to the Bluetooth interface -//#define BTENABLED // Enable BT interface on AT90USB devices - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_MEGATRONICS_3 -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -// #define CUSTOM_MACHINE_NAME "3D Printer" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -// #define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define EXTRUDER_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} - -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -// #define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -// #define DUMMY_THERMISTOR_998_VALUE 25 -// #define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" } -#define TEMP_SENSOR_0 1 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 1 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Actual temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the -// average current. The value should be an integer and the heat bed will be turned on for 1 interval of -// HEATER_BED_DUTY_CYCLE_DIVIDER intervals. -//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4 - -// If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS -//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=I^2/R -//#define BED_WATTS (12.0*12.0/1.1) // P=I^2/R - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#ifdef PIDTEMP - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - #define PID_dT ((16.0 * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine - -// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it -// Ultimaker - #define DEFAULT_Kp 22.2 - #define DEFAULT_Ki 1.08 - #define DEFAULT_Kd 114 - -// MakerGear -// #define DEFAULT_Kp 7.0 -// #define DEFAULT_Ki 0.1 -// #define DEFAULT_Kd 12 - -// Mendel Parts V9 on 12V -// #define DEFAULT_Kp 63.0 -// #define DEFAULT_Ki 2.25 -// #define DEFAULT_Kd 440 -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED -// -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -//#define PID_BED_DEBUG // Sends debug data to the serial port. - -#ifdef PIDTEMPBED -//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) -//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 - -//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) -//from pidautotune -// #define DEFAULT_bedKp 97.1 -// #define DEFAULT_bedKi 1.41 -// #define DEFAULT_bedKd 1675.16 - -// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//============================= Thermal Runaway Protection ================== -//=========================================================================== -/* -This is a feature to protect your printer from burn up in flames if it has -a thermistor coming off place (this happened to a friend of mine recently and -motivated me writing this feature). - -The issue: If a thermistor come off, it will read a lower temperature than actual. -The system will turn the heater on forever, burning up the filament and anything -else around. - -After the temperature reaches the target for the first time, this feature will -start measuring for how long the current temperature stays below the target -minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). - -If it stays longer than _PERIOD, it means the thermistor temperature -cannot catch up with the target, so something *may be* wrong. Then, to be on the -safe side, the system will he halt. - -Bear in mind the count down will just start AFTER the first time the -thermistor temperature is over the target, so you will have no problem if -your extruder heater takes 2 minutes to hit the target on heating. - -*/ -// If you want to enable this feature for all your extruder heaters, -// uncomment the 2 defines below: - -// Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds -#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius - -// If you want to enable this feature for your bed heater, -// uncomment the 2 defines below: - -// Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds -#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius - - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment this option to enable CoreXY kinematics -// #define COREXY - -// Enable this option for Toshiba steppers -// #define CONFIG_STEPPERS_TOSHIBA - -// @section homing - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#ifndef ENDSTOPPULLUPS - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - // #define ENDSTOPPULLUP_XMAX - // #define ENDSTOPPULLUP_YMAX - // #define ENDSTOPPULLUP_ZMAX - // #define ENDSTOPPULLUP_XMIN - // #define ENDSTOPPULLUP_YMIN - // #define ENDSTOPPULLUP_ZMIN - // #define ENDSTOPPULLUP_ZPROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. -const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. -const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. -const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. -const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. -const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. -const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. -//#define DISABLE_MAX_ENDSTOPS -//#define DISABLE_MIN_ENDSTOPS - -// @section machine -// If you want to enable the Z Probe pin, but disable its use, uncomment the line below. -// This only affects a Z Probe Endstop if you have separate Z min endstop as well and have -// activated Z_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z Probe, -// this has no effect. -//#define DISABLE_Z_PROBE_ENDSTOP - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false -#define INVERT_Y_DIR false -#define INVERT_Z_DIR false - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 0 -#define Z_MIN_POS 0 -#define X_MAX_POS 200 -#define Y_MAX_POS 200 -#define Z_MAX_POS 200 - -//=========================================================================== -//============================= Filament Runout Sensor ====================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned -//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling -// #define MESH_BED_LEVELING // Enable mesh bed leveling - -#ifdef MANUAL_BED_LEVELING - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis -#endif // MANUAL_BED_LEVELING - -#ifdef MESH_BED_LEVELING - #define MESH_MIN_X 10 - #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) - #define MESH_MIN_Y 10 - #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y) - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0 -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================= Bed Auto Leveling =========================== -//=========================================================================== - -// @section bedlevel - -//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) -#define Z_PROBE_REPEATABILITY_TEST // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled. - -#ifdef ENABLE_AUTO_BED_LEVELING - - // There are 2 different ways to specify probing locations - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't colinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution) - // Note: this feature generates 10KB extra code size - #define AUTO_BED_LEVELING_GRID - - #ifdef AUTO_BED_LEVELING_GRID - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this - - // Set the number of grid points per dimension - // You probably don't need more than 3 (squared=9) - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. A simple cross-product - // is used to estimate the plane of the bed. - #define ABL_PROBE_PT_1_X 15 - #define ABL_PROBE_PT_1_Y 180 - #define ABL_PROBE_PT_2_X 15 - #define ABL_PROBE_PT_2_Y 20 - #define ABL_PROBE_PT_3_X 170 - #define ABL_PROBE_PT_3_Y 20 - - #endif // AUTO_BED_LEVELING_GRID - - // Offsets to the probe relative to the extruder tip (Hotend - Probe) - // X and Y offsets must be integers - #define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right - #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Probe on: -front +behind - #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!) - - #define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. - // Be sure you have this distance over your Z_MAX_POS in case - - #define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min - - #define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point. - #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points - #define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point. - -// #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine. - //Useful to retract a deployable probe. - - //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell - //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. - - //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk - //The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it. - // You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile. - -// #define PROBE_SERVO_DEACTIVATION_DELAY 300 - - -//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing, -//it is highly recommended you let this Z_SAFE_HOMING enabled!!! - - #define Z_SAFE_HOMING // This feature is meant to avoid Z homing with probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled - // - If stepper drivers timeout, it will need X and Y homing again before Z homing - // - Position the probe in a defined XY point before Z Homing when homing all axis (G28) - // - Block Z homing only when the probe is outside bed area. - - #ifdef Z_SAFE_HOMING - - #define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28) - #define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28) - - #endif - - // Support for a dedicated Z PROBE endstop separate from the Z MIN endstop. - // If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below. - // If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28. - // WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print. - // To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board. - // If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below. - // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32 - // for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed. - // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works. - // D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file. - // WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework. - - //#define Z_PROBE_ENDSTOP - -#endif // ENABLE_AUTO_BED_LEVELING - - -// @section homing - -// The position of the homing switches -//#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used -//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) - -// Manual homing switch locations: -// For deltabots this means top and center of the Cartesian print volume. -#ifdef MANUAL_HOME_POSITIONS - #define MANUAL_X_HOME_POS 0 - #define MANUAL_Y_HOME_POS 0 - #define MANUAL_Z_HOME_POS 0 - //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. -#endif - -// @section movement - -/** - * MOVEMENT SETTINGS - */ - -#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min) - -// default settings - -#define DEFAULT_AXIS_STEPS_PER_UNIT {78.7402*2,78.7402*2,5120.00,760*1*1.5} // default steps per unit for Ultimaker -#define DEFAULT_MAX_FEEDRATE {300, 300, 5, 25} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {3000,3000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 20.0 // (mm/sec) -#define DEFAULT_ZJERK 0.4 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#ifdef CUSTOM_M_CODES - #ifdef ENABLE_AUTO_BED_LEVELING - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - -// @section extras - -// EEPROM -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#ifdef EEPROM_SETTINGS - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // please keep turned on if you can. -#endif - - -// @section temperature - -// Preheat Constants -#define PLA_PREHEAT_HOTEND_TEMP 180 -#define PLA_PREHEAT_HPB_TEMP 70 -#define PLA_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255 - -#define ABS_PREHEAT_HOTEND_TEMP 240 -#define ABS_PREHEAT_HPB_TEMP 110 -#define ABS_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255 - -//==============================LCD and SD support============================= -// @section lcd - -// Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test -// See also language.h -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) - -// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display. -// To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset. -// See also documentation/LCDLanguageFont.md - #define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware - //#define DISPLAY_CHARSET_HD44780_WESTERN - //#define DISPLAY_CHARSET_HD44780_CYRILLIC - -#define ULTRA_LCD //general LCD support, also 16x2 -//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) -#define SDSUPPORT // Enable SD Card Support in Hardware Console -//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error) -#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication -//#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder -//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking -//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store. -//#define ULTIPANEL //the UltiPanel as on Thingiverse -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click - // 0 to disable buzzer feedback. Test with M300 S P -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -//#define PANEL_ONE - -// The MaKr3d Makr-Panel with graphic controller and SD support -// http://reprap.org/wiki/MaKr3d_MaKrPanel -//#define MAKRPANEL - -// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD -// http://panucatt.com -// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib -//#define VIKI2 -//#define miniVIKI - -// The RepRapDiscount Smart Controller (white PCB) -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// The GADGETS3D G3D LCD/SD Controller (blue PCB) -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -//#define G3D_PANEL - -// The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB) -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// The RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -#define REPRAPWORLD_KEYPAD -#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // how much should be moved when a key is pressed, eg 10.0 means 10mm per click - -// The Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C -//#define RA_CONTROL_PANEL - -/** - * I2C Panels - */ - -//#define LCD_I2C_SAINSMART_YWROBOT - -// PANELOLU2 LCD with status LEDs, separate encoder and click inputs -//#define LCD_I2C_PANELOLU2 - -// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs -//#define LCD_I2C_VIKI - -// Shift register panels -// --------------------- -// 2 wire Non-latching LCD SR from: -// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection - -//#define SAV_3DLCD - -// @section extras - -// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bet temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -// #define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Servo Endstops -// -// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. -// Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500. -// -//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 -//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_SENSOR - -#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) -#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation -#define MEASURED_UPPER_LIMIT 3.3 //upper limit factor used for sensor reading validation in mm -#define MEASURED_LOWER_LIMIT 1.9 //lower limit factor for sensor reading validation in mm -#define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - -//defines used in the code -#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - -//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. -//#define FILAMENT_LCD_DISPLAY - - - - - - -#include "Configuration_adv.h" -#include "thermistortables.h" - -#endif //CONFIGURATION_H From b7fcb1158044609d9f46ac00e8bc3f10f66bc833 Mon Sep 17 00:00:00 2001 From: brupje Date: Thu, 7 May 2015 13:18:05 +0200 Subject: [PATCH 033/126] Added example configuration for Megatronics --- .../Megatronics/Configuration_megatronics.h | 817 ++++++++++++++++++ 1 file changed, 817 insertions(+) create mode 100644 Marlin/example_configurations/RepRapWorld/Megatronics/Configuration_megatronics.h diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration_megatronics.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration_megatronics.h new file mode 100644 index 000000000..c62845989 --- /dev/null +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration_megatronics.h @@ -0,0 +1,817 @@ +#ifndef CONFIGURATION_H +#define CONFIGURATION_H + +#include "boards.h" + +//=========================================================================== +//============================= Getting Started ============================= +//=========================================================================== +/* +Here are some standard links for getting your machine calibrated: + * http://reprap.org/wiki/Calibration + * http://youtu.be/wAL9d7FgInk + * http://calculator.josefprusa.cz + * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide + * http://www.thingiverse.com/thing:5573 + * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap + * http://www.thingiverse.com/thing:298812 +*/ + +// This configuration file contains the basic settings. +// Advanced settings can be found in Configuration_adv.h +// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration + +//=========================================================================== +//============================= DELTA Printer =============================== +//=========================================================================== +// For a Delta printer replace the configuration files with the files in the +// example_configurations/delta directory. +// + +//=========================================================================== +//============================= SCARA Printer =============================== +//=========================================================================== +// For a Scara printer replace the configuration files with the files in the +// example_configurations/SCARA directory. +// + +// @section info + +// User-specified version info of this build to display in [Pronterface, etc] terminal window during +// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this +// build by the user have been successfully uploaded into firmware. +#define STRING_VERSION "1.0.3 dev" +#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time +#define STRING_CONFIG_H_AUTHOR "RepRapWorld.com" // Who made the changes. +#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1 +//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2 + +// @section machine + +// SERIAL_PORT selects which serial port should be used for communication with the host. +// This allows the connection of wireless adapters (for instance) to non-default port pins. +// Serial port 0 is still used by the Arduino bootloader regardless of this setting. +// :[0,1,2,3,4,5,6,7] +#define SERIAL_PORT 0 + +// This determines the communication speed of the printer +// :[2400,9600,19200,38400,57600,115200,250000] +#define BAUDRATE 250000 + +// This enables the serial port associated to the Bluetooth interface +//#define BTENABLED // Enable BT interface on AT90USB devices + +// The following define selects which electronics board you have. +// Please choose the name from boards.h that matches your setup +#ifndef MOTHERBOARD + #define MOTHERBOARD BOARD_MEGATRONICS_3 +#endif + +// Optional custom name for your RepStrap or other custom machine +// Displayed in the LCD "Ready" message +// #define CUSTOM_MACHINE_NAME "3D Printer" + +// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) +// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) +// #define MACHINE_UUID "00000000-0000-0000-0000-000000000000" + +// This defines the number of extruders +// :[1,2,3,4] +#define EXTRUDERS 1 + +// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). +// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). +// For the other hotends it is their distance from the extruder 0 hotend. +//#define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis +//#define EXTRUDER_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis + +//// The following define selects which power supply you have. Please choose the one that matches your setup +// 1 = ATX +// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) +// :{1:'ATX',2:'X-Box 360'} + +#define POWER_SUPPLY 1 + +// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. +// #define PS_DEFAULT_OFF + +// @section temperature + +//=========================================================================== +//============================= Thermal Settings ============================ +//=========================================================================== +// +//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table +// +//// Temperature sensor settings: +// -2 is thermocouple with MAX6675 (only for sensor 0) +// -1 is thermocouple with AD595 +// 0 is not used +// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) +// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) +// 3 is Mendel-parts thermistor (4.7k pullup) +// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! +// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) +// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) +// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) +// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) +// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) +// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) +// 10 is 100k RS thermistor 198-961 (4.7k pullup) +// 11 is 100k beta 3950 1% thermistor (4.7k pullup) +// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) +// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" +// 20 is the PT100 circuit found in the Ultimainboard V2.x +// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 +// +// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k +// (but gives greater accuracy and more stable PID) +// 51 is 100k thermistor - EPCOS (1k pullup) +// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) +// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) +// +// 1047 is Pt1000 with 4k7 pullup +// 1010 is Pt1000 with 1k pullup (non standard) +// 147 is Pt100 with 4k7 pullup +// 110 is Pt100 with 1k pullup (non standard) +// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. +// Use it for Testing or Development purposes. NEVER for production machine. +// #define DUMMY_THERMISTOR_998_VALUE 25 +// #define DUMMY_THERMISTOR_999_VALUE 100 +// :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" } +#define TEMP_SENSOR_0 1 +#define TEMP_SENSOR_1 0 +#define TEMP_SENSOR_2 0 +#define TEMP_SENSOR_3 0 +#define TEMP_SENSOR_BED 1 + +// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. +//#define TEMP_SENSOR_1_AS_REDUNDANT +#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 + +// Actual temperature must be close to target for this long before M109 returns success +#define TEMP_RESIDENCY_TIME 10 // (seconds) +#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one +#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. + +// The minimal temperature defines the temperature below which the heater will not be enabled It is used +// to check that the wiring to the thermistor is not broken. +// Otherwise this would lead to the heater being powered on all the time. +#define HEATER_0_MINTEMP 5 +#define HEATER_1_MINTEMP 5 +#define HEATER_2_MINTEMP 5 +#define HEATER_3_MINTEMP 5 +#define BED_MINTEMP 5 + +// When temperature exceeds max temp, your heater will be switched off. +// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! +// You should use MINTEMP for thermistor short/failure protection. +#define HEATER_0_MAXTEMP 275 +#define HEATER_1_MAXTEMP 275 +#define HEATER_2_MAXTEMP 275 +#define HEATER_3_MAXTEMP 275 +#define BED_MAXTEMP 150 + +// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the +// average current. The value should be an integer and the heat bed will be turned on for 1 interval of +// HEATER_BED_DUTY_CYCLE_DIVIDER intervals. +//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4 + +// If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS +//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=I^2/R +//#define BED_WATTS (12.0*12.0/1.1) // P=I^2/R + +//=========================================================================== +//============================= PID Settings ================================ +//=========================================================================== +// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning + +// Comment the following line to disable PID and enable bang-bang. +#define PIDTEMP +#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current +#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current +#ifdef PIDTEMP + //#define PID_DEBUG // Sends debug data to the serial port. + //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX + //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay + //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders) + // Set/get with gcode: M301 E[extruder number, 0-2] + #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature + // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. + #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term + #define K1 0.95 //smoothing factor within the PID + #define PID_dT ((16.0 * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine + +// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it +// Ultimaker + #define DEFAULT_Kp 22.2 + #define DEFAULT_Ki 1.08 + #define DEFAULT_Kd 114 + +// MakerGear +// #define DEFAULT_Kp 7.0 +// #define DEFAULT_Ki 0.1 +// #define DEFAULT_Kd 12 + +// Mendel Parts V9 on 12V +// #define DEFAULT_Kp 63.0 +// #define DEFAULT_Ki 2.25 +// #define DEFAULT_Kd 440 +#endif // PIDTEMP + +//=========================================================================== +//============================= PID > Bed Temperature Control =============== +//=========================================================================== +// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis +// +// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. +// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, +// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. +// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. +// If your configuration is significantly different than this and you don't understand the issues involved, you probably +// shouldn't use bed PID until someone else verifies your hardware works. +// If this is enabled, find your own PID constants below. +//#define PIDTEMPBED +// +//#define BED_LIMIT_SWITCHING + +// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. +// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) +// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, +// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current + +//#define PID_BED_DEBUG // Sends debug data to the serial port. + +#ifdef PIDTEMPBED +//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) +//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) + #define DEFAULT_bedKp 10.00 + #define DEFAULT_bedKi .023 + #define DEFAULT_bedKd 305.4 + +//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) +//from pidautotune +// #define DEFAULT_bedKp 97.1 +// #define DEFAULT_bedKi 1.41 +// #define DEFAULT_bedKd 1675.16 + +// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. +#endif // PIDTEMPBED + +// @section extruder + +//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit +//can be software-disabled for whatever purposes by +#define PREVENT_DANGEROUS_EXTRUDE +//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. +#define PREVENT_LENGTHY_EXTRUDE + +#define EXTRUDE_MINTEMP 170 +#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. + +//=========================================================================== +//============================= Thermal Runaway Protection ================== +//=========================================================================== +/* +This is a feature to protect your printer from burn up in flames if it has +a thermistor coming off place (this happened to a friend of mine recently and +motivated me writing this feature). + +The issue: If a thermistor come off, it will read a lower temperature than actual. +The system will turn the heater on forever, burning up the filament and anything +else around. + +After the temperature reaches the target for the first time, this feature will +start measuring for how long the current temperature stays below the target +minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). + +If it stays longer than _PERIOD, it means the thermistor temperature +cannot catch up with the target, so something *may be* wrong. Then, to be on the +safe side, the system will he halt. + +Bear in mind the count down will just start AFTER the first time the +thermistor temperature is over the target, so you will have no problem if +your extruder heater takes 2 minutes to hit the target on heating. + +*/ +// If you want to enable this feature for all your extruder heaters, +// uncomment the 2 defines below: + +// Parameters for all extruder heaters +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius + +// If you want to enable this feature for your bed heater, +// uncomment the 2 defines below: + +// Parameters for the bed heater +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius + + +//=========================================================================== +//============================= Mechanical Settings ========================= +//=========================================================================== + +// @section machine + +// Uncomment this option to enable CoreXY kinematics +// #define COREXY + +// Enable this option for Toshiba steppers +// #define CONFIG_STEPPERS_TOSHIBA + +// @section homing + +// coarse Endstop Settings +#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors + +#ifndef ENDSTOPPULLUPS + // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // #define ENDSTOPPULLUP_XMAX + // #define ENDSTOPPULLUP_YMAX + // #define ENDSTOPPULLUP_ZMAX + // #define ENDSTOPPULLUP_XMIN + // #define ENDSTOPPULLUP_YMIN + // #define ENDSTOPPULLUP_ZMIN + // #define ENDSTOPPULLUP_ZPROBE +#endif + +// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). +const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. +//#define DISABLE_MAX_ENDSTOPS +//#define DISABLE_MIN_ENDSTOPS + +// @section machine +// If you want to enable the Z Probe pin, but disable its use, uncomment the line below. +// This only affects a Z Probe Endstop if you have separate Z min endstop as well and have +// activated Z_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z Probe, +// this has no effect. +//#define DISABLE_Z_PROBE_ENDSTOP + +// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 +// :{0:'Low',1:'High'} +#define X_ENABLE_ON 0 +#define Y_ENABLE_ON 0 +#define Z_ENABLE_ON 0 +#define E_ENABLE_ON 0 // For all extruders + +// Disables axis when it's not being used. +// WARNING: When motors turn off there is a chance of losing position accuracy! +#define DISABLE_X false +#define DISABLE_Y false +#define DISABLE_Z false + +// @section extruder + +#define DISABLE_E false // For all extruders +#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled + +// @section machine + +// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. +#define INVERT_X_DIR false +#define INVERT_Y_DIR false +#define INVERT_Z_DIR false + +// @section extruder + +// For direct drive extruder v9 set to true, for geared extruder set to false. +#define INVERT_E0_DIR false +#define INVERT_E1_DIR false +#define INVERT_E2_DIR false +#define INVERT_E3_DIR false + +// @section homing + +// ENDSTOP SETTINGS: +// Sets direction of endstops when homing; 1=MAX, -1=MIN +// :[-1,1] +#define X_HOME_DIR -1 +#define Y_HOME_DIR -1 +#define Z_HOME_DIR -1 + +#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. +#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. + +// @section machine + +// Travel limits after homing (units are in mm) +#define X_MIN_POS 0 +#define Y_MIN_POS 0 +#define Z_MIN_POS 0 +#define X_MAX_POS 200 +#define Y_MAX_POS 200 +#define Z_MAX_POS 200 + +//=========================================================================== +//============================= Filament Runout Sensor ====================== +//=========================================================================== +//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament + // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. + // It is assumed that when logic high = filament available + // when logic low = filament ran out +//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned +//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + +//=========================================================================== +//============================ Mesh Bed Leveling ============================ +//=========================================================================== + +// #define MANUAL_BED_LEVELING // Add display menu option for bed leveling +// #define MESH_BED_LEVELING // Enable mesh bed leveling + +#ifdef MANUAL_BED_LEVELING + #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis +#endif // MANUAL_BED_LEVELING + +#ifdef MESH_BED_LEVELING + #define MESH_MIN_X 10 + #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X) + #define MESH_MIN_Y 10 + #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y) + #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited + #define MESH_NUM_Y_POINTS 3 + #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0 +#endif // MESH_BED_LEVELING + +//=========================================================================== +//============================= Bed Auto Leveling =========================== +//=========================================================================== + +// @section bedlevel + +//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) +#define Z_PROBE_REPEATABILITY_TEST // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled. + +#ifdef ENABLE_AUTO_BED_LEVELING + + // There are 2 different ways to specify probing locations + // + // - "grid" mode + // Probe several points in a rectangular grid. + // You specify the rectangle and the density of sample points. + // This mode is preferred because there are more measurements. + // + // - "3-point" mode + // Probe 3 arbitrary points on the bed (that aren't colinear) + // You specify the XY coordinates of all 3 points. + + // Enable this to sample the bed in a grid (least squares solution) + // Note: this feature generates 10KB extra code size + #define AUTO_BED_LEVELING_GRID + + #ifdef AUTO_BED_LEVELING_GRID + + #define LEFT_PROBE_BED_POSITION 15 + #define RIGHT_PROBE_BED_POSITION 170 + #define FRONT_PROBE_BED_POSITION 20 + #define BACK_PROBE_BED_POSITION 170 + + #define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this + + // Set the number of grid points per dimension + // You probably don't need more than 3 (squared=9) + #define AUTO_BED_LEVELING_GRID_POINTS 2 + + #else // !AUTO_BED_LEVELING_GRID + + // Arbitrary points to probe. A simple cross-product + // is used to estimate the plane of the bed. + #define ABL_PROBE_PT_1_X 15 + #define ABL_PROBE_PT_1_Y 180 + #define ABL_PROBE_PT_2_X 15 + #define ABL_PROBE_PT_2_Y 20 + #define ABL_PROBE_PT_3_X 170 + #define ABL_PROBE_PT_3_Y 20 + + #endif // AUTO_BED_LEVELING_GRID + + // Offsets to the probe relative to the extruder tip (Hotend - Probe) + // X and Y offsets must be integers + #define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right + #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Probe on: -front +behind + #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!) + + #define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance. + // Be sure you have this distance over your Z_MAX_POS in case + + #define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min + + #define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point. + #define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points + #define Z_RAISE_AFTER_PROBING 15 //How much the extruder will be raised after the last probing point. + +// #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine. + //Useful to retract a deployable probe. + + //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell + //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. + + //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk + //The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it. + // You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile. + +// #define PROBE_SERVO_DEACTIVATION_DELAY 300 + + +//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing, +//it is highly recommended you let this Z_SAFE_HOMING enabled!!! + + #define Z_SAFE_HOMING // This feature is meant to avoid Z homing with probe outside the bed area. + // When defined, it will: + // - Allow Z homing only after X and Y homing AND stepper drivers still enabled + // - If stepper drivers timeout, it will need X and Y homing again before Z homing + // - Position the probe in a defined XY point before Z Homing when homing all axis (G28) + // - Block Z homing only when the probe is outside bed area. + + #ifdef Z_SAFE_HOMING + + #define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28) + #define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28) + + #endif + + // Support for a dedicated Z PROBE endstop separate from the Z MIN endstop. + // If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below. + // If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28. + // WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print. + // To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board. + // If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below. + // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32 + // for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed. + // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works. + // D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file. + // WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework. + + //#define Z_PROBE_ENDSTOP + +#endif // ENABLE_AUTO_BED_LEVELING + + +// @section homing + +// The position of the homing switches +//#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used +//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0) + +// Manual homing switch locations: +// For deltabots this means top and center of the Cartesian print volume. +#ifdef MANUAL_HOME_POSITIONS + #define MANUAL_X_HOME_POS 0 + #define MANUAL_Y_HOME_POS 0 + #define MANUAL_Z_HOME_POS 0 + //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. +#endif + +// @section movement + +/** + * MOVEMENT SETTINGS + */ + +#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min) + +// default settings + +#define DEFAULT_AXIS_STEPS_PER_UNIT {78.7402*2,78.7402*2,5120.00,760*1*1.5} // default steps per unit for Ultimaker +#define DEFAULT_MAX_FEEDRATE {300, 300, 5, 25} // (mm/sec) +#define DEFAULT_MAX_ACCELERATION {3000,3000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. + +#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves +#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts +#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves + +// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) +#define DEFAULT_XYJERK 20.0 // (mm/sec) +#define DEFAULT_ZJERK 0.4 // (mm/sec) +#define DEFAULT_EJERK 5.0 // (mm/sec) + + +//============================================================================= +//============================= Additional Features =========================== +//============================================================================= + +// @section more + +// Custom M code points +#define CUSTOM_M_CODES +#ifdef CUSTOM_M_CODES + #ifdef ENABLE_AUTO_BED_LEVELING + #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 + #define Z_PROBE_OFFSET_RANGE_MIN -20 + #define Z_PROBE_OFFSET_RANGE_MAX 20 + #endif +#endif + +// @section extras + +// EEPROM +// The microcontroller can store settings in the EEPROM, e.g. max velocity... +// M500 - stores parameters in EEPROM +// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). +// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. +//define this to enable EEPROM support +//#define EEPROM_SETTINGS + +#ifdef EEPROM_SETTINGS + // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: + #define EEPROM_CHITCHAT // please keep turned on if you can. +#endif + + +// @section temperature + +// Preheat Constants +#define PLA_PREHEAT_HOTEND_TEMP 180 +#define PLA_PREHEAT_HPB_TEMP 70 +#define PLA_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255 + +#define ABS_PREHEAT_HOTEND_TEMP 240 +#define ABS_PREHEAT_HPB_TEMP 110 +#define ABS_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255 + +//==============================LCD and SD support============================= +// @section lcd + +// Define your display language below. Replace (en) with your language code and uncomment. +// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test +// See also language.h +#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) + +// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display. +// To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset. +// See also documentation/LCDLanguageFont.md + #define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware + //#define DISPLAY_CHARSET_HD44780_WESTERN + //#define DISPLAY_CHARSET_HD44780_CYRILLIC + +#define ULTRA_LCD //general LCD support, also 16x2 +//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) +#define SDSUPPORT // Enable SD Card Support in Hardware Console +//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error) +#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication +//#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder +//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking +//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store. +//#define ULTIPANEL //the UltiPanel as on Thingiverse +//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click +//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click + // 0 to disable buzzer feedback. Test with M300 S P +// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) +// http://reprap.org/wiki/PanelOne +//#define PANEL_ONE + +// The MaKr3d Makr-Panel with graphic controller and SD support +// http://reprap.org/wiki/MaKr3d_MaKrPanel +//#define MAKRPANEL + +// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD +// http://panucatt.com +// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib +//#define VIKI2 +//#define miniVIKI + +// The RepRapDiscount Smart Controller (white PCB) +// http://reprap.org/wiki/RepRapDiscount_Smart_Controller +//#define REPRAP_DISCOUNT_SMART_CONTROLLER + +// The GADGETS3D G3D LCD/SD Controller (blue PCB) +// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel +//#define G3D_PANEL + +// The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB) +// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller +// +// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib +//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + +// The RepRapWorld REPRAPWORLD_KEYPAD v1.1 +// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 +#define REPRAPWORLD_KEYPAD +#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // how much should be moved when a key is pressed, eg 10.0 means 10mm per click + +// The Elefu RA Board Control Panel +// http://www.elefu.com/index.php?route=product/product&product_id=53 +// REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C +//#define RA_CONTROL_PANEL + +/** + * I2C Panels + */ + +//#define LCD_I2C_SAINSMART_YWROBOT + +// PANELOLU2 LCD with status LEDs, separate encoder and click inputs +//#define LCD_I2C_PANELOLU2 + +// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs +//#define LCD_I2C_VIKI + +// Shift register panels +// --------------------- +// 2 wire Non-latching LCD SR from: +// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection + +//#define SAV_3DLCD + +// @section extras + +// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino +//#define FAST_PWM_FAN + +// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency +// which is not as annoying as with the hardware PWM. On the other hand, if this frequency +// is too low, you should also increment SOFT_PWM_SCALE. +//#define FAN_SOFT_PWM + +// Incrementing this by 1 will double the software PWM frequency, +// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. +// However, control resolution will be halved for each increment; +// at zero value, there are 128 effective control positions. +#define SOFT_PWM_SCALE 0 + +// Temperature status LEDs that display the hotend and bet temperature. +// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. +// Otherwise the RED led is on. There is 1C hysteresis. +//#define TEMP_STAT_LEDS + +// M240 Triggers a camera by emulating a Canon RC-1 Remote +// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ +// #define PHOTOGRAPH_PIN 23 + +// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure +//#define SF_ARC_FIX + +// Support for the BariCUDA Paste Extruder. +//#define BARICUDA + +//define BlinkM/CyzRgb Support +//#define BLINKM + +/*********************************************************************\ +* R/C SERVO support +* Sponsored by TrinityLabs, Reworked by codexmas +**********************************************************************/ + +// Number of servos +// +// If you select a configuration below, this will receive a default value and does not need to be set manually +// set it manually if you have more servos than extruders and wish to manually control some +// leaving it undefined or defining as 0 will disable the servo subsystem +// If unsure, leave commented / disabled +// +//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command + +// Servo Endstops +// +// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. +// Use M851 to set the z-probe vertical offset from the nozzle. Store that setting with M500. +// +//#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 +//#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles + +/**********************************************************************\ + * Support for a filament diameter sensor + * Also allows adjustment of diameter at print time (vs at slicing) + * Single extruder only at this point (extruder 0) + * + * Motherboards + * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector + * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) + * 301 - Rambo - uses Analog input 3 + * Note may require analog pins to be defined for different motherboards + **********************************************************************/ +// Uncomment below to enable +//#define FILAMENT_SENSOR + +#define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) +#define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel + +#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation +#define MEASURED_UPPER_LIMIT 3.3 //upper limit factor used for sensor reading validation in mm +#define MEASURED_LOWER_LIMIT 1.9 //lower limit factor for sensor reading validation in mm +#define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) + +//defines used in the code +#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially + +//When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. +//#define FILAMENT_LCD_DISPLAY + + + + + + +#include "Configuration_adv.h" +#include "thermistortables.h" + +#endif //CONFIGURATION_H From 073e4af7e28b47b16e9f30d3fb8a39f4f4db63df Mon Sep 17 00:00:00 2001 From: Wurstnase Date: Thu, 7 May 2015 18:55:47 +0200 Subject: [PATCH 034/126] We don't need the old standard one. The STEP_ADD and STEP_IF_COUNTER are also good for non-Toshiba stepper driver. --- Marlin/stepper.cpp | 69 +++++++++++++++------------------------------- 1 file changed, 22 insertions(+), 47 deletions(-) diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index ca17b3f9f..0c0706550 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -676,60 +676,34 @@ ISR(TIMER1_COMPA_vect) { #endif //ADVANCE #define _COUNTER(axis) counter_## axis - #define _WRITE_STEP(AXIS, HIGHLOW) AXIS ##_STEP_WRITE(HIGHLOW) #define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP #define _INVERT_STEP_PIN(AXIS) INVERT_## AXIS ##_STEP_PIN - #ifdef CONFIG_STEPPERS_TOSHIBA - /** - * The Toshiba stepper controller require much longer pulses. - * So we 'stage' decompose the pulses between high and low - * instead of doing each in turn. The extra tests add enough - * lag to allow it work with without needing NOPs - */ - #define STEP_ADD(axis, AXIS) \ - _COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \ - if (_COUNTER(axis) > 0) { _WRITE_STEP(AXIS, HIGH); } - STEP_ADD(x,X); - STEP_ADD(y,Y); - STEP_ADD(z,Z); - #ifndef ADVANCE - STEP_ADD(e,E); - #endif + #define STEP_ADD(axis, AXIS) \ + _COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \ + if (_COUNTER(axis) > 0) { _APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS),0); } - #define STEP_IF_COUNTER(axis, AXIS) \ - if (_COUNTER(axis) > 0) { \ - _COUNTER(axis) -= current_block->step_event_count; \ - count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; \ - _WRITE_STEP(AXIS, LOW); \ - } + STEP_ADD(x,X); + STEP_ADD(y,Y); + STEP_ADD(z,Z); + #ifndef ADVANCE + STEP_ADD(e,E); + #endif - STEP_IF_COUNTER(x, X); - STEP_IF_COUNTER(y, Y); - STEP_IF_COUNTER(z, Z); - #ifndef ADVANCE - STEP_IF_COUNTER(e, E); - #endif + #define STEP_IF_COUNTER(axis, AXIS) \ + if (_COUNTER(axis) > 0) { \ + _COUNTER(axis) -= current_block->step_event_count; \ + count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; \ + _APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS),0); \ + } - #else // !CONFIG_STEPPERS_TOSHIBA + STEP_IF_COUNTER(x, X); + STEP_IF_COUNTER(y, Y); + STEP_IF_COUNTER(z, Z); + #ifndef ADVANCE + STEP_IF_COUNTER(e, E); + #endif - #define APPLY_MOVEMENT(axis, AXIS) \ - _COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \ - if (_COUNTER(axis) > 0) { \ - _APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS),0); \ - _COUNTER(axis) -= current_block->step_event_count; \ - count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; \ - _APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS),0); \ - } - - APPLY_MOVEMENT(x, X); - APPLY_MOVEMENT(y, Y); - APPLY_MOVEMENT(z, Z); - #ifndef ADVANCE - APPLY_MOVEMENT(e, E); - #endif - - #endif // CONFIG_STEPPERS_TOSHIBA step_events_completed++; if (step_events_completed >= current_block->step_event_count) break; } @@ -1024,6 +998,7 @@ void st_init() { #endif #define _STEP_INIT(AXIS) AXIS ##_STEP_INIT + #define _WRITE_STEP(AXIS, HIGHLOW) AXIS ##_STEP_WRITE(HIGHLOW) #define _DISABLE(axis) disable_## axis() #define AXIS_INIT(axis, AXIS, PIN) \ From 181ccc884c79c48c818e23514499968d7fbf7701 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 7 May 2015 20:46:03 -0700 Subject: [PATCH 035/126] Edit thermal runaway description --- Marlin/Configuration.h | 56 +++++++++---------- Marlin/configurator/config/Configuration.h | 56 +++++++++---------- .../Felix/Configuration.h | 56 +++++++++---------- .../Felix/Configuration_DUAL.h | 56 +++++++++---------- .../Hephestos/Configuration.h | 56 +++++++++---------- .../K8200/Configuration.h | 56 +++++++++---------- .../SCARA/Configuration.h | 56 +++++++++---------- .../WITBOX/Configuration.h | 56 +++++++++---------- .../delta/biv2.5/Configuration.h | 56 +++++++++---------- .../delta/generic/Configuration.h | 56 +++++++++---------- .../delta/kossel_mini/Configuration.h | 56 +++++++++---------- .../makibox/Configuration.h | 56 +++++++++---------- .../tvrrug/Round2/Configuration.h | 56 +++++++++---------- 13 files changed, 325 insertions(+), 403 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index abcfea50f..69bf148bb 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -270,42 +270,36 @@ Here are some standard links for getting your machine calibrated: #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. //=========================================================================== -//============================= Thermal Runaway Protection ================== +//======================== Thermal Runaway Protection ======================= //=========================================================================== -/* -This is a feature to protect your printer from burn up in flames if it has -a thermistor coming off place (this happened to a friend of mine recently and -motivated me writing this feature). -The issue: If a thermistor come off, it will read a lower temperature than actual. -The system will turn the heater on forever, burning up the filament and anything -else around. - -After the temperature reaches the target for the first time, this feature will -start measuring for how long the current temperature stays below the target -minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). - -If it stays longer than _PERIOD, it means the thermistor temperature -cannot catch up with the target, so something *may be* wrong. Then, to be on the -safe side, the system will he halt. - -Bear in mind the count down will just start AFTER the first time the -thermistor temperature is over the target, so you will have no problem if -your extruder heater takes 2 minutes to hit the target on heating. - -*/ -// If you want to enable this feature for all your extruder heaters, -// uncomment the 2 defines below: +/** + * Thermal Runaway Protection protects your printer from damage and fire if a + * thermistor falls out or temperature sensors fail in any way. + * + * The issue: If a thermistor falls out or a temperature sensor fails, + * Marlin can no longer sense the actual temperature. Since a disconnected + * thermistor reads as a low temperature, the firmware will keep the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too long, + * the firmware will halt as a safety precaution. + * + * Note that because the countdown starts only AFTER the temperature reaches + * the target, this will not catch a thermistor that is already disconnected + * when the print starts! + * + * To enable for all extruder heaters, uncomment the two defines below: + */ // Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds #define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius -// If you want to enable this feature for your bed heater, -// uncomment the 2 defines below: +// To enable for the bed heater, uncomment the two defines below: // Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds #define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius @@ -411,7 +405,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #define Z_MAX_POS 200 //=========================================================================== -//============================= Filament Runout Sensor ====================== +//========================= Filament Runout Sensor ========================== //=========================================================================== //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. @@ -421,7 +415,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. //=========================================================================== -//============================ Mesh Bed Leveling ============================ +//=========================== Manual Bed Leveling =========================== //=========================================================================== // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling @@ -442,7 +436,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #endif // MESH_BED_LEVELING //=========================================================================== -//============================= Bed Auto Leveling =========================== +//============================ Bed Auto Leveling ============================ //=========================================================================== // @section bedlevel diff --git a/Marlin/configurator/config/Configuration.h b/Marlin/configurator/config/Configuration.h index 927a89046..d888911b6 100644 --- a/Marlin/configurator/config/Configuration.h +++ b/Marlin/configurator/config/Configuration.h @@ -270,42 +270,36 @@ Here are some standard links for getting your machine calibrated: #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. //=========================================================================== -//============================= Thermal Runaway Protection ================== +//======================== Thermal Runaway Protection ======================= //=========================================================================== -/* -This is a feature to protect your printer from burn up in flames if it has -a thermistor coming off place (this happened to a friend of mine recently and -motivated me writing this feature). -The issue: If a thermistor come off, it will read a lower temperature than actual. -The system will turn the heater on forever, burning up the filament and anything -else around. - -After the temperature reaches the target for the first time, this feature will -start measuring for how long the current temperature stays below the target -minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). - -If it stays longer than _PERIOD, it means the thermistor temperature -cannot catch up with the target, so something *may be* wrong. Then, to be on the -safe side, the system will he halt. - -Bear in mind the count down will just start AFTER the first time the -thermistor temperature is over the target, so you will have no problem if -your extruder heater takes 2 minutes to hit the target on heating. - -*/ -// If you want to enable this feature for all your extruder heaters, -// uncomment the 2 defines below: +/** + * Thermal Runaway Protection protects your printer from damage and fire if a + * thermistor falls out or temperature sensors fail in any way. + * + * The issue: If a thermistor falls out or a temperature sensor fails, + * Marlin can no longer sense the actual temperature. Since a disconnected + * thermistor reads as a low temperature, the firmware will keep the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too long, + * the firmware will halt as a safety precaution. + * + * Note that because the countdown starts only AFTER the temperature reaches + * the target, this will not catch a thermistor that is already disconnected + * when the print starts! + * + * To enable for all extruder heaters, uncomment the two defines below: + */ // Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds #define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius -// If you want to enable this feature for your bed heater, -// uncomment the 2 defines below: +// To enable for the bed heater, uncomment the two defines below: // Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds #define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== @@ -410,7 +404,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #define Z_MAX_POS 200 //=========================================================================== -//============================= Filament Runout Sensor ====================== +//========================= Filament Runout Sensor ========================== //=========================================================================== //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. @@ -420,7 +414,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. //=========================================================================== -//============================ Manual Bed Leveling ========================== +//=========================== Manual Bed Leveling =========================== //=========================================================================== // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling @@ -441,7 +435,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #endif // MESH_BED_LEVELING //=========================================================================== -//============================= Bed Auto Leveling =========================== +//============================ Bed Auto Leveling ============================ //=========================================================================== // @section bedlevel diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 0bdc42f97..af0cfba32 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -236,42 +236,36 @@ Here are some standard links for getting your machine calibrated: #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. //=========================================================================== -//============================= Thermal Runaway Protection ================== +//======================== Thermal Runaway Protection ======================= //=========================================================================== -/* -This is a feature to protect your printer from burn up in flames if it has -a thermistor coming off place (this happened to a friend of mine recently and -motivated me writing this feature). -The issue: If a thermistor come off, it will read a lower temperature than actual. -The system will turn the heater on forever, burning up the filament and anything -else around. - -After the temperature reaches the target for the first time, this feature will -start measuring for how long the current temperature stays below the target -minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). - -If it stays longer than _PERIOD, it means the thermistor temperature -cannot catch up with the target, so something *may be* wrong. Then, to be on the -safe side, the system will he halt. - -Bear in mind the count down will just start AFTER the first time the -thermistor temperature is over the target, so you will have no problem if -your extruder heater takes 2 minutes to hit the target on heating. - -*/ -// If you want to enable this feature for all your extruder heaters, -// uncomment the 2 defines below: +/** + * Thermal Runaway Protection protects your printer from damage and fire if a + * thermistor falls out or temperature sensors fail in any way. + * + * The issue: If a thermistor falls out or a temperature sensor fails, + * Marlin can no longer sense the actual temperature. Since a disconnected + * thermistor reads as a low temperature, the firmware will keep the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too long, + * the firmware will halt as a safety precaution. + * + * Note that because the countdown starts only AFTER the temperature reaches + * the target, this will not catch a thermistor that is already disconnected + * when the print starts! + * + * To enable for all extruder heaters, uncomment the two defines below: + */ // Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds #define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius -// If you want to enable this feature for your bed heater, -// uncomment the 2 defines below: +// To enable for the bed heater, uncomment the two defines below: // Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds #define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== @@ -349,7 +343,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #define Z_MAX_POS 235 //=========================================================================== -//============================= Filament Runout Sensor ====================== +//========================= Filament Runout Sensor ========================== //=========================================================================== //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. @@ -359,7 +353,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. //=========================================================================== -//============================ Manual Bed Leveling ========================== +//=========================== Manual Bed Leveling =========================== //=========================================================================== // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling @@ -380,7 +374,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #endif // MESH_BED_LEVELING //=========================================================================== -//============================= Bed Auto Leveling =========================== +//============================ Bed Auto Leveling ============================ //=========================================================================== //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h index 478685818..cc335fb71 100644 --- a/Marlin/example_configurations/Felix/Configuration_DUAL.h +++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h @@ -236,42 +236,36 @@ Here are some standard links for getting your machine calibrated: #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. //=========================================================================== -//============================= Thermal Runaway Protection ================== +//======================== Thermal Runaway Protection ======================= //=========================================================================== -/* -This is a feature to protect your printer from burn up in flames if it has -a thermistor coming off place (this happened to a friend of mine recently and -motivated me writing this feature). -The issue: If a thermistor come off, it will read a lower temperature than actual. -The system will turn the heater on forever, burning up the filament and anything -else around. - -After the temperature reaches the target for the first time, this feature will -start measuring for how long the current temperature stays below the target -minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). - -If it stays longer than _PERIOD, it means the thermistor temperature -cannot catch up with the target, so something *may be* wrong. Then, to be on the -safe side, the system will he halt. - -Bear in mind the count down will just start AFTER the first time the -thermistor temperature is over the target, so you will have no problem if -your extruder heater takes 2 minutes to hit the target on heating. - -*/ -// If you want to enable this feature for all your extruder heaters, -// uncomment the 2 defines below: +/** + * Thermal Runaway Protection protects your printer from damage and fire if a + * thermistor falls out or temperature sensors fail in any way. + * + * The issue: If a thermistor falls out or a temperature sensor fails, + * Marlin can no longer sense the actual temperature. Since a disconnected + * thermistor reads as a low temperature, the firmware will keep the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too long, + * the firmware will halt as a safety precaution. + * + * Note that because the countdown starts only AFTER the temperature reaches + * the target, this will not catch a thermistor that is already disconnected + * when the print starts! + * + * To enable for all extruder heaters, uncomment the two defines below: + */ // Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds #define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius -// If you want to enable this feature for your bed heater, -// uncomment the 2 defines below: +// To enable for the bed heater, uncomment the two defines below: // Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds #define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== @@ -349,7 +343,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #define Z_MAX_POS 235 //=========================================================================== -//============================= Filament Runout Sensor ====================== +//========================= Filament Runout Sensor ========================== //=========================================================================== //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. @@ -359,7 +353,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. //=========================================================================== -//============================ Manual Bed Leveling ========================== +//=========================== Manual Bed Leveling =========================== //=========================================================================== // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling @@ -376,7 +370,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #endif // MESH_BED_LEVELING //=========================================================================== -//============================= Bed Auto Leveling =========================== +//============================ Bed Auto Leveling ============================ //=========================================================================== //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index cf2337407..0fab231ec 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -257,42 +257,36 @@ Here are some standard links for getting your machine calibrated: #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. //=========================================================================== -//============================= Thermal Runaway Protection ================== +//======================== Thermal Runaway Protection ======================= //=========================================================================== -/* -This is a feature to protect your printer from burn up in flames if it has -a thermistor coming off place (this happened to a friend of mine recently and -motivated me writing this feature). -The issue: If a thermistor come off, it will read a lower temperature than actual. -The system will turn the heater on forever, burning up the filament and anything -else around. - -After the temperature reaches the target for the first time, this feature will -start measuring for how long the current temperature stays below the target -minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). - -If it stays longer than _PERIOD, it means the thermistor temperature -cannot catch up with the target, so something *may be* wrong. Then, to be on the -safe side, the system will he halt. - -Bear in mind the count down will just start AFTER the first time the -thermistor temperature is over the target, so you will have no problem if -your extruder heater takes 2 minutes to hit the target on heating. - -*/ -// If you want to enable this feature for all your extruder heaters, -// uncomment the 2 defines below: +/** + * Thermal Runaway Protection protects your printer from damage and fire if a + * thermistor falls out or temperature sensors fail in any way. + * + * The issue: If a thermistor falls out or a temperature sensor fails, + * Marlin can no longer sense the actual temperature. Since a disconnected + * thermistor reads as a low temperature, the firmware will keep the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too long, + * the firmware will halt as a safety precaution. + * + * Note that because the countdown starts only AFTER the temperature reaches + * the target, this will not catch a thermistor that is already disconnected + * when the print starts! + * + * To enable for all extruder heaters, uncomment the two defines below: + */ // Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds #define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius -// If you want to enable this feature for your bed heater, -// uncomment the 2 defines below: +// To enable for the bed heater, uncomment the two defines below: // Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds #define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== @@ -370,7 +364,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic #define Z_MAX_POS 180 //=========================================================================== -//============================= Filament Runout Sensor ====================== +//========================= Filament Runout Sensor ========================== //=========================================================================== //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. @@ -380,7 +374,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. //=========================================================================== -//============================ Manual Bed Leveling ========================== +//=========================== Manual Bed Leveling =========================== //=========================================================================== // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling @@ -401,7 +395,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic #endif // MESH_BED_LEVELING //=========================================================================== -//============================= Bed Auto Leveling =========================== +//============================ Bed Auto Leveling ============================ //=========================================================================== //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 75ccf4f74..e60402450 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -286,42 +286,36 @@ Here are some standard links for getting your machine calibrated: #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. //=========================================================================== -//============================= Thermal Runaway Protection ================== +//======================== Thermal Runaway Protection ======================= //=========================================================================== -/* -This is a feature to protect your printer from burn up in flames if it has -a thermistor coming off place (this happened to a friend of mine recently and -motivated me writing this feature). -The issue: If a thermistor come off, it will read a lower temperature than actual. -The system will turn the heater on forever, burning up the filament and anything -else around. - -After the temperature reaches the target for the first time, this feature will -start measuring for how long the current temperature stays below the target -minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). - -If it stays longer than _PERIOD, it means the thermistor temperature -cannot catch up with the target, so something *may be* wrong. Then, to be on the -safe side, the system will he halt. - -Bear in mind the count down will just start AFTER the first time the -thermistor temperature is over the target, so you will have no problem if -your extruder heater takes 2 minutes to hit the target on heating. - -*/ -// If you want to enable this feature for all your extruder heaters, -// uncomment the 2 defines below: +/** + * Thermal Runaway Protection protects your printer from damage and fire if a + * thermistor falls out or temperature sensors fail in any way. + * + * The issue: If a thermistor falls out or a temperature sensor fails, + * Marlin can no longer sense the actual temperature. Since a disconnected + * thermistor reads as a low temperature, the firmware will keep the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too long, + * the firmware will halt as a safety precaution. + * + * Note that because the countdown starts only AFTER the temperature reaches + * the target, this will not catch a thermistor that is already disconnected + * when the print starts! + * + * To enable for all extruder heaters, uncomment the two defines below: + */ // Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds #define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius -// If you want to enable this feature for your bed heater, -// uncomment the 2 defines below: +// To enable for the bed heater, uncomment the two defines below: // Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds #define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== @@ -426,7 +420,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #define Z_MAX_POS 200 //=========================================================================== -//============================= Filament Runout Sensor ====================== +//========================= Filament Runout Sensor ========================== //=========================================================================== //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. @@ -436,7 +430,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. //=========================================================================== -//============================ Mesh Bed Leveling ============================ +//=========================== Manual Bed Leveling =========================== //=========================================================================== // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling @@ -457,7 +451,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #endif // MESH_BED_LEVELING //=========================================================================== -//============================= Bed Auto Leveling =========================== +//============================ Bed Auto Leveling ============================ //=========================================================================== // @section bedlevel diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 44b8af94d..ed074a0e2 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -288,42 +288,36 @@ Here are some standard links for getting your machine calibrated: #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. //=========================================================================== -//============================= Thermal Runaway Protection ================== +//======================== Thermal Runaway Protection ======================= //=========================================================================== -/* -This is a feature to protect your printer from burn up in flames if it has -a thermistor coming off place (this happened to a friend of mine recently and -motivated me writing this feature). -The issue: If a thermistor come off, it will read a lower temperature than actual. -The system will turn the heater on forever, burning up the filament and anything -else around. - -After the temperature reaches the target for the first time, this feature will -start measuring for how long the current temperature stays below the target -minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). - -If it stays longer than _PERIOD, it means the thermistor temperature -cannot catch up with the target, so something *may be* wrong. Then, to be on the -safe side, the system will he halt. - -Bear in mind the count down will just start AFTER the first time the -thermistor temperature is over the target, so you will have no problem if -your extruder heater takes 2 minutes to hit the target on heating. - -*/ -// If you want to enable this feature for all your extruder heaters, -// uncomment the 2 defines below: +/** + * Thermal Runaway Protection protects your printer from damage and fire if a + * thermistor falls out or temperature sensors fail in any way. + * + * The issue: If a thermistor falls out or a temperature sensor fails, + * Marlin can no longer sense the actual temperature. Since a disconnected + * thermistor reads as a low temperature, the firmware will keep the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too long, + * the firmware will halt as a safety precaution. + * + * Note that because the countdown starts only AFTER the temperature reaches + * the target, this will not catch a thermistor that is already disconnected + * when the print starts! + * + * To enable for all extruder heaters, uncomment the two defines below: + */ // Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds #define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius -// If you want to enable this feature for your bed heater, -// uncomment the 2 defines below: +// To enable for the bed heater, uncomment the two defines below: // Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds #define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== @@ -401,7 +395,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #define Z_MAX_POS 225 //=========================================================================== -//============================= Filament Runout Sensor ====================== +//========================= Filament Runout Sensor ========================== //=========================================================================== //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. @@ -411,7 +405,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. //=========================================================================== -//============================ Manual Bed Leveling ========================== +//=========================== Manual Bed Leveling =========================== //=========================================================================== // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling @@ -432,7 +426,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #endif // MESH_BED_LEVELING //=========================================================================== -//============================= Bed Auto Leveling =========================== +//============================ Bed Auto Leveling ============================ //=========================================================================== //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index dc356f81d..d585533b9 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -256,42 +256,36 @@ Here are some standard links for getting your machine calibrated: #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. //=========================================================================== -//============================= Thermal Runaway Protection ================== +//======================== Thermal Runaway Protection ======================= //=========================================================================== -/* -This is a feature to protect your printer from burn up in flames if it has -a thermistor coming off place (this happened to a friend of mine recently and -motivated me writing this feature). -The issue: If a thermistor come off, it will read a lower temperature than actual. -The system will turn the heater on forever, burning up the filament and anything -else around. - -After the temperature reaches the target for the first time, this feature will -start measuring for how long the current temperature stays below the target -minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). - -If it stays longer than _PERIOD, it means the thermistor temperature -cannot catch up with the target, so something *may be* wrong. Then, to be on the -safe side, the system will he halt. - -Bear in mind the count down will just start AFTER the first time the -thermistor temperature is over the target, so you will have no problem if -your extruder heater takes 2 minutes to hit the target on heating. - -*/ -// If you want to enable this feature for all your extruder heaters, -// uncomment the 2 defines below: +/** + * Thermal Runaway Protection protects your printer from damage and fire if a + * thermistor falls out or temperature sensors fail in any way. + * + * The issue: If a thermistor falls out or a temperature sensor fails, + * Marlin can no longer sense the actual temperature. Since a disconnected + * thermistor reads as a low temperature, the firmware will keep the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too long, + * the firmware will halt as a safety precaution. + * + * Note that because the countdown starts only AFTER the temperature reaches + * the target, this will not catch a thermistor that is already disconnected + * when the print starts! + * + * To enable for all extruder heaters, uncomment the two defines below: + */ // Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds #define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius -// If you want to enable this feature for your bed heater, -// uncomment the 2 defines below: +// To enable for the bed heater, uncomment the two defines below: // Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds #define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== @@ -369,7 +363,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic #define Z_MAX_POS 200 //=========================================================================== -//============================= Filament Runout Sensor ====================== +//========================= Filament Runout Sensor ========================== //=========================================================================== //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. @@ -379,7 +373,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. //=========================================================================== -//============================ Manual Bed Leveling ========================== +//=========================== Manual Bed Leveling =========================== //=========================================================================== // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling @@ -400,7 +394,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic #endif // MESH_BED_LEVELING //=========================================================================== -//============================= Bed Auto Leveling =========================== +//============================ Bed Auto Leveling ============================ //=========================================================================== //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index 65983b360..d9874ce94 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -286,42 +286,36 @@ Here are some standard links for getting your machine calibrated: #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. //=========================================================================== -//============================= Thermal Runaway Protection ================== +//======================== Thermal Runaway Protection ======================= //=========================================================================== -/* -This is a feature to protect your printer from burn up in flames if it has -a thermistor coming off place (this happened to a friend of mine recently and -motivated me writing this feature). -The issue: If a thermistor come off, it will read a lower temperature than actual. -The system will turn the heater on forever, burning up the filament and anything -else around. - -After the temperature reaches the target for the first time, this feature will -start measuring for how long the current temperature stays below the target -minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). - -If it stays longer than _PERIOD, it means the thermistor temperature -cannot catch up with the target, so something *may be* wrong. Then, to be on the -safe side, the system will he halt. - -Bear in mind the count down will just start AFTER the first time the -thermistor temperature is over the target, so you will have no problem if -your extruder heater takes 2 minutes to hit the target on heating. - -*/ -// If you want to enable this feature for all your extruder heaters, -// uncomment the 2 defines below: +/** + * Thermal Runaway Protection protects your printer from damage and fire if a + * thermistor falls out or temperature sensors fail in any way. + * + * The issue: If a thermistor falls out or a temperature sensor fails, + * Marlin can no longer sense the actual temperature. Since a disconnected + * thermistor reads as a low temperature, the firmware will keep the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too long, + * the firmware will halt as a safety precaution. + * + * Note that because the countdown starts only AFTER the temperature reaches + * the target, this will not catch a thermistor that is already disconnected + * when the print starts! + * + * To enable for all extruder heaters, uncomment the two defines below: + */ // Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds #define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius -// If you want to enable this feature for your bed heater, -// uncomment the 2 defines below: +// To enable for the bed heater, uncomment the two defines below: // Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 120 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 120 // in seconds #define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 4 // in degree Celsius //=========================================================================== @@ -399,7 +393,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic #define Z_MAX_POS MANUAL_Z_HOME_POS //=========================================================================== -//============================= Filament Runout Sensor ====================== +//========================= Filament Runout Sensor ========================== //=========================================================================== //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. @@ -409,7 +403,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. //=========================================================================== -//============================ Manual Bed Leveling ========================== +//=========================== Manual Bed Leveling =========================== //=========================================================================== // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling @@ -430,7 +424,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic #endif // MESH_BED_LEVELING //=========================================================================== -//============================= Bed Auto Leveling =========================== +//============================ Bed Auto Leveling ============================ //=========================================================================== //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index d4028c067..ef8037ca7 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -286,42 +286,36 @@ Here are some standard links for getting your machine calibrated: #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. //=========================================================================== -//============================= Thermal Runaway Protection ================== +//======================== Thermal Runaway Protection ======================= //=========================================================================== -/* -This is a feature to protect your printer from burn up in flames if it has -a thermistor coming off place (this happened to a friend of mine recently and -motivated me writing this feature). -The issue: If a thermistor come off, it will read a lower temperature than actual. -The system will turn the heater on forever, burning up the filament and anything -else around. - -After the temperature reaches the target for the first time, this feature will -start measuring for how long the current temperature stays below the target -minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). - -If it stays longer than _PERIOD, it means the thermistor temperature -cannot catch up with the target, so something *may be* wrong. Then, to be on the -safe side, the system will he halt. - -Bear in mind the count down will just start AFTER the first time the -thermistor temperature is over the target, so you will have no problem if -your extruder heater takes 2 minutes to hit the target on heating. - -*/ -// If you want to enable this feature for all your extruder heaters, -// uncomment the 2 defines below: +/** + * Thermal Runaway Protection protects your printer from damage and fire if a + * thermistor falls out or temperature sensors fail in any way. + * + * The issue: If a thermistor falls out or a temperature sensor fails, + * Marlin can no longer sense the actual temperature. Since a disconnected + * thermistor reads as a low temperature, the firmware will keep the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too long, + * the firmware will halt as a safety precaution. + * + * Note that because the countdown starts only AFTER the temperature reaches + * the target, this will not catch a thermistor that is already disconnected + * when the print starts! + * + * To enable for all extruder heaters, uncomment the two defines below: + */ // Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds #define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius -// If you want to enable this feature for your bed heater, -// uncomment the 2 defines below: +// To enable for the bed heater, uncomment the two defines below: // Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds #define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== @@ -399,7 +393,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic #define Z_MAX_POS MANUAL_Z_HOME_POS //=========================================================================== -//============================= Filament Runout Sensor ====================== +//========================= Filament Runout Sensor ========================== //=========================================================================== //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. @@ -409,7 +403,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. //=========================================================================== -//============================ Manual Bed Leveling ========================== +//=========================== Manual Bed Leveling =========================== //=========================================================================== // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling @@ -430,7 +424,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic #endif // MESH_BED_LEVELING //=========================================================================== -//============================= Bed Auto Leveling =========================== +//============================ Bed Auto Leveling ============================ //=========================================================================== //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index cd0a34ec9..863087c1b 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -286,42 +286,36 @@ Here are some standard links for getting your machine calibrated: #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. //=========================================================================== -//============================= Thermal Runaway Protection ================== +//======================== Thermal Runaway Protection ======================= //=========================================================================== -/* -This is a feature to protect your printer from burn up in flames if it has -a thermistor coming off place (this happened to a friend of mine recently and -motivated me writing this feature). -The issue: If a thermistor come off, it will read a lower temperature than actual. -The system will turn the heater on forever, burning up the filament and anything -else around. - -After the temperature reaches the target for the first time, this feature will -start measuring for how long the current temperature stays below the target -minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). - -If it stays longer than _PERIOD, it means the thermistor temperature -cannot catch up with the target, so something *may be* wrong. Then, to be on the -safe side, the system will he halt. - -Bear in mind the count down will just start AFTER the first time the -thermistor temperature is over the target, so you will have no problem if -your extruder heater takes 2 minutes to hit the target on heating. - -*/ -// If you want to enable this feature for all your extruder heaters, -// uncomment the 2 defines below: +/** + * Thermal Runaway Protection protects your printer from damage and fire if a + * thermistor falls out or temperature sensors fail in any way. + * + * The issue: If a thermistor falls out or a temperature sensor fails, + * Marlin can no longer sense the actual temperature. Since a disconnected + * thermistor reads as a low temperature, the firmware will keep the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too long, + * the firmware will halt as a safety precaution. + * + * Note that because the countdown starts only AFTER the temperature reaches + * the target, this will not catch a thermistor that is already disconnected + * when the print starts! + * + * To enable for all extruder heaters, uncomment the two defines below: + */ // Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds #define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius -// If you want to enable this feature for your bed heater, -// uncomment the 2 defines below: +// To enable for the bed heater, uncomment the two defines below: // Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds #define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== @@ -399,7 +393,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #define Z_MAX_POS MANUAL_Z_HOME_POS //=========================================================================== -//============================= Filament Runout Sensor ====================== +//========================= Filament Runout Sensor ========================== //=========================================================================== //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. @@ -409,7 +403,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. //=========================================================================== -//============================ Manual Bed Leveling ========================== +//=========================== Manual Bed Leveling =========================== //=========================================================================== // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling @@ -430,7 +424,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #endif // MESH_BED_LEVELING //=========================================================================== -//============================= Bed Auto Leveling =========================== +//============================ Bed Auto Leveling ============================ //=========================================================================== #define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 237ea7d38..a39f4786f 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -256,42 +256,36 @@ Here are some standard links for getting your machine calibrated: #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. //=========================================================================== -//============================= Thermal Runaway Protection ================== +//======================== Thermal Runaway Protection ======================= //=========================================================================== -/* -This is a feature to protect your printer from burn up in flames if it has -a thermistor coming off place (this happened to a friend of mine recently and -motivated me writing this feature). -The issue: If a thermistor come off, it will read a lower temperature than actual. -The system will turn the heater on forever, burning up the filament and anything -else around. - -After the temperature reaches the target for the first time, this feature will -start measuring for how long the current temperature stays below the target -minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). - -If it stays longer than _PERIOD, it means the thermistor temperature -cannot catch up with the target, so something *may be* wrong. Then, to be on the -safe side, the system will he halt. - -Bear in mind the count down will just start AFTER the first time the -thermistor temperature is over the target, so you will have no problem if -your extruder heater takes 2 minutes to hit the target on heating. - -*/ -// If you want to enable this feature for all your extruder heaters, -// uncomment the 2 defines below: +/** + * Thermal Runaway Protection protects your printer from damage and fire if a + * thermistor falls out or temperature sensors fail in any way. + * + * The issue: If a thermistor falls out or a temperature sensor fails, + * Marlin can no longer sense the actual temperature. Since a disconnected + * thermistor reads as a low temperature, the firmware will keep the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too long, + * the firmware will halt as a safety precaution. + * + * Note that because the countdown starts only AFTER the temperature reaches + * the target, this will not catch a thermistor that is already disconnected + * when the print starts! + * + * To enable for all extruder heaters, uncomment the two defines below: + */ // Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds #define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius -// If you want to enable this feature for your bed heater, -// uncomment the 2 defines below: +// To enable for the bed heater, uncomment the two defines below: // Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds #define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== @@ -369,7 +363,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #define Z_MAX_POS 86 //=========================================================================== -//============================= Filament Runout Sensor ====================== +//========================= Filament Runout Sensor ========================== //=========================================================================== //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. @@ -379,7 +373,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. //=========================================================================== -//============================ Manual Bed Leveling ========================== +//=========================== Manual Bed Leveling =========================== //=========================================================================== // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling @@ -400,7 +394,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #endif // MESH_BED_LEVELING //=========================================================================== -//============================= Bed Auto Leveling =========================== +//============================ Bed Auto Leveling ============================ //=========================================================================== //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 5e07e4790..506bade82 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -258,42 +258,36 @@ Here are some standard links for getting your machine calibrated: #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. //=========================================================================== -//============================= Thermal Runaway Protection ================== +//======================== Thermal Runaway Protection ======================= //=========================================================================== -/* -This is a feature to protect your printer from burn up in flames if it has -a thermistor coming off place (this happened to a friend of mine recently and -motivated me writing this feature). -The issue: If a thermistor come off, it will read a lower temperature than actual. -The system will turn the heater on forever, burning up the filament and anything -else around. - -After the temperature reaches the target for the first time, this feature will -start measuring for how long the current temperature stays below the target -minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). - -If it stays longer than _PERIOD, it means the thermistor temperature -cannot catch up with the target, so something *may be* wrong. Then, to be on the -safe side, the system will he halt. - -Bear in mind the count down will just start AFTER the first time the -thermistor temperature is over the target, so you will have no problem if -your extruder heater takes 2 minutes to hit the target on heating. - -*/ -// If you want to enable this feature for all your extruder heaters, -// uncomment the 2 defines below: +/** + * Thermal Runaway Protection protects your printer from damage and fire if a + * thermistor falls out or temperature sensors fail in any way. + * + * The issue: If a thermistor falls out or a temperature sensor fails, + * Marlin can no longer sense the actual temperature. Since a disconnected + * thermistor reads as a low temperature, the firmware will keep the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too long, + * the firmware will halt as a safety precaution. + * + * Note that because the countdown starts only AFTER the temperature reaches + * the target, this will not catch a thermistor that is already disconnected + * when the print starts! + * + * To enable for all extruder heaters, uncomment the two defines below: + */ // Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds #define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius -// If you want to enable this feature for your bed heater, -// uncomment the 2 defines below: +// To enable for the bed heater, uncomment the two defines below: // Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds +#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds #define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius //=========================================================================== @@ -371,7 +365,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic #define Z_MAX_POS 120 //=========================================================================== -//============================= Filament Runout Sensor ====================== +//========================= Filament Runout Sensor ========================== //=========================================================================== //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. @@ -381,7 +375,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic //#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. //=========================================================================== -//============================ Manual Bed Leveling ========================== +//=========================== Manual Bed Leveling =========================== //=========================================================================== // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling @@ -402,7 +396,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic #endif // MESH_BED_LEVELING //=========================================================================== -//============================= Bed Auto Leveling =========================== +//============================ Bed Auto Leveling ============================ //=========================================================================== //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) From d1148a0198b9af9947b83c987731bb1a70e51d7b Mon Sep 17 00:00:00 2001 From: brupje Date: Fri, 8 May 2015 14:36:23 +0200 Subject: [PATCH 036/126] Rename Configuration_megatronics.h to Configuration.h --- .../Megatronics/{Configuration_megatronics.h => Configuration.h} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Marlin/example_configurations/RepRapWorld/Megatronics/{Configuration_megatronics.h => Configuration.h} (100%) diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration_megatronics.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h similarity index 100% rename from Marlin/example_configurations/RepRapWorld/Megatronics/Configuration_megatronics.h rename to Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h From b425851441dc867a84a7191c292f89dc45347894 Mon Sep 17 00:00:00 2001 From: brupje Date: Fri, 8 May 2015 14:40:14 +0200 Subject: [PATCH 037/126] Rename Configuration_megatronics.h to Configuration.h --- .../Megatronics/{Configuration_megatronics.h => Configuration.h} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Marlin/example_configurations/RepRapWorld/Megatronics/{Configuration_megatronics.h => Configuration.h} (100%) diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration_megatronics.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h similarity index 100% rename from Marlin/example_configurations/RepRapWorld/Megatronics/Configuration_megatronics.h rename to Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h From 0cb87795a30919b96aa4f098ace7ef7f84d6e7f7 Mon Sep 17 00:00:00 2001 From: Wurstnase Date: Fri, 8 May 2015 22:28:51 +0200 Subject: [PATCH 038/126] advanced 'ok' ok N(linenumber) P(bufferremaining) the host can use this to send the data much faster. Some pseudo code: If (bufferremaining > 0) send command ## as long there is free buffer send command Also if (linenumber > lastsend - bufferremaining) send command ## as long last linenumber received is bigger than lastsend (host) - last bufferremaining received --- Marlin/Marlin_main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 2319fe87f..19bec369b 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -5533,8 +5533,9 @@ void ClearToSend() { SERIAL_PROTOCOLPGM(MSG_OK); #ifdef ADVANCED_OK SERIAL_PROTOCOLPGM(" N"); SERIAL_PROTOCOL(gcode_LastN); - SERIAL_PROTOCOLPGM(" S"); SERIAL_PROTOCOLLN(commands_in_queue); + SERIAL_PROTOCOLPGM(" P"); SERIAL_PROTOCOL(BUFSIZE - commands_in_queue); #endif + SERIAL_PROTOCOLLNPGM(""); } void get_coordinates() { From cb4ea75fab561d0f3091e127b72b1090b86e5988 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 8 May 2015 19:07:37 -0700 Subject: [PATCH 039/126] Support for MKS BASE 1.0 board --- Marlin/boards.h | 1 + Marlin/pins_MKS_BASE.h | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 Marlin/pins_MKS_BASE.h diff --git a/Marlin/boards.h b/Marlin/boards.h index 8a60f011d..d6f45d765 100644 --- a/Marlin/boards.h +++ b/Marlin/boards.h @@ -50,6 +50,7 @@ #define BOARD_ELEFU_3 21 // Elefu Ra Board (v3) #define BOARD_5DPRINT 88 // 5DPrint D8 Driver Board #define BOARD_LEAPFROG 999 // Leapfrog +#define BOARD_MKS_BASE 40 // MKS BASE 1.0 #define BOARD_WITBOX 41 // bq WITBOX #define BOARD_HEPHESTOS 42 // bq Prusa i3 Hephestos #define BOARD_BAM_DICE 401 // 2PrintBeta BAM&DICE with STK drivers diff --git a/Marlin/pins_MKS_BASE.h b/Marlin/pins_MKS_BASE.h new file mode 100644 index 000000000..5a5b8ea48 --- /dev/null +++ b/Marlin/pins_MKS_BASE.h @@ -0,0 +1,11 @@ +/** + * MKS BASE 1.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments + */ + +#include "pins_RAMPS_13.h" + +#undef FAN_PIN +#define FAN_PIN 9 // (Sprinter config) + +#undef HEATER_1_PIN +#define HEATER_1_PIN 7 From 44decda00b503521c362f0501a9a12829cb17ec3 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 8 May 2015 19:35:59 -0700 Subject: [PATCH 040/126] Add documentation for MKS BASE 1.0 et. al. --- Documentation/Hardware.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Documentation/Hardware.md b/Documentation/Hardware.md index 21620efde..806887e87 100644 --- a/Documentation/Hardware.md +++ b/Documentation/Hardware.md @@ -47,6 +47,7 @@ - [Elefu Ra](#21-board_elefu_3) - [5DPrint D8](#88-board_5dprint) - [Leapfrog](#999-board_leapfrog) +- [MKS BASE 1.0](#40-board_mks_base) - [bq Witbox](#41-board_witbox) - [bq Prusa i3 Hephestos](#42-board_hephestos) - [2PrintBeta BAM&DICE](#401-board_bam_dice) @@ -193,14 +194,17 @@ Elefu Ra Board (v3) #### 999 BOARD_LEAPFROG Leapfrog +#### 40 BOARD_MKS_BASE +The [MKS BASE 1.0](http://reprap.org/wiki/MKS_BASE_1.0) is a custom board with pin assignments nearly identical to RAMPS 1.4. + #### 41 BOARD_WITBOX -bq WITBOX +The [bq WITBOX](https://github.com/bq/witbox) is not a controller board, but an open source box cartesian RAMPS-based printer. The controller is a standard Mega2560 with RAMPS 1.4 configured for a single extruder. #### 42 BOARD_HEPHESTOS -bq Prusa i3 Hephestos +The [bq Prusa i3 Hephestos](https://github.com/bq/prusa-i3-hephestos) is not a controller board, but an open source variant of the popular Prusa i3 Mendel RepRap. The controller is a standard Mega2560 with RAMPS 1.4 configured for a single extruder. #### 401 BOARD_BAM_DICE -2PrintBeta BAM&DICE with STK drivers +[2PrintBeta BAM&DICE](http://www.2printbeta.de/) with STK drivers. The Beta Arduino Mega (BAM) shield is a crowd-funded open source RAMPS shield with 5 slots for plugin modules instead of the standard stepper driver sockets. The DICE-STK module a stepper driver module utilizing the STK682-010-E with up to 128X micro-stepping. (A4988 also available.) #### 402 BOARD_BAM_DICE_DUE -2PrintBeta BAM&DICE Due with STK drivers +[2PrintBeta BAM&DICE Due](http://www.2printbeta.de/) with STK drivers. This variant of the BAM&DICE is made for the Due instead of the Mega. From deedb00c18084c6d93d8eb4ea1354a3976f019c2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 8 May 2015 22:25:51 -0700 Subject: [PATCH 041/126] Document WATCH_TEMP_PERIOD --- Marlin/Configuration_adv.h | 4 +- .../configurator/config/Configuration_adv.h | 4 +- .../Felix/Configuration_adv.h | 4 +- .../Hephestos/Configuration_adv.h | 4 +- .../K8200/Configuration_adv.h | 4 +- .../SCARA/Configuration_adv.h | 4 +- .../WITBOX/Configuration_adv.h | 4 +- .../delta/biv2.5/Configuration_adv.h | 4 +- .../delta/generic/Configuration_adv.h | 4 +- .../delta/kossel_mini/Configuration_adv.h | 4 +- .../makibox/Configuration_adv.h | 4 +- .../tvrrug/Round2/Configuration_adv.h | 4 +- Marlin/temperature.cpp | 44 +++++++++++-------- 13 files changed, 50 insertions(+), 42 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index b79035ab6..dafb271b5 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -17,8 +17,8 @@ //// Heating sanity check: // This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature // If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature -// differ by at least 2x WATCH_TEMP_INCREASE +// It can be reset with another M104/M109. This check is also only triggered if the target temperature and +// the current temperature differ by at least 2x WATCH_TEMP_INCREASE //#define WATCH_TEMP_PERIOD 40000 //40 seconds //#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds diff --git a/Marlin/configurator/config/Configuration_adv.h b/Marlin/configurator/config/Configuration_adv.h index b79035ab6..dafb271b5 100644 --- a/Marlin/configurator/config/Configuration_adv.h +++ b/Marlin/configurator/config/Configuration_adv.h @@ -17,8 +17,8 @@ //// Heating sanity check: // This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature // If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature -// differ by at least 2x WATCH_TEMP_INCREASE +// It can be reset with another M104/M109. This check is also only triggered if the target temperature and +// the current temperature differ by at least 2x WATCH_TEMP_INCREASE //#define WATCH_TEMP_PERIOD 40000 //40 seconds //#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 672b3ff02..52cb51bfe 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -17,8 +17,8 @@ //// Heating sanity check: // This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature // If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature -// differ by at least 2x WATCH_TEMP_INCREASE +// It can be reset with another M104/M109. This check is also only triggered if the target temperature and +// the current temperature differ by at least 2x WATCH_TEMP_INCREASE //#define WATCH_TEMP_PERIOD 40000 //40 seconds //#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index 5713373d1..cb736f2cb 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -17,8 +17,8 @@ //// Heating sanity check: // This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature // If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature -// differ by at least 2x WATCH_TEMP_INCREASE +// It can be reset with another M104/M109. This check is also only triggered if the target temperature and +// the current temperature differ by at least 2x WATCH_TEMP_INCREASE //#define WATCH_TEMP_PERIOD 40000 //40 seconds //#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 672b3ff02..52cb51bfe 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -17,8 +17,8 @@ //// Heating sanity check: // This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature // If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature -// differ by at least 2x WATCH_TEMP_INCREASE +// It can be reset with another M104/M109. This check is also only triggered if the target temperature and +// the current temperature differ by at least 2x WATCH_TEMP_INCREASE //#define WATCH_TEMP_PERIOD 40000 //40 seconds //#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index a706696aa..4e90b004b 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -17,8 +17,8 @@ //// Heating sanity check: // This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature // If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature -// differ by at least 2x WATCH_TEMP_INCREASE +// It can be reset with another M104/M109. This check is also only triggered if the target temperature and +// the current temperature differ by at least 2x WATCH_TEMP_INCREASE //#define WATCH_TEMP_PERIOD 40000 //40 seconds //#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index 25abd17c2..f3778a715 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -17,8 +17,8 @@ //// Heating sanity check: // This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature // If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature -// differ by at least 2x WATCH_TEMP_INCREASE +// It can be reset with another M104/M109. This check is also only triggered if the target temperature and +// the current temperature differ by at least 2x WATCH_TEMP_INCREASE //#define WATCH_TEMP_PERIOD 40000 //40 seconds //#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h index d035073b8..7fb10e3c4 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h @@ -17,8 +17,8 @@ //// Heating sanity check: // This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature // If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature -// differ by at least 2x WATCH_TEMP_INCREASE +// It can be reset with another M104/M109. This check is also only triggered if the target temperature and +// the current temperature differ by at least 2x WATCH_TEMP_INCREASE #define WATCH_TEMP_PERIOD 40000 //40 seconds #define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index cdfa7c8f9..d90b0d5c0 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -17,8 +17,8 @@ //// Heating sanity check: // This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature // If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature -// differ by at least 2x WATCH_TEMP_INCREASE +// It can be reset with another M104/M109. This check is also only triggered if the target temperature and +// the current temperature differ by at least 2x WATCH_TEMP_INCREASE //#define WATCH_TEMP_PERIOD 40000 //40 seconds //#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 943022c81..e3b87902f 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -17,8 +17,8 @@ //// Heating sanity check: // This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature // If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature -// differ by at least 2x WATCH_TEMP_INCREASE +// It can be reset with another M104/M109. This check is also only triggered if the target temperature and +// the current temperature differ by at least 2x WATCH_TEMP_INCREASE //#define WATCH_TEMP_PERIOD 40000 //40 seconds //#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 8d451fd28..e762a09e7 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -17,8 +17,8 @@ //// Heating sanity check: // This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature // If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature -// differ by at least 2x WATCH_TEMP_INCREASE +// It can be reset with another M104/M109. This check is also only triggered if the target temperature and +// the current temperature differ by at least 2x WATCH_TEMP_INCREASE //#define WATCH_TEMP_PERIOD 40000 //40 seconds //#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 3187150ba..e13987b83 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -17,8 +17,8 @@ //// Heating sanity check: // This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature // If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature -// differ by at least 2x WATCH_TEMP_INCREASE +// It can be reset with another M104/M109. This check is also only triggered if the target temperature and +// the current temperature differ by at least 2x WATCH_TEMP_INCREASE //#define WATCH_TEMP_PERIOD 40000 //40 seconds //#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 7bf0b6e53..587b29b0c 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -172,8 +172,8 @@ static void updateTemperaturesFromRawValues(); #ifdef WATCH_TEMP_PERIOD int watch_start_temp[EXTRUDERS] = { 0 }; - millis_t watchmillis[EXTRUDERS] = { 0 }; -#endif //WATCH_TEMP_PERIOD + millis_t watch_heater_next_ms[EXTRUDERS] = { 0 }; +#endif #ifndef SOFT_PWM_SCALE #define SOFT_PWM_SCALE 0 @@ -447,14 +447,14 @@ void checkExtruderAutoFans() // // Temperature Error Handlers // -inline void _temp_error(int e, const char *msg1, const char *msg2) { +inline void _temp_error(int e, const char *serial_msg, const char *lcd_msg) { if (IsRunning()) { SERIAL_ERROR_START; if (e >= 0) SERIAL_ERRORLN((int)e); - serialprintPGM(msg1); + serialprintPGM(serial_msg); MYSERIAL.write('\n'); #ifdef ULTRA_LCD - lcd_setalertstatuspgm(msg2); + lcd_setalertstatuspgm(lcd_msg); #endif } #ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE @@ -602,7 +602,7 @@ void manage_heater() { float ct = current_temperature[0]; if (ct > min(HEATER_0_MAXTEMP, 1023)) max_temp_error(0); if (ct < max(HEATER_0_MINTEMP, 0.01)) min_temp_error(0); - #endif //HEATER_0_USES_MAX6675 + #endif #if defined(WATCH_TEMP_PERIOD) || !defined(PIDTEMPBED) || HAS_AUTO_FAN millis_t ms = millis(); @@ -620,26 +620,27 @@ void manage_heater() { // Check if temperature is within the correct range soft_pwm[e] = current_temperature[e] > minttemp[e] && current_temperature[e] < maxttemp[e] ? (int)pid_output >> 1 : 0; + // Check if the temperature is failing to increase #ifdef WATCH_TEMP_PERIOD - if (watchmillis[e] && ms > watchmillis[e] + WATCH_TEMP_PERIOD) { + // Is it time to check this extruder's heater? + if (watch_heater_next_ms[e] && ms > watch_heater_next_ms[e]) { + // Has it failed to increase enough? if (degHotend(e) < watch_start_temp[e] + WATCH_TEMP_INCREASE) { - setTargetHotend(0, e); - LCD_MESSAGEPGM(MSG_HEATING_FAILED_LCD); // translatable - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM(MSG_HEATING_FAILED); + // Stop! + _temp_error(e, MSG_HEATING_FAILED, MSG_HEATING_FAILED_LCD); } else { - watchmillis[e] = 0; + watch_heater_next_ms[e] = 0; } } - #endif //WATCH_TEMP_PERIOD + #endif // WATCH_TEMP_PERIOD #ifdef TEMP_SENSOR_1_AS_REDUNDANT if (fabs(current_temperature[0] - redundant_temperature) > MAX_REDUNDANT_TEMP_SENSOR_DIFF) { disable_all_heaters(); _temp_error(0, PSTR(MSG_EXTRUDER_SWITCHED_OFF), PSTR(MSG_ERR_REDUNDANT_TEMP)); } - #endif // TEMP_SENSOR_1_AS_REDUNDANT + #endif } // Extruders Loop @@ -996,16 +997,23 @@ void tp_init() { #endif //BED_MAXTEMP } +/** + * Start Heating Sanity Check for hotends that are below + * their target temperature by a configurable margin. + * This is called when the temperature is set. (M104, M109) + */ void setWatch() { #ifdef WATCH_TEMP_PERIOD - millis_t ms = millis(); + millis_t ms = millis() + WATCH_TEMP_PERIOD; for (int e = 0; e < EXTRUDERS; e++) { if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE * 2)) { watch_start_temp[e] = degHotend(e); - watchmillis[e] = ms; - } + watch_heater_next_ms[e] = ms; + } + else + watch_heater_next_ms[e] = 0; } - #endif + #endif } #if HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION From 54deb9eea366295100ab9c0c9105dbb841cc826e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 8 May 2015 22:36:02 -0700 Subject: [PATCH 042/126] Enable WATCH_TEMP_PERIOD by default --- Marlin/Configuration_adv.h | 4 +- Marlin/Marlin_main.cpp | 9 ++++- .../configurator/config/Configuration_adv.h | 4 +- .../Felix/Configuration_adv.h | 4 +- .../Hephestos/Configuration_adv.h | 4 +- .../K8200/Configuration_adv.h | 4 +- .../SCARA/Configuration_adv.h | 4 +- .../WITBOX/Configuration_adv.h | 4 +- .../delta/generic/Configuration_adv.h | 4 +- .../delta/kossel_mini/Configuration_adv.h | 4 +- .../makibox/Configuration_adv.h | 4 +- .../tvrrug/Round2/Configuration_adv.h | 4 +- Marlin/temperature.cpp | 39 ++++++++++--------- Marlin/temperature.h | 5 ++- Marlin/ultralcd.cpp | 4 +- 15 files changed, 56 insertions(+), 45 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index dafb271b5..b5e5ef5b1 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -//#define WATCH_TEMP_PERIOD 40000 //40 seconds -//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds +#define WATCH_TEMP_PERIOD 10000 // 10 seconds +#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 8b719bd49..4f4e18b58 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3166,7 +3166,10 @@ inline void gcode_M104() { if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0) setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset); #endif - setWatch(); + + #ifdef WATCH_TEMP_PERIOD + start_watching_heaters(); + #endif } } @@ -3278,7 +3281,9 @@ inline void gcode_M109() { if (code_seen('B')) autotemp_max = code_value(); #endif - setWatch(); + #ifdef WATCH_TEMP_PERIOD + start_watching_heaters(); + #endif millis_t temp_ms = millis(); diff --git a/Marlin/configurator/config/Configuration_adv.h b/Marlin/configurator/config/Configuration_adv.h index dafb271b5..b5e5ef5b1 100644 --- a/Marlin/configurator/config/Configuration_adv.h +++ b/Marlin/configurator/config/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -//#define WATCH_TEMP_PERIOD 40000 //40 seconds -//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds +#define WATCH_TEMP_PERIOD 10000 // 10 seconds +#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 52cb51bfe..ef80384b1 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -//#define WATCH_TEMP_PERIOD 40000 //40 seconds -//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds +#define WATCH_TEMP_PERIOD 10000 // 10 seconds +#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index cb736f2cb..14cb8b8b8 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -//#define WATCH_TEMP_PERIOD 40000 //40 seconds -//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds +#define WATCH_TEMP_PERIOD 10000 // 10 seconds +#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 52cb51bfe..ef80384b1 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -//#define WATCH_TEMP_PERIOD 40000 //40 seconds -//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds +#define WATCH_TEMP_PERIOD 10000 // 10 seconds +#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 4e90b004b..70c33413a 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -//#define WATCH_TEMP_PERIOD 40000 //40 seconds -//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds +#define WATCH_TEMP_PERIOD 10000 // 10 seconds +#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index f3778a715..652041bd1 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -//#define WATCH_TEMP_PERIOD 40000 //40 seconds -//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds +#define WATCH_TEMP_PERIOD 10000 // 10 seconds +#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index d90b0d5c0..f5fbb1b34 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -//#define WATCH_TEMP_PERIOD 40000 //40 seconds -//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds +#define WATCH_TEMP_PERIOD 10000 // 10 seconds +#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index e3b87902f..6d76091a4 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -//#define WATCH_TEMP_PERIOD 40000 //40 seconds -//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds +#define WATCH_TEMP_PERIOD 10000 // 10 seconds +#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index e762a09e7..f0662dc8b 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -//#define WATCH_TEMP_PERIOD 40000 //40 seconds -//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds +#define WATCH_TEMP_PERIOD 10000 // 10 seconds +#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index e13987b83..4a31b86c7 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -//#define WATCH_TEMP_PERIOD 40000 //40 seconds -//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds +#define WATCH_TEMP_PERIOD 10000 // 10 seconds +#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 587b29b0c..68a1d6942 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -171,7 +171,7 @@ static float analog2tempBed(int raw); static void updateTemperaturesFromRawValues(); #ifdef WATCH_TEMP_PERIOD - int watch_start_temp[EXTRUDERS] = { 0 }; + int watch_target_temp[EXTRUDERS] = { 0 }; millis_t watch_heater_next_ms[EXTRUDERS] = { 0 }; #endif @@ -625,11 +625,12 @@ void manage_heater() { // Is it time to check this extruder's heater? if (watch_heater_next_ms[e] && ms > watch_heater_next_ms[e]) { // Has it failed to increase enough? - if (degHotend(e) < watch_start_temp[e] + WATCH_TEMP_INCREASE) { + if (degHotend(e) < watch_target_temp[e]) { // Stop! _temp_error(e, MSG_HEATING_FAILED, MSG_HEATING_FAILED_LCD); } else { + // Only check once per M104/M109 watch_heater_next_ms[e] = 0; } } @@ -997,24 +998,24 @@ void tp_init() { #endif //BED_MAXTEMP } -/** - * Start Heating Sanity Check for hotends that are below - * their target temperature by a configurable margin. - * This is called when the temperature is set. (M104, M109) - */ -void setWatch() { - #ifdef WATCH_TEMP_PERIOD - millis_t ms = millis() + WATCH_TEMP_PERIOD; - for (int e = 0; e < EXTRUDERS; e++) { - if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE * 2)) { - watch_start_temp[e] = degHotend(e); - watch_heater_next_ms[e] = ms; +#ifdef WATCH_TEMP_PERIOD + /** + * Start Heating Sanity Check for hotends that are below + * their target temperature by a configurable margin. + * This is called when the temperature is set. (M104, M109) + */ + void start_watching_heaters() { + millis_t ms = millis() + WATCH_TEMP_PERIOD; + for (int e = 0; e < EXTRUDERS; e++) { + if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE * 2)) { + watch_target_temp[e] = degHotend(e) + WATCH_TEMP_INCREASE; + watch_heater_next_ms[e] = ms; + } + else + watch_heater_next_ms[e] = 0; } - else - watch_heater_next_ms[e] = 0; - } - #endif -} + } +#endif #if HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION diff --git a/Marlin/temperature.h b/Marlin/temperature.h index f9effaa9e..1616d0d11 100644 --- a/Marlin/temperature.h +++ b/Marlin/temperature.h @@ -130,7 +130,6 @@ HOTEND_ROUTINES(0); int getHeaterPower(int heater); void disable_all_heaters(); -void setWatch(); void updatePID(); void PID_autotune(float temp, int extruder, int ncycles); @@ -138,6 +137,10 @@ void PID_autotune(float temp, int extruder, int ncycles); void setExtruderAutoFanState(int pin, bool state); void checkExtruderAutoFans(); +#ifdef WATCH_TEMP_PERIOD + void start_watching_heaters(); +#endif + FORCE_INLINE void autotempShutdown() { #ifdef AUTOTEMP if (autotemp_enabled) { diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 15c20fff3..739e54c07 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -521,7 +521,9 @@ void _lcd_preheat(int endnum, const float temph, const float tempb, const int fa setTargetBed(tempb); fanSpeed = fan; lcd_return_to_status(); - setWatch(); // heater sanity check timer + #ifdef WATCH_TEMP_PERIOD + start_watching_heaters(); + #endif } void lcd_preheat_pla0() { _lcd_preheat(0, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); } void lcd_preheat_abs0() { _lcd_preheat(0, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed); } From 6110494a56588e8e65ed20fe85a12477315e7963 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 8 May 2015 22:41:12 -0700 Subject: [PATCH 043/126] =?UTF-8?q?Change=20default=20to=204=C2=B0C=20in?= =?UTF-8?q?=2016s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 4 ++-- Marlin/configurator/config/Configuration_adv.h | 4 ++-- Marlin/example_configurations/Felix/Configuration_adv.h | 4 ++-- Marlin/example_configurations/Hephestos/Configuration_adv.h | 4 ++-- Marlin/example_configurations/K8200/Configuration_adv.h | 4 ++-- Marlin/example_configurations/SCARA/Configuration_adv.h | 4 ++-- Marlin/example_configurations/WITBOX/Configuration_adv.h | 4 ++-- .../example_configurations/delta/biv2.5/Configuration_adv.h | 4 ++-- .../example_configurations/delta/generic/Configuration_adv.h | 4 ++-- .../delta/kossel_mini/Configuration_adv.h | 4 ++-- Marlin/example_configurations/makibox/Configuration_adv.h | 4 ++-- .../example_configurations/tvrrug/Round2/Configuration_adv.h | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index b5e5ef5b1..f2a4d0be2 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -#define WATCH_TEMP_PERIOD 10000 // 10 seconds -#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds +#define WATCH_TEMP_PERIOD 16000 // 16 seconds +#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/configurator/config/Configuration_adv.h b/Marlin/configurator/config/Configuration_adv.h index b5e5ef5b1..f2a4d0be2 100644 --- a/Marlin/configurator/config/Configuration_adv.h +++ b/Marlin/configurator/config/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -#define WATCH_TEMP_PERIOD 10000 // 10 seconds -#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds +#define WATCH_TEMP_PERIOD 16000 // 16 seconds +#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index ef80384b1..8d1b3ceaf 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -#define WATCH_TEMP_PERIOD 10000 // 10 seconds -#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds +#define WATCH_TEMP_PERIOD 16000 // 16 seconds +#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index 14cb8b8b8..71e953010 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -#define WATCH_TEMP_PERIOD 10000 // 10 seconds -#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds +#define WATCH_TEMP_PERIOD 16000 // 16 seconds +#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index ef80384b1..8d1b3ceaf 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -#define WATCH_TEMP_PERIOD 10000 // 10 seconds -#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds +#define WATCH_TEMP_PERIOD 16000 // 16 seconds +#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 70c33413a..380c4816b 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -#define WATCH_TEMP_PERIOD 10000 // 10 seconds -#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds +#define WATCH_TEMP_PERIOD 16000 // 16 seconds +#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index 652041bd1..d167e5c83 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -#define WATCH_TEMP_PERIOD 10000 // 10 seconds -#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds +#define WATCH_TEMP_PERIOD 16000 // 16 seconds +#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h index 7fb10e3c4..ff7cdecb7 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -#define WATCH_TEMP_PERIOD 40000 //40 seconds -#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds +#define WATCH_TEMP_PERIOD 16000 // 16 seconds +#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index f5fbb1b34..3566cb6ed 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -#define WATCH_TEMP_PERIOD 10000 // 10 seconds -#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds +#define WATCH_TEMP_PERIOD 16000 // 16 seconds +#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 6d76091a4..d1b0f8998 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -#define WATCH_TEMP_PERIOD 10000 // 10 seconds -#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds +#define WATCH_TEMP_PERIOD 16000 // 16 seconds +#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index f0662dc8b..99a61a1b5 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -#define WATCH_TEMP_PERIOD 10000 // 10 seconds -#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds +#define WATCH_TEMP_PERIOD 16000 // 16 seconds +#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 4a31b86c7..636b81d2d 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -19,8 +19,8 @@ // If the temperature has not increased at the end of that period, the target temperature is set to zero. // It can be reset with another M104/M109. This check is also only triggered if the target temperature and // the current temperature differ by at least 2x WATCH_TEMP_INCREASE -#define WATCH_TEMP_PERIOD 10000 // 10 seconds -#define WATCH_TEMP_INCREASE 2 // Heat up at least 2 degrees in 10 seconds +#define WATCH_TEMP_PERIOD 16000 // 16 seconds +#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. From 79106638a8296f8adc999a9981f34561159f7907 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 8 May 2015 22:50:08 -0700 Subject: [PATCH 044/126] Fix documentation of heating sanity check --- Marlin/Configuration_adv.h | 13 ++++++++----- Marlin/configurator/config/Configuration_adv.h | 13 ++++++++----- .../Felix/Configuration_adv.h | 13 ++++++++----- .../Hephestos/Configuration_adv.h | 13 ++++++++----- .../K8200/Configuration_adv.h | 13 ++++++++----- .../SCARA/Configuration_adv.h | 13 ++++++++----- .../WITBOX/Configuration_adv.h | 13 ++++++++----- .../delta/biv2.5/Configuration_adv.h | 13 ++++++++----- .../delta/generic/Configuration_adv.h | 13 ++++++++----- .../delta/kossel_mini/Configuration_adv.h | 13 ++++++++----- .../makibox/Configuration_adv.h | 13 ++++++++----- .../tvrrug/Round2/Configuration_adv.h | 13 ++++++++----- 12 files changed, 96 insertions(+), 60 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index f2a4d0be2..b40615524 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -14,11 +14,14 @@ #endif #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control -//// Heating sanity check: -// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature -// If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and -// the current temperature differ by at least 2x WATCH_TEMP_INCREASE +/** + * Heating Sanity Check + * + * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, + * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a + * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target + * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + */ #define WATCH_TEMP_PERIOD 16000 // 16 seconds #define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds diff --git a/Marlin/configurator/config/Configuration_adv.h b/Marlin/configurator/config/Configuration_adv.h index f2a4d0be2..b40615524 100644 --- a/Marlin/configurator/config/Configuration_adv.h +++ b/Marlin/configurator/config/Configuration_adv.h @@ -14,11 +14,14 @@ #endif #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control -//// Heating sanity check: -// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature -// If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and -// the current temperature differ by at least 2x WATCH_TEMP_INCREASE +/** + * Heating Sanity Check + * + * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, + * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a + * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target + * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + */ #define WATCH_TEMP_PERIOD 16000 // 16 seconds #define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 8d1b3ceaf..9384ed553 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -14,11 +14,14 @@ #endif #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control -//// Heating sanity check: -// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature -// If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and -// the current temperature differ by at least 2x WATCH_TEMP_INCREASE +/** + * Heating Sanity Check + * + * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, + * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a + * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target + * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + */ #define WATCH_TEMP_PERIOD 16000 // 16 seconds #define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index 71e953010..58159fe36 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -14,11 +14,14 @@ #endif #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control -//// Heating sanity check: -// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature -// If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and -// the current temperature differ by at least 2x WATCH_TEMP_INCREASE +/** + * Heating Sanity Check + * + * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, + * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a + * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target + * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + */ #define WATCH_TEMP_PERIOD 16000 // 16 seconds #define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 8d1b3ceaf..9384ed553 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -14,11 +14,14 @@ #endif #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control -//// Heating sanity check: -// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature -// If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and -// the current temperature differ by at least 2x WATCH_TEMP_INCREASE +/** + * Heating Sanity Check + * + * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, + * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a + * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target + * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + */ #define WATCH_TEMP_PERIOD 16000 // 16 seconds #define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 380c4816b..146e7fab1 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -14,11 +14,14 @@ #endif #define BED_CHECK_INTERVAL 3000 //ms between checks in bang-bang control -//// Heating sanity check: -// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature -// If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and -// the current temperature differ by at least 2x WATCH_TEMP_INCREASE +/** + * Heating Sanity Check + * + * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, + * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a + * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target + * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + */ #define WATCH_TEMP_PERIOD 16000 // 16 seconds #define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index d167e5c83..a4d8f65f9 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -14,11 +14,14 @@ #endif #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control -//// Heating sanity check: -// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature -// If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and -// the current temperature differ by at least 2x WATCH_TEMP_INCREASE +/** + * Heating Sanity Check + * + * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, + * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a + * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target + * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + */ #define WATCH_TEMP_PERIOD 16000 // 16 seconds #define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h index ff7cdecb7..0807c999b 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h @@ -14,11 +14,14 @@ #endif #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control -//// Heating sanity check: -// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature -// If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and -// the current temperature differ by at least 2x WATCH_TEMP_INCREASE +/** + * Heating Sanity Check + * + * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, + * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a + * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target + * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + */ #define WATCH_TEMP_PERIOD 16000 // 16 seconds #define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 3566cb6ed..9f1fda4a4 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -14,11 +14,14 @@ #endif #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control -//// Heating sanity check: -// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature -// If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and -// the current temperature differ by at least 2x WATCH_TEMP_INCREASE +/** + * Heating Sanity Check + * + * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, + * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a + * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target + * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + */ #define WATCH_TEMP_PERIOD 16000 // 16 seconds #define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index d1b0f8998..b36e8a0f3 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -14,11 +14,14 @@ #endif #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control -//// Heating sanity check: -// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature -// If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and -// the current temperature differ by at least 2x WATCH_TEMP_INCREASE +/** + * Heating Sanity Check + * + * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, + * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a + * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target + * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + */ #define WATCH_TEMP_PERIOD 16000 // 16 seconds #define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 99a61a1b5..411985f79 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -14,11 +14,14 @@ #endif #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control -//// Heating sanity check: -// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature -// If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and -// the current temperature differ by at least 2x WATCH_TEMP_INCREASE +/** + * Heating Sanity Check + * + * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, + * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a + * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target + * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + */ #define WATCH_TEMP_PERIOD 16000 // 16 seconds #define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 636b81d2d..572fdb6bf 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -14,11 +14,14 @@ #endif #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control -//// Heating sanity check: -// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature -// If the temperature has not increased at the end of that period, the target temperature is set to zero. -// It can be reset with another M104/M109. This check is also only triggered if the target temperature and -// the current temperature differ by at least 2x WATCH_TEMP_INCREASE +/** + * Heating Sanity Check + * + * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, + * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a + * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target + * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + */ #define WATCH_TEMP_PERIOD 16000 // 16 seconds #define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds From 28c87ec81b405c9eada07621912e673b6aaeeb95 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 8 May 2015 23:17:25 -0700 Subject: [PATCH 045/126] Disable all heaters on temp error --- Marlin/temperature.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 68a1d6942..94f0a8762 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -627,6 +627,7 @@ void manage_heater() { // Has it failed to increase enough? if (degHotend(e) < watch_target_temp[e]) { // Stop! + disable_all_heaters(); _temp_error(e, MSG_HEATING_FAILED, MSG_HEATING_FAILED_LCD); } else { From 86ed55e75c3cf7f5d6a5311edc503a8a1fe2e4a4 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 14:18:23 +0200 Subject: [PATCH 046/126] moved to http://www.marlinfirmware.org/ --- Documentation/Compilation.md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 Documentation/Compilation.md diff --git a/Documentation/Compilation.md b/Documentation/Compilation.md deleted file mode 100644 index 93c23a627..000000000 --- a/Documentation/Compilation.md +++ /dev/null @@ -1,16 +0,0 @@ -# Configuring and compilation - - 1. Install the latest non-beta arduino software IDE/toolset: http://www.arduino.cc/en/Main/Software - 2. Download the Marlin firmware - - [Latest developement version](https://github.com/MarlinFirmware/Marlin/tree/Development) - - [Stable version]() - 3. In both cases use the "Download Zip" button on the right. - 4. Some boards require special files and/or libraries from the ArduinoAddons directory. Take a look at the dedicated [README](/ArduinoAddons/README.md) for details. - 5. Start the arduino IDE. - 6. Select Tools -> Board -> Arduino Mega 2560 or your microcontroller - 7. Select the correct serial port in Tools ->Serial Port - 8. Open Marlin.pde or .ino - 9. Click the Verify/Compile button - 10. Click the Upload button. If all goes well the firmware is uploading - -That's ok. Enjoy Silky Smooth Printing. From d54fe3a40cb676ab6f2427724156bbc7d05b917d Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 14:19:07 +0200 Subject: [PATCH 047/126] moved to http://www.marlinfirmware.org/ --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b40193d2..8bf9bb41e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Marlin 3D Printer Firmware - * [Configuration & Compilation](/Documentation/Compilation.md) + * Supported * [Features](/Documentation/Features.md) * [Hardware](/Documentation/Hardware.md) From 6e8f8706b00ffcbcdd3a90218ecacc5eae9a914f Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 14:28:43 +0200 Subject: [PATCH 048/126] moved to http://www.marlinfirmware.org/ --- Documentation/Features.md | 112 -------------------------------------- 1 file changed, 112 deletions(-) delete mode 100644 Documentation/Features.md diff --git a/Documentation/Features.md b/Documentation/Features.md deleted file mode 100644 index b306741e8..000000000 --- a/Documentation/Features.md +++ /dev/null @@ -1,112 +0,0 @@ -# Features - -* Interrupt based movement with real linear acceleration -* High steprate -* Look ahead (Keep the speed high when possible. High cornering speed) -* Interrupt based temperature protection -* Preliminary support for [Matthew Roberts Advance Algorithm](http://reprap.org/pipermail/reprap-dev/2011-May/003323.html) -* Full endstop support -* SD Card support -* SD Card folders (works in pronterface) -* SD Card autostart support -* LCD support (ideally 20x4) -* LCD menu system for autonomous SD card printing, controlled by an click-encoder. -* EEPROM storage of e.g. max-velocity, max-acceleration, and similar variables -* many small but handy things originating from bkubicek's fork. -* Arc support -* Temperature oversampling -* Dynamic Temperature setpointing aka "AutoTemp" -* Support for [QTMarlin](https://github.com/bkubicek/QTMarlin), a very beta GUI for PID-tuning and velocity-acceleration testing. -* Endstop trigger reporting to the host software. -* Updated sdcardlib -* Heater power reporting. Useful for PID monitoring. -* PID tuning -* [CoreXY kinematics](www.corexy.com/theory.html) -* Delta kinematics -* SCARA kinematics -* Dual X-carriage support for multiple extruder systems -* Configurable serial port to support connection of wireless adaptors. -* Automatic operation of extruder/cold-end cooling fans based on nozzle temperature -* RC Servo Support, specify angle or duration for continuous rotation servos. -* Bed Auto Leveling. -* Support for a filament diameter sensor, which adjusts extrusion volume - -The default baudrate is 250000. This baudrate has less jitter and hence errors than the usual 115200 baud, but is less supported by drivers and host-environments. - -## Differences and additions to the already good Sprinter firmware - -### Look-ahead - -Marlin has look-ahead. While sprinter has to break and re-accelerate at each corner, -lookahead will only decelerate and accelerate to a velocity, -so that the change in vectorial velocity magnitude is less than the xy_jerk_velocity. -This is only possible, if some future moves are already processed, hence the name. -It leads to less over-deposition at corners, especially at flat angles. - -### Arc support - -Slic3r can find curves that, although broken into segments, were ment to describe an arc. -Marlin is able to print those arcs. The advantage is the firmware can choose the resolution, -and can perform the arc with nearly constant velocity, resulting in a nice finish. -Also, less serial communication is needed. - -### Temperature Oversampling - -To reduce noise and make the PID-differential term more useful, 16 ADC conversion results are averaged. - -### AutoTemp - -If your gcode contains a wide spread of extruder velocities, or you realtime change the building speed, the temperature should be changed accordingly. -Usually, higher speed requires higher temperature. -This can now be performed by the AutoTemp function -By calling M109 S B F you enter the autotemp mode. - -You can leave it by calling M109 without any F. -If active, the maximal extruder stepper rate of all buffered moves will be calculated, and named "maxerate" [steps/sec]. -The wanted temperature then will be set to t=tempmin+factor*maxerate, while being limited between tempmin and tempmax. -If the target temperature is set manually or by gcode to a value less then tempmin, it will be kept without change. -Ideally, your gcode can be completely free of temperature controls, apart from a M109 S T F in the start.gcode, and a M109 S0 in the end.gcode. - -### EEPROM - -If you know your PID values, the acceleration and max-velocities of your unique machine, you can set them, and finally store them in the EEPROM. -After each reboot, it will magically load them from EEPROM, independent what your Configuration.h says. - -### LCD Menu - -If your hardware supports it, you can build yourself a LCD-CardReader+Click+encoder combination. It will enable you to realtime tune temperatures, -accelerations, velocities, flow rates, select and print files from the SD card, preheat, disable the steppers, and do other fancy stuff. -One working hardware is documented here: http://www.thingiverse.com/thing:12663 -Also, with just a 20x4 or 16x2 display, useful data is shown. - -### SD card directories - -If you have an SD card reader attached to your controller, also folders work now. Listing the files in pronterface will show "/path/subpath/file.g". -You can write to file in a subfolder by specifying a similar text using small letters in the path. -Also, backup copies of various operating systems are hidden, as well as files not ending with ".g". - -### Autostart - -If you place a file auto[0-9].g into the root of the sd card, it will be automatically executed if you boot the printer. The same file will be executed by selecting "Autostart" from the menu. -First *0 will be performed, than *1 and so on. That way, you can heat up or even print automatically without user interaction. - -### Endstop trigger reporting - -If an endstop is hit while moving towards the endstop, the location at which the firmware thinks that the endstop was triggered is outputed on the serial port. -This is useful, because the user gets a warning message. -However, also tools like QTMarlin can use this for finding acceptable combinations of velocity+acceleration. - -### Coding paradigm - -Not relevant from a user side, but Marlin was split into thematic junks, and has tried to partially enforced private variables. -This is intended to make it clearer, what interacts which what, and leads to a higher level of modularization. -We think that this is a useful prestep for porting this firmware to e.g. an ARM platform in the future. -A lot of RAM (with enabled LCD ~2200 bytes) was saved by storing char []="some message" in Program memory. -In the serial communication, a #define based level of abstraction was enforced, so that it is clear that -some transfer is information (usually beginning with "echo:"), an error "error:", or just normal protocol, -necessary for backwards compatibility. - -### Interrupt based temperature measurements - -An interrupt is used to manage ADC conversions, and enforce checking for critical temperatures. -This leads to less blocking in the heater management routine. From 0de83187eaf2e99fb3a78ba0b63a7d036cc8724d Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 14:29:07 +0200 Subject: [PATCH 049/126] moved to http://www.marlinfirmware.org/ --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8bf9bb41e..348e185eb 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ * Supported - * [Features](/Documentation/Features.md) + * [Hardware](/Documentation/Hardware.md) * [GCodes](/Documentation/GCodes.md) * Notes From b9b9a2085a6ba89d549a61c4e0f118241893e0b8 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 14:39:46 +0200 Subject: [PATCH 050/126] moved to http://www.marlinfirmware.org/ --- Documentation/Hardware.md | 210 -------------------------------------- 1 file changed, 210 deletions(-) delete mode 100644 Documentation/Hardware.md diff --git a/Documentation/Hardware.md b/Documentation/Hardware.md deleted file mode 100644 index 806887e87..000000000 --- a/Documentation/Hardware.md +++ /dev/null @@ -1,210 +0,0 @@ -## Marlin Supported Hardware - -- [Gen 7 Custom](#10-board_gen7_custom) -- [Gen 7 <=1.2](#11-board_gen7_12) -- [Gen 7 v1.3](#12-board_gen7_13) -- [Gen 7 v1.4](#13-board_gen7_14) -- [Cheaptronic v1.0](#2-board_cheaptronic) -- [Sethi 3D_1](#20-board_sethi) -- [RAMPS <=1.2](#3-board_ramps_old) -- [RAMPS 1.3 Extruder-Fan-Bed](#33-board_ramps_13_efb) -- [RAMPS 1.3 Extruder-Extruder-Bed](#34-board_ramps_13_eeb) -- [RAMPS 1.3 Extruder-Fan-Fan](#35-board_ramps_13_eff) -- [RAMPS 1.3 Extruder-Extruder-Fan](#36-board_ramps_13_eef) -- [Felix 2](#37-board_felix2) -- [Duemilanove 328P](#4-board_duemilanove_328p) -- [Gen 6](#5-board_gen6) -- [Gen 6 Deluxe](#51-board_gen6_deluxe) -- [Sanguinololu <=1.1](#6-board_sanguinololu_11) -- [Sanguinololu 1.2](#62-board_sanguinololu_12) -- [Melzi](#63-board_melzi) -- [STB v1.1](#64-board_stb_11) -- [Azteeg X1](#65-board_azteeg_x1) -- [Melzi 1284](#66-board_melzi_1284) -- [Azteeg X3](#67-board_azteeg_x3) -- [Azteeg X3 Pro](#68-board_azteeg_x3_pro) -- [Ultimaker](#7-board_ultimaker) -- [Legacy Ultimaker](#71-board_ultimaker_old) -- [Ultimainboard 2.x](#72-board_ultimain_2) -- [3DRAG](#77-board_3drag) -- [Vellemann K8200](#78-board_k8200) -- [Teensylu](#8-board_teensylu) -- [Rumba](#80-board_rumba) -- [Printrboard](#81-board_printrboard) -- [Brainwave](#82-board_brainwave) -- [SAV Mk-I](#83-board_sav_mki) -- [Teensy++2.0](#84-board_teensy2) -- [Brainwave Pro](#85-board_brainwave_pro) -- [Gen3+](#9-board_gen3_plus) -- [Gen3 Monolithic](#22-board_gen3_monolithic) -- [Megatronics](#70-board_megatronics) -- [Megatronics 2.0](#701-board_megatronics_2) -- [Minitronics 1.0](#702-board_megatronics_1) -- [Megatronics 3.0](#703-board_megatronics_3) -- [OMCA Alpha](#90-board_omca_a) -- [OMCA Final](#91-board_omca) -- [RAMBo](#301-board_rambo) -- [Elefu Ra](#21-board_elefu_3) -- [5DPrint D8](#88-board_5dprint) -- [Leapfrog](#999-board_leapfrog) -- [MKS BASE 1.0](#40-board_mks_base) -- [bq Witbox](#41-board_witbox) -- [bq Prusa i3 Hephestos](#42-board_hephestos) -- [2PrintBeta BAM&DICE](#401-board_bam_dice) -- [2PrintBeta BAM&DICE DUE](#402-board_bam_dice_due) - -#### 10 BOARD_GEN7_CUSTOM -Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics" - -#### 11 BOARD_GEN7_12 -Gen7 v1.1, v1.2 - -#### 12 BOARD_GEN7_13 -Gen7 v1.3 - -#### 13 BOARD_GEN7_14 -Gen7 v1.4 - -#### 2 BOARD_CHEAPTRONIC -Cheaptronic v1.0 - -#### 20 BOARD_SETHI -Sethi 3D_1 - -#### 3 BOARD_RAMPS_OLD -MEGA/RAMPS up to 1.2 - -#### 33 BOARD_RAMPS_13_EFB -RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed) - -#### 34 BOARD_RAMPS_13_EEB -RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed) - -#### 35 BOARD_RAMPS_13_EFF -RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan) - -#### 36 BOARD_RAMPS_13_EEF -RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan) - -#### 37 BOARD_FELIX2 -Felix 2.0+ Electronics Board (RAMPS like) - -#### 4 BOARD_DUEMILANOVE_328P -Duemilanove w/ ATMega328P pin assignments - -#### 5 BOARD_GEN6 -Gen6 - -#### 51 BOARD_GEN6_DELUXE -Gen6 deluxe - -#### 6 BOARD_SANGUINOLOLU_11 -Sanguinololu < 1.2 - -#### 62 BOARD_SANGUINOLOLU_12 -Sanguinololu 1.2 and above - -#### 63 BOARD_MELZI -Melzi - -#### 64 BOARD_STB_11 -STB V1.1 - -#### 65 BOARD_AZTEEG_X1 -Azteeg X1 - -#### 66 BOARD_MELZI_1284 -Melzi with ATmega1284 (MaKr3d version) - -#### 67 BOARD_AZTEEG_X3 -Azteeg X3 - -#### 68 BOARD_AZTEEG_X3_PRO -Azteeg X3 Pro - -#### 7 BOARD_ULTIMAKER -Ultimaker - -#### 71 BOARD_ULTIMAKER_OLD -Ultimaker (Older electronics. Pre 1.5.4. This is rare) - -#### 72 BOARD_ULTIMAIN_2 -Ultimainboard 2.x (Uses TEMP_SENSOR 20) - -#### 77 BOARD_3DRAG -3Drag Controller - -#### 78 BOARD_K8200 -Vellemann K8200 Controller (derived from 3Drag Controller) - -#### 8 BOARD_TEENSYLU -Teensylu - -#### 80 BOARD_RUMBA -Rumba - -#### 81 BOARD_PRINTRBOARD -Printrboard (AT90USB1286) - -#### 82 BOARD_BRAINWAVE -Brainwave (AT90USB646) - -#### 83 BOARD_SAV_MKI -SAV Mk-I (AT90USB1286) - -#### 84 BOARD_TEENSY2 -Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make - -#### 85 BOARD_BRAINWAVE_PRO -Brainwave Pro (AT90USB1286) - -#### 9 BOARD_GEN3_PLUS -Gen3+ - -#### 22 BOARD_GEN3_MONOLITHIC -Gen3 Monolithic Electronics - -#### 70 BOARD_MEGATRONICS -Megatronics - -#### 701 BOARD_MEGATRONICS_2 -Megatronics v2.0 - -#### 702 BOARD_MEGATRONICS_1 -Minitronics v1.0 - -#### 703 BOARD_MEGATRONICS_3 -Megatronics v3.0 - -#### 90 BOARD_OMCA_A -Alpha OMCA board - -#### 91 BOARD_OMCA -Final OMCA board - -#### 301 BOARD_RAMBO -Rambo - -#### 21 BOARD_ELEFU_3 -Elefu Ra Board (v3) - -#### 88 BOARD_5DPRINT -5DPrint D8 Driver Board - -#### 999 BOARD_LEAPFROG -Leapfrog - -#### 40 BOARD_MKS_BASE -The [MKS BASE 1.0](http://reprap.org/wiki/MKS_BASE_1.0) is a custom board with pin assignments nearly identical to RAMPS 1.4. - -#### 41 BOARD_WITBOX -The [bq WITBOX](https://github.com/bq/witbox) is not a controller board, but an open source box cartesian RAMPS-based printer. The controller is a standard Mega2560 with RAMPS 1.4 configured for a single extruder. - -#### 42 BOARD_HEPHESTOS -The [bq Prusa i3 Hephestos](https://github.com/bq/prusa-i3-hephestos) is not a controller board, but an open source variant of the popular Prusa i3 Mendel RepRap. The controller is a standard Mega2560 with RAMPS 1.4 configured for a single extruder. - -#### 401 BOARD_BAM_DICE -[2PrintBeta BAM&DICE](http://www.2printbeta.de/) with STK drivers. The Beta Arduino Mega (BAM) shield is a crowd-funded open source RAMPS shield with 5 slots for plugin modules instead of the standard stepper driver sockets. The DICE-STK module a stepper driver module utilizing the STK682-010-E with up to 128X micro-stepping. (A4988 also available.) - -#### 402 BOARD_BAM_DICE_DUE -[2PrintBeta BAM&DICE Due](http://www.2printbeta.de/) with STK drivers. This variant of the BAM&DICE is made for the Due instead of the Mega. From d92b52b19bf216eb99e84b05a1ac428fd5fcec98 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 14:40:18 +0200 Subject: [PATCH 051/126] moved to http://www.marlinfirmware.org/ --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 348e185eb..2f50bae1a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ * Supported - * [Hardware](/Documentation/Hardware.md) + * [GCodes](/Documentation/GCodes.md) * Notes * [Auto Bed Leveling](/Documentation/BedLeveling.md) From b413cf34e985e6364cade01f1f200674716e2e65 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 14:55:22 +0200 Subject: [PATCH 052/126] moved to http://www.marlinfirmware.org/ --- Documentation/GCodes.md | 210 ---------------------------------------- 1 file changed, 210 deletions(-) delete mode 100644 Documentation/GCodes.md diff --git a/Documentation/GCodes.md b/Documentation/GCodes.md deleted file mode 100644 index d9e51d611..000000000 --- a/Documentation/GCodes.md +++ /dev/null @@ -1,210 +0,0 @@ -## Implemented G Codes - -- [Movement F and M Codes](#movement-g-and-m-codes) -- [SD Card M Codes](#sd-card-m-codes) -- [Hardware Control](#hardware-control) -- [Temperature M Codes](#temperature-m-codes) -- [Message M Codes](#message-m-codes) -- [Endstops M Codes](#endstops-m-codes) -- [Special Features M Codes](#special-features-m-codes) -- [Units and Measures G and M Codes](#units-and-measures-g-and-m-codes) -- [Firmware Retraction G and M Codes](#firmware-retraction-g-and-m-codes) -- [Z Probe G and M Codes](#z-probe-g-and-m-codes) -- [Filament Diameter M Codes](#filament-diameter-m-codes) -- [EEPROM Settings M Codes](#eeprom-settings-m-codes) -- [Delta M Codes](#delta-m-codes) -- [Stepper Driver M Codes](#stepper-driver-m-codes) -- [SCARA M Codes](#scara-m-codes) -- [GCode Comments](#comments) - -### Movement G and M Codes -``` -G0 -> G1 -G1 - Coordinated Movement X Y Z E -G2 - CW ARC -G3 - CCW ARC -G4 - Dwell S[seconds] or P[milliseconds] -G92 - Set the "current position" to coordinates: X Y Z E -M0 - Wait for user, with optional prompt message (requires LCD controller) - M0 Click When Ready ; show "Click When Ready" until the button is pressed. -M1 - Same as M0 -M400 - Finish all moves -M999 - Restart after being stopped by error -``` -### SD Card M Codes -``` -M20 - List SD card -M21 - Init SD card -M22 - Release SD card -M23 - Select SD file (M23 filename.g) -M24 - Start/resume SD print -M25 - Pause SD print -M26 - Set SD position in bytes (M26 S12345) -M27 - Report SD print status -M28 - Start SD write (M28 filename.g) -M29 - Stop SD write -M30 - Delete file from SD (M30 filename.g) -M31 - Output time since last M109 or SD card start to serial -M32 - Select file and start SD print (Can be used _while_ printing from SD card files): - syntax "M32 /path/filename#", or "M32 S !filename#" - Call gcode file : "M32 P !filename#" and return to caller file after finishing (similar to #include). - The '#' is necessary when calling from within sd files, as it stops buffer prereading -M540 - Enable/Disable "Stop SD Print on Endstop Hit" (req. ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) - M540 S<0|1> -M928 - Start SD logging (M928 filename.g) - ended by M29 -``` -### Hardware Control -``` -M42 - Change pin status via gcode: P S. If P is omitted the onboard LED pin will be used. - M42 P9 S1 ; set PIN 9 to 1. -M80 - Turn on Power Supply -M81 - Turn off Power Supply -M84 - Disable steppers until next move, - or use S to specify an inactivity timeout, after which the steppers will be disabled. S0 to disable the timeout. -M85 - Set inactivity shutdown timer with parameter S. Disable with "M85" or "M85 S0". -M112 - Emergency stop. Requires hardware reset!! -M226 - Wait for a pin to be in some state: P S -``` -### Temperature M Codes -``` -M104 - Set extruder target temp -M105 - Read current temp -M106 - Fan on -M107 - Fan off -M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating - Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling - IF AUTOTEMP is enabled, S B F. Exit autotemp by any M109 without F -M140 - Set bed target temp -M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating - Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling -M301 - Set PID parameters P I and D -M302 - Allow cold extrudes, or set the minimum extrude S. -M303 - PID relay autotune S sets the target temperature. (default target temperature = 150C) -M304 - Set bed PID parameters P I and D -``` -### Message M Codes -``` -M114 - Output current position to serial port -M115 - Capabilities string -M117 - Display message text on the LCD -M119 - Output Endstop status to serial port -``` -### Endstops M Codes -``` -M120 - Enable endstop detection -M121 - Disable endstop detection -``` -### Special Features M Codes -``` -M126 - Solenoid Air Valve Open (BariCUDA support by jmil) -M127 - Solenoid Air Valve Closed (BariCUDA vent to atmospheric pressure by jmil) -M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil) -M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil) -M150 - Set BlinkM Color: R U B via I2C. Range: 0-255 -M240 - Trigger a camera to take a photograph. (Add to your per-layer GCode.) -M250 - Set LCD contrast: C<0-63> -M280 - Set servo position absolute. P S -M300 - Play beep sound S P -M380 - Activate solenoid on active extruder -M381 - Disable all solenoids -M600 - Pause for filament change X Y Z E L -``` -### Units and Measures G and M Codes -``` -G90 - Use Absolute Coordinates -G91 - Use Relative Coordinates -M82 - Set E codes absolute (default) -M83 - Set E codes relative while in Absolute Coordinates (G90) mode -M92 - Set axis_steps_per_unit - same syntax as G92 -M200 - Set filament diameter and set E axis units to mm^3 (use S0 to set back to mm).: D -M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000) -M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!! -M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec -M204 - Set default acceleration: P for Printing moves, R for Retract only (no X, Y, Z) moves and T for Travel (non printing) moves (ex. M204 P800 T3000 R9000) in mm/sec^2 -M205 - Advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X=maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk -M206 - Set additional homing offset -M218 - Set hotend offset (in mm): T X Y -M220 - Set speed factor override percentage: S -M221 - Set extrude factor override percentage: S -``` -### Firmware Retraction G and M Codes -``` -G10 - Retract filament according to settings of M207 -G11 - Retract recover filament according to settings of M208 -M207 - Set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop], stays in mm regardless of M200 setting -M208 - Set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/s] -M209 - S<1=true/0=false> enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction -``` -### Z Probe G and M Codes -``` -G28 - Home all Axis -G29 - Detailed Z-Probe, probes the bed at 3 or more points. The printer must be homed with G28 before G29. -G30 - Single Z Probe, probes bed at current XY location. -G31 - Dock Z Probe sled (if enabled) -G32 - Undock Z Probe sled (if enabled) -M48 - Measure Z_Probe repeatability: P X Y V E=engage L - As with G29, the E flag causes the probe to stow after each probe. -M401 - Lower Z-probe (if present) -M402 - Raise Z-probe (if present) -``` -### Filament Diameter M Codes -``` -M404 - Set (or display) Nominal Filament Diameter in mm: [N] (e.g., 3mm or 1.75mm) -M405 - Turn on Filament Sensor extrusion control: [D] to set distance (in cm) from sensor to extruder -M406 - Turn off Filament Sensor extrusion control -M407 - Display measured Filament Diameter -``` -### EEPROM Settings M Codes -``` -M500 - Store parameters in EEPROM -M501 - Read parameters from EEPROM (if you need reset them after you changed them temporarily). -M502 - Revert to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -M503 - Print the current settings (from memory not from EEPROM). Use S0 to leave off headings. -``` -### Delta M Codes -``` -M665 - Set Delta configurations: L R S -M666 - Set Delta endstop adjustment: X Y Z -M605 - Set dual x-carriage movement mode: S [ X R ] -``` -### Stepper Driver M Codes -``` -M17 - Enable/Power all stepper motors -M18 - Disable all stepper motors. (same as M84) -M907 - Set digital trimpot motor current using axis codes. -M908 - Control digital trimpot directly. -M350 - Set microstepping mode. -M351 - Toggle MS1 MS2 pins directly. -``` -### SCARA M-Codes -__May change to suit future G-code standards__ -``` -M360 - SCARA calibration: Move to cal-position ThetaA (0 deg calibration) -M361 - SCARA calibration: Move to cal-position ThetaB (90 deg calibration - steps per degree) -M362 - SCARA calibration: Move to cal-position PsiA (0 deg calibration) -M363 - SCARA calibration: Move to cal-position PsiB (90 deg calibration - steps per degree) -M364 - SCARA calibration: Move to cal-position PSIC (90 deg to Theta calibration position) -M365 - SCARA calibration: Scaling factor, X, Y, Z axis -``` - -## Comments - -Comments start at a `;` (semicolon) and end with the end of the line: - - N3 T0*57 ; This is a comment - N4 G92 E0*67 - ; So is this - N5 G28*22 - -(example taken from the [RepRap wiki](http://reprap.org/wiki/Gcode#Comments)) - -If you need to use a literal `;` somewhere (for example within `M117`), you can escape semicolons with a `\` -(backslash): - - M117 Hello \;) - -`\` can also be used to escape `\` itself, if you need a literal `\` in front of a `;`: - - M117 backslash: \\;and a comment - -Please note that hosts should strip any comments before sending GCODE to the printer in order to save bandwidth. From 711f7b01804d7c4a87d5def95811e087d25dabfa Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 14:56:59 +0200 Subject: [PATCH 053/126] Update README.md --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2f50bae1a..0ab86f373 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@ # Marlin 3D Printer Firmware - - * Supported - - - * [GCodes](/Documentation/GCodes.md) + Documentation is moving to http://www.marlinfirmware.org + + If you cant find it here then look there, if you cant find it either place then raise a issue. If you know the documentation please contribute. + * Notes * [Auto Bed Leveling](/Documentation/BedLeveling.md) * [Filament Sensor](/Documentation/FilamentSensor.md) From 39d6de1558cec7a7553b464ae1cd3edb4d221578 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 14:59:48 +0200 Subject: [PATCH 054/126] Update README.md --- README.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 0ab86f373..bff484f61 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,14 @@ Documentation is moving to http://www.marlinfirmware.org If you cant find it here then look there, if you cant find it either place then raise a issue. If you know the documentation please contribute. + +## Current Status: Bug Fixing + +The Marlin development is currently revived. There's a long list of reported issues and pull requests, which we are working on currently. + +[![Coverity Scan Build Status](https://scan.coverity.com/projects/2224/badge.svg)](https://scan.coverity.com/projects/2224) +[![Travis Build Status](https://travis-ci.org/MarlinFirmware/Marlin.svg)](https://travis-ci.org/MarlinFirmware/Marlin) + * Notes * [Auto Bed Leveling](/Documentation/BedLeveling.md) @@ -14,18 +22,8 @@ ##### [RepRap.org Wiki Page](http://reprap.org/wiki/Marlin) -## Quick Information -This is a firmware for reprap single-processor electronics setups. -It also works on the Ultimaker PCB. It supports printing from SD card+Folders and look-ahead trajectory planning. -This firmware is a mashup between [Sprinter](https://github.com/kliment/Sprinter), [grbl](https://github.com/simen/grbl), and many original parts. -## Current Status: Bug Fixing - -The Marlin development is currently revived. There's a long list of reported issues and pull requests, which we are working on currently. - -[![Coverity Scan Build Status](https://scan.coverity.com/projects/2224/badge.svg)](https://scan.coverity.com/projects/2224) -[![Travis Build Status](https://travis-ci.org/MarlinFirmware/Marlin.svg)](https://travis-ci.org/MarlinFirmware/Marlin) ## Contact From 29f4ebf32a44c31a4f045b0ffc2e98d61ba5882b Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 18:16:28 +0200 Subject: [PATCH 055/126] moved to http://www.marlinfirmware.org/ --- Documentation/Contributing.md | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 Documentation/Contributing.md diff --git a/Documentation/Contributing.md b/Documentation/Contributing.md deleted file mode 100644 index 2caa96442..000000000 --- a/Documentation/Contributing.md +++ /dev/null @@ -1,10 +0,0 @@ -Developer Notes -=================== - -- There are now 2 branches: The __development__ branch is where new features and code changes will be sorted out. This branch may have untested code in it, so please let us know if you find any bugs. When the __development__ branch has reached a state where it is stable, it will be moved to the __stable__ branch. - -- We are doing a kind of cleanup in the list of Issues and Pull Requests, the aim is to get to a state where we can certify the code as stable. To get the code tested as widely as possible we require several volunteers with a wide variety of hardware configurations willing to test the firmware and help us to certify it as stable. If you want to help out testing go to this issue and let us know: https://github.com/MarlinFirmware/Marlin/issues/1209 - -- Before you submit any pull request, we ask that you _PLEASE_ test your code before submission, even if the change seems innocuous. When creating the pull request, please include the hardware you used for testing and a short synopsis of your testing procedure. Untested pull requests are less likely to be merged, as even slight changes create the risk of breaking the main branch. - -- If you have a fix don't open an issue telling about it, but test the code and submit a pull request. Use the __development__ branch when you submit. \ No newline at end of file From caf15371e25532e682a1b034c288cfef0c300952 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 18:24:31 +0200 Subject: [PATCH 056/126] moved to http://www.marlinfirmware.org/ --- Documentation/changelog.md | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 Documentation/changelog.md diff --git a/Documentation/changelog.md b/Documentation/changelog.md deleted file mode 100644 index 393b404df..000000000 --- a/Documentation/changelog.md +++ /dev/null @@ -1,30 +0,0 @@ -### Version 1.0.3 -* Reduced code size, maybe a lot depending on your configuration. -* Improved support for Delta, SCARA, and COREXY kinematics. -* Move parts of Configuration files to `Conditionals.h` and `SanityCheck.h`. -* Clean up of temperature code. -* Enhanced `G29` with improved grid bed leveling based on Roxy code. See documentation. -* Various bugs fixed from 1.0.2. -* EEPROM layout updated to `V17`. -* Added `M204` travel acceleration options. -* `M204` "`P`" parameter replaces "`S`." "`S`" retained for backward compatibility. -* Support for more RAMPS-based boards. -* Configurator utility under development. -* `M404` "`N`" parameter replaced with "`W`." ("`N`" is for line numbers only). -* Much cleanup of the code. -* Improved support for Cyrillic and accented languages. -* LCD controller knob acceleration. -* Improved compatibility with various sensors, MAX6675 thermocouple. -* Filament runout sensor support. -* Filament width measurement support. -* Support for TMC and L6470 stepper drivers. -* Better support of G-Code `;` comments, `\`, `N` line numbers, and `*` checksums. -* Moved GCode handling code into individual functions per-code. - -### Version 1.0.2 -* Progress bar for character-based LCD displays. - -### Version 1.0.1 - -### Version 1.0.0 -* Initial release From 2ddace1a84ceedf7343b673bf640594ebe1ae671 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 18:26:58 +0200 Subject: [PATCH 057/126] moved to http://www.marlinfirmware.org/ --- Documentation/FilamentSensor.md | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 Documentation/FilamentSensor.md diff --git a/Documentation/FilamentSensor.md b/Documentation/FilamentSensor.md deleted file mode 100644 index 46e4251c1..000000000 --- a/Documentation/FilamentSensor.md +++ /dev/null @@ -1,9 +0,0 @@ -Filament Sensor ---------------- -Supports the use of a real time filament diameter sensor that measures the diameter of the filament going into the extruder and then adjusts the extrusion rate to compensate for filament that does not match what is defined in the g-code. The diameter can also be displayed on the LCD screen. This potentially eliminates the need to measure filament diameter when changing spools of filament. Gcode becomes independent of the filament diameter. Can also compensate for changing diameter. - -For examples of these sensors, see: http://www.thingiverse.com/thing:454584, https://www.youmagine.com/designs/filament-diameter-sensor, http://diy3dprinting.blogspot.com/2014/01/diy-filament-diameter-sensor.html. Any sensor which produces a voltage equivalent to the diameter in mm (i.e. 1v = 1mm) can be used. This provides a very simple interface and may encourage more innovation in this area. - -4 new Mcodes are defined to set relevant parameters: M404, M405, M406, M407 - see above. - - Implements a delay buffer to handle the transit delay between where the filament is measured and when it gets to the extruder. \ No newline at end of file From b2b595f8f4c64b861aea9e24edc5102c2e830556 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 18:29:23 +0200 Subject: [PATCH 058/126] moved to http://www.marlinfirmware.org/ --- Documentation/BedLeveling.md | 105 ----------------------------------- 1 file changed, 105 deletions(-) delete mode 100644 Documentation/BedLeveling.md diff --git a/Documentation/BedLeveling.md b/Documentation/BedLeveling.md deleted file mode 100644 index 35a38bb3a..000000000 --- a/Documentation/BedLeveling.md +++ /dev/null @@ -1,105 +0,0 @@ -=============================================== -Instructions for configuring Bed Auto Leveling -=============================================== -There are two options for this feature. You may choose to use a servo mounted on the X carriage or you may use a sled that mounts on the X axis and can be docked when not in use. -See the section for each option below for specifics about installation and configuration. Also included are instructions that apply to both options. - -Instructions for Both Options ------------------------------ - -Uncomment the "ENABLE_AUTO_BED_LEVELING" define (commented by default) - -The following options define the probing positions. These are good starting values. -I recommend to keep a better clearance from borders in the first run and then make the probes as close as possible to borders: - -* \#define LEFT_PROBE_BED_POSITION 30 -* \#define RIGHT_PROBE_BED_POSITION 140 -* \#define BACK_PROBE_BED_POSITION 140 -* \#define FRONT_PROBE_BED_POSITION 30 - -A few more options: - -* \#define XY_TRAVEL_SPEED 6000 - -X and Y axis travel speed between probes, in mm/min. -Bear in mind that really fast moves may render step skipping. 6000 mm/min (100mm/s) is a good value. - -* \#define Z_RAISE_BEFORE_PROBING 10 -* \#define Z_RAISE_BETWEEN_PROBINGS 10 - -The Z axis is lifted when traveling to the first probe point by Z_RAISE_BEFORE_PROBING value -and then lifted when traveling from first to second and second to third point by Z_RAISE_BETWEEN_PROBINGS. -All values are in mm as usual. - -Servo Option Notes ------------------- -You will probably need a swivel Z-MIN endstop in the extruder. A rc servo do a great job. -Check the system working here: http://www.youtube.com/watch?v=3IKMeOYz-1Q (Enable English subtitles) -Teasing ;-) video: http://www.youtube.com/watch?v=x8eqSQNAyro - -In order to get the servo working, you need to enable: - -* \#define NUM_SERVOS 1 // Servo index starts with 0 for M280 command - -* \#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 - -* \#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 165,60} // X,Y,Z Axis Extend and Retract angles - -The first define tells firmware how many servos you have. -The second tells what axis this servo will be attached to. In the example above, we have a servo in Z axis. -The third one tells the angle in 2 situations: Probing (165º) and resting (60º). Check this with command M280 P0 S{angle} (example: M280 P0 S60 moves the servo to 60º) - -Next you need to define the Z endstop (probe) offset from hotend. -My preferred method: - -* a) Make a small mark in the bed with a marker/felt-tip pen. -* b) Place the hotend tip as *exactly* as possible on the mark, touching the bed. Raise the hotend 0.1mm (a regular paper thickness) and zero all axis (G92 X0 Y0 Z0); -* d) Raise the hotend 10mm (or more) for probe clearance, lower the Z probe (Z-Endstop) with M401 and place it just on that mark by moving X, Y and Z; -* e) Lower the Z in 0.1mm steps, with the probe always touching the mark (it may be necessary to adjust X and Y as well) until you hear the "click" meaning the mechanical endstop was trigged. You can confirm with M119; -* f) Now you have the probe in the same place as your hotend tip was before. Perform a M114 and write down the values, for example: X:24.3 Y:-31.4 Z:5.1; -* g) You can raise the z probe with M402 command; -* h) Fill the defines bellow multiplying the values by "-1" (just change the signal) - -* X and Y-Offset must be Integers! -* \#define X_PROBE_OFFSET_FROM_EXTRUDER -24 -* \#define Y_PROBE_OFFSET_FROM_EXTRUDER 31 -* \#define Z_PROBE_OFFSET_FROM_EXTRUDER -5.1 - -Sled Option Notes ------------------ -The sled option uses an electromagnet to attach and detach to/from the X carriage. See http://www.thingiverse.com/thing:396692 for more details on how to print and install this feature. It uses the same connections as the servo option. - -To use the sled option, you must define two additional things in Configuration.h: - -* \#define Z_PROBE_SLED -* \#define SLED_DOCKING_OFFSET 5 - -Uncomment the Z_PROBE_SLED to define to enable the sled (commented out by default). - -Uncomment the SLED_DOCKING_OFFSET to set the extra distance the X axis must travel to dock the sled. This value can be found by moving the X axis to its maximum position then measure the distance to the right X end and subtract the width of the sled (23mm if you printed the sled from Thingiverse). - -Next you need to define the Z endstop (probe) offset from hotend. -My preferred method: - -* a) Home the X and Y axes. -* b) Move the X axis to about the center of the print bed. Make a mark on the print bed. -* c) Move the Y axis to the maximum position. Make another mark. -* d) Home the X axis and use a straight edge to make a line between the two points. -* e) Repeat (b)-(d) reversing the X and Y. When you are done you will have two lines on the print bed. We will use these to measure the offset for the Z probe endstop. -* f) Move the nozzle so that it is positioned on the center point of the two lines. You can use fine movement of 0.1mm to get it as close as possible. Note the position of X and Y. -* g) Zero the Z axis with the G92 Z0 command. -* h) Raise the Z axis about 20mmm. -* i) Use the G32 command to retrieve the sled. -* j) Now more the X and Y axis to the position recorded in (f). -* k) Lower the Z axis in 0.1mm steps until you hear the "click" meaning the mechanical endstop was trigged. You can confirm with the M119 command. Note the position of the Z axis. -* l) Make a mark on the print bed where the endstop lever has touched the print bed. Raise the Z-axis about 30mm to give yourself some room. -* m) Now measure the distance from the center point to the endstop impact site along the X and Y axis using the lines drawn previously. -* n) Fill in the values below. If the endstop mark is in front of the line running left-to-right, use positive values. If it is behind, use negative values. For the Z axis use the value from (k) and subtract 0.1mm. - -For example, suppose you measured the endstop position and it was 20mm to the right of the line running front-to-back, 10mm toward the front of the line running left-to-right, and the value from (k) was 2.85. The values for the defines would be: - -* \#define X_PROBE_OFFSET_FROM_EXTRUDER 20 -* \#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -* \#define Z_PROBE_OFFSET_FROM_EXTRUDER 2.75 - -That's it.. enjoy never having to calibrate your Z endstop neither leveling your bed by hand anymore ;-) From 031294bdd2b71e5727b316bb4694685d10170740 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 18:31:44 +0200 Subject: [PATCH 059/126] moved to http://www.marlinfirmware.org/ --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index bff484f61..b51c55643 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,6 @@ The Marlin development is currently revived. There's a long list of reported iss * Notes - * [Auto Bed Leveling](/Documentation/BedLeveling.md) - * [Filament Sensor](/Documentation/FilamentSensor.md) * [Ramps Servo Power](/Documentation/RampsServoPower.md) * [LCD Language - Font - System](Documentation/LCDLanguageFont.md) * [Mesh Bed Leveling](/Documentation/MeshBedLeveling.md) From 7cd7b2e4c8bc5b59316129f40d4371cfb62c8d57 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 22:58:49 +0200 Subject: [PATCH 060/126] moved to http://www.marlinfirmware.org/ --- Documentation/MeshBedLeveling.md | 82 -------------------------------- 1 file changed, 82 deletions(-) delete mode 100644 Documentation/MeshBedLeveling.md diff --git a/Documentation/MeshBedLeveling.md b/Documentation/MeshBedLeveling.md deleted file mode 100644 index 09c1ec948..000000000 --- a/Documentation/MeshBedLeveling.md +++ /dev/null @@ -1,82 +0,0 @@ -============================================== -Instructions for configuring Mesh Bed Leveling -============================================== - -Background ----------- - -This mesh based method of leveling/compensating can compensate for an non-flat bed. There are various opinions about doing this. It was primarily written to compensate a RigidBot BIG bed (40x30cm) that was somewhat bent. - -Currently there is no automatic way to probe the bed like the Auto Bed Leveling feature. So, you can not enable `ENABLE_AUTO_BED_LEVELING` at the same time. This might soon be implemented though, stay tuned. - -Theory ------- - -The bed is manually probed in a grid maner. During a print the Z axis compensation will be interpolated within each square using a bi-linear method. Because the grid squares can be tilting in different directions a printing move can be split on the borders of the grid squares. During fast travel moves one can sometimes notice a de-acceleration on these borders. - -Mesh point probing can either be carried out from the display, or by issuing `G29` commands. - -The Z-endstop should be set slightly above the bed. An opto endstop is preferable but a switch with a metal arm that allow some travel though should also work. - -Configuration -------------- - -In `Configuration.h` there are two options that can be enabled. - -`MESH_BED_LEVELING` will enable mesh bed leveling.
-`MANUAL_BED_LEVELING` will add the menu option for bed leveling. - -There are also some values that can be set. - -The following will set the step distance used when manually turning the display encoder. Default is 0.025 - -`MBL_Z_STEP` - -Following four define the area to cover. Default 10mm from max bed size - -`MESH_MIN_X`
-`MESH_MAX_X`
-`MESH_MIN_Y`
-`MESH_MAX_Y` - -Following two define the number of points to probe, total number will be these two multiplied. Default is 3x3 points. Don't probe more than 7x7 points (software limited) - -`MESH_NUM_X_POINTS`
-`MESH_NUM_Y_POINTS`
- -The following will set the Z-endstop height during probing. When initiating a bed leveling probing, a homing will take place and the Z-endstop will be set to this height so lowering through the endstop can take place and the bed should be within this distance. Default is 4mm - -`MESH_HOME_SEARCH_Z` - -The probed points will also be saved in the EEPROM if it has been enables. Otherwise a new probe sequence needs to be made next time the printer has been turned on. - -Probing the bed with the display --------------------------------- - -If `MANUAL_BED_LEVELING` has been enabled then will a `Level bed` menu option be available in the `Prepare` menu. - -When selecting this option the printer will first do a homing, and then travel to the first probe point. There it will wait. By turning the encoder on the display the hotend can now be lowered until it touches the bed. Using a paper to feel the distance when it gets close. Pressing the encoder/button will store this point and then travel to the next point. Repeating this until all points have been probed. - -If the EEPROM has been enable it can be good to issue a `M500` to get these points saved. - -Issuing a `G29` will return the state of the mesh leveling and report the probed points. - -Probing the bed with G-codes ----------------------------- - -Probing the bed by G-codes follows the sequence much like doing it with the display. - -`G29` or `G29 S0` will return the state of the bed leveling and report the probed points. Where X=1 Y=1 is the top-left value and X=MESH_NUM_X_POINTS Y=MESH_NUM_Y_POINTS is bottom-right value. X per column and Y per row. - -`G29 S1` will initiate the bed leveling, homing and traveling to the first point to probe. - -Then use your preferred Printer controller program, i.e. Printrun, to lower the hotend until it touches the bed. Using a paper to feel the distance when it gets close. - -`G29 S2` will store the point and travel to the next point until last point has been probed. - -`G29 S3 Xn Yn Zn.nn` will modify a single probed point. This can be used to tweak a badly probed point. Specify probe point where `Xn` and `Yn`, where `n` in `Xn` is between 1 and `MESH_NUM_X_POINTS`. Likewise for `Yn`. `Zn.nn` is the new Z value in that probed point. - -Note ----- - -Depending how firm feel you aim for on the paper you can use the `Z offset` option in Slic3r to compensate a slight height diff. (I like the paper loose so I needed to put `-0.05` in Slic3r) \ No newline at end of file From 12d0983757d7986a2744136331415fbbb17758c0 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 23:11:18 +0200 Subject: [PATCH 061/126] moved to http://www.marlinfirmware.org/ --- Documentation/LCDLanguageFont.md | 146 ------------------------------- 1 file changed, 146 deletions(-) delete mode 100644 Documentation/LCDLanguageFont.md diff --git a/Documentation/LCDLanguageFont.md b/Documentation/LCDLanguageFont.md deleted file mode 100644 index ff9c1222e..000000000 --- a/Documentation/LCDLanguageFont.md +++ /dev/null @@ -1,146 +0,0 @@ -# LCD Language Font System - -We deal with a variety of different displays. -And we try to display a lot of different languages in different scripts on them. -This system is ought to solve some of the related problems. - -## The Displays -We have two different technologies for the displays: - -* Character based displays: - Have a fixed set of symbols (charset - font) in their ROM. - All of them have a similar but not identical symbol set at the positions 0 to 127 similar to US-ASCII. - On the other hand symbols at places higher than 127 have mayor differences. - Until now we know of (and support): - * 1.) HD44780 and similar with Kana charset A00 https://www.sparkfun.com/datasheets/LCD/HD44780.pdf Page 17 - These are very common, but sadly not very useful when writing in European languages. - * 2.) HD44780 and similar with Western charset A02 https://www.sparkfun.com/datasheets/LCD/HD44780.pdf Page 18 - These are rare, but fairly useful for European languages. Also a limited number of Cyrillic symbols is available. - * 3.) HD44780 and similar with Cyrillic charset http://store.comet.bg/download-file.php?id=466 Page 14 - Some of our Russian friends use them. - - At all of them you can define 8 different symbols by yourself. In Marlin they are used for the Feedrate-, Thermometer-, ... symbols - -* Full graphic displays: - Where we have the full freedom to display whatever we want, when we can make a program for it. - Currently we deal with 128x64 Pixel Displays and divide this area in about 5 Lines with about 22 columns. - Therefore we need fonts with a bounding box of about 6x10. - Until now we used a - * 1.) Marlin-font similar to ISO10646-1 but with special Symbols at the end, what made 'ü' and 'ä' inaccessible, in the size 6x10. - * 2.) Because these letters where to big for some locations on the info-screen we use a full ISO10646-1 font in the size of 6x9.(3200 byte) - * 3.) When we define USE_BIG_EDIT_FONT we use an additional ISO10646-1 font with 9x18, eating up another 3120 bytes of progmem - but readable without glasses. - -## The Languages - For the moment Marlin wants to support a lot of languages: - * en English - * pl Polish - * fr French - * de German - * es Spanish - * ru Russian - * it Italian - * pt Portuguese - * pt-br Portuguese (Brazil) - * fi Finnish - * an Aragonese - * nl Dutch - * ca Catalan - * eu Basque-Euskera - * cn Chinese - * jp Japanese (Katakana) - - -## The Problem - All of this languages, except the English, normally use extended symbol sets, not contained in US-ASCII. - Even the English translation uses some Symbols not in US-ASCII. ( '\002' for Thermometer, STR_h3 for '³') - And worse, in the code itself symbols are used, not taking in account, on what display they are written. [(This is true only for Displays with Japanese charset](https://github.com/MarlinFirmware/Marlin/blob/Development/Marlin/ultralcd_implementation_hitachi_HD44780.h#L218) on Western displays you'll see a '~' and on Cyrillic an 'arrow coming from top - pointing to left', what is quite the opposite of what the programmer wanted.) - The Germans want to use "ÄäÖöÜüß" the Finnish at least "äö". Other European languages want to see their accents on their letters. - For other scripts like Cyrillic, Japanese, Greek, Hebrew, ... you have to find totally different symbol sets. - - Until now the problems where ignored widely. - The German translation used utf8 'ä' and 'ö' and did not care about showing garbage on ALL displays. - The Russian translators new that their system only works on the Cyrillic character displays and relied on special LCD routines (LiquidCrystalRus.cpp) to handle UTF8 but missed to implement a proper strlen(). - The Japanese translator dealed with to scripts. He introduced a very special font for the full graphic displays and made use of the Japanese version of the character displays. Therefore he ended up with two pretty unreadable language.h files full of '\xxx' definitions. - Other languages ether tried to avoid wording with their special symbols or ignored the problem at all and used the basic symbols without the accents, dots, ... whatever. - -## The (partial) Solution - On a 'perfect' system like Windows or Linux we'd dig out unifont.ttf and some code from the libraries and they'd do what we want. But we are on a embedded system with very limited resources. So we had to find ways to limit the used space (Alone unifont.ttf is about 12MB) and have to make some compromise. - -### Aims: - * 1.) Make the input for translators as convenient as possible. (Unicode UTF8) - * 2.) Make the displays show the scripts as good as they can. (fonts, mapping tables) - * 3.) Don't destroy the existing language files. - * 3.) Don't loose to much speed - * 4.) Don't loose to much memory. - -### Actions: - * a.) Declare the display hardware we use. (Configuration.h) - * b.) Declare the language ore script we use. (Configuration.h) - * c.) Declare the kind of input we use. Ether direct pointers to the font (\xxx) or UTF8 and the font to use on graphic displays. (language_xx.h) - * d.) Declare the needed translations. (language_xx.h) - * e.) Make strlen() work with UTF8. (ultralcd.cpp) - * f.) Seperate the Marlin Symbols to their own font. (dogm_font_data_Marlin_symbols.h) - * g.) Make the fontswitch function remember the last used font. (dogm_lcd_implementation.h) - * h.) Make output functions that count the number of written chars and switch the font to Marlin symbols and back when needed. (dogm_lcd_implementation.h) (ultralcd_implementation_hitachi_HD44780.h) - * i.) Make three fonts to simulate the HD44780 charsets on dogm-displays. With this fonts the translator can check how his translation will look on the character based displays. - * j.) Make ISO fonts for Cyrillic and Katakana because they do not need a mapping table and are faster to deal with and have a better charset (less compromises) than the HD44780 fonts. - * k.) Make mapping functions and tables to convert from UTF8 to the fonts and integrate in the new output functions. (utf_mapper.h) - * l.) Delete the not needed any more 'LiquidCrystalRus.xxx' files and their calls in 'ultralcd_implementation_hitachi_HD44780.h'. - * m.) Split 'dogm_font_data_Marlin.h' into separate fonts and delete. (+dogm_font_data_6x9_marlin.h , +dogm_font_data_Marlin_symbols.h, -dogm_font_data_Marlin.h) - * n.) Do a bit of preprocessor magic to match displays - fonts and mappers in 'utf_mapper.h'. - -## Translators handbook - * a.) Check is there already is a language_xx.h file for your language (-> b.) or not (-> e.) - * b.) Ether their is declared MAPPER_NON (-> c.) or an other mapper (-> d.) - * c.) Symbols outside the normal ASCII-range (32-128) are written as "\xxx" and point directly into the font of the hardware you declared in 'Configuration.h' - This is one of the three fonts of the character based Hitachi displays (DISPLAY_CHARSET_HD44780_JAPAN, DISPLAY_CHARSET_HD44780_WEST, DISPLAY_CHARSET_HD44780_CYRILIC). - Even on the full graphic displays one of these will be used when SIMULATE_ROMFONT is defined. - If you don't make use of the extended character set your file will look like 'language_en.h' and your language file will work on all the displays. - If you make intensive use, your file will look like 'language_kana.h' and your language file will only work on one of displays. (in this case DISPLAY_CHARSET_HD44780_JAPAN) - Be careful with the characters 0x5c = '\', and 0x7b - 0x7f. "{|}"These are not the same on all variants. - MAPPER_NON is the fastest an least memory consuming variant. - If you want to make use of more than a view symbols outside standard ASCII or want to improve the portability to more different types of displays use UTF8 input. That means define an other mapper. - * d.) With a mapper different to MAPPER_NON UTF8 input is used. Instead of "\xe1" (on a display with Japanese font) or STR_ae simply use "ä". When the string is read byte by byte , the "ä" will expand to "\0xc3\0xa4" or "Я" will expand to "0xd0\0xaf" or "ホ" will expand to "\0xe3\0x83\0x9b" - To limit the used memory we can't use all the possibilities UTF8 gives at the same time. We define a subset matching to the language or script we use. - * MAPPER_C2C3 correspondents good with west European languages the possible symbols are listed at (http://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)) - * MAPPER_D0D1 correspondents well with the Cyrillic languages. See (http://en.wikipedia.org/wiki/Cyrillic_(Unicode_block)) - * MAPPER_E382E383 works with the Japanese Katakana script. See (http://en.wikipedia.org/wiki/Katakana_(Unicode_block)) - - The mapper functions will only catch the 'lead in' described in the mappers name. If the input they get does not match they'll put out a '?' or garbage. - The last byte in the sequence ether points directly into a matching ISO10646 font or via a mapper_table into one of the HD44780 fonts. - The mapper_tables do their best to find a similar symbol in the HD44780_fonts. For example replacing small letters with the matching capital letters. But they may fail to find something matching and will output a '?'. There are combinations of language and display what simply have no corresponding symbols - like Cyrillic on a Japanese display or visa versa - than the compiler will throw an error. - In short: Chose a Mapper working with the symbols you want to use. Use only symbols matching the mapper. On FULL graphic displays all will be fine, but check for daring replacements or question-marks in the output of character based displays by defining SIMULATE_ROMFONT and trying the different variants. - If you get a lot of question-marks on the Hitachi based displays with your new translation, maybe creating an additional language file with the format 'language_xx_utf8.h' is the way to go. - * MAPPER_NON is the fastest and least memory consuming variant. - * Mappers together with a ISO10646_font are the second best choice regarding speed and memory consumption. Only a few more decisions are mad per character. - * Mappers together with the HD44780_fonts use about additional 128 bytes for the mapping_table. - * e.) Creating a new language file is not a big thing. Just make a new file with the format 'language_xx.h' or maybe 'language.xx.utf8.h', define a mapper and a font in there and translate some of the strings defined in language_en.h. You can drop the surrounding #ifndef #endif. You don't have to translate all the stings - the missing one will be added by language_en.h - in English - of cause. - * f.) If you cant find a matching mapper things will be a bit more complex. With the Hitachi based displays you will not have big chance to make something useful unless you have one with a matching charset. For a full graphic display - lets explain with - let's say Greece. - Find a matching charset. (http://en.wikipedia.org/wiki/Greek_and_Coptic) - Provide a font containing the symbols in the right size. Normal ASCII in the lower 127 places, the upper with your selection. - Write a mapper catching, in this case, 0xcd to 0xcf and add it to 'utf_mapper.h'. - In case of a ISO10646 font we have a MAPPER_ONE_TO_ONE and don't have to make a table. - * g.) If you discover enough useful symbols in one of the HD44780 fonts you can provide a mapping table. For example HD44780_WEST contains 'alpha', 'beta', 'pi', 'Sigma', 'omega' 'My' - what is not enough to make USEFUL table - I think. - * h.) If you want to integrate an entirely new variant of a Hitachi based display. - Add it in 'Configuration.h'. Define mapper tables in 'utf_mapper.h'. Maybe you need a new mapper function. - - The length of the strings is limited. '17 chars' was crude rule of thumb. Obviously 17 is to long for the 16x2 displays. A more exact rule would be max_strlen = Displaywidth - 2 - strlen(value to display behind). This is a bit complicated. So try and count is my rule of thumb. - - On the 16x2 displays the strings are cut at the end to fit on the display. So it's a good idea to make them differ early. ('Somverylongoptionname x' -> 'x Somverylongoptionname') - - You'll find all translatable strings in 'language_en.h'. Please don't translate any strings from 'language.h', this may break the serial protocol. - - For information about fonts see: Marlin\fonts\README.fonts - - -## User Instructions - Define your hardware and the wanted language in 'Configuration.h'. - To find out what charset your hardware is, define language 'test' and compile. In the menu you will see two lines from the upper half of the charset. - * DISPLAY_CHARSET_HD44780_JAPAN locks like "バパヒビピフブプヘベペホボポマミ" - * DISPLAY_CHARSET_HD44780_WESTERN locks like "ÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß" - * DISPLAY_CHARSET_HD44780_CYRILIC locks like "РСТУФХЦЧШЩЪЫЬЭЮЯ" - - If you get an error about missing mappers during compilation - lie about your displays hardware font to see at lest some garbage, or select an other language. - - English works on all hardware. - From c0b318330bce1a02203c58e75734c9d08a103537 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 23:11:33 +0200 Subject: [PATCH 062/126] moved to http://www.marlinfirmware.org/ --- Documentation/LCD Menu Tree.pdf | Bin 94148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Documentation/LCD Menu Tree.pdf diff --git a/Documentation/LCD Menu Tree.pdf b/Documentation/LCD Menu Tree.pdf deleted file mode 100644 index 72b5911dd719830999dc6d9cfedb09ee1061b128..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 94148 zcmcG!bzEERnl4Offnue&yK5i>C|=y%T?2&T?zFf=ai_QyhoXhz?heJ>-R-3BJ9}o& z*)wzI`{N5F>yg{9CkyWDx2P3G#hKYyI8c$O>!2@GBsMZuGFxLyR3tt=fU3J47$9Qg zWMpM)4p1~Q2Ro7hq1(y;StA>BIp=I%2brW1)S-hZG$s)Tu#pqQ)<)FG2}~!-17u|bu>${mvT?JqGqSSM zLVuxRa<-=b4+%vFTT^Efumj!m3yd5L1jYo$0mc@_5&AZRae^s_A%hWvaf7acVXXd| z0by8S*kIWI5dt)_|F4Swoamq2|D`}sBpkrd0{snzGT719*}(+t2raa@t&P*43mX~d zpP~W8fn*>43_8yP2QqGU4i*rX9<;JhA5ia(WE_9FkZ`bdw)@9X`D+4D0jN3{**Mz$iPFR! zAff^g1-n2@z{(QBQ0uBj#*R>tzYopdnK+WM{&UiQ4F4l(afp=@*a0AJ1;tSmY+`E) z2FQYK%$+RA*g4ra|7bZnL7}!rMRH58%doZm-GJV+g3#wWHrULVb1F!`YWLZM);dfk zjnl>>N#DSV=%~Bw=fQC~pwa7oL^0?49HW3XkI-kl=7K&_^B}LFSV@g&1N9Z(m)q{M zi#X}WQ<1C9%?6CR`X-D^+lzxvgn4Jq?G*YHE&)Z)ND#$Nd zh)?c_E1)_{2j>uNOUs(X^6Zy{w^?=8B1?Tv#C6-kj)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JrhGcus)l1b9w>=LC38fae5wPJrhGcus-m z6nIX7=M;EOf#(!>PJ!nXcus-m6nIX7=M;EOf#(!>PJ!nXcus-m6nIX7=M;EOf#(!> zPJ!nXcus-m6nIX7=M;EOf#(!>PJ!nXcus-m6nIX7=M;EOf#(!>PJ!nXcus-m6nIX7 z=M;EOf#(!>PJ!nXcus-m6nIX7=M;EOf#(!>PJ!nXcus-m6nIX7=M;EOf#(!>PJ!nX zcus-m6nIX7=M;EOf#(!>PJ!nXcus-m6nIX7=M;EOf#(!>PJ!nXcus-m6nIX7=M;EO zf#(!>PJ!nXcus-m6nIX7=M;EOf#(!>PJ!nXcus-m6nIX7=M;F(0M8lVIRiXrfaeVG zoB^IQz;gz8&H&FD;5h?4XMpDn@SFjjGr)5Oc+LRN8Q?hsJZFIC4Dg%*o-@F626)Z@ z&l%u313YJd=M3MkJJ;mw(Q9 z(jSwl%uFEtzW?WTLjITE8U1$_9O%BvM;xfEC|x1`Yh9T9UoQrKTkdra4F0xSCgh7m z($z8p14~;gWyQZ&&^XG9{~yQ3UJxh_VSPQMuZ!gl!M@Ua(o^=`L5mm>U-Z{O{|BO{ B)VKfu From 1351e40c7287d2303aa4871960e1b9df713f4f0d Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 23:11:42 +0200 Subject: [PATCH 063/126] moved to http://www.marlinfirmware.org/ --- Documentation/Menu Plans.xlsx | Bin 34782 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Documentation/Menu Plans.xlsx diff --git a/Documentation/Menu Plans.xlsx b/Documentation/Menu Plans.xlsx deleted file mode 100644 index 8c7e2c17ba9cfcf4559c10c5272f3a1d3f1c8632..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 34782 zcmeFXWmjZN(=A%KyEX3aP`JChySqCyH16*1-ncuBySuwf(`e&x+56lhcRcU?1@BoO z)~H$|V`b)yIU}MfQc(sB9321&fCc~n!~mzlXsLV<0H6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SH37PEZ)7SAn$s z()vE1`2(6CS#_YLYwqg&ASm7C4fc%;gSED`v7sfa!iS$n{A%ASY{4bYHihC}9ZpQp4gFpAa{Fgx?{r^gBU>t8MeGXJM{ zyZ+?y=Yt*p@=!In*W|CqJpSbH=e5j#Ipo>ibNHWEHvi=E`*QnV9$;YN&i`r4uf_MD z)&E=`{mWp+^ Date: Sat, 9 May 2015 23:14:52 +0200 Subject: [PATCH 064/126] moved to http://www.marlinfirmware.org/ --- Documentation/RampsServoPower.md | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 Documentation/RampsServoPower.md diff --git a/Documentation/RampsServoPower.md b/Documentation/RampsServoPower.md deleted file mode 100644 index 2f715cfd7..000000000 --- a/Documentation/RampsServoPower.md +++ /dev/null @@ -1,9 +0,0 @@ - - -__Note for RAMPS users:__ ----------------------- - --By default, RAMPS have no power on servo bus (if you happen to have a multimeter, check the voltage on servo power pins). --In order to get the servo working, you need to supply 5V to 5V pin.. You can do it using your power supply (if it has a 5V output) or jumping the "Vcc" from Arduino to the 5V RAMPS rail. --These 2 pins are located just between the Reset Button and the yellow fuses... There are marks in the board showing 5V and VCC.. just connect them.. --If jumping the arduino Vcc do RAMPS 5V rail, take care to not use a power hungry servo, otherwise you will cause a blackout in the arduino board ;-) From 37219072c14415ad1f8f29e8e7c8b1c81e04caeb Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 23:15:52 +0200 Subject: [PATCH 065/126] moved to http://www.marlinfirmware.org/ --- README.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/README.md b/README.md index b51c55643..a04bf4907 100644 --- a/README.md +++ b/README.md @@ -12,17 +12,8 @@ The Marlin development is currently revived. There's a long list of reported iss [![Coverity Scan Build Status](https://scan.coverity.com/projects/2224/badge.svg)](https://scan.coverity.com/projects/2224) [![Travis Build Status](https://travis-ci.org/MarlinFirmware/Marlin.svg)](https://travis-ci.org/MarlinFirmware/Marlin) - - * Notes - * [Ramps Servo Power](/Documentation/RampsServoPower.md) - * [LCD Language - Font - System](Documentation/LCDLanguageFont.md) - * [Mesh Bed Leveling](/Documentation/MeshBedLeveling.md) - ##### [RepRap.org Wiki Page](http://reprap.org/wiki/Marlin) - - - ## Contact __Google Hangout:__ Hangout From 875d86bf9b31791c81893b860e6cfc7dbb50c598 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 23:16:56 +0200 Subject: [PATCH 066/126] removed donation as it was agreed that we should not have it --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index a04bf4907..891ae00b5 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,6 @@ The current Marlin dev team consists of: - Scott Lahteine [@thinkyhead] - -## Donation - -If you find our work usefull please consider donating. Donations will be used to pay for our website http://www.marlinfirmware.org/ and to pay some food or rent money for the very active Collaborators - More features have been added by: - Lampmaker, - Bradley Feldman, From b0235adccd3cbacfff982db595b6db2123328c78 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 23:18:39 +0200 Subject: [PATCH 067/126] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 891ae00b5..a0020049c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,7 @@ # Marlin 3D Printer Firmware - Documentation is moving to http://www.marlinfirmware.org - - If you cant find it here then look there, if you cant find it either place then raise a issue. If you know the documentation please contribute. + Documentation has moved to http://www.marlinfirmware.org ## Current Status: Bug Fixing From 4cafe9e2758e41ada26f1330e322918f100219e3 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 23:27:34 +0200 Subject: [PATCH 068/126] updated info on hangout --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a0020049c..a75c90994 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ The Marlin development is currently revived. There's a long list of reported iss ## Contact -__Google Hangout:__ Hangout +__Google Hangout:__ Hangout We have a hangout every 2 weeks. Search the issue list for "Hangout" and you will see what time and date the next event is going on. ## Credits From 598c7aea5dcf2883e69e353dfa0957d0273b6432 Mon Sep 17 00:00:00 2001 From: Bo Herrmannsen Date: Sat, 9 May 2015 23:27:54 +0200 Subject: [PATCH 069/126] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a75c90994..9791ceb92 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ The Marlin development is currently revived. There's a long list of reported iss ## Contact -__Google Hangout:__ Hangout We have a hangout every 2 weeks. Search the issue list for "Hangout" and you will see what time and date the next event is going on. +__Google Hangout:__ . Hangout We have a hangout every 2 weeks. Search the issue list for "Hangout" and you will see what time and date the next event is going on. ## Credits From f73f4ce5553b494c7a6298358b9c65f448e82016 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 9 May 2015 19:11:19 -0700 Subject: [PATCH 070/126] Make some z probe and servo code tweaks --- Marlin/Marlin_main.cpp | 20 ++++++++------------ Marlin/pins.h | 1 + Marlin/pins_OMCA.h | 25 +++++++++++++------------ 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 8b719bd49..d3b1a314d 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -4074,14 +4074,14 @@ inline void gcode_M226() { #if NUM_SERVOS > 0 /** - * M280: Set servo position absolute. P: servo index, S: angle or microseconds + * M280: Get or set servo position. P S */ inline void gcode_M280() { - int servo_index = code_seen('P') ? code_value() : -1; + int servo_index = code_seen('P') ? code_value_short() : -1; int servo_position = 0; if (code_seen('S')) { - servo_position = code_value(); - if ((servo_index >= 0) && (servo_index < NUM_SERVOS)) { + servo_position = code_value_short(); + if (servo_index >= 0 && servo_index < NUM_SERVOS) { Servo *srv = &servo[servo_index]; #if SERVO_LEVELING srv->attach(0); @@ -5650,10 +5650,6 @@ void clamp_to_software_endstops(float target[3]) { #ifdef MESH_BED_LEVELING - #if !defined(MIN) - #define MIN(_v1, _v2) (((_v1) < (_v2)) ? (_v1) : (_v2)) - #endif // ! MIN - // This function is used to split lines on mesh borders so each segment is only part of one mesh area void mesh_plan_buffer_line(float x, float y, float z, const float e, float feed_rate, const uint8_t &extruder, uint8_t x_splits=0xff, uint8_t y_splits=0xff) { @@ -5666,10 +5662,10 @@ void mesh_plan_buffer_line(float x, float y, float z, const float e, float feed_ int piy = mbl.select_y_index(current_position[Y_AXIS]); int ix = mbl.select_x_index(x); int iy = mbl.select_y_index(y); - pix = MIN(pix, MESH_NUM_X_POINTS-2); - piy = MIN(piy, MESH_NUM_Y_POINTS-2); - ix = MIN(ix, MESH_NUM_X_POINTS-2); - iy = MIN(iy, MESH_NUM_Y_POINTS-2); + pix = min(pix, MESH_NUM_X_POINTS - 2); + piy = min(piy, MESH_NUM_Y_POINTS - 2); + ix = min(ix, MESH_NUM_X_POINTS - 2); + iy = min(iy, MESH_NUM_Y_POINTS - 2); if (pix == ix && piy == iy) { // Start and end on same mesh square plan_buffer_line(x, y, z, e, feed_rate, extruder); diff --git a/Marlin/pins.h b/Marlin/pins.h index e45ba09df..0270253af 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -190,6 +190,7 @@ #endif #if defined(DISABLE_Z_PROBE_ENDSTOP) || !defined(Z_PROBE_ENDSTOP) // Allow code to compile regardless of Z_PROBE_ENDSTOP setting. + #undef Z_PROBE_PIN #define Z_PROBE_PIN -1 #endif diff --git a/Marlin/pins_OMCA.h b/Marlin/pins_OMCA.h index 26a797362..91efbd295 100644 --- a/Marlin/pins_OMCA.h +++ b/Marlin/pins_OMCA.h @@ -48,9 +48,9 @@ #define Z_ENABLE_PIN 10 #define Z_STOP_PIN 2 -#define E0_STEP_PIN 24 -#define E0_DIR_PIN 21 -#define E0_ENABLE_PIN 10 +#define E0_STEP_PIN 24 +#define E0_DIR_PIN 21 +#define E0_ENABLE_PIN 10 // future proofing #define __FS 20 @@ -58,15 +58,15 @@ #define __GS 18 #define __GD 13 -#define UNUSED_PWM 14 // PWM on LEFT connector +#define UNUSED_PWM 14 // PWM on LEFT connector -#define E1_STEP_PIN -1 // 21 -#define E1_DIR_PIN -1 // 20 -#define E1_ENABLE_PIN -1 // 19 +#define E1_STEP_PIN -1 // 21 +#define E1_DIR_PIN -1 // 20 +#define E1_ENABLE_PIN -1 // 19 -#define E2_STEP_PIN -1 // 21 -#define E2_DIR_PIN -1 // 20 -#define E2_ENABLE_PIN -1 // 18 +#define E2_STEP_PIN -1 // 21 +#define E2_DIR_PIN -1 // 20 +#define E2_ENABLE_PIN -1 // 18 #define SDPOWER -1 #define SDSS 11 @@ -87,5 +87,6 @@ #define HEATER_BED_PIN 4 #define TEMP_BED_PIN 2 // 1,2 or I2C -#define I2C_SCL 16 -#define I2C_SDA 17 +#define I2C_SCL 16 +#define I2C_SDA 17 + From e70e6e2b48762735c4305be7e7b40f958527c2c7 Mon Sep 17 00:00:00 2001 From: Laurent DELAGE Date: Sun, 10 May 2015 15:22:40 +0200 Subject: [PATCH 071/126] Correction traductions --- Marlin/language_fr.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Marlin/language_fr.h b/Marlin/language_fr.h index be526a723..9d001a577 100644 --- a/Marlin/language_fr.h +++ b/Marlin/language_fr.h @@ -39,16 +39,17 @@ #define MSG_EXTRUDE "Extrusion" #define MSG_RETRACT "Retraction" #define MSG_MOVE_AXIS "Deplacer un axe" -#define MSG_MOVE_X "Move X" -#define MSG_MOVE_Y "Move Y" -#define MSG_MOVE_Z "Move Z" +#define MSG_MOVE_X "Depl. X" +#define MSG_MOVE_Y "Depl. Y" +#define MSG_MOVE_Z "Depl. Z" #define MSG_MOVE_E "Extruder" -#define MSG_MOVE_01MM "Move 0.1mm" -#define MSG_MOVE_1MM "Move 1mm" -#define MSG_MOVE_10MM "Move 10mm" +#define MSG_MOVE_01MM "Depl. 0.1mm" +#define MSG_MOVE_1MM "Depl. 1mm" +#define MSG_MOVE_10MM "Depl. 10mm" #define MSG_SPEED " Vitesse" #define MSG_NOZZLE "Buse" #define MSG_BED "Plateau" +#define MSG_LEVEL_BED "Regl. Niv. Plateau" #define MSG_FAN_SPEED "Vite. ventilateur" #define MSG_FLOW "Flux" #define MSG_CONTROL "Controler" @@ -102,7 +103,7 @@ #define MSG_DWELL "Repos..." #define MSG_USERWAIT "Atten. de l'util." #define MSG_RESUMING "Repri. de l'impr." -#define MSG_PRINT_ABORTED "Print aborted" +#define MSG_PRINT_ABORTED "Impr. Annulee" #define MSG_NO_MOVE "Aucun mouvement." #define MSG_KILLED "MORT." #define MSG_STOPPED "STOPPE." From b55f32f8a1f2fc3fe55ca6b891da72dc848f7a5e Mon Sep 17 00:00:00 2001 From: Wurstnase Date: Sun, 10 May 2015 21:37:39 +0200 Subject: [PATCH 072/126] replace some bools this PR replaces some bools with one char. this will safe 3 bytes and should also be sometimes a little bit faster. --- Marlin/Marlin.h | 2 ++ Marlin/stepper.cpp | 22 ++++++++++------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 97978c45f..4703dbffa 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -195,6 +195,8 @@ void manage_inactivity(bool ignore_stepper_queue=false); */ enum AxisEnum {X_AXIS=0, Y_AXIS=1, A_AXIS=0, B_AXIS=1, Z_AXIS=2, E_AXIS=3, X_HEAD=4, Y_HEAD=5}; +enum EndstopEnum {X_MIN=0, Y_MIN=1, Z_MIN=2, Z_PROBE=3, X_MAX=4, Y_MAX=5, Z_MAX=6}; + void enable_all_steppers(); void disable_all_steppers(); diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 0c0706550..4bc2de84c 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -73,10 +73,7 @@ static unsigned short step_loops_nominal; volatile long endstops_trigsteps[3] = { 0 }; volatile long endstops_stepsTotal, endstops_stepsDone; -static volatile bool endstop_x_hit = false; -static volatile bool endstop_y_hit = false; -static volatile bool endstop_z_hit = false; -static volatile bool endstop_z_probe_hit = false; // Leaving this in even if Z_PROBE_ENDSTOP isn't defined, keeps code below cleaner. #ifdef it and usage below to save space. +static volatile char endstop_hit_bits = 0; // use X_MIN, Y_MIN, Z_MIN and Z_PROBE as BIT value #ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED bool abort_on_endstop_hit = false; @@ -264,27 +261,27 @@ volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1 }; #define DISABLE_STEPPER_DRIVER_INTERRUPT() TIMSK1 &= ~BIT(OCIE1A) void endstops_hit_on_purpose() { - endstop_x_hit = endstop_y_hit = endstop_z_hit = endstop_z_probe_hit = false; // #ifdef endstop_z_probe_hit = to save space if needed. + endstop_hit_bits = 0; } void checkHitEndstops() { - if (endstop_x_hit || endstop_y_hit || endstop_z_hit || endstop_z_probe_hit) { // #ifdef || endstop_z_probe_hit to save space if needed. + if (endstop_hit_bits) { // #ifdef || endstop_z_probe_hit to save space if needed. SERIAL_ECHO_START; SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT); - if (endstop_x_hit) { + if (endstop_hit_bits & BIT(X_MIN)) { SERIAL_ECHOPAIR(" X:", (float)endstops_trigsteps[X_AXIS] / axis_steps_per_unit[X_AXIS]); LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "X"); } - if (endstop_y_hit) { + if (endstop_hit_bits & BIT(Y_MIN)) { SERIAL_ECHOPAIR(" Y:", (float)endstops_trigsteps[Y_AXIS] / axis_steps_per_unit[Y_AXIS]); LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Y"); } - if (endstop_z_hit) { + if (endstop_hit_bits & BIT(Z_MIN)) { SERIAL_ECHOPAIR(" Z:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]); LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z"); } #ifdef Z_PROBE_ENDSTOP - if (endstop_z_probe_hit) { + if (endstop_hit_bits & BIT(Z_PROBE)) { SERIAL_ECHOPAIR(" Z_PROBE:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]); LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "ZP"); } @@ -468,13 +465,14 @@ ISR(TIMER1_COMPA_vect) { #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING #define _OLD_ENDSTOP(axis, minmax) old_## axis ##_## minmax ##_endstop #define _AXIS(AXIS) AXIS ##_AXIS - #define _ENDSTOP_HIT(axis) endstop_## axis ##_hit + #define _HIT_BIT(AXIS) AXIS ##_MIN + #define _ENDSTOP_HIT(AXIS) endstop_hit_bits |= BIT(_HIT_BIT(AXIS)) #define UPDATE_ENDSTOP(axis,AXIS,minmax,MINMAX) \ bool _ENDSTOP(axis, minmax) = (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)); \ if (_ENDSTOP(axis, minmax) && _OLD_ENDSTOP(axis, minmax) && (current_block->steps[_AXIS(AXIS)] > 0)) { \ endstops_trigsteps[_AXIS(AXIS)] = count_position[_AXIS(AXIS)]; \ - _ENDSTOP_HIT(axis) = true; \ + _ENDSTOP_HIT(AXIS); \ step_events_completed = current_block->step_event_count; \ } \ _OLD_ENDSTOP(axis, minmax) = _ENDSTOP(axis, minmax); From 9b3d4380d31e0824d85a36e71665ba2f90e34363 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 10 May 2015 20:26:45 -0700 Subject: [PATCH 073/126] Only watch the heater that was set --- Marlin/Marlin_main.cpp | 4 ++-- Marlin/temperature.cpp | 18 ++++++++---------- Marlin/temperature.h | 2 +- Marlin/ultralcd.cpp | 2 +- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 4f4e18b58..7b0a7b3d3 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3168,7 +3168,7 @@ inline void gcode_M104() { #endif #ifdef WATCH_TEMP_PERIOD - start_watching_heaters(); + start_watching_heater(target_extruder); #endif } } @@ -3282,7 +3282,7 @@ inline void gcode_M109() { #endif #ifdef WATCH_TEMP_PERIOD - start_watching_heaters(); + start_watching_heater(target_extruder); #endif millis_t temp_ms = millis(); diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 94f0a8762..e98ab0045 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -1005,16 +1005,14 @@ void tp_init() { * their target temperature by a configurable margin. * This is called when the temperature is set. (M104, M109) */ - void start_watching_heaters() { - millis_t ms = millis() + WATCH_TEMP_PERIOD; - for (int e = 0; e < EXTRUDERS; e++) { - if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE * 2)) { - watch_target_temp[e] = degHotend(e) + WATCH_TEMP_INCREASE; - watch_heater_next_ms[e] = ms; - } - else - watch_heater_next_ms[e] = 0; - } + void start_watching_heater(int e) { + millis_t ms = millis() + WATCH_TEMP_PERIOD; + if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE * 2)) { + watch_target_temp[e] = degHotend(e) + WATCH_TEMP_INCREASE; + watch_heater_next_ms[e] = ms; + } + else + watch_heater_next_ms[e] = 0; } #endif diff --git a/Marlin/temperature.h b/Marlin/temperature.h index 1616d0d11..6a08d09c0 100644 --- a/Marlin/temperature.h +++ b/Marlin/temperature.h @@ -138,7 +138,7 @@ void setExtruderAutoFanState(int pin, bool state); void checkExtruderAutoFans(); #ifdef WATCH_TEMP_PERIOD - void start_watching_heaters(); + void start_watching_heater(int e=0); #endif FORCE_INLINE void autotempShutdown() { diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 739e54c07..a1a24dbcd 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -522,7 +522,7 @@ void _lcd_preheat(int endnum, const float temph, const float tempb, const int fa fanSpeed = fan; lcd_return_to_status(); #ifdef WATCH_TEMP_PERIOD - start_watching_heaters(); + if (endnum >= 0) start_watching_heater(endnum); #endif } void lcd_preheat_pla0() { _lcd_preheat(0, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed); } From 2445ae3d3aed0e1dc6da1a4094c543bad1dbbf60 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 10 May 2015 22:52:01 -0700 Subject: [PATCH 074/126] Combine thermal runaway and watch-period - Make thermal protection for all hotends and/or bed into simple switches - Now enable `WATCH_TEMP_PERIOD` when `THERMAL_PROTECTION_HOTENDS` is enabled - Move detailed thermal parameters to `Configuration_adv.h` - Add sanity checks to warn about old configurations - Change `WATCH_TEMP_PERIOD` to seconds instead of milliseconds --- Marlin/Configuration.h | 18 +---- Marlin/Configuration_adv.h | 45 ++++++++----- Marlin/Marlin_main.cpp | 4 +- Marlin/SanityCheck.h | 12 ++++ Marlin/configurator/config/Configuration.h | 17 +---- .../configurator/config/Configuration_adv.h | 37 ++++++++--- .../Felix/Configuration.h | 17 +---- .../Felix/Configuration_DUAL.h | 17 +---- .../Felix/Configuration_adv.h | 37 ++++++++--- .../Hephestos/Configuration.h | 17 +---- .../Hephestos/Configuration_adv.h | 37 ++++++++--- .../K8200/Configuration.h | 17 +---- .../K8200/Configuration_adv.h | 37 ++++++++--- .../RepRapWorld/Megatronics/Configuration.h | 66 +++++++------------ .../SCARA/Configuration.h | 17 +---- .../SCARA/Configuration_adv.h | 37 ++++++++--- .../WITBOX/Configuration.h | 17 +---- .../WITBOX/Configuration_adv.h | 37 ++++++++--- .../delta/biv2.5/Configuration.h | 17 +---- .../delta/biv2.5/Configuration_adv.h | 37 ++++++++--- .../delta/generic/Configuration.h | 17 +---- .../delta/generic/Configuration_adv.h | 37 ++++++++--- .../delta/kossel_mini/Configuration.h | 17 +---- .../delta/kossel_mini/Configuration_adv.h | 37 ++++++++--- .../makibox/Configuration.h | 17 +---- .../makibox/Configuration_adv.h | 37 ++++++++--- .../tvrrug/Round2/Configuration.h | 17 +---- .../tvrrug/Round2/Configuration_adv.h | 37 ++++++++--- Marlin/temperature.cpp | 32 +++++---- Marlin/temperature.h | 2 +- 30 files changed, 428 insertions(+), 362 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 6f2333de8..823fadc14 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -284,24 +284,10 @@ Here are some standard links for getting your machine calibrated: * The solution: Once the temperature reaches the target, start observing. * If the temperature stays too far below the target (hysteresis) for too long, * the firmware will halt as a safety precaution. - * - * Note that because the countdown starts only AFTER the temperature reaches - * the target, this will not catch a thermistor that is already disconnected - * when the print starts! - * - * To enable for all extruder heaters, uncomment the two defines below: */ -// Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius - -// To enable for the bed heater, uncomment the two defines below: - -// Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius - +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index b40615524..89d8e2716 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -15,15 +15,26 @@ #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control /** - * Heating Sanity Check - * - * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, - * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a - * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target - * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + * Thermal Protection parameters */ -#define WATCH_TEMP_PERIOD 16000 // 16 seconds -#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds +#ifdef THERMAL_PROTECTION_HOTENDS + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + + /** + * Whenever an M104 or M109 increases the target temperature the firmware will wait for the + * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE + * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, + * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + */ + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius +#endif + +#ifdef THERMAL_PROTECTION_BED + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius +#endif #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. @@ -34,14 +45,16 @@ #endif #endif - -//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode. -//The maximum buffered steps/sec of the extruder motor are called "se". -//You enter the autotemp mode by a M109 S B F -// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp -// you exit the value by any M109 without F* -// Also, if the temperature is set to a value B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by excuting M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ #define AUTOTEMP #ifdef AUTOTEMP #define AUTOTEMP_OLDWEIGHT 0.98 diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index ed57d2b9c..5427e107d 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3167,7 +3167,7 @@ inline void gcode_M104() { setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset); #endif - #ifdef WATCH_TEMP_PERIOD + #ifdef THERMAL_PROTECTION_HOTENDS start_watching_heater(target_extruder); #endif } @@ -3281,7 +3281,7 @@ inline void gcode_M109() { if (code_seen('B')) autotemp_max = code_value(); #endif - #ifdef WATCH_TEMP_PERIOD + #ifdef THERMAL_PROTECTION_HOTENDS start_watching_heater(target_extruder); #endif diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 3bba4584c..a0e2138e3 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -313,4 +313,16 @@ #error [XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM #endif + #if WATCH_TEMP_PERIOD > 500 + #error WATCH_TEMP_PERIOD now uses seconds instead of milliseconds + #endif + + #if !defined(THERMAL_PROTECTION_HOTENDS) && (defined(WATCH_TEMP_PERIOD) || defined(THERMAL_PROTECTION_PERIOD)) + #error Thermal Runaway Protection for hotends must now be enabled with THERMAL_PROTECTION_HOTENDS + #endif + + #if !defined(THERMAL_PROTECTION_BED) && defined(THERMAL_PROTECTION_BED_PERIOD) + #error Thermal Runaway Protection for the bed must now be enabled with THERMAL_PROTECTION_BED + #error + #endif //SANITYCHECK_H diff --git a/Marlin/configurator/config/Configuration.h b/Marlin/configurator/config/Configuration.h index 35820a4eb..a807a56e9 100644 --- a/Marlin/configurator/config/Configuration.h +++ b/Marlin/configurator/config/Configuration.h @@ -284,23 +284,10 @@ Here are some standard links for getting your machine calibrated: * The solution: Once the temperature reaches the target, start observing. * If the temperature stays too far below the target (hysteresis) for too long, * the firmware will halt as a safety precaution. - * - * Note that because the countdown starts only AFTER the temperature reaches - * the target, this will not catch a thermistor that is already disconnected - * when the print starts! - * - * To enable for all extruder heaters, uncomment the two defines below: */ -// Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius - -// To enable for the bed heater, uncomment the two defines below: - -// Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/configurator/config/Configuration_adv.h b/Marlin/configurator/config/Configuration_adv.h index b40615524..c484db4ed 100644 --- a/Marlin/configurator/config/Configuration_adv.h +++ b/Marlin/configurator/config/Configuration_adv.h @@ -15,16 +15,37 @@ #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control /** - * Heating Sanity Check - * - * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, - * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a - * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target - * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + * Thermal Protection parameters */ -#define WATCH_TEMP_PERIOD 16000 // 16 seconds -#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds +#ifdef THERMAL_PROTECTION_HOTENDS + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + /** + * Whenever an M104 or M109 increases the target temperature the firmware will wait for the + * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE + * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, + * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + */ + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius +#endif + +#ifdef THERMAL_PROTECTION_BED + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by excuting M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. // if Kc is chosen well, the additional required power due to increased melting should be compensated. diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 294407367..078af2a0d 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -250,23 +250,10 @@ Here are some standard links for getting your machine calibrated: * The solution: Once the temperature reaches the target, start observing. * If the temperature stays too far below the target (hysteresis) for too long, * the firmware will halt as a safety precaution. - * - * Note that because the countdown starts only AFTER the temperature reaches - * the target, this will not catch a thermistor that is already disconnected - * when the print starts! - * - * To enable for all extruder heaters, uncomment the two defines below: */ -// Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius - -// To enable for the bed heater, uncomment the two defines below: - -// Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h index 6c5c50f22..27c2d0c22 100644 --- a/Marlin/example_configurations/Felix/Configuration_DUAL.h +++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h @@ -250,23 +250,10 @@ Here are some standard links for getting your machine calibrated: * The solution: Once the temperature reaches the target, start observing. * If the temperature stays too far below the target (hysteresis) for too long, * the firmware will halt as a safety precaution. - * - * Note that because the countdown starts only AFTER the temperature reaches - * the target, this will not catch a thermistor that is already disconnected - * when the print starts! - * - * To enable for all extruder heaters, uncomment the two defines below: */ -// Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius - -// To enable for the bed heater, uncomment the two defines below: - -// Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 9384ed553..6bfe76c2c 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -15,16 +15,37 @@ #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control /** - * Heating Sanity Check - * - * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, - * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a - * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target - * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + * Thermal Protection parameters */ -#define WATCH_TEMP_PERIOD 16000 // 16 seconds -#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds +#ifdef THERMAL_PROTECTION_HOTENDS + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + /** + * Whenever an M104 or M109 increases the target temperature the firmware will wait for the + * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE + * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, + * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + */ + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius +#endif + +#ifdef THERMAL_PROTECTION_BED + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by excuting M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. // if Kc is chosen well, the additional required power due to increased melting should be compensated. diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 595a63a5b..c5184ac6e 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -271,23 +271,10 @@ Here are some standard links for getting your machine calibrated: * The solution: Once the temperature reaches the target, start observing. * If the temperature stays too far below the target (hysteresis) for too long, * the firmware will halt as a safety precaution. - * - * Note that because the countdown starts only AFTER the temperature reaches - * the target, this will not catch a thermistor that is already disconnected - * when the print starts! - * - * To enable for all extruder heaters, uncomment the two defines below: */ -// Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius - -// To enable for the bed heater, uncomment the two defines below: - -// Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index 58159fe36..344f71e10 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -15,16 +15,37 @@ #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control /** - * Heating Sanity Check - * - * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, - * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a - * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target - * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + * Thermal Protection parameters */ -#define WATCH_TEMP_PERIOD 16000 // 16 seconds -#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds +#ifdef THERMAL_PROTECTION_HOTENDS + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + /** + * Whenever an M104 or M109 increases the target temperature the firmware will wait for the + * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE + * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, + * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + */ + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius +#endif + +#ifdef THERMAL_PROTECTION_BED + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by excuting M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. // if Kc is chosen well, the additional required power due to increased melting should be compensated. diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index f39775c6b..f4fccc82a 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -300,23 +300,10 @@ Here are some standard links for getting your machine calibrated: * The solution: Once the temperature reaches the target, start observing. * If the temperature stays too far below the target (hysteresis) for too long, * the firmware will halt as a safety precaution. - * - * Note that because the countdown starts only AFTER the temperature reaches - * the target, this will not catch a thermistor that is already disconnected - * when the print starts! - * - * To enable for all extruder heaters, uncomment the two defines below: */ -// Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius - -// To enable for the bed heater, uncomment the two defines below: - -// Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 9384ed553..6bfe76c2c 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -15,16 +15,37 @@ #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control /** - * Heating Sanity Check - * - * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, - * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a - * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target - * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + * Thermal Protection parameters */ -#define WATCH_TEMP_PERIOD 16000 // 16 seconds -#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds +#ifdef THERMAL_PROTECTION_HOTENDS + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + /** + * Whenever an M104 or M109 increases the target temperature the firmware will wait for the + * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE + * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, + * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + */ + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius +#endif + +#ifdef THERMAL_PROTECTION_BED + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by excuting M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. // if Kc is chosen well, the additional required power due to increased melting should be compensated. diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index c62845989..e922f472a 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -200,8 +200,7 @@ Here are some standard links for getting your machine calibrated: // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term #define K1 0.95 //smoothing factor within the PID - #define PID_dT ((16.0 * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine - + // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it // Ultimaker #define DEFAULT_Kp 22.2 @@ -271,44 +270,24 @@ Here are some standard links for getting your machine calibrated: #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. //=========================================================================== -//============================= Thermal Runaway Protection ================== +//======================== Thermal Runaway Protection ======================= //=========================================================================== -/* -This is a feature to protect your printer from burn up in flames if it has -a thermistor coming off place (this happened to a friend of mine recently and -motivated me writing this feature). -The issue: If a thermistor come off, it will read a lower temperature than actual. -The system will turn the heater on forever, burning up the filament and anything -else around. - -After the temperature reaches the target for the first time, this feature will -start measuring for how long the current temperature stays below the target -minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS). - -If it stays longer than _PERIOD, it means the thermistor temperature -cannot catch up with the target, so something *may be* wrong. Then, to be on the -safe side, the system will he halt. - -Bear in mind the count down will just start AFTER the first time the -thermistor temperature is over the target, so you will have no problem if -your extruder heater takes 2 minutes to hit the target on heating. - -*/ -// If you want to enable this feature for all your extruder heaters, -// uncomment the 2 defines below: - -// Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds -#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius - -// If you want to enable this feature for your bed heater, -// uncomment the 2 defines below: - -// Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds -#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius +/** + * Thermal Runaway Protection protects your printer from damage and fire if a + * thermistor falls out or temperature sensors fail in any way. + * + * The issue: If a thermistor falls out or a temperature sensor fails, + * Marlin can no longer sense the actual temperature. Since a disconnected + * thermistor reads as a low temperature, the firmware will keep the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too long, + * the firmware will halt as a safety precaution. + */ +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed //=========================================================================== //============================= Mechanical Settings ========================= @@ -412,17 +391,20 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #define Z_MAX_POS 200 //=========================================================================== -//============================= Filament Runout Sensor ====================== +//========================= Filament Runout Sensor ========================== //=========================================================================== //#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. // It is assumed that when logic high = filament available // when logic low = filament ran out -//const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned -//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. +#ifdef FILAMENT_RUNOUT_SENSOR + const bool FIL_RUNOUT_INVERTING = true; // Should be uncommented and true or false should assigned + #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif //=========================================================================== -//============================ Mesh Bed Leveling ============================ +//=========================== Manual Bed Leveling =========================== //=========================================================================== // #define MANUAL_BED_LEVELING // Add display menu option for bed leveling @@ -443,7 +425,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #endif // MESH_BED_LEVELING //=========================================================================== -//============================= Bed Auto Leveling =========================== +//============================ Bed Auto Leveling ============================ //=========================================================================== // @section bedlevel diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 151b70300..d642a811a 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -302,23 +302,10 @@ Here are some standard links for getting your machine calibrated: * The solution: Once the temperature reaches the target, start observing. * If the temperature stays too far below the target (hysteresis) for too long, * the firmware will halt as a safety precaution. - * - * Note that because the countdown starts only AFTER the temperature reaches - * the target, this will not catch a thermistor that is already disconnected - * when the print starts! - * - * To enable for all extruder heaters, uncomment the two defines below: */ -// Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius - -// To enable for the bed heater, uncomment the two defines below: - -// Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 146e7fab1..1feb0ec4e 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -15,16 +15,37 @@ #define BED_CHECK_INTERVAL 3000 //ms between checks in bang-bang control /** - * Heating Sanity Check - * - * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, - * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a - * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target - * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + * Thermal Protection parameters */ -#define WATCH_TEMP_PERIOD 16000 // 16 seconds -#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds +#ifdef THERMAL_PROTECTION_HOTENDS + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + /** + * Whenever an M104 or M109 increases the target temperature the firmware will wait for the + * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE + * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, + * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + */ + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius +#endif + +#ifdef THERMAL_PROTECTION_BED + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by excuting M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. // if Kc is chosen well, the additional required power due to increased melting should be compensated. diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 218396d13..f0c71c16d 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -270,23 +270,10 @@ Here are some standard links for getting your machine calibrated: * The solution: Once the temperature reaches the target, start observing. * If the temperature stays too far below the target (hysteresis) for too long, * the firmware will halt as a safety precaution. - * - * Note that because the countdown starts only AFTER the temperature reaches - * the target, this will not catch a thermistor that is already disconnected - * when the print starts! - * - * To enable for all extruder heaters, uncomment the two defines below: */ -// Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius - -// To enable for the bed heater, uncomment the two defines below: - -// Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index a4d8f65f9..0f0807f0e 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -15,16 +15,37 @@ #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control /** - * Heating Sanity Check - * - * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, - * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a - * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target - * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + * Thermal Protection parameters */ -#define WATCH_TEMP_PERIOD 16000 // 16 seconds -#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds +#ifdef THERMAL_PROTECTION_HOTENDS + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + /** + * Whenever an M104 or M109 increases the target temperature the firmware will wait for the + * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE + * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, + * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + */ + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius +#endif + +#ifdef THERMAL_PROTECTION_BED + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by excuting M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. // if Kc is chosen well, the additional required power due to increased melting should be compensated. diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index d9874ce94..908acce5a 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -300,23 +300,10 @@ Here are some standard links for getting your machine calibrated: * The solution: Once the temperature reaches the target, start observing. * If the temperature stays too far below the target (hysteresis) for too long, * the firmware will halt as a safety precaution. - * - * Note that because the countdown starts only AFTER the temperature reaches - * the target, this will not catch a thermistor that is already disconnected - * when the print starts! - * - * To enable for all extruder heaters, uncomment the two defines below: */ -// Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius - -// To enable for the bed heater, uncomment the two defines below: - -// Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 120 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 4 // in degree Celsius +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h index 0807c999b..eb4f8ae46 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h @@ -15,16 +15,37 @@ #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control /** - * Heating Sanity Check - * - * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, - * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a - * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target - * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + * Thermal Protection parameters */ -#define WATCH_TEMP_PERIOD 16000 // 16 seconds -#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds +#ifdef THERMAL_PROTECTION_HOTENDS + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + /** + * Whenever an M104 or M109 increases the target temperature the firmware will wait for the + * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE + * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, + * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + */ + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius +#endif + +#ifdef THERMAL_PROTECTION_BED + #define THERMAL_PROTECTION_BED_PERIOD 120 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 4 // Degrees Celsius +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by excuting M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. // if Kc is chosen well, the additional required power due to increased melting should be compensated. diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 270a3b5dc..0a5b7e671 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -300,23 +300,10 @@ Here are some standard links for getting your machine calibrated: * The solution: Once the temperature reaches the target, start observing. * If the temperature stays too far below the target (hysteresis) for too long, * the firmware will halt as a safety precaution. - * - * Note that because the countdown starts only AFTER the temperature reaches - * the target, this will not catch a thermistor that is already disconnected - * when the print starts! - * - * To enable for all extruder heaters, uncomment the two defines below: */ -// Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius - -// To enable for the bed heater, uncomment the two defines below: - -// Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 9f1fda4a4..2f5eedc9b 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -15,16 +15,37 @@ #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control /** - * Heating Sanity Check - * - * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, - * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a - * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target - * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + * Thermal Protection parameters */ -#define WATCH_TEMP_PERIOD 16000 // 16 seconds -#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds +#ifdef THERMAL_PROTECTION_HOTENDS + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + /** + * Whenever an M104 or M109 increases the target temperature the firmware will wait for the + * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE + * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, + * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + */ + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius +#endif + +#ifdef THERMAL_PROTECTION_BED + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by excuting M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. // if Kc is chosen well, the additional required power due to increased melting should be compensated. diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 85290fb9f..87d1cd2a1 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -300,23 +300,10 @@ Here are some standard links for getting your machine calibrated: * The solution: Once the temperature reaches the target, start observing. * If the temperature stays too far below the target (hysteresis) for too long, * the firmware will halt as a safety precaution. - * - * Note that because the countdown starts only AFTER the temperature reaches - * the target, this will not catch a thermistor that is already disconnected - * when the print starts! - * - * To enable for all extruder heaters, uncomment the two defines below: */ -// Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius - -// To enable for the bed heater, uncomment the two defines below: - -// Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index b36e8a0f3..d6ea04aca 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -15,16 +15,37 @@ #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control /** - * Heating Sanity Check - * - * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, - * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a - * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target - * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + * Thermal Protection parameters */ -#define WATCH_TEMP_PERIOD 16000 // 16 seconds -#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds +#ifdef THERMAL_PROTECTION_HOTENDS + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + /** + * Whenever an M104 or M109 increases the target temperature the firmware will wait for the + * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE + * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, + * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + */ + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius +#endif + +#ifdef THERMAL_PROTECTION_BED + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by excuting M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. // if Kc is chosen well, the additional required power due to increased melting should be compensated. diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 432cd449f..f1f448029 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -270,23 +270,10 @@ Here are some standard links for getting your machine calibrated: * The solution: Once the temperature reaches the target, start observing. * If the temperature stays too far below the target (hysteresis) for too long, * the firmware will halt as a safety precaution. - * - * Note that because the countdown starts only AFTER the temperature reaches - * the target, this will not catch a thermistor that is already disconnected - * when the print starts! - * - * To enable for all extruder heaters, uncomment the two defines below: */ -// Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius - -// To enable for the bed heater, uncomment the two defines below: - -// Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 411985f79..b36442b48 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -15,16 +15,37 @@ #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control /** - * Heating Sanity Check - * - * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, - * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a - * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target - * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + * Thermal Protection parameters */ -#define WATCH_TEMP_PERIOD 16000 // 16 seconds -#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds +#ifdef THERMAL_PROTECTION_HOTENDS + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + /** + * Whenever an M104 or M109 increases the target temperature the firmware will wait for the + * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE + * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, + * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + */ + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius +#endif + +#ifdef THERMAL_PROTECTION_BED + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by excuting M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. // if Kc is chosen well, the additional required power due to increased melting should be compensated. diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index e0f054b5b..0dd00045b 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -272,23 +272,10 @@ Here are some standard links for getting your machine calibrated: * The solution: Once the temperature reaches the target, start observing. * If the temperature stays too far below the target (hysteresis) for too long, * the firmware will halt as a safety precaution. - * - * Note that because the countdown starts only AFTER the temperature reaches - * the target, this will not catch a thermistor that is already disconnected - * when the print starts! - * - * To enable for all extruder heaters, uncomment the two defines below: */ -// Parameters for all extruder heaters -#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius - -// To enable for the bed heater, uncomment the two defines below: - -// Parameters for the bed heater -#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // in seconds -#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 572fdb6bf..976f6a8b8 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -15,16 +15,37 @@ #define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control /** - * Heating Sanity Check - * - * Whenever an M104 or M109 increases the target temperature this will wait for WATCH_TEMP_PERIOD milliseconds, - * and if the temperature hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted, requiring a - * hard reset. This test restarts with any M104/M109, but only if the current temperature is below the target - * by at least 2 * WATCH_TEMP_INCREASE degrees celsius. + * Thermal Protection parameters */ -#define WATCH_TEMP_PERIOD 16000 // 16 seconds -#define WATCH_TEMP_INCREASE 4 // Heat up at least 4 degrees in 16 seconds +#ifdef THERMAL_PROTECTION_HOTENDS + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + /** + * Whenever an M104 or M109 increases the target temperature the firmware will wait for the + * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE + * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, + * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + */ + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius +#endif + +#ifdef THERMAL_PROTECTION_BED + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by excuting M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ #ifdef PIDTEMP // this adds an experimental additional term to the heating power, proportional to the extrusion speed. // if Kc is chosen well, the additional required power due to increased melting should be compensated. diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index e98ab0045..8aee2f73e 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -73,16 +73,14 @@ unsigned char soft_pwm_bed; int current_raw_filwidth = 0; //Holds measured filament diameter - one extruder only #endif -#define HAS_HEATER_THERMAL_PROTECTION (defined(THERMAL_RUNAWAY_PROTECTION_PERIOD) && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0) -#define HAS_BED_THERMAL_PROTECTION (defined(THERMAL_RUNAWAY_PROTECTION_BED_PERIOD) && THERMAL_RUNAWAY_PROTECTION_BED_PERIOD > 0 && TEMP_SENSOR_BED != 0) -#if HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION +#if THERMAL_PROTECTION_HOTENDS || THERMAL_PROTECTION_BED enum TRState { TRReset, TRInactive, TRFirstHeating, TRStable, TRRunaway }; void thermal_runaway_protection(TRState *state, millis_t *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc); - #if HAS_HEATER_THERMAL_PROTECTION + #if THERMAL_PROTECTION_HOTENDS static TRState thermal_runaway_state_machine[4] = { TRReset, TRReset, TRReset, TRReset }; static millis_t thermal_runaway_timer[4]; // = {0,0,0,0}; #endif - #if HAS_BED_THERMAL_PROTECTION + #if THERMAL_PROTECTION_BED static TRState thermal_runaway_bed_state_machine = TRReset; static millis_t thermal_runaway_bed_timer; #endif @@ -170,7 +168,7 @@ static float analog2temp(int raw, uint8_t e); static float analog2tempBed(int raw); static void updateTemperaturesFromRawValues(); -#ifdef WATCH_TEMP_PERIOD +#ifdef THERMAL_PROTECTION_HOTENDS int watch_target_temp[EXTRUDERS] = { 0 }; millis_t watch_heater_next_ms[EXTRUDERS] = { 0 }; #endif @@ -604,15 +602,15 @@ void manage_heater() { if (ct < max(HEATER_0_MINTEMP, 0.01)) min_temp_error(0); #endif - #if defined(WATCH_TEMP_PERIOD) || !defined(PIDTEMPBED) || HAS_AUTO_FAN + #if defined(THERMAL_PROTECTION_HOTENDS) || !defined(PIDTEMPBED) || HAS_AUTO_FAN millis_t ms = millis(); #endif // Loop through all extruders for (int e = 0; e < EXTRUDERS; e++) { - #if HAS_HEATER_THERMAL_PROTECTION - thermal_runaway_protection(&thermal_runaway_state_machine[e], &thermal_runaway_timer[e], current_temperature[e], target_temperature[e], e, THERMAL_RUNAWAY_PROTECTION_PERIOD, THERMAL_RUNAWAY_PROTECTION_HYSTERESIS); + #if THERMAL_PROTECTION_HOTENDS + thermal_runaway_protection(&thermal_runaway_state_machine[e], &thermal_runaway_timer[e], current_temperature[e], target_temperature[e], e, THERMAL_PROTECTION_PERIOD, THERMAL_PROTECTION_HYSTERESIS); #endif float pid_output = get_pid_output(e); @@ -621,7 +619,7 @@ void manage_heater() { soft_pwm[e] = current_temperature[e] > minttemp[e] && current_temperature[e] < maxttemp[e] ? (int)pid_output >> 1 : 0; // Check if the temperature is failing to increase - #ifdef WATCH_TEMP_PERIOD + #ifdef THERMAL_PROTECTION_HOTENDS // Is it time to check this extruder's heater? if (watch_heater_next_ms[e] && ms > watch_heater_next_ms[e]) { // Has it failed to increase enough? @@ -635,7 +633,7 @@ void manage_heater() { watch_heater_next_ms[e] = 0; } } - #endif // WATCH_TEMP_PERIOD + #endif // THERMAL_PROTECTION_HOTENDS #ifdef TEMP_SENSOR_1_AS_REDUNDANT if (fabs(current_temperature[0] - redundant_temperature) > MAX_REDUNDANT_TEMP_SENSOR_DIFF) { @@ -675,8 +673,8 @@ void manage_heater() { #if TEMP_SENSOR_BED != 0 - #if HAS_BED_THERMAL_PROTECTION - thermal_runaway_protection(&thermal_runaway_bed_state_machine, &thermal_runaway_bed_timer, current_temperature_bed, target_temperature_bed, -1, THERMAL_RUNAWAY_PROTECTION_BED_PERIOD, THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS); + #if THERMAL_PROTECTION_BED + thermal_runaway_protection(&thermal_runaway_bed_state_machine, &thermal_runaway_bed_timer, current_temperature_bed, target_temperature_bed, -1, THERMAL_PROTECTION_BED_PERIOD, THERMAL_PROTECTION_BED_HYSTERESIS); #endif #ifdef PIDTEMPBED @@ -999,14 +997,14 @@ void tp_init() { #endif //BED_MAXTEMP } -#ifdef WATCH_TEMP_PERIOD +#ifdef THERMAL_PROTECTION_HOTENDS /** * Start Heating Sanity Check for hotends that are below * their target temperature by a configurable margin. * This is called when the temperature is set. (M104, M109) */ void start_watching_heater(int e) { - millis_t ms = millis() + WATCH_TEMP_PERIOD; + millis_t ms = millis() + WATCH_TEMP_PERIOD * 1000; if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE * 2)) { watch_target_temp[e] = degHotend(e) + WATCH_TEMP_INCREASE; watch_heater_next_ms[e] = ms; @@ -1016,7 +1014,7 @@ void tp_init() { } #endif -#if HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION +#if THERMAL_PROTECTION_HOTENDS || THERMAL_PROTECTION_BED void thermal_runaway_protection(TRState *state, millis_t *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc) { @@ -1082,7 +1080,7 @@ void tp_init() { } } -#endif // HAS_HEATER_THERMAL_PROTECTION || HAS_BED_THERMAL_PROTECTION +#endif // THERMAL_PROTECTION_HOTENDS || THERMAL_PROTECTION_BED void disable_all_heaters() { for (int i=0; i Date: Sun, 10 May 2015 22:58:37 -0700 Subject: [PATCH 075/126] Fix typo in SanityCheck.h --- Marlin/SanityCheck.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index a0e2138e3..9aaff4a95 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -323,6 +323,6 @@ #if !defined(THERMAL_PROTECTION_BED) && defined(THERMAL_PROTECTION_BED_PERIOD) #error Thermal Runaway Protection for the bed must now be enabled with THERMAL_PROTECTION_BED - #error + #endif #endif //SANITYCHECK_H From 526ad82d20608d5262b5333684bcf7e85d18e431 Mon Sep 17 00:00:00 2001 From: Wurstnase Date: Mon, 11 May 2015 08:01:51 +0200 Subject: [PATCH 076/126] activate advanced_ok and no_timeout --- Marlin/Configuration_adv.h | 6 +++--- Marlin/Marlin_main.cpp | 2 +- Marlin/configurator/config/Configuration_adv.h | 8 ++++++++ .../example_configurations/Felix/Configuration_adv.h | 8 ++++++++ .../Hephestos/Configuration_adv.h | 10 +++++++++- .../example_configurations/K8200/Configuration_adv.h | 8 ++++++++ .../example_configurations/SCARA/Configuration_adv.h | 8 ++++++++ .../example_configurations/WITBOX/Configuration_adv.h | 10 +++++++++- .../delta/biv2.5/Configuration_adv.h | 8 ++++++++ .../delta/generic/Configuration_adv.h | 8 ++++++++ .../delta/kossel_mini/Configuration_adv.h | 8 ++++++++ .../example_configurations/makibox/Configuration_adv.h | 8 ++++++++ .../tvrrug/Round2/Configuration_adv.h | 8 ++++++++ 13 files changed, 94 insertions(+), 6 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index ee390289b..22ecc1d59 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -379,10 +379,10 @@ const unsigned int dropsegments=5; //everything with less than this number of st // Bad Serial-connections can miss a received command by sending an 'ok' // Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. // This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. -// #define NO_TIMEOUTS 1000 +#define NO_TIMEOUTS 1000 -// Some clients will have this feature soon. This should make the NO_TIMEOUTS unnecessary. -// #define ADVANCED_OK +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +#define ADVANCED_OK // @section fwretract diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 19bec369b..62ac57140 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -5535,7 +5535,7 @@ void ClearToSend() { SERIAL_PROTOCOLPGM(" N"); SERIAL_PROTOCOL(gcode_LastN); SERIAL_PROTOCOLPGM(" P"); SERIAL_PROTOCOL(BUFSIZE - commands_in_queue); #endif - SERIAL_PROTOCOLLNPGM(""); + SERIAL_EOL; } void get_coordinates() { diff --git a/Marlin/configurator/config/Configuration_adv.h b/Marlin/configurator/config/Configuration_adv.h index b79035ab6..22ecc1d59 100644 --- a/Marlin/configurator/config/Configuration_adv.h +++ b/Marlin/configurator/config/Configuration_adv.h @@ -376,6 +376,14 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define MAX_CMD_SIZE 96 #define BUFSIZE 4 +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. +// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. +#define NO_TIMEOUTS 1000 + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +#define ADVANCED_OK + // @section fwretract // Firmware based and LCD controlled retract diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 672b3ff02..a5e44e690 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -376,6 +376,14 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define MAX_CMD_SIZE 96 #define BUFSIZE 4 +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. +// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. +#define NO_TIMEOUTS 1000 + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +#define ADVANCED_OK + // @section fwretract // Firmware based and LCD controlled retract diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index 5713373d1..3918fa53c 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -374,7 +374,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st //The ASCII buffer for receiving from the serial: #define MAX_CMD_SIZE 96 -#define BUFSIZE 5 +#define BUFSIZE 4 + +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. +// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. +#define NO_TIMEOUTS 1000 + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +#define ADVANCED_OK // @section fwretract diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 672b3ff02..a5e44e690 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -376,6 +376,14 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define MAX_CMD_SIZE 96 #define BUFSIZE 4 +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. +// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. +#define NO_TIMEOUTS 1000 + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +#define ADVANCED_OK + // @section fwretract // Firmware based and LCD controlled retract diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index a706696aa..2b7cbda07 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -376,6 +376,14 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define MAX_CMD_SIZE 96 #define BUFSIZE 4 +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. +// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. +#define NO_TIMEOUTS 1000 + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +#define ADVANCED_OK + // @section fwretract // Firmware based and LCD controlled retract diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index 25abd17c2..44f532cb1 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -374,7 +374,15 @@ const unsigned int dropsegments=5; //everything with less than this number of st //The ASCII buffer for receiving from the serial: #define MAX_CMD_SIZE 96 -#define BUFSIZE 5 +#define BUFSIZE 4 + +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. +// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. +#define NO_TIMEOUTS 1000 + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +#define ADVANCED_OK // @section fwretract diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h index d035073b8..71666033a 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h @@ -377,6 +377,14 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define MAX_CMD_SIZE 96 #define BUFSIZE 4 +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. +// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. +#define NO_TIMEOUTS 1000 + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +#define ADVANCED_OK + // @section fwretract // Firmware based and LCD controlled retract diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index cdfa7c8f9..2c193d38d 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -377,6 +377,14 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define MAX_CMD_SIZE 96 #define BUFSIZE 4 +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. +// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. +#define NO_TIMEOUTS 1000 + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +#define ADVANCED_OK + // @section fwretract // Firmware based and LCD controlled retract diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 943022c81..cfa54ce75 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -376,6 +376,14 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define MAX_CMD_SIZE 96 #define BUFSIZE 4 +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. +// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. +#define NO_TIMEOUTS 1000 + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +#define ADVANCED_OK + // @section fwretract // Firmware based and LCD controlled retract diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 8d451fd28..845a98b4d 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -376,6 +376,14 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define MAX_CMD_SIZE 96 #define BUFSIZE 4 +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. +// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. +#define NO_TIMEOUTS 1000 + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +#define ADVANCED_OK + // @section fwretract // Firmware based and LCD controlled retract diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 3187150ba..2fb6b492e 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -376,6 +376,14 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define MAX_CMD_SIZE 96 #define BUFSIZE 4 +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. +// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. +#define NO_TIMEOUTS 1000 + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +#define ADVANCED_OK + // @section fwretract // Firmware based and LCD controlled retract From 8332a158993caf2a718e046e145d5cd3dc4bb63d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 10 May 2015 23:03:24 -0700 Subject: [PATCH 077/126] Fix testing of runaway options in temperature.cpp --- Marlin/temperature.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 8aee2f73e..5ca03a757 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -73,14 +73,14 @@ unsigned char soft_pwm_bed; int current_raw_filwidth = 0; //Holds measured filament diameter - one extruder only #endif -#if THERMAL_PROTECTION_HOTENDS || THERMAL_PROTECTION_BED +#if defined(THERMAL_PROTECTION_HOTENDS) || defined(THERMAL_PROTECTION_BED) enum TRState { TRReset, TRInactive, TRFirstHeating, TRStable, TRRunaway }; void thermal_runaway_protection(TRState *state, millis_t *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc); - #if THERMAL_PROTECTION_HOTENDS + #ifdef THERMAL_PROTECTION_HOTENDS static TRState thermal_runaway_state_machine[4] = { TRReset, TRReset, TRReset, TRReset }; static millis_t thermal_runaway_timer[4]; // = {0,0,0,0}; #endif - #if THERMAL_PROTECTION_BED + #ifdef THERMAL_PROTECTION_BED static TRState thermal_runaway_bed_state_machine = TRReset; static millis_t thermal_runaway_bed_timer; #endif @@ -609,7 +609,7 @@ void manage_heater() { // Loop through all extruders for (int e = 0; e < EXTRUDERS; e++) { - #if THERMAL_PROTECTION_HOTENDS + #ifdef THERMAL_PROTECTION_HOTENDS thermal_runaway_protection(&thermal_runaway_state_machine[e], &thermal_runaway_timer[e], current_temperature[e], target_temperature[e], e, THERMAL_PROTECTION_PERIOD, THERMAL_PROTECTION_HYSTERESIS); #endif @@ -673,7 +673,7 @@ void manage_heater() { #if TEMP_SENSOR_BED != 0 - #if THERMAL_PROTECTION_BED + #ifdef THERMAL_PROTECTION_BED thermal_runaway_protection(&thermal_runaway_bed_state_machine, &thermal_runaway_bed_timer, current_temperature_bed, target_temperature_bed, -1, THERMAL_PROTECTION_BED_PERIOD, THERMAL_PROTECTION_BED_HYSTERESIS); #endif @@ -1014,7 +1014,7 @@ void tp_init() { } #endif -#if THERMAL_PROTECTION_HOTENDS || THERMAL_PROTECTION_BED +#if defined(THERMAL_PROTECTION_HOTENDS) || defined(THERMAL_PROTECTION_BED) void thermal_runaway_protection(TRState *state, millis_t *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc) { From 429c6ccad2ffc5ada058526b14ba2b85a7b33501 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 10 May 2015 23:27:00 -0700 Subject: [PATCH 078/126] Neaten config formatting --- Marlin/Configuration_adv.h | 4 ++-- Marlin/configurator/config/Configuration_adv.h | 4 ++-- Marlin/example_configurations/Felix/Configuration_adv.h | 4 ++-- Marlin/example_configurations/Hephestos/Configuration_adv.h | 4 ++-- Marlin/example_configurations/K8200/Configuration_adv.h | 4 ++-- Marlin/example_configurations/SCARA/Configuration_adv.h | 4 ++-- Marlin/example_configurations/WITBOX/Configuration_adv.h | 4 ++-- .../example_configurations/delta/biv2.5/Configuration_adv.h | 4 ++-- .../example_configurations/delta/generic/Configuration_adv.h | 4 ++-- .../delta/kossel_mini/Configuration_adv.h | 4 ++-- Marlin/example_configurations/makibox/Configuration_adv.h | 4 ++-- .../example_configurations/tvrrug/Round2/Configuration_adv.h | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 89d8e2716..b629cc0e9 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -27,8 +27,8 @@ * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. */ - #define WATCH_TEMP_PERIOD 16 // Seconds - #define WATCH_TEMP_INCREASE 4 // Degrees Celsius + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius #endif #ifdef THERMAL_PROTECTION_BED diff --git a/Marlin/configurator/config/Configuration_adv.h b/Marlin/configurator/config/Configuration_adv.h index c484db4ed..35790e7fa 100644 --- a/Marlin/configurator/config/Configuration_adv.h +++ b/Marlin/configurator/config/Configuration_adv.h @@ -27,8 +27,8 @@ * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. */ - #define WATCH_TEMP_PERIOD 16 // Seconds - #define WATCH_TEMP_INCREASE 4 // Degrees Celsius + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius #endif #ifdef THERMAL_PROTECTION_BED diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 6bfe76c2c..dd8059cd1 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -27,8 +27,8 @@ * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. */ - #define WATCH_TEMP_PERIOD 16 // Seconds - #define WATCH_TEMP_INCREASE 4 // Degrees Celsius + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius #endif #ifdef THERMAL_PROTECTION_BED diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index 344f71e10..aef6a2393 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -27,8 +27,8 @@ * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. */ - #define WATCH_TEMP_PERIOD 16 // Seconds - #define WATCH_TEMP_INCREASE 4 // Degrees Celsius + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius #endif #ifdef THERMAL_PROTECTION_BED diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 6bfe76c2c..dd8059cd1 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -27,8 +27,8 @@ * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. */ - #define WATCH_TEMP_PERIOD 16 // Seconds - #define WATCH_TEMP_INCREASE 4 // Degrees Celsius + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius #endif #ifdef THERMAL_PROTECTION_BED diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 1feb0ec4e..e844dc6d8 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -27,8 +27,8 @@ * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. */ - #define WATCH_TEMP_PERIOD 16 // Seconds - #define WATCH_TEMP_INCREASE 4 // Degrees Celsius + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius #endif #ifdef THERMAL_PROTECTION_BED diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index 0f0807f0e..cb947615d 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -27,8 +27,8 @@ * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. */ - #define WATCH_TEMP_PERIOD 16 // Seconds - #define WATCH_TEMP_INCREASE 4 // Degrees Celsius + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius #endif #ifdef THERMAL_PROTECTION_BED diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h index eb4f8ae46..3e75186f8 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h @@ -27,8 +27,8 @@ * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. */ - #define WATCH_TEMP_PERIOD 16 // Seconds - #define WATCH_TEMP_INCREASE 4 // Degrees Celsius + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius #endif #ifdef THERMAL_PROTECTION_BED diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 2f5eedc9b..495f003bd 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -27,8 +27,8 @@ * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. */ - #define WATCH_TEMP_PERIOD 16 // Seconds - #define WATCH_TEMP_INCREASE 4 // Degrees Celsius + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius #endif #ifdef THERMAL_PROTECTION_BED diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index d6ea04aca..a6511ab6d 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -27,8 +27,8 @@ * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. */ - #define WATCH_TEMP_PERIOD 16 // Seconds - #define WATCH_TEMP_INCREASE 4 // Degrees Celsius + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius #endif #ifdef THERMAL_PROTECTION_BED diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index b36442b48..000b69d06 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -27,8 +27,8 @@ * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. */ - #define WATCH_TEMP_PERIOD 16 // Seconds - #define WATCH_TEMP_INCREASE 4 // Degrees Celsius + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius #endif #ifdef THERMAL_PROTECTION_BED diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 976f6a8b8..24ec231e5 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -27,8 +27,8 @@ * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. */ - #define WATCH_TEMP_PERIOD 16 // Seconds - #define WATCH_TEMP_INCREASE 4 // Degrees Celsius + #define WATCH_TEMP_PERIOD 16 // Seconds + #define WATCH_TEMP_INCREASE 4 // Degrees Celsius #endif #ifdef THERMAL_PROTECTION_BED From 46d19323800c72e824ceea40977c93f6b8b851b5 Mon Sep 17 00:00:00 2001 From: Wurstnase Date: Mon, 11 May 2015 13:04:00 +0200 Subject: [PATCH 079/126] add plan buffer remaining for 'P' and block buffer remaining 'B' --- Marlin/Marlin_main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 62ac57140..b430aab7f 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -5533,7 +5533,8 @@ void ClearToSend() { SERIAL_PROTOCOLPGM(MSG_OK); #ifdef ADVANCED_OK SERIAL_PROTOCOLPGM(" N"); SERIAL_PROTOCOL(gcode_LastN); - SERIAL_PROTOCOLPGM(" P"); SERIAL_PROTOCOL(BUFSIZE - commands_in_queue); + SERIAL_PROTOCOLPGM(" P"); SERIAL_PROTOCOL(int(BLOCK_BUFFER_SIZE - movesplanned() - 1)); + SERIAL_PROTOCOLPGM(" B"); SERIAL_PROTOCOL(BUFSIZE - commands_in_queue); #endif SERIAL_EOL; } From fb44b53ae396bfc3d039ea0841a2df59d03dbaf4 Mon Sep 17 00:00:00 2001 From: Christian Bohn Date: Mon, 11 May 2015 23:22:19 +0200 Subject: [PATCH 080/126] sled improvements - create sled pin definition - G28 Works with sled --- Marlin/Conditionals.h | 7 +++ Marlin/Marlin_main.cpp | 99 +++++++++++++++++++++-------------- Marlin/pins_SANGUINOLOLU_11.h | 4 ++ 3 files changed, 72 insertions(+), 38 deletions(-) diff --git a/Marlin/Conditionals.h b/Marlin/Conditionals.h index fa574083d..f09a8a2fe 100644 --- a/Marlin/Conditionals.h +++ b/Marlin/Conditionals.h @@ -276,6 +276,13 @@ #define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER)) #endif + /** + * Sled Options + */ + #ifdef Z_PROBE_SLED + #define Z_SAFE_HOMING + #endif + /** * MAX_STEP_FREQUENCY differs for TOSHIBA */ diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 5517b8e18..52b48e21d 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -650,8 +650,8 @@ void setup() { #endif #ifdef Z_PROBE_SLED - pinMode(SERVO0_PIN, OUTPUT); - digitalWrite(SERVO0_PIN, LOW); // turn it off + pinMode(SLED_PIN, OUTPUT); + digitalWrite(SLED_PIN, LOW); // turn it off #endif // Z_PROBE_SLED setup_homepin(); @@ -1516,6 +1516,48 @@ inline void set_destination_to_current() { memcpy(destination, current_position, #endif // ENABLE_AUTO_BED_LEVELING + +#ifdef Z_PROBE_SLED + + #ifndef SLED_DOCKING_OFFSET + #define SLED_DOCKING_OFFSET 0 + #endif + + /** + * Method to dock/undock a sled designed by Charles Bell. + * + * dock[in] If true, move to MAX_X and engage the electromagnet + * offset[in] The additional distance to move to adjust docking location + */ + static void dock_sled(bool dock, int offset=0) { + if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS]) { + LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN); + SERIAL_ECHO_START; + SERIAL_ECHOLNPGM(MSG_POSITION_UNKNOWN); + return; + } + + if (dock) { + float oldXpos = current_position[X_AXIS]; // save x position + do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING); // rise Z + do_blocking_move_to(X_MAX_POS + SLED_DOCKING_OFFSET + offset - 1, current_position[Y_AXIS], current_position[Z_AXIS]); // Dock sled a bit closer to ensure proper capturing + digitalWrite(SLED_PIN, LOW); // turn off magnet + do_blocking_move_to(oldXpos, current_position[Y_AXIS], current_position[Z_AXIS]); // return to position before docking + do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] - Z_RAISE_AFTER_PROBING); + } else { + float oldXpos = current_position[X_AXIS]; // save x position + float z_loc = current_position[Z_AXIS]; + if (z_loc < Z_RAISE_BEFORE_PROBING + 5) z_loc = Z_RAISE_BEFORE_PROBING; + do_blocking_move_to(X_MAX_POS + SLED_DOCKING_OFFSET + offset, current_position[Y_AXIS], z_loc); // this also updates current_position + digitalWrite(SLED_PIN, HIGH); // turn on magnet + do_blocking_move_to(oldXpos, current_position[Y_AXIS], current_position[Z_AXIS]); // return to position before docking + } + } + +#endif // Z_PROBE_SLED + + + /** * Home an individual axis */ @@ -1538,6 +1580,13 @@ static void homeaxis(AxisEnum axis) { current_position[axis] = 0; sync_plan_position(); + #ifdef Z_PROBE_SLED + // Get Probe + if (axis == Z_AXIS) { + if (axis_home_dir < 0) dock_sled(false); + } + #endif + #if SERVO_LEVELING && !defined(Z_PROBE_SLED) // Deploy a probe if there is one, and homing towards the bed @@ -1634,6 +1683,13 @@ static void homeaxis(AxisEnum axis) { endstops_hit_on_purpose(); // clear endstop hit flags axis_known_position[axis] = true; + #ifdef Z_PROBE_SLED + // bring probe back + if (axis == Z_AXIS) { + if (axis_home_dir < 0) dock_sled(true); + } + #endif + #if SERVO_LEVELING && !defined(Z_PROBE_SLED) // Deploy a probe if there is one, and homing towards the bed @@ -1708,39 +1764,6 @@ static void homeaxis(AxisEnum axis) { #endif // FWRETRACT -#ifdef Z_PROBE_SLED - - #ifndef SLED_DOCKING_OFFSET - #define SLED_DOCKING_OFFSET 0 - #endif - - /** - * Method to dock/undock a sled designed by Charles Bell. - * - * dock[in] If true, move to MAX_X and engage the electromagnet - * offset[in] The additional distance to move to adjust docking location - */ - static void dock_sled(bool dock, int offset=0) { - if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS]) { - LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN); - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM(MSG_POSITION_UNKNOWN); - return; - } - - if (dock) { - do_blocking_move_to(X_MAX_POS + SLED_DOCKING_OFFSET + offset, current_position[Y_AXIS], current_position[Z_AXIS]); // this also updates current_position - digitalWrite(SERVO0_PIN, LOW); // turn off magnet - } else { - float z_loc = current_position[Z_AXIS]; - if (z_loc < Z_RAISE_BEFORE_PROBING + 5) z_loc = Z_RAISE_BEFORE_PROBING; - do_blocking_move_to(X_MAX_POS + SLED_DOCKING_OFFSET + offset, Y_PROBE_OFFSET_FROM_EXTRUDER, z_loc); // this also updates current_position - digitalWrite(SERVO0_PIN, HIGH); // turn on magnet - } - } - -#endif // Z_PROBE_SLED - /** * * G-Code Handler functions @@ -2000,12 +2023,12 @@ inline void gcode_G28() { if (home_all_axis || homeZ) { - #ifdef Z_SAFE_HOMING + #ifdef Z_SAFE_HOMING if (home_all_axis) { current_position[Z_AXIS] = 0; - sync_plan_position(); + sync_plan_position(); // // Set the probe (or just the nozzle) destination to the safe homing point @@ -2586,7 +2609,7 @@ inline void gcode_G28() { #endif // !DELTA #ifdef Z_PROBE_SLED - dock_sled(true, -SLED_DOCKING_OFFSET); // dock the probe, correcting for over-travel + dock_sled(true); // dock the probe #elif defined(Z_PROBE_ALLEN_KEY) //|| defined(SERVO_LEVELING) stow_z_probe(); #endif diff --git a/Marlin/pins_SANGUINOLOLU_11.h b/Marlin/pins_SANGUINOLOLU_11.h index e7bdd974e..3eaec6706 100644 --- a/Marlin/pins_SANGUINOLOLU_11.h +++ b/Marlin/pins_SANGUINOLOLU_11.h @@ -44,6 +44,10 @@ #define FAN_PIN 4 #endif +#ifdef Z_PROBE_SLED + #define SLED_PIN 27 +#endif + #ifdef NUM_SERVOS #define SERVO0_PIN -1 From 27a3b1d8954090e8114606ff4c2f5d7c5320d25c Mon Sep 17 00:00:00 2001 From: Christian Bohn Date: Tue, 12 May 2015 08:51:01 +0200 Subject: [PATCH 081/126] disable sled pin by default --- Marlin/Marlin_main.cpp | 4 ++-- Marlin/pins_SANGUINOLOLU_11.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 52b48e21d..1bcec9579 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2023,12 +2023,12 @@ inline void gcode_G28() { if (home_all_axis || homeZ) { - #ifdef Z_SAFE_HOMING + #ifdef Z_SAFE_HOMING if (home_all_axis) { current_position[Z_AXIS] = 0; - sync_plan_position(); + sync_plan_position(); // // Set the probe (or just the nozzle) destination to the safe homing point diff --git a/Marlin/pins_SANGUINOLOLU_11.h b/Marlin/pins_SANGUINOLOLU_11.h index 3eaec6706..ca41bdd97 100644 --- a/Marlin/pins_SANGUINOLOLU_11.h +++ b/Marlin/pins_SANGUINOLOLU_11.h @@ -45,7 +45,7 @@ #endif #ifdef Z_PROBE_SLED - #define SLED_PIN 27 + #define SLED_PIN -1 #endif #ifdef NUM_SERVOS From fa951f8a0bc7391c55478e8951813f798696bef1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 May 2015 00:31:51 -0700 Subject: [PATCH 082/126] Always do st_synchronize() before G28 --- Marlin/Marlin_main.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 5517b8e18..7d75ad8d5 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1845,6 +1845,9 @@ inline void gcode_G4() { */ inline void gcode_G28() { + // Wait for planner moves to finish! + st_synchronize(); + // For auto bed leveling, clear the level matrix #ifdef ENABLE_AUTO_BED_LEVELING plan_bed_level_matrix.set_to_identity(); @@ -1859,12 +1862,7 @@ inline void gcode_G28() { mbl.active = 0; #endif - saved_feedrate = feedrate; - saved_feedrate_multiplier = feedrate_multiplier; - feedrate_multiplier = 100; - refresh_cmd_timeout(); - - enable_endstops(true); + setup_for_endstop_move(); set_destination_to_current(); @@ -3150,8 +3148,6 @@ inline void gcode_M42() { clean_up_after_endstop_move(); - // enable_endstops(true); - if (verbose_level > 0) { SERIAL_PROTOCOLPGM("Mean: "); SERIAL_PROTOCOL_F(mean, 6); From df12e68e7d6098bdb5d6f251a661a49e505fb468 Mon Sep 17 00:00:00 2001 From: Wurstnase Date: Tue, 12 May 2015 09:33:24 +0200 Subject: [PATCH 083/126] add missing Z_PROBE-bit --- Marlin/stepper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 4bc2de84c..508eb3f5f 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -579,7 +579,7 @@ ISR(TIMER1_COMPA_vect) { if(z_probe_endstop && old_z_probe_endstop) { endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS]; - endstop_z_probe_hit=true; + endstop_hit_bits |= BIT(Z_PROBE); // if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true"); } @@ -638,7 +638,7 @@ ISR(TIMER1_COMPA_vect) { if(z_probe_endstop && old_z_probe_endstop) { endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS]; - endstop_z_probe_hit=true; + endstop_hit_bits |= BIT(Z_PROBE); // if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true"); } old_z_probe_endstop = z_probe_endstop; From 1d5677cc3b1c7fa3e0b1b9ee6f980f417d99b646 Mon Sep 17 00:00:00 2001 From: Wurstnase Date: Tue, 12 May 2015 09:36:19 +0200 Subject: [PATCH 084/126] add missing Z-bits --- Marlin/stepper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 508eb3f5f..29d77048c 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -558,7 +558,7 @@ ISR(TIMER1_COMPA_vect) { z2_min_both = z2_min_endstop && old_z2_min_endstop; if ((z_min_both || z2_min_both) && current_block->steps[Z_AXIS] > 0) { endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS]; - endstop_z_hit = true; + endstop_hit_bits |= BIT(Z_MIN); if (!performing_homing || (performing_homing && z_min_both && z2_min_both)) //if not performing home or if both endstops were trigged during homing... step_events_completed = current_block->step_event_count; } @@ -613,7 +613,7 @@ ISR(TIMER1_COMPA_vect) { z2_max_both = z2_max_endstop && old_z2_max_endstop; if ((z_max_both || z2_max_both) && current_block->steps[Z_AXIS] > 0) { endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS]; - endstop_z_hit = true; + endstop_hit_bits |= BIT(Z_MIN); // if (z_max_both) SERIAL_ECHOLN("z_max_endstop = true"); // if (z2_max_both) SERIAL_ECHOLN("z2_max_endstop = true"); From 367e2eb9f47906dfa08e8a2804b54030db15b5e2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 May 2015 00:51:22 -0700 Subject: [PATCH 085/126] Global setup_for_endstop_move --- Marlin/Marlin_main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 7d75ad8d5..1ca925d5f 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1096,6 +1096,14 @@ inline void sync_plan_position() { inline void set_current_to_destination() { memcpy(current_position, destination, sizeof(current_position)); } inline void set_destination_to_current() { memcpy(destination, current_position, sizeof(destination)); } +static void setup_for_endstop_move() { + saved_feedrate = feedrate; + saved_feedrate_multiplier = feedrate_multiplier; + feedrate_multiplier = 100; + refresh_cmd_timeout(); + enable_endstops(true); +} + #ifdef ENABLE_AUTO_BED_LEVELING #ifdef DELTA From 8d814de558a34897ce4f6734b06e6c27ddab4021 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 May 2015 00:55:00 -0700 Subject: [PATCH 086/126] Return void in prevent_dangerous_extrude --- Marlin/Marlin_main.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 1ca925d5f..ae0652ac1 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -5743,25 +5743,22 @@ void mesh_plan_buffer_line(float x, float y, float z, const float e, float feed_ #ifdef PREVENT_DANGEROUS_EXTRUDE - inline float prevent_dangerous_extrude(float &curr_e, float &dest_e) { + inline void prevent_dangerous_extrude(float &curr_e, float &dest_e) { float de = dest_e - curr_e; if (de) { if (degHotend(active_extruder) < extrude_min_temp) { curr_e = dest_e; // Behave as if the move really took place, but ignore E part SERIAL_ECHO_START; SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP); - return 0; } #ifdef PREVENT_LENGTHY_EXTRUDE if (labs(de) > EXTRUDE_MAXLENGTH) { curr_e = dest_e; // Behave as if the move really took place, but ignore E part SERIAL_ECHO_START; SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP); - return 0; } #endif } - return de; } #endif // PREVENT_DANGEROUS_EXTRUDE From b5200e184cc83eac6055667f94a522ef99212bed Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 May 2015 01:01:53 -0700 Subject: [PATCH 087/126] Remove extra setup_for_endstop_move --- Marlin/Marlin_main.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index ae0652ac1..1e3d436a1 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1264,14 +1264,6 @@ static void setup_for_endstop_move() { feedrate = oldFeedRate; } - static void setup_for_endstop_move() { - saved_feedrate = feedrate; - saved_feedrate_multiplier = feedrate_multiplier; - feedrate_multiplier = 100; - refresh_cmd_timeout(); - enable_endstops(true); - } - static void clean_up_after_endstop_move() { #ifdef ENDSTOPS_ONLY_FOR_HOMING enable_endstops(false); From f48599f172bfbf08dcd17a051a7426f0a60cbb91 Mon Sep 17 00:00:00 2001 From: Christian Bohn Date: Tue, 12 May 2015 10:02:23 +0200 Subject: [PATCH 088/126] add pin definition to some motherboards --- Marlin/Marlin_main.cpp | 1 - Marlin/pins_MEGATRONICS_3.h | 5 +++++ Marlin/pins_RAMBO.h | 4 ++++ Marlin/pins_RAMPS_13.h | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 1bcec9579..e6609e28c 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1543,7 +1543,6 @@ inline void set_destination_to_current() { memcpy(destination, current_position, do_blocking_move_to(X_MAX_POS + SLED_DOCKING_OFFSET + offset - 1, current_position[Y_AXIS], current_position[Z_AXIS]); // Dock sled a bit closer to ensure proper capturing digitalWrite(SLED_PIN, LOW); // turn off magnet do_blocking_move_to(oldXpos, current_position[Y_AXIS], current_position[Z_AXIS]); // return to position before docking - do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] - Z_RAISE_AFTER_PROBING); } else { float oldXpos = current_position[X_AXIS]; // save x position float z_loc = current_position[Z_AXIS]; diff --git a/Marlin/pins_MEGATRONICS_3.h b/Marlin/pins_MEGATRONICS_3.h index 6b4016bf4..ed627274c 100644 --- a/Marlin/pins_MEGATRONICS_3.h +++ b/Marlin/pins_MEGATRONICS_3.h @@ -8,6 +8,11 @@ #define LARGE_FLASH true + +#ifdef Z_PROBE_SLED + #define SLED_PIN -1 +#endif + // Servo support #ifdef NUM_SERVOS #define SERVO0_PIN 46 //AUX3-6 diff --git a/Marlin/pins_RAMBO.h b/Marlin/pins_RAMBO.h index 6d782b9d9..4c008d6ce 100644 --- a/Marlin/pins_RAMBO.h +++ b/Marlin/pins_RAMBO.h @@ -22,6 +22,10 @@ #endif #endif +#ifdef Z_PROBE_SLED + #define SLED_PIN -1 +#endif + #undef X_MS1_PIN #undef X_MS2_PIN #undef Y_MS1_PIN diff --git a/Marlin/pins_RAMPS_13.h b/Marlin/pins_RAMPS_13.h index af1d2d3bb..87ac9230f 100644 --- a/Marlin/pins_RAMPS_13.h +++ b/Marlin/pins_RAMPS_13.h @@ -134,6 +134,10 @@ #endif #endif +#ifdef Z_PROBE_SLED + #define SLED_PIN -1 +#endif + #ifdef ULTRA_LCD #ifdef NEWPANEL From 873f7d6f2a81ec550072177ef52a024186a9d4a3 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 May 2015 01:33:51 -0700 Subject: [PATCH 089/126] Check that configs are up-to-date --- Marlin/Marlin.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 4703dbffa..03531d1d3 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -21,6 +21,10 @@ #include "fastio.h" #include "Configuration.h" +#ifndef SANITYCHECK_H + #error Your Configuration.h and Configuration_adv.h files are outdated! +#endif + #if (ARDUINO >= 100) #include "Arduino.h" #else From 9e95ceb3fcd64906f078f2af8cd54c0484cd70c7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 May 2015 02:08:20 -0700 Subject: [PATCH 090/126] Split up prepare_move by type - For better encapsulation add inlines for each prepare_move type - Move controllerFan vars inside the function as statics - Some formatting cleanup - Rename `ClearToSend` as `ok_to_send` --- Marlin/Marlin.h | 2 +- Marlin/Marlin_main.cpp | 187 ++++++++++++++++++++++------------------- 2 files changed, 102 insertions(+), 87 deletions(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 03531d1d3..c62ba9130 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -205,7 +205,7 @@ void enable_all_steppers(); void disable_all_steppers(); void FlushSerialRequestResend(); -void ClearToSend(); +void ok_to_send(); void get_coordinates(); #ifdef DELTA diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 1e3d436a1..c534c8867 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1657,7 +1657,7 @@ static void homeaxis(AxisEnum axis) { #ifdef FWRETRACT - void retract(bool retracting, bool swapretract = false) { + void retract(bool retracting, bool swapping=false) { if (retracting == retracted[active_extruder]) return; @@ -1668,7 +1668,7 @@ static void homeaxis(AxisEnum axis) { if (retracting) { feedrate = retract_feedrate * 60; - current_position[E_AXIS] += (swapretract ? retract_length_swap : retract_length) / volumetric_multiplier[active_extruder]; + current_position[E_AXIS] += (swapping ? retract_length_swap : retract_length) / volumetric_multiplier[active_extruder]; plan_set_e_position(current_position[E_AXIS]); prepare_move(); @@ -1695,7 +1695,7 @@ static void homeaxis(AxisEnum axis) { } feedrate = retract_recover_feedrate * 60; - float move_e = swapretract ? retract_length_swap + retract_recover_length_swap : retract_length + retract_recover_length; + float move_e = swapping ? retract_length_swap + retract_recover_length_swap : retract_length + retract_recover_length; current_position[E_AXIS] -= move_e / volumetric_multiplier[active_extruder]; plan_set_e_position(current_position[E_AXIS]); prepare_move(); @@ -1770,7 +1770,7 @@ inline void gcode_G0_G1() { #endif //FWRETRACT prepare_move(); - //ClearToSend(); + //ok_to_send(); } } @@ -4292,7 +4292,7 @@ inline void gcode_M303() { destination[X_AXIS] = delta[X_AXIS]/axis_scaling[X_AXIS]; destination[Y_AXIS] = delta[Y_AXIS]/axis_scaling[Y_AXIS]; prepare_move(); - //ClearToSend(); + //ok_to_send(); return true; } return false; @@ -5515,7 +5515,7 @@ void process_commands() { SERIAL_ECHOLNPGM("\""); } - ClearToSend(); + ok_to_send(); } void FlushSerialRequestResend() { @@ -5523,10 +5523,10 @@ void FlushSerialRequestResend() { MYSERIAL.flush(); SERIAL_PROTOCOLPGM(MSG_RESEND); SERIAL_PROTOCOLLN(gcode_LastN + 1); - ClearToSend(); + ok_to_send(); } -void ClearToSend() { +void ok_to_send() { refresh_cmd_timeout(); #ifdef SDSUPPORT if (fromsd[cmd_queue_index_r]) return; @@ -5755,34 +5755,35 @@ void mesh_plan_buffer_line(float x, float y, float z, const float e, float feed_ #endif // PREVENT_DANGEROUS_EXTRUDE -void prepare_move() { - clamp_to_software_endstops(destination); - refresh_cmd_timeout(); - - #ifdef PREVENT_DANGEROUS_EXTRUDE - (void)prevent_dangerous_extrude(current_position[E_AXIS], destination[E_AXIS]); - #endif - - #ifdef SCARA //for now same as delta-code +#if defined(DELTA) || defined(SCARA) + inline bool prepare_move_delta() { float difference[NUM_AXIS]; - for (int8_t i = 0; i < NUM_AXIS; i++) difference[i] = destination[i] - current_position[i]; + for (int8_t i=0; i < NUM_AXIS; i++) difference[i] = destination[i] - current_position[i]; float cartesian_mm = sqrt(sq(difference[X_AXIS]) + sq(difference[Y_AXIS]) + sq(difference[Z_AXIS])); - if (cartesian_mm < 0.000001) { cartesian_mm = abs(difference[E_AXIS]); } - if (cartesian_mm < 0.000001) { return; } + if (cartesian_mm < 0.000001) cartesian_mm = abs(difference[E_AXIS]); + if (cartesian_mm < 0.000001) return false; float seconds = 6000 * cartesian_mm / feedrate / feedrate_multiplier; - int steps = max(1, int(scara_segments_per_second * seconds)); + int steps = max(1, int(delta_segments_per_second * seconds)); - //SERIAL_ECHOPGM("mm="); SERIAL_ECHO(cartesian_mm); - //SERIAL_ECHOPGM(" seconds="); SERIAL_ECHO(seconds); - //SERIAL_ECHOPGM(" steps="); SERIAL_ECHOLN(steps); + // SERIAL_ECHOPGM("mm="); SERIAL_ECHO(cartesian_mm); + // SERIAL_ECHOPGM(" seconds="); SERIAL_ECHO(seconds); + // SERIAL_ECHOPGM(" steps="); SERIAL_ECHOLN(steps); for (int s = 1; s <= steps; s++) { + float fraction = float(s) / float(steps); - for (int8_t i = 0; i < NUM_AXIS; i++) destination[i] = current_position[i] + difference[i] * fraction; - + + for (int8_t i = 0; i < NUM_AXIS; i++) + destination[i] = current_position[i] + difference[i] * fraction; + calculate_delta(destination); + + #ifdef ENABLE_AUTO_BED_LEVELING + adjust_delta(destination); + #endif + //SERIAL_ECHOPGM("destination[X_AXIS]="); SERIAL_ECHOLN(destination[X_AXIS]); //SERIAL_ECHOPGM("destination[Y_AXIS]="); SERIAL_ECHOLN(destination[Y_AXIS]); //SERIAL_ECHOPGM("destination[Z_AXIS]="); SERIAL_ECHOLN(destination[Z_AXIS]); @@ -5792,37 +5793,18 @@ void prepare_move() { plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], feedrate/60*feedrate_multiplier/100.0, active_extruder); } + return true; + } - #endif // SCARA - - #ifdef DELTA +#endif // DELTA || SCARA - float difference[NUM_AXIS]; - for (int8_t i=0; i < NUM_AXIS; i++) difference[i] = destination[i] - current_position[i]; +#ifdef SCARA + inline bool prepare_move_scara() { return prepare_move_delta(); } +#endif - float cartesian_mm = sqrt(sq(difference[X_AXIS]) + sq(difference[Y_AXIS]) + sq(difference[Z_AXIS])); - if (cartesian_mm < 0.000001) cartesian_mm = abs(difference[E_AXIS]); - if (cartesian_mm < 0.000001) return; - float seconds = 6000 * cartesian_mm / feedrate / feedrate_multiplier; - int steps = max(1, int(delta_segments_per_second * seconds)); +#ifdef DUAL_X_CARRIAGE - // SERIAL_ECHOPGM("mm="); SERIAL_ECHO(cartesian_mm); - // SERIAL_ECHOPGM(" seconds="); SERIAL_ECHO(seconds); - // SERIAL_ECHOPGM(" steps="); SERIAL_ECHOLN(steps); - - for (int s = 1; s <= steps; s++) { - float fraction = float(s) / float(steps); - for (int8_t i = 0; i < NUM_AXIS; i++) destination[i] = current_position[i] + difference[i] * fraction; - calculate_delta(destination); - #ifdef ENABLE_AUTO_BED_LEVELING - adjust_delta(destination); - #endif - plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], feedrate/60*feedrate_multiplier/100.0, active_extruder); - } - - #endif // DELTA - - #ifdef DUAL_X_CARRIAGE + inline bool prepare_move_dual_x_carriage() { if (active_extruder_parked) { if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) { // move duplicate extruder into correct duplication position. @@ -5843,7 +5825,7 @@ void prepare_move() { set_current_to_destination(); NOLESS(raised_parked_position[Z_AXIS], destination[Z_AXIS]); delayed_move_time = millis(); - return; + return false; } } delayed_move_time = 0; @@ -5854,9 +5836,14 @@ void prepare_move() { active_extruder_parked = false; } } - #endif // DUAL_X_CARRIAGE + return true; + } - #if !defined(DELTA) && !defined(SCARA) +#endif // DUAL_X_CARRIAGE + +#if !defined(DELTA) && !defined(SCARA) + + inline bool prepare_move_cartesian() { // Do not use feedrate_multiplier for E or Z only moves if (current_position[X_AXIS] == destination[X_AXIS] && current_position[Y_AXIS] == destination[Y_AXIS]) { line_to_destination(); @@ -5864,12 +5851,40 @@ void prepare_move() { else { #ifdef MESH_BED_LEVELING mesh_plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], (feedrate/60)*(feedrate_multiplier/100.0), active_extruder); - return; + return false; #else line_to_destination(feedrate * feedrate_multiplier / 100.0); - #endif // MESH_BED_LEVELING + #endif } - #endif // !(DELTA || SCARA) + return true; + } + +#endif // !DELTA && !SCARA + +/** + * Prepare a single move and get ready for the next one + */ +void prepare_move() { + clamp_to_software_endstops(destination); + refresh_cmd_timeout(); + + #ifdef PREVENT_DANGEROUS_EXTRUDE + prevent_dangerous_extrude(current_position[E_AXIS], destination[E_AXIS]); + #endif + + #ifdef SCARA + if (!prepare_move_scara()) return; + #elif defined(DELTA) + if (!prepare_move_delta()) return; + #endif + + #ifdef DUAL_X_CARRIAGE + if (!prepare_move_dual_x_carriage()) return; + #endif + + #if !defined(DELTA) && !defined(SCARA) + if (!prepare_move_cartesian()) return; + #endif set_current_to_destination(); } @@ -5889,37 +5904,37 @@ void prepare_arc_move(char isclockwise) { #if HAS_CONTROLLERFAN -millis_t lastMotor = 0; // Last time a motor was turned on -millis_t lastMotorCheck = 0; // Last time the state was checked - -void controllerFan() { - millis_t ms = millis(); - if (ms >= lastMotorCheck + 2500) { // Not a time critical function, so we only check every 2500ms - lastMotorCheck = ms; - if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON || soft_pwm_bed > 0 - || E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled... - #if EXTRUDERS > 1 - || E1_ENABLE_READ == E_ENABLE_ON - #if HAS_X2_ENABLE - || X2_ENABLE_READ == X_ENABLE_ON - #endif - #if EXTRUDERS > 2 - || E2_ENABLE_READ == E_ENABLE_ON - #if EXTRUDERS > 3 - || E3_ENABLE_READ == E_ENABLE_ON + void controllerFan() { + static millis_t lastMotor = 0; // Last time a motor was turned on + static millis_t lastMotorCheck = 0; // Last time the state was checked + millis_t ms = millis(); + if (ms >= lastMotorCheck + 2500) { // Not a time critical function, so we only check every 2500ms + lastMotorCheck = ms; + if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON || soft_pwm_bed > 0 + || E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled... + #if EXTRUDERS > 1 + || E1_ENABLE_READ == E_ENABLE_ON + #if HAS_X2_ENABLE + || X2_ENABLE_READ == X_ENABLE_ON + #endif + #if EXTRUDERS > 2 + || E2_ENABLE_READ == E_ENABLE_ON + #if EXTRUDERS > 3 + || E3_ENABLE_READ == E_ENABLE_ON + #endif #endif #endif - #endif - ) { - lastMotor = ms; //... set time to NOW so the fan will turn on + ) { + lastMotor = ms; //... set time to NOW so the fan will turn on + } + uint8_t speed = (lastMotor == 0 || ms >= lastMotor + (CONTROLLERFAN_SECS * 1000UL)) ? 0 : CONTROLLERFAN_SPEED; + // allows digital or PWM fan output to be used (see M42 handling) + digitalWrite(CONTROLLERFAN_PIN, speed); + analogWrite(CONTROLLERFAN_PIN, speed); } - uint8_t speed = (lastMotor == 0 || ms >= lastMotor + (CONTROLLERFAN_SECS * 1000UL)) ? 0 : CONTROLLERFAN_SPEED; - // allows digital or PWM fan output to be used (see M42 handling) - digitalWrite(CONTROLLERFAN_PIN, speed); - analogWrite(CONTROLLERFAN_PIN, speed); } -} -#endif + +#endif // HAS_CONTROLLERFAN #ifdef SCARA void calculate_SCARA_forward_Transform(float f_scara[3]) From b2bd9aae7c67a3d5501b1ead51fe509ab7147665 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 May 2015 04:18:15 -0700 Subject: [PATCH 091/126] SCARA_SEGMENTS_PER_SECOND --- Marlin/Marlin_main.cpp | 1 + Marlin/example_configurations/SCARA/Configuration.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index c534c8867..1dcadf1c4 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -363,6 +363,7 @@ bool target_direction; #endif #ifdef SCARA + float delta_segments_per_second = SCARA_SEGMENTS_PER_SECOND; static float delta[3] = { 0 }; float axis_scaling[3] = { 1, 1, 1 }; // Build size scaling, default to 1 #endif diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 151b70300..bb552e5f3 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -30,7 +30,7 @@ Here are some standard links for getting your machine calibrated: // You might need Z-Min endstop on SCARA-Printer to use this feature. Actually untested! // Uncomment to use Morgan scara mode #define SCARA -#define scara_segments_per_second 200 //careful, two much will decrease performance... +#define SCARA_SEGMENTS_PER_SECOND 200 // If movement is choppy try lowering this value // Length of inner support arm #define Linkage_1 150 //mm Preprocessor cannot handle decimal point... // Length of outer support arm Measure arm lengths precisely and enter From 27ad381e253e538d2f20997e0d46cc02c342f988 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 May 2015 07:52:08 -0700 Subject: [PATCH 092/126] Allow fractional seconds in G4 and M0 --- Marlin/Marlin_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 1dcadf1c4..a0fb564a6 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1793,7 +1793,7 @@ inline void gcode_G4() { millis_t codenum = 0; if (code_seen('P')) codenum = code_value_long(); // milliseconds to wait - if (code_seen('S')) codenum = code_value_long() * 1000; // seconds to wait + if (code_seen('S')) codenum = code_value() * 1000; // seconds to wait st_synchronize(); refresh_cmd_timeout(); @@ -2660,7 +2660,7 @@ inline void gcode_G92() { hasP = codenum > 0; } if (code_seen('S')) { - codenum = code_value_short() * 1000UL; // seconds to wait + codenum = code_value() * 1000; // seconds to wait hasS = codenum > 0; } char* starpos = strchr(src, '*'); From 5693a6e3c9a3350da9d73288605f9457dd9a27cf Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 May 2015 18:17:13 -0700 Subject: [PATCH 093/126] Fix heating error message --- Marlin/temperature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 5ca03a757..a5ee27313 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -626,7 +626,7 @@ void manage_heater() { if (degHotend(e) < watch_target_temp[e]) { // Stop! disable_all_heaters(); - _temp_error(e, MSG_HEATING_FAILED, MSG_HEATING_FAILED_LCD); + _temp_error(e, PSTR(MSG_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD)); } else { // Only check once per M104/M109 From 6697a8f3752a32290f876a214a9e46fcaf2a9c53 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 May 2015 18:22:47 -0700 Subject: [PATCH 094/126] Watch the heater a little longer --- Marlin/temperature.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index a5ee27313..7043eeda0 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -620,6 +620,7 @@ void manage_heater() { // Check if the temperature is failing to increase #ifdef THERMAL_PROTECTION_HOTENDS + // Is it time to check this extruder's heater? if (watch_heater_next_ms[e] && ms > watch_heater_next_ms[e]) { // Has it failed to increase enough? @@ -629,10 +630,11 @@ void manage_heater() { _temp_error(e, PSTR(MSG_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD)); } else { - // Only check once per M104/M109 - watch_heater_next_ms[e] = 0; + // Start again if the target is still far off + start_watching_heater(e); } } + #endif // THERMAL_PROTECTION_HOTENDS #ifdef TEMP_SENSOR_1_AS_REDUNDANT From d693e0f3784d72f9acdc610cd3dcf242b993f356 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 May 2015 18:30:38 -0700 Subject: [PATCH 095/126] Use WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1 as difference limit --- Marlin/Configuration_adv.h | 2 +- Marlin/configurator/config/Configuration_adv.h | 2 +- Marlin/example_configurations/Felix/Configuration_adv.h | 2 +- Marlin/example_configurations/Hephestos/Configuration_adv.h | 2 +- Marlin/example_configurations/K8200/Configuration_adv.h | 2 +- Marlin/example_configurations/SCARA/Configuration_adv.h | 2 +- Marlin/example_configurations/WITBOX/Configuration_adv.h | 2 +- Marlin/example_configurations/delta/biv2.5/Configuration_adv.h | 2 +- Marlin/example_configurations/delta/generic/Configuration_adv.h | 2 +- .../delta/kossel_mini/Configuration_adv.h | 2 +- Marlin/example_configurations/makibox/Configuration_adv.h | 2 +- Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h | 2 +- Marlin/temperature.cpp | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 1d94ede57..44f2f96dd 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -25,7 +25,7 @@ * Whenever an M104 or M109 increases the target temperature the firmware will wait for the * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + * but only if the current temperature is far enough below the target for a reliable test. */ #define WATCH_TEMP_PERIOD 16 // Seconds #define WATCH_TEMP_INCREASE 4 // Degrees Celsius diff --git a/Marlin/configurator/config/Configuration_adv.h b/Marlin/configurator/config/Configuration_adv.h index e816e9eb5..b03d42a61 100644 --- a/Marlin/configurator/config/Configuration_adv.h +++ b/Marlin/configurator/config/Configuration_adv.h @@ -25,7 +25,7 @@ * Whenever an M104 or M109 increases the target temperature the firmware will wait for the * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + * but only if the current temperature is far enough below the target for a reliable test. */ #define WATCH_TEMP_PERIOD 16 // Seconds #define WATCH_TEMP_INCREASE 4 // Degrees Celsius diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 82bc7130d..244ec0652 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -25,7 +25,7 @@ * Whenever an M104 or M109 increases the target temperature the firmware will wait for the * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + * but only if the current temperature is far enough below the target for a reliable test. */ #define WATCH_TEMP_PERIOD 16 // Seconds #define WATCH_TEMP_INCREASE 4 // Degrees Celsius diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index dc9139023..6d5102ca4 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -25,7 +25,7 @@ * Whenever an M104 or M109 increases the target temperature the firmware will wait for the * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + * but only if the current temperature is far enough below the target for a reliable test. */ #define WATCH_TEMP_PERIOD 16 // Seconds #define WATCH_TEMP_INCREASE 4 // Degrees Celsius diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 82bc7130d..244ec0652 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -25,7 +25,7 @@ * Whenever an M104 or M109 increases the target temperature the firmware will wait for the * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + * but only if the current temperature is far enough below the target for a reliable test. */ #define WATCH_TEMP_PERIOD 16 // Seconds #define WATCH_TEMP_INCREASE 4 // Degrees Celsius diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 8d0f89f92..60a58797c 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -25,7 +25,7 @@ * Whenever an M104 or M109 increases the target temperature the firmware will wait for the * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + * but only if the current temperature is far enough below the target for a reliable test. */ #define WATCH_TEMP_PERIOD 16 // Seconds #define WATCH_TEMP_INCREASE 4 // Degrees Celsius diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index 0323efc7e..6382b6c1e 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -25,7 +25,7 @@ * Whenever an M104 or M109 increases the target temperature the firmware will wait for the * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + * but only if the current temperature is far enough below the target for a reliable test. */ #define WATCH_TEMP_PERIOD 16 // Seconds #define WATCH_TEMP_INCREASE 4 // Degrees Celsius diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h index 52d91378f..e5e3a11fd 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h @@ -25,7 +25,7 @@ * Whenever an M104 or M109 increases the target temperature the firmware will wait for the * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + * but only if the current temperature is far enough below the target for a reliable test. */ #define WATCH_TEMP_PERIOD 16 // Seconds #define WATCH_TEMP_INCREASE 4 // Degrees Celsius diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 40e7458a7..4f2b11454 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -25,7 +25,7 @@ * Whenever an M104 or M109 increases the target temperature the firmware will wait for the * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + * but only if the current temperature is far enough below the target for a reliable test. */ #define WATCH_TEMP_PERIOD 16 // Seconds #define WATCH_TEMP_INCREASE 4 // Degrees Celsius diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 5df4e54e5..f4cb49222 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -25,7 +25,7 @@ * Whenever an M104 or M109 increases the target temperature the firmware will wait for the * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + * but only if the current temperature is far enough below the target for a reliable test. */ #define WATCH_TEMP_PERIOD 16 // Seconds #define WATCH_TEMP_INCREASE 4 // Degrees Celsius diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 2c05afdda..7d33bd9ee 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -25,7 +25,7 @@ * Whenever an M104 or M109 increases the target temperature the firmware will wait for the * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + * but only if the current temperature is far enough below the target for a reliable test. */ #define WATCH_TEMP_PERIOD 16 // Seconds #define WATCH_TEMP_INCREASE 4 // Degrees Celsius diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index a320f3228..2747e0098 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -25,7 +25,7 @@ * Whenever an M104 or M109 increases the target temperature the firmware will wait for the * WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees. + * but only if the current temperature is far enough below the target for a reliable test. */ #define WATCH_TEMP_PERIOD 16 // Seconds #define WATCH_TEMP_INCREASE 4 // Degrees Celsius diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 7043eeda0..ff730507a 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -1007,7 +1007,7 @@ void tp_init() { */ void start_watching_heater(int e) { millis_t ms = millis() + WATCH_TEMP_PERIOD * 1000; - if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE * 2)) { + if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1)) { watch_target_temp[e] = degHotend(e) + WATCH_TEMP_INCREASE; watch_heater_next_ms[e] = ms; } From fcfd99c1aecaef1be898ca72282b118ca65ba26e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 May 2015 18:46:16 -0700 Subject: [PATCH 096/126] Add comments to lcd_control_temperature_menu --- Marlin/ultralcd.cpp | 47 ++++++++++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index a1a24dbcd..1bcd3dbaa 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -7,12 +7,11 @@ #include "stepper.h" #include "configuration_store.h" -int8_t encoderDiff; /* encoderDiff is updated from interrupt context and added to encoderPosition every LCD update */ +int8_t encoderDiff; // updated from interrupt context and added to encoderPosition every LCD update bool encoderRateMultiplierEnabled; int32_t lastEncoderMovementMillis; -/* Configuration settings */ int plaPreheatHotendTemp; int plaPreheatHPBTemp; int plaPreheatFanSpeed; @@ -25,9 +24,7 @@ int absPreheatFanSpeed; millis_t previous_lcd_status_ms = 0; #endif -/* !Configuration settings */ - -//Function pointer to menu functions. +// Function pointer to menu functions. typedef void (*menuFunc_t)(); uint8_t lcd_status_message_level; @@ -875,10 +872,17 @@ static void lcd_control_menu() { * "Control" > "Temperature" submenu * */ - static void lcd_control_temperature_menu() { START_MENU(); + + // + // ^ Control + // MENU_ITEM(back, MSG_CONTROL, lcd_control_menu); + + // + // Nozzle, Nozzle 2, Nozzle 3, Nozzle 4 + // #if TEMP_SENSOR_0 != 0 MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15); #endif @@ -897,16 +901,32 @@ static void lcd_control_temperature_menu() { #endif // EXTRUDERS > 3 #endif // EXTRUDERS > 2 #endif // EXTRUDERS > 1 + + // + // Bed + // #if TEMP_SENSOR_BED != 0 MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15); #endif + + // + // Fan Speed + // MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255); + + // + // Autotemp, Min, Max, Fact + // #if defined(AUTOTEMP) && (TEMP_SENSOR_0 != 0) MENU_ITEM_EDIT(bool, MSG_AUTOTEMP, &autotemp_enabled); MENU_ITEM_EDIT(float3, MSG_MIN, &autotemp_min, 0, HEATER_0_MAXTEMP - 15); MENU_ITEM_EDIT(float3, MSG_MAX, &autotemp_max, 0, HEATER_0_MAXTEMP - 15); MENU_ITEM_EDIT(float32, MSG_FACTOR, &autotemp_factor, 0.0, 1.0); #endif + + // + // PID-P, PID-I, PID-D, PID-C + // #ifdef PIDTEMP // set up temp variables - undo the default scaling raw_Ki = unscalePID_i(PID_PARAM(Ki,0)); @@ -959,7 +979,15 @@ static void lcd_control_temperature_menu() { #endif//EXTRUDERS > 1 #endif //PID_PARAMS_PER_EXTRUDER #endif//PIDTEMP + + // + // Preheat PLA conf + // MENU_ITEM(submenu, MSG_PREHEAT_PLA_SETTINGS, lcd_control_temperature_preheat_pla_settings_menu); + + // + // Preheat ABS conf + // MENU_ITEM(submenu, MSG_PREHEAT_ABS_SETTINGS, lcd_control_temperature_preheat_abs_settings_menu); END_MENU(); } @@ -969,7 +997,6 @@ static void lcd_control_temperature_menu() { * "Temperature" > "Preheat PLA conf" submenu * */ - static void lcd_control_temperature_preheat_pla_settings_menu() { START_MENU(); MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu); @@ -991,7 +1018,6 @@ static void lcd_control_temperature_preheat_pla_settings_menu() { * "Temperature" > "Preheat ABS conf" submenu * */ - static void lcd_control_temperature_preheat_abs_settings_menu() { START_MENU(); MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu); @@ -1013,7 +1039,6 @@ static void lcd_control_temperature_preheat_abs_settings_menu() { * "Control" > "Motion" submenu * */ - static void lcd_control_motion_menu() { START_MENU(); MENU_ITEM(back, MSG_CONTROL, lcd_control_menu); @@ -1055,7 +1080,6 @@ static void lcd_control_motion_menu() { * "Control" > "Filament" submenu * */ - static void lcd_control_volumetric_menu() { START_MENU(); MENU_ITEM(back, MSG_CONTROL, lcd_control_menu); @@ -1083,7 +1107,6 @@ static void lcd_control_volumetric_menu() { * "Control" > "Contrast" submenu * */ - #ifdef HAS_LCD_CONTRAST static void lcd_set_contrast() { if (encoderPosition != 0) { @@ -1103,7 +1126,6 @@ static void lcd_control_volumetric_menu() { * "Control" > "Retract" submenu * */ - #ifdef FWRETRACT static void lcd_control_retract_menu() { START_MENU(); @@ -1141,7 +1163,6 @@ static void lcd_sd_updir() { * "Print from SD" submenu * */ - void lcd_sdcard_menu() { if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return; // nothing to do (so don't thrash the SD card) uint16_t fileCnt = card.getnrfilenames(); From f65833931d3a5af5fbb44e05dd808c10c41dbb06 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 13 May 2015 02:02:19 -0700 Subject: [PATCH 097/126] Formatting tweaks --- Marlin/Configuration.h | 3 +- Marlin/Marlin_main.cpp | 2 +- Marlin/cardreader.cpp | 1 + Marlin/temperature.cpp | 11 +- .../ultralcd_implementation_hitachi_HD44780.h | 107 ++++++++---------- 5 files changed, 58 insertions(+), 66 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 823fadc14..f71699db7 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -605,10 +605,9 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #ifdef EEPROM_SETTINGS // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // please keep turned on if you can. + #define EEPROM_CHITCHAT // Please keep turned on if you can. #endif - // @section temperature // Preheat Constants diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index d4e1bf44c..ecdad9977 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -5982,7 +5982,7 @@ void calculate_SCARA_forward_Transform(float f_scara[3]) delta[X_AXIS] = x_cos + y_cos + SCARA_offset_x; //theta delta[Y_AXIS] = x_sin + y_sin + SCARA_offset_y; //theta+phi - + //SERIAL_ECHOPGM(" delta[X_AXIS]="); SERIAL_ECHO(delta[X_AXIS]); //SERIAL_ECHOPGM(" delta[Y_AXIS]="); SERIAL_ECHOLN(delta[Y_AXIS]); } diff --git a/Marlin/cardreader.cpp b/Marlin/cardreader.cpp index 639b4f244..4b6017218 100644 --- a/Marlin/cardreader.cpp +++ b/Marlin/cardreader.cpp @@ -20,6 +20,7 @@ CardReader::CardReader() { autostart_stilltocheck = true; //the SD start is delayed, because otherwise the serial cannot answer fast enough to make contact with the host software. autostart_index = 0; + //power to SD reader #if SDPOWER > -1 OUT_WRITE(SDPOWER, HIGH); diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index ff730507a..9ccd1de14 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -245,8 +245,8 @@ void PID_autotune(float temp, int extruder, int ncycles) } #endif - if (heating == true && input > temp) { - if (ms - t2 > 5000) { + if (heating && input > temp) { + if (ms > t2 + 5000) { heating = false; if (extruder < 0) soft_pwm_bed = (bias - d) >> 1; @@ -257,8 +257,9 @@ void PID_autotune(float temp, int extruder, int ncycles) max = temp; } } - if (heating == false && input < temp) { - if (ms - t1 > 5000) { + + if (!heating && input < temp) { + if (ms > t1 + 5000) { heating = true; t2 = ms; t_low = t2 - t1; @@ -787,7 +788,7 @@ static void updateTemperaturesFromRawValues() { #ifdef HEATER_0_USES_MAX6675 current_temperature_raw[0] = read_max6675(); #endif - for(uint8_t e = 0; e < EXTRUDERS; e++) { + for (uint8_t e = 0; e < EXTRUDERS; e++) { current_temperature[e] = analog2temp(current_temperature_raw[e], e); } current_temperature_bed = analog2tempBed(current_temperature_bed_raw); diff --git a/Marlin/ultralcd_implementation_hitachi_HD44780.h b/Marlin/ultralcd_implementation_hitachi_HD44780.h index 7f9a88e5b..3f87e8b2f 100644 --- a/Marlin/ultralcd_implementation_hitachi_HD44780.h +++ b/Marlin/ultralcd_implementation_hitachi_HD44780.h @@ -15,8 +15,8 @@ //////////////////////////////////// // Setup button and encode mappings for each panel (into 'buttons' variable // -// This is just to map common functions (across different panels) onto the same -// macro name. The mapping is independent of whether the button is directly connected or +// This is just to map common functions (across different panels) onto the same +// macro name. The mapping is independent of whether the button is directly connected or // via a shift/i2c register. #ifdef ULTIPANEL @@ -38,7 +38,7 @@ // #if defined(LCD_I2C_VIKI) #define B_I2C_BTN_OFFSET 3 // (the first three bit positions reserved for EN_A, EN_B, EN_C) - + // button and encoder bit positions within 'buttons' #define B_LE (BUTTON_LEFT< -1 + #if defined(BTN_ENC) && BTN_ENC > -1 // the pause/stop/restart button is connected to BTN_ENC when used - #define B_ST (EN_C) // Map the pause/stop/resume button into its normalized functional name + #define B_ST (EN_C) // Map the pause/stop/resume button into its normalized functional name #define LCD_CLICKED (buttons&(B_MI|B_RI|B_ST)) // pause/stop button also acts as click until we implement proper pause/stop. #else #define LCD_CLICKED (buttons&(B_MI|B_RI)) - #endif + #endif // I2C buttons take too long to read inside an interrupt context and so we read them during lcd_update #define LCD_HAS_SLOW_BUTTONS #elif defined(LCD_I2C_PANELOLU2) // encoder click can be read through I2C if not directly connected - #if BTN_ENC <= 0 + #if BTN_ENC <= 0 #define B_I2C_BTN_OFFSET 3 // (the first three bit positions reserved for EN_A, EN_B, EN_C) - + #define B_MI (PANELOLU2_ENCODER_C< #define LCD_CLASS LiquidCrystal_I2C LCD_CLASS lcd(LCD_I2C_ADDRESS,LCD_I2C_PIN_EN,LCD_I2C_PIN_RW,LCD_I2C_PIN_RS,LCD_I2C_PIN_D4,LCD_I2C_PIN_D5,LCD_I2C_PIN_D6,LCD_I2C_PIN_D7); - + #elif defined(LCD_I2C_TYPE_MCP23017) //for the LED indicators (which maybe mapped to different things in lcd_implementation_update_indicators()) #define LED_A 0x04 //100 @@ -156,28 +156,28 @@ #include #define LCD_CLASS LiquidTWI2 #if defined(DETECT_DEVICE) - LCD_CLASS lcd(LCD_I2C_ADDRESS, 1); + LCD_CLASS lcd(LCD_I2C_ADDRESS, 1); #else - LCD_CLASS lcd(LCD_I2C_ADDRESS); + LCD_CLASS lcd(LCD_I2C_ADDRESS); #endif - + #elif defined(LCD_I2C_TYPE_MCP23008) #include #include #define LCD_CLASS LiquidTWI2 #if defined(DETECT_DEVICE) - LCD_CLASS lcd(LCD_I2C_ADDRESS, 1); + LCD_CLASS lcd(LCD_I2C_ADDRESS, 1); #else - LCD_CLASS lcd(LCD_I2C_ADDRESS); + LCD_CLASS lcd(LCD_I2C_ADDRESS); #endif #elif defined(LCD_I2C_TYPE_PCA8574) #include #define LCD_CLASS LiquidCrystal_I2C LCD_CLASS lcd(LCD_I2C_ADDRESS, LCD_WIDTH, LCD_HEIGHT); - + // 2 wire Non-latching LCD SR from: -// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection +// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection #elif defined(SR_LCD_2W_NL) extern "C" void __cxa_pure_virtual() { while (1); } #include @@ -353,65 +353,56 @@ static void lcd_implementation_init( #endif ) { -#if defined(LCD_I2C_TYPE_PCF8575) + #if defined(LCD_I2C_TYPE_PCF8575) lcd.begin(LCD_WIDTH, LCD_HEIGHT); - #ifdef LCD_I2C_PIN_BL - lcd.setBacklightPin(LCD_I2C_PIN_BL,POSITIVE); - lcd.setBacklight(HIGH); - #endif - -#elif defined(LCD_I2C_TYPE_MCP23017) + #ifdef LCD_I2C_PIN_BL + lcd.setBacklightPin(LCD_I2C_PIN_BL, POSITIVE); + lcd.setBacklight(HIGH); + #endif + + #elif defined(LCD_I2C_TYPE_MCP23017) lcd.setMCPType(LTI_TYPE_MCP23017); lcd.begin(LCD_WIDTH, LCD_HEIGHT); lcd.setBacklight(0); //set all the LEDs off to begin with - -#elif defined(LCD_I2C_TYPE_MCP23008) + + #elif defined(LCD_I2C_TYPE_MCP23008) lcd.setMCPType(LTI_TYPE_MCP23008); lcd.begin(LCD_WIDTH, LCD_HEIGHT); -#elif defined(LCD_I2C_TYPE_PCA8574) - lcd.init(); - lcd.backlight(); - -#else + #elif defined(LCD_I2C_TYPE_PCA8574) + lcd.init(); + lcd.backlight(); + + #else lcd.begin(LCD_WIDTH, LCD_HEIGHT); -#endif + #endif - lcd_set_custom_characters( - #ifdef LCD_PROGRESS_BAR - progress_bar_set - #endif - ); + lcd_set_custom_characters( + #ifdef LCD_PROGRESS_BAR + progress_bar_set + #endif + ); - lcd.clear(); -} -static void lcd_implementation_clear() -{ - lcd.clear(); + lcd.clear(); } +static void lcd_implementation_clear() { lcd.clear(); } + /* Arduino < 1.0.0 is missing a function to print PROGMEM strings, so we need to implement our own */ char lcd_printPGM(const char* str) { - char c; - char n = 0; - while((c = pgm_read_byte(str++))) { - n += charset_mapper(c); - } + char c, n = 0; + while ((c = pgm_read_byte(str++))) n += charset_mapper(c); return n; } char lcd_print(char* str) { char c, n = 0;; unsigned char i = 0; - while((c = str[i++])) { - n += charset_mapper(c); - } + while ((c = str[i++])) n += charset_mapper(c); return n; } -unsigned lcd_print(char c) { - return charset_mapper(c); -} +unsigned lcd_print(char c) { return charset_mapper(c); } /* Possible status screens: @@ -437,7 +428,7 @@ Possible status screens: 20x4 |01234567890123456789| |T000/000D B000/000D | - |T000/000D Z000.0| + |T000/000D Z000.00 | |F100% SD100% T--:--| |Status line.........| */ @@ -728,13 +719,13 @@ static void lcd_implementation_drawmenu_sddirectory(bool sel, uint8_t row, const static void lcd_implementation_update_indicators() { #if defined(LCD_I2C_PANELOLU2) || defined(LCD_I2C_VIKI) - //set the LEDS - referred to as backlights by the LiquidTWI2 library + // Set the LEDS - referred to as backlights by the LiquidTWI2 library static uint8_t ledsprev = 0; uint8_t leds = 0; if (target_temperature_bed > 0) leds |= LED_A; if (target_temperature[0] > 0) leds |= LED_B; if (fanSpeed) leds |= LED_C; - #if EXTRUDERS > 1 + #if EXTRUDERS > 1 if (target_temperature[1] > 0) leds |= LED_C; #endif if (leds != ledsprev) { @@ -766,4 +757,4 @@ static void lcd_implementation_drawmenu_sddirectory(bool sel, uint8_t row, const #endif // LCD_HAS_SLOW_BUTTONS -#endif //__ULTRALCD_IMPLEMENTATION_HITACHI_HD44780_H +#endif // ULTRALCD_IMPLEMENTATION_HITACHI_HD44780_H From 80807b2d71802b7aee4d5b3269a794d682fa3a97 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 13 May 2015 18:52:41 -0700 Subject: [PATCH 098/126] Consolidate arc code, remove motion_control.* --- Marlin/Makefile | 4 +- Marlin/Marlin.h | 1 - Marlin/Marlin_main.cpp | 217 +++++++++++++++++++++++++++++--------- Marlin/motion_control.cpp | 145 ------------------------- Marlin/motion_control.h | 32 ------ 5 files changed, 170 insertions(+), 229 deletions(-) delete mode 100644 Marlin/motion_control.cpp delete mode 100644 Marlin/motion_control.h diff --git a/Marlin/Makefile b/Marlin/Makefile index e23c2a19b..34ad1340d 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -266,8 +266,8 @@ VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/cores/teensy endif CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp \ MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp \ - SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp \ - stepper.cpp temperature.cpp cardreader.cpp configuration_store.cpp \ + SdFile.cpp SdVolume.cpp planner.cpp stepper.cpp \ + temperature.cpp cardreader.cpp configuration_store.cpp \ watchdog.cpp SPI.cpp servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \ vector_3.cpp qr_solve.cpp ifeq ($(LIQUID_TWI2), 0) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index c62ba9130..af362457d 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -207,7 +207,6 @@ void disable_all_steppers(); void FlushSerialRequestResend(); void ok_to_send(); -void get_coordinates(); #ifdef DELTA void calculate_delta(float cartesian[3]); #ifdef ENABLE_AUTO_BED_LEVELING diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index d4e1bf44c..03587ab56 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -47,7 +47,6 @@ #include "planner.h" #include "stepper.h" #include "temperature.h" -#include "motion_control.h" #include "cardreader.h" #include "watchdog.h" #include "configuration_store.h" @@ -226,7 +225,7 @@ bool Running = true; uint8_t marlin_debug_flags = DEBUG_INFO|DEBUG_ERRORS; -static float feedrate = 1500.0, next_feedrate, saved_feedrate; +static float feedrate = 1500.0, saved_feedrate; float current_position[NUM_AXIS] = { 0.0 }; static float destination[NUM_AXIS] = { 0.0 }; bool axis_known_position[3] = { false }; @@ -258,7 +257,7 @@ const char errormagic[] PROGMEM = "Error:"; const char echomagic[] PROGMEM = "echo:"; const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'}; -static float offset[3] = { 0 }; +static float arc_offset[3] = { 0 }; static bool relative_mode = false; //Determines Absolute or Relative Coordinates static char serial_char; static int serial_count = 0; @@ -401,7 +400,6 @@ bool target_direction; //================================ Functions ================================ //=========================================================================== -void get_arc_coordinates(); bool setTargetedHotend(int code); void serial_echopair_P(const char *s_P, float v) { serialprintPGM(s_P); SERIAL_ECHO(v); } @@ -1770,12 +1768,32 @@ static void homeaxis(AxisEnum axis) { * */ +/** + * Set XYZE destination and feedrate from the current GCode command + * + * - Set destination from included axis codes + * - Set to current for missing axis codes + * - Set the feedrate, if included + */ +void gcode_get_destination() { + for (int i = 0; i < NUM_AXIS; i++) { + if (code_seen(axis_codes[i])) + destination[i] = code_value() + (axis_relative_modes[i] || relative_mode ? current_position[i] : 0); + else + destination[i] = current_position[i]; + } + if (code_seen('F')) { + float next_feedrate = code_value(); + if (next_feedrate > 0.0) feedrate = next_feedrate; + } +} + /** * G0, G1: Coordinated movement of X Y Z E axes */ inline void gcode_G0_G1() { if (IsRunning()) { - get_coordinates(); // For X Y Z E F + gcode_get_destination(); // For X Y Z E F #ifdef FWRETRACT @@ -1797,14 +1815,155 @@ inline void gcode_G0_G1() { } } +/** + * Plan an arc in 2 dimensions + * + * The arc is approximated by generating many small linear segments. + * The length of each segment is configured in MM_PER_ARC_SEGMENT (Default 1mm) + * Arcs should only be made relatively large (over 5mm). Your slicer should have + * options for G2/G3 arc generation. + */ +void plan_arc( + float *target, // Destination position + float *offset, // Center of rotation relative to current_position + uint8_t clockwise // Clockwise? +) { + + float radius = hypot(offset[X_AXIS], offset[Y_AXIS]), + center_axis0 = current_position[X_AXIS] + offset[X_AXIS], + center_axis1 = current_position[Y_AXIS] + offset[Y_AXIS], + linear_travel = target[Z_AXIS] - current_position[Z_AXIS], + extruder_travel = target[E_AXIS] - current_position[E_AXIS], + r_axis0 = -offset[X_AXIS], // Radius vector from center to current location + r_axis1 = -offset[Y_AXIS], + rt_axis0 = target[X_AXIS] - center_axis0, + rt_axis1 = target[Y_AXIS] - center_axis1; + + // CCW angle of rotation between position and target from the circle center. Only one atan2() trig computation required. + float angular_travel = atan2(r_axis0*rt_axis1-r_axis1*rt_axis0, r_axis0*rt_axis0+r_axis1*rt_axis1); + if (angular_travel < 0) { angular_travel += RADIANS(360); } + if (clockwise) { angular_travel -= RADIANS(360); } + + // Make a circle if the angular rotation is 0 + if (current_position[X_AXIS] == target[X_AXIS] && current_position[Y_AXIS] == target[Y_AXIS] && angular_travel == 0) + angular_travel += RADIANS(360); + + float mm_of_travel = hypot(angular_travel*radius, fabs(linear_travel)); + if (mm_of_travel < 0.001) { return; } + uint16_t segments = floor(mm_of_travel / MM_PER_ARC_SEGMENT); + if (segments == 0) segments = 1; + + float theta_per_segment = angular_travel/segments; + float linear_per_segment = linear_travel/segments; + float extruder_per_segment = extruder_travel/segments; + + /* Vector rotation by transformation matrix: r is the original vector, r_T is the rotated vector, + and phi is the angle of rotation. Based on the solution approach by Jens Geisler. + r_T = [cos(phi) -sin(phi); + sin(phi) cos(phi] * r ; + + For arc generation, the center of the circle is the axis of rotation and the radius vector is + defined from the circle center to the initial position. Each line segment is formed by successive + vector rotations. This requires only two cos() and sin() computations to form the rotation + matrix for the duration of the entire arc. Error may accumulate from numerical round-off, since + all double numbers are single precision on the Arduino. (True double precision will not have + round off issues for CNC applications.) Single precision error can accumulate to be greater than + tool precision in some cases. Therefore, arc path correction is implemented. + + Small angle approximation may be used to reduce computation overhead further. This approximation + holds for everything, but very small circles and large MM_PER_ARC_SEGMENT values. In other words, + theta_per_segment would need to be greater than 0.1 rad and N_ARC_CORRECTION would need to be large + to cause an appreciable drift error. N_ARC_CORRECTION~=25 is more than small enough to correct for + numerical drift error. N_ARC_CORRECTION may be on the order a hundred(s) before error becomes an + issue for CNC machines with the single precision Arduino calculations. + + This approximation also allows plan_arc to immediately insert a line segment into the planner + without the initial overhead of computing cos() or sin(). By the time the arc needs to be applied + a correction, the planner should have caught up to the lag caused by the initial plan_arc overhead. + This is important when there are successive arc motions. + */ + // Vector rotation matrix values + float cos_T = 1-0.5*theta_per_segment*theta_per_segment; // Small angle approximation + float sin_T = theta_per_segment; + + float arc_target[4]; + float sin_Ti; + float cos_Ti; + float r_axisi; + uint16_t i; + int8_t count = 0; + + // Initialize the linear axis + arc_target[Z_AXIS] = current_position[Z_AXIS]; + + // Initialize the extruder axis + arc_target[E_AXIS] = current_position[E_AXIS]; + + float feed_rate = feedrate*feedrate_multiplier/60/100.0; + + for (i = 1; i < segments; i++) { // Increment (segments-1) + + if (count < N_ARC_CORRECTION) { + // Apply vector rotation matrix to previous r_axis0 / 1 + r_axisi = r_axis0*sin_T + r_axis1*cos_T; + r_axis0 = r_axis0*cos_T - r_axis1*sin_T; + r_axis1 = r_axisi; + count++; + } + else { + // Arc correction to radius vector. Computed only every N_ARC_CORRECTION increments. + // Compute exact location by applying transformation matrix from initial radius vector(=-offset). + cos_Ti = cos(i*theta_per_segment); + sin_Ti = sin(i*theta_per_segment); + r_axis0 = -offset[X_AXIS]*cos_Ti + offset[Y_AXIS]*sin_Ti; + r_axis1 = -offset[X_AXIS]*sin_Ti - offset[Y_AXIS]*cos_Ti; + count = 0; + } + + // Update arc_target location + arc_target[X_AXIS] = center_axis0 + r_axis0; + arc_target[Y_AXIS] = center_axis1 + r_axis1; + arc_target[Z_AXIS] += linear_per_segment; + arc_target[E_AXIS] += extruder_per_segment; + + clamp_to_software_endstops(arc_target); + plan_buffer_line(arc_target[X_AXIS], arc_target[Y_AXIS], arc_target[Z_AXIS], arc_target[E_AXIS], feed_rate, active_extruder); + } + // Ensure last segment arrives at target location. + plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], feed_rate, active_extruder); + + // As far as the parser is concerned, the position is now == target. In reality the + // motion control system might still be processing the action and the real tool position + // in any intermediate location. + set_current_to_destination(); +} + /** * G2: Clockwise Arc * G3: Counterclockwise Arc */ inline void gcode_G2_G3(bool clockwise) { if (IsRunning()) { - get_arc_coordinates(); - prepare_arc_move(clockwise); + + #ifdef SF_ARC_FIX + bool relative_mode_backup = relative_mode; + relative_mode = true; + #endif + + gcode_get_destination(); + + #ifdef SF_ARC_FIX + relative_mode = relative_mode_backup; + #endif + + // Center of arc as offset from current_position + arc_offset[0] = code_seen('I') ? code_value() : 0; + arc_offset[1] = code_seen('J') ? code_value() : 0; + + // Send an arc to the planner + plan_arc(destination, arc_offset, clockwise); + + refresh_cmd_timeout(); } } @@ -4308,7 +4467,7 @@ inline void gcode_M303() { //SoftEndsEnabled = false; // Ignore soft endstops during calibration //SERIAL_ECHOLN(" Soft endstops disabled "); if (IsRunning()) { - //get_coordinates(); // For X Y Z E F + //gcode_get_destination(); // For X Y Z E F delta[X_AXIS] = delta_x; delta[Y_AXIS] = delta_y; calculate_SCARA_forward_Transform(delta); @@ -4932,7 +5091,7 @@ inline void gcode_T() { make_move = true; #endif - next_feedrate = code_value(); + float next_feedrate = code_value(); if (next_feedrate > 0.0) feedrate = next_feedrate; } #if EXTRUDERS > 1 @@ -5562,33 +5721,6 @@ void ok_to_send() { SERIAL_EOL; } -void get_coordinates() { - for (int i = 0; i < NUM_AXIS; i++) { - if (code_seen(axis_codes[i])) - destination[i] = code_value() + (axis_relative_modes[i] || relative_mode ? current_position[i] : 0); - else - destination[i] = current_position[i]; - } - if (code_seen('F')) { - next_feedrate = code_value(); - if (next_feedrate > 0.0) feedrate = next_feedrate; - } -} - -void get_arc_coordinates() { - #ifdef SF_ARC_FIX - bool relative_mode_backup = relative_mode; - relative_mode = true; - #endif - get_coordinates(); - #ifdef SF_ARC_FIX - relative_mode = relative_mode_backup; - #endif - - offset[0] = code_seen('I') ? code_value() : 0; - offset[1] = code_seen('J') ? code_value() : 0; -} - void clamp_to_software_endstops(float target[3]) { if (min_software_endstops) { NOLESS(target[X_AXIS], min_pos[X_AXIS]); @@ -5912,19 +6044,6 @@ void prepare_move() { set_current_to_destination(); } -void prepare_arc_move(char isclockwise) { - float r = hypot(offset[X_AXIS], offset[Y_AXIS]); // Compute arc radius for mc_arc - - // Trace the arc - mc_arc(current_position, destination, offset, X_AXIS, Y_AXIS, Z_AXIS, feedrate*feedrate_multiplier/60/100.0, r, isclockwise, active_extruder); - - // As far as the parser is concerned, the position is now == target. In reality the - // motion control system might still be processing the action and the real tool position - // in any intermediate location. - set_current_to_destination(); - refresh_cmd_timeout(); -} - #if HAS_CONTROLLERFAN void controllerFan() { diff --git a/Marlin/motion_control.cpp b/Marlin/motion_control.cpp deleted file mode 100644 index b26cbafc8..000000000 --- a/Marlin/motion_control.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/* - motion_control.c - high level interface for issuing motion commands - Part of Grbl - - Copyright (c) 2009-2011 Simen Svale Skogsrud - Copyright (c) 2011 Sungeun K. Jeon - - Grbl 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. - - Grbl 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 Grbl. If not, see . -*/ - -#include "Marlin.h" -#include "stepper.h" -#include "planner.h" - -// The arc is approximated by generating a huge number of tiny, linear segments. The length of each -// segment is configured in settings.mm_per_arc_segment. -void mc_arc(float *position, float *target, float *offset, uint8_t axis_0, uint8_t axis_1, - uint8_t axis_linear, float feed_rate, float radius, uint8_t isclockwise, uint8_t extruder) -{ - // int acceleration_manager_was_enabled = plan_is_acceleration_manager_enabled(); - // plan_set_acceleration_manager_enabled(false); // disable acceleration management for the duration of the arc - float center_axis0 = position[axis_0] + offset[axis_0]; - float center_axis1 = position[axis_1] + offset[axis_1]; - float linear_travel = target[axis_linear] - position[axis_linear]; - float extruder_travel = target[E_AXIS] - position[E_AXIS]; - float r_axis0 = -offset[axis_0]; // Radius vector from center to current location - float r_axis1 = -offset[axis_1]; - float rt_axis0 = target[axis_0] - center_axis0; - float rt_axis1 = target[axis_1] - center_axis1; - - // CCW angle between position and target from circle center. Only one atan2() trig computation required. - float angular_travel = atan2(r_axis0*rt_axis1-r_axis1*rt_axis0, r_axis0*rt_axis0+r_axis1*rt_axis1); - if (angular_travel < 0) { angular_travel += 2*M_PI; } - if (isclockwise) { angular_travel -= 2*M_PI; } - - //20141002:full circle for G03 did not work, e.g. G03 X80 Y80 I20 J0 F2000 is giving an Angle of zero so head is not moving - //to compensate when start pos = target pos && angle is zero -> angle = 2Pi - if (position[axis_0] == target[axis_0] && position[axis_1] == target[axis_1] && angular_travel == 0) - { - angular_travel += 2*M_PI; - } - //end fix G03 - - float millimeters_of_travel = hypot(angular_travel*radius, fabs(linear_travel)); - if (millimeters_of_travel < 0.001) { return; } - uint16_t segments = floor(millimeters_of_travel/MM_PER_ARC_SEGMENT); - if(segments == 0) segments = 1; - - /* - // Multiply inverse feed_rate to compensate for the fact that this movement is approximated - // by a number of discrete segments. The inverse feed_rate should be correct for the sum of - // all segments. - if (invert_feed_rate) { feed_rate *= segments; } - */ - float theta_per_segment = angular_travel/segments; - float linear_per_segment = linear_travel/segments; - float extruder_per_segment = extruder_travel/segments; - - /* Vector rotation by transformation matrix: r is the original vector, r_T is the rotated vector, - and phi is the angle of rotation. Based on the solution approach by Jens Geisler. - r_T = [cos(phi) -sin(phi); - sin(phi) cos(phi] * r ; - - For arc generation, the center of the circle is the axis of rotation and the radius vector is - defined from the circle center to the initial position. Each line segment is formed by successive - vector rotations. This requires only two cos() and sin() computations to form the rotation - matrix for the duration of the entire arc. Error may accumulate from numerical round-off, since - all double numbers are single precision on the Arduino. (True double precision will not have - round off issues for CNC applications.) Single precision error can accumulate to be greater than - tool precision in some cases. Therefore, arc path correction is implemented. - - Small angle approximation may be used to reduce computation overhead further. This approximation - holds for everything, but very small circles and large mm_per_arc_segment values. In other words, - theta_per_segment would need to be greater than 0.1 rad and N_ARC_CORRECTION would need to be large - to cause an appreciable drift error. N_ARC_CORRECTION~=25 is more than small enough to correct for - numerical drift error. N_ARC_CORRECTION may be on the order a hundred(s) before error becomes an - issue for CNC machines with the single precision Arduino calculations. - - This approximation also allows mc_arc to immediately insert a line segment into the planner - without the initial overhead of computing cos() or sin(). By the time the arc needs to be applied - a correction, the planner should have caught up to the lag caused by the initial mc_arc overhead. - This is important when there are successive arc motions. - */ - // Vector rotation matrix values - float cos_T = 1-0.5*theta_per_segment*theta_per_segment; // Small angle approximation - float sin_T = theta_per_segment; - - float arc_target[4]; - float sin_Ti; - float cos_Ti; - float r_axisi; - uint16_t i; - int8_t count = 0; - - // Initialize the linear axis - arc_target[axis_linear] = position[axis_linear]; - - // Initialize the extruder axis - arc_target[E_AXIS] = position[E_AXIS]; - - for (i = 1; i. -*/ - -#ifndef motion_control_h -#define motion_control_h - -// Execute an arc in offset mode format. position == current xyz, target == target xyz, -// offset == offset from current xyz, axis_XXX defines circle plane in tool space, axis_linear is -// the direction of helical travel, radius == circle radius, isclockwise boolean. Used -// for vector transformation direction. -void mc_arc(float *position, float *target, float *offset, unsigned char axis_0, unsigned char axis_1, - unsigned char axis_linear, float feed_rate, float radius, unsigned char isclockwise, uint8_t extruder); - -#endif From 8b92249f18d0cce9f05e304777e13c0e1a5655b5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 13 May 2015 19:00:46 -0700 Subject: [PATCH 099/126] Bring arc_offset into auto scope --- Marlin/Marlin_main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 03587ab56..d94f04fa1 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -257,7 +257,6 @@ const char errormagic[] PROGMEM = "Error:"; const char echomagic[] PROGMEM = "echo:"; const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'}; -static float arc_offset[3] = { 0 }; static bool relative_mode = false; //Determines Absolute or Relative Coordinates static char serial_char; static int serial_count = 0; @@ -1957,8 +1956,10 @@ inline void gcode_G2_G3(bool clockwise) { #endif // Center of arc as offset from current_position - arc_offset[0] = code_seen('I') ? code_value() : 0; - arc_offset[1] = code_seen('J') ? code_value() : 0; + float arc_offset[2] = { + code_seen('I') ? code_value() : 0, + code_seen('J') ? code_value() : 0 + }; // Send an arc to the planner plan_arc(destination, arc_offset, clockwise); From 68ce419147dc37f5ffaf523024510f6d6bc16ed4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 13 May 2015 19:11:36 -0700 Subject: [PATCH 100/126] Note on segment size --- Marlin/Marlin_main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index d94f04fa1..eed90c87b 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1819,8 +1819,9 @@ inline void gcode_G0_G1() { * * The arc is approximated by generating many small linear segments. * The length of each segment is configured in MM_PER_ARC_SEGMENT (Default 1mm) - * Arcs should only be made relatively large (over 5mm). Your slicer should have - * options for G2/G3 arc generation. + * Arcs should only be made relatively large (over 5mm), as larger arcs with + * larger segments will tend to be more efficient. Your slicer should have + * options for G2/G3 arc generation. In future these options may be GCode tunable. */ void plan_arc( float *target, // Destination position From 1a4a09c26f6ed206970668911e816c5539d37954 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 13 May 2015 22:45:58 -0700 Subject: [PATCH 101/126] Display unknown XYZ on the LCD as "---" - Also show 2 digits past decimal for Z on DOGM --- Marlin/dogm_lcd_implementation.h | 16 +- .../ultralcd_implementation_hitachi_HD44780.h | 163 ++++++++++-------- 2 files changed, 101 insertions(+), 78 deletions(-) diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index ff7cc9990..47e4a9244 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -273,7 +273,6 @@ static void lcd_implementation_status_screen() { u8g.drawFrame(42, 49 - TALL_FONT_CORRECTION, 10, 4); u8g.drawPixel(50, 43 - TALL_FONT_CORRECTION); - // Progress bar frame u8g.drawFrame(54, 49, 73, 4 - TALL_FONT_CORRECTION); @@ -333,19 +332,28 @@ static void lcd_implementation_status_screen() { u8g.drawPixel(8,XYZ_BASELINE - 5); u8g.drawPixel(8,XYZ_BASELINE - 3); u8g.setPrintPos(10,XYZ_BASELINE); - lcd_print(ftostr31ns(current_position[X_AXIS])); + if (axis_known_position[X_AXIS]) + lcd_print(ftostr31ns(current_position[X_AXIS])); + else + lcd_printPGM(PSTR("---")); u8g.setPrintPos(43,XYZ_BASELINE); lcd_print('Y'); u8g.drawPixel(49,XYZ_BASELINE - 5); u8g.drawPixel(49,XYZ_BASELINE - 3); u8g.setPrintPos(51,XYZ_BASELINE); - lcd_print(ftostr31ns(current_position[Y_AXIS])); + if (axis_known_position[Y_AXIS]) + lcd_print(ftostr31ns(current_position[Y_AXIS])); + else + lcd_printPGM(PSTR("---")); u8g.setPrintPos(83,XYZ_BASELINE); lcd_print('Z'); u8g.drawPixel(89,XYZ_BASELINE - 5); u8g.drawPixel(89,XYZ_BASELINE - 3); u8g.setPrintPos(91,XYZ_BASELINE); - lcd_print(ftostr31(current_position[Z_AXIS])); + if (axis_known_position[Z_AXIS]) + lcd_print(ftostr32sp(current_position[Z_AXIS])); + else + lcd_printPGM(PSTR("---.--")); u8g.setColorIndex(1); // black on white // Feedrate diff --git a/Marlin/ultralcd_implementation_hitachi_HD44780.h b/Marlin/ultralcd_implementation_hitachi_HD44780.h index 3f87e8b2f..27e2be0e3 100644 --- a/Marlin/ultralcd_implementation_hitachi_HD44780.h +++ b/Marlin/ultralcd_implementation_hitachi_HD44780.h @@ -406,97 +406,99 @@ unsigned lcd_print(char c) { return charset_mapper(c); } /* Possible status screens: -16x2 |0123456789012345| - |000/000 B000/000| - |Status line.....| +16x2 |000/000 B000/000| + |0123456789012345| -16x4 |0123456789012345| - |000/000 B000/000| - |SD100% Z000.0| +16x4 |000/000 B000/000| + |SD100% Z000.00 | |F100% T--:--| - |Status line.....| + |0123456789012345| -20x2 |01234567890123456789| - |T000/000D B000/000D | - |Status line.........| +20x2 |T000/000D B000/000D | + |01234567890123456789| -20x4 |01234567890123456789| - |T000/000D B000/000D | - |X000 Y000 Z000.00| +20x4 |T000/000D B000/000D | + |X000 Y000 Z000.00 | |F100% SD100% T--:--| - |Status line.........| + |01234567890123456789| -20x4 |01234567890123456789| - |T000/000D B000/000D | +20x4 |T000/000D B000/000D | |T000/000D Z000.00 | |F100% SD100% T--:--| - |Status line.........| + |01234567890123456789| */ static void lcd_implementation_status_screen() { - int tHotend = int(degHotend(0) + 0.5); - int tTarget = int(degTargetHotend(0) + 0.5); + + #define LCD_TEMP_ONLY(T1,T2) \ + lcd.print(itostr3(T1 + 0.5)); \ + lcd.print('/'); \ + lcd.print(itostr3left(T2 + 0.5)) + + #define LCD_TEMP(T1,T2,PREFIX) \ + lcd.print(PREFIX); \ + LCD_TEMP_ONLY(T1,T2); \ + lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); \ + if (T2 < 10) lcd.print(' ') + + // + // Line 1 + // + + lcd.setCursor(0, 0); #if LCD_WIDTH < 20 - lcd.setCursor(0, 0); - lcd.print(itostr3(tHotend)); - lcd.print('/'); - lcd.print(itostr3left(tTarget)); + // + // Hotend 0 Temperature + // + LCD_TEMP_ONLY(degHotend(0), degTargetHotend(0)); + // + // Hotend 1 or Bed Temperature + // #if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0 - // If we have an 2nd extruder or heated bed, show that in the top right corner lcd.setCursor(8, 0); #if EXTRUDERS > 1 - tHotend = int(degHotend(1) + 0.5); - tTarget = int(degTargetHotend(1) + 0.5); lcd.print(LCD_STR_THERMOMETER[0]); - #else // Heated bed - tHotend = int(degBed() + 0.5); - tTarget = int(degTargetBed() + 0.5); + LCD_TEMP_ONLY(degHotend(1), degTargetHotend(1)); + #else lcd.print(LCD_STR_BEDTEMP[0]); + LCD_TEMP_ONLY(degBed(), degTargetBed()); #endif - lcd.print(itostr3(tHotend)); - lcd.print('/'); - lcd.print(itostr3left(tTarget)); #endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0 - #else // LCD_WIDTH > 19 + #else // LCD_WIDTH >= 20 - lcd.setCursor(0, 0); - lcd.print(LCD_STR_THERMOMETER[0]); - lcd.print(itostr3(tHotend)); - lcd.print('/'); - lcd.print(itostr3left(tTarget)); - lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); - if (tTarget < 10) lcd.print(' '); + // + // Hotend 0 Temperature + // + LCD_TEMP(degHotend(0), degTargetHotend(0), LCD_STR_THERMOMETER[0]); + // + // Hotend 1 or Bed Temperature + // #if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0 - // If we have an 2nd extruder or heated bed, show that in the top right corner lcd.setCursor(10, 0); #if EXTRUDERS > 1 - tHotend = int(degHotend(1) + 0.5); - tTarget = int(degTargetHotend(1) + 0.5); - lcd.print(LCD_STR_THERMOMETER[0]); - #else // Heated bed - tHotend = int(degBed() + 0.5); - tTarget = int(degTargetBed() + 0.5); - lcd.print(LCD_STR_BEDTEMP[0]); + LCD_TEMP(degHotend(1), degTargetHotend(1), LCD_STR_THERMOMETER[0]); + #else + LCD_TEMP(degBed(), degTargetBed(), LCD_STR_BEDTEMP[0]); #endif - lcd.print(itostr3(tHotend)); - lcd.print('/'); - lcd.print(itostr3left(tTarget)); - lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); - if (tTarget < 10) lcd.print(' '); #endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0 - #endif // LCD_WIDTH > 19 + #endif // LCD_WIDTH >= 20 + + // + // Line 2 + // #if LCD_HEIGHT > 2 - // Lines 2 for 4 line LCD + #if LCD_WIDTH < 20 + #ifdef SDSUPPORT lcd.setCursor(0, 2); lcd_printPGM(PSTR("SD")); @@ -507,36 +509,48 @@ static void lcd_implementation_status_screen() { lcd.print('%'); #endif // SDSUPPORT - #else // LCD_WIDTH > 19 + #else // LCD_WIDTH >= 20 + + lcd.setCursor(0, 1); #if EXTRUDERS > 1 && TEMP_SENSOR_BED != 0 - // If we both have a 2nd extruder and a heated bed, show the heated bed temp on the 2nd line on the left, as the first line is filled with extruder temps - tHotend = int(degBed() + 0.5); - tTarget = int(degTargetBed() + 0.5); - lcd.setCursor(0, 1); - lcd.print(LCD_STR_BEDTEMP[0]); - lcd.print(itostr3(tHotend)); - lcd.print('/'); - lcd.print(itostr3left(tTarget)); - lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); - if (tTarget < 10) lcd.print(' '); + // If we both have a 2nd extruder and a heated bed, + // show the heated bed temp on the left, + // since the first line is filled with extruder temps + LCD_TEMP(degBed(), degTargetBed(), LCD_STR_BEDTEMP[0]); + #else - lcd.setCursor(0,1); + lcd.print('X'); - lcd.print(ftostr3(current_position[X_AXIS])); + if (axis_known_position[X_AXIS]) + lcd.print(ftostr3(current_position[X_AXIS])); + else + lcd_printPGM(PSTR("---")); + lcd_printPGM(PSTR(" Y")); - lcd.print(ftostr3(current_position[Y_AXIS])); + if (axis_known_position[Y_AXIS]) + lcd.print(ftostr3(current_position[Y_AXIS])); + else + lcd_printPGM(PSTR("---")); + #endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0 - #endif // LCD_WIDTH > 19 + #endif // LCD_WIDTH >= 20 lcd.setCursor(LCD_WIDTH - 8, 1); lcd.print('Z'); - lcd.print(ftostr32sp(current_position[Z_AXIS] + 0.00001)); + if (axis_known_position[Z_AXIS]) + lcd.print(ftostr32sp(current_position[Z_AXIS] + 0.00001)); + else + lcd_printPGM(PSTR("---.--")); #endif // LCD_HEIGHT > 2 + // + // Line 3 + // + #if LCD_HEIGHT > 3 lcd.setCursor(0, 2); @@ -570,9 +584,10 @@ static void lcd_implementation_status_screen() { #endif // LCD_HEIGHT > 3 - /** - * Display Progress Bar, Filament display, and/or Status Message on the last line - */ + // + // Last Line + // Status Message (which may be a Progress Bar or Filament display) + // lcd.setCursor(0, LCD_HEIGHT - 1); From 78beef2d73c4b0b59ea6536dbd8e7ac9d0219d97 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 14 May 2015 00:25:47 -0700 Subject: [PATCH 102/126] Use Mendel default for INVERT_Y_DIR --- Marlin/Configuration.h | 2 +- Marlin/configurator/config/Configuration.h | 2 +- .../RepRapWorld/Megatronics/Configuration.h | 2 +- Marlin/example_configurations/makibox/Configuration.h | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index f71699db7..8e520fa96 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -357,7 +357,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. #define INVERT_X_DIR false -#define INVERT_Y_DIR false +#define INVERT_Y_DIR true #define INVERT_Z_DIR false // @section extruder diff --git a/Marlin/configurator/config/Configuration.h b/Marlin/configurator/config/Configuration.h index a807a56e9..de4c8a5f7 100644 --- a/Marlin/configurator/config/Configuration.h +++ b/Marlin/configurator/config/Configuration.h @@ -357,7 +357,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. #define INVERT_X_DIR false -#define INVERT_Y_DIR false +#define INVERT_Y_DIR true #define INVERT_Z_DIR false // @section extruder diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index e922f472a..27a258290 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -357,7 +357,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. #define INVERT_X_DIR false -#define INVERT_Y_DIR false +#define INVERT_Y_DIR true #define INVERT_Z_DIR false // @section extruder diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index f1f448029..63a402467 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -327,6 +327,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic #define INVERT_X_DIR false #define INVERT_Y_DIR false #define INVERT_Z_DIR false + #define INVERT_E0_DIR true #define INVERT_E1_DIR false #define INVERT_E2_DIR false From 0ce355d9e7bc76a9aea4bf723b746494839bf261 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 14 May 2015 03:33:38 -0700 Subject: [PATCH 103/126] Use MSG_OK in M105 --- Marlin/Marlin_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index ecdad9977..189f519be 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3211,7 +3211,7 @@ inline void gcode_M105() { if (setTargetedHotend(105)) return; #if HAS_TEMP_0 || HAS_TEMP_BED || defined(HEATER_0_USES_MAX6675) - SERIAL_PROTOCOLPGM("ok"); + SERIAL_PROTOCOLPGM(MSG_OK); #if HAS_TEMP_0 SERIAL_PROTOCOLPGM(" T:"); SERIAL_PROTOCOL_F(degHotend(target_extruder), 1); From 0f6cd3640b0db730df02f52745b9c3d824d2be7d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 14 May 2015 04:38:09 -0700 Subject: [PATCH 104/126] Drop extraneous ok_to_send --- Marlin/Marlin_main.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 189f519be..acb292f70 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1793,7 +1793,6 @@ inline void gcode_G0_G1() { #endif //FWRETRACT prepare_move(); - //ok_to_send(); } } From 2e6f57baa915d33c83bdd7e81a35a9ee201126bc Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 14 May 2015 04:40:07 -0700 Subject: [PATCH 105/126] More active authors --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9791ceb92..9e9f56c4b 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,14 @@ __Google Hangout:__ Date: Thu, 14 May 2015 18:21:53 -0700 Subject: [PATCH 107/126] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 1638b4790..20dab1545 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,9 @@ The current Marlin dev team consists of: - Chris Palmer [@nophead] - [@paclema] - [@epatel] + - Erik van der Zalm [@ErikZalm] + - David Braam [@daid] + - Bernhard Kubicek [@bkubicek] More features have been added by: - Lampmaker, From 98e91f525330927e476e496ed173fbfdc18719e8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 15 May 2015 03:19:07 -0700 Subject: [PATCH 108/126] Allow lsDive to recurse with minimal stack usage --- Marlin/SdBaseFile.cpp | 48 +++++++++++------------------- Marlin/cardreader.cpp | 69 ++++++++++++++++++++++++++++--------------- 2 files changed, 63 insertions(+), 54 deletions(-) diff --git a/Marlin/SdBaseFile.cpp b/Marlin/SdBaseFile.cpp index c72eced73..0bbfd2b75 100644 --- a/Marlin/SdBaseFile.cpp +++ b/Marlin/SdBaseFile.cpp @@ -1114,50 +1114,38 @@ int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) { if (!isDir() || (0X1F & curPosition_)) return -1; //If we have a longFilename buffer, mark it as invalid. If we find a long filename it will be filled automaticly. - if (longFilename != NULL) - { - longFilename[0] = '\0'; - } + if (longFilename != NULL) longFilename[0] = '\0'; while (1) { + n = read(dir, sizeof(dir_t)); if (n != sizeof(dir_t)) return n == 0 ? 0 : -1; + // last entry if DIR_NAME_FREE if (dir->name[0] == DIR_NAME_FREE) return 0; + // skip empty entries and entry for . and .. if (dir->name[0] == DIR_NAME_DELETED || dir->name[0] == '.') continue; - //Fill the long filename if we have a long filename entry, - // long filename entries are stored before the actual filename. - if (DIR_IS_LONG_NAME(dir) && longFilename != NULL) - { + + // Fill the long filename if we have a long filename entry. + // Long filename entries are stored before the short filename. + if (longFilename != NULL && DIR_IS_LONG_NAME(dir)) { vfat_t *VFAT = (vfat_t*)dir; - //Sanity check the VFAT entry. The first cluster is always set to zero. And th esequence number should be higher then 0 - if (VFAT->firstClusterLow == 0 && (VFAT->sequenceNumber & 0x1F) > 0 && (VFAT->sequenceNumber & 0x1F) <= MAX_VFAT_ENTRIES) - { - //TODO: Store the filename checksum to verify if a none-long filename aware system modified the file table. + // Sanity-check the VFAT entry. The first cluster is always set to zero. And the sequence number should be higher than 0 + if (VFAT->firstClusterLow == 0 && (VFAT->sequenceNumber & 0x1F) > 0 && (VFAT->sequenceNumber & 0x1F) <= MAX_VFAT_ENTRIES) { + // TODO: Store the filename checksum to verify if a none-long filename aware system modified the file table. n = ((VFAT->sequenceNumber & 0x1F) - 1) * FILENAME_LENGTH; - longFilename[n+0] = VFAT->name1[0]; - longFilename[n+1] = VFAT->name1[1]; - longFilename[n+2] = VFAT->name1[2]; - longFilename[n+3] = VFAT->name1[3]; - longFilename[n+4] = VFAT->name1[4]; - longFilename[n+5] = VFAT->name2[0]; - longFilename[n+6] = VFAT->name2[1]; - longFilename[n+7] = VFAT->name2[2]; - longFilename[n+8] = VFAT->name2[3]; - longFilename[n+9] = VFAT->name2[4]; - longFilename[n+10] = VFAT->name2[5]; - longFilename[n+11] = VFAT->name3[0]; - longFilename[n+12] = VFAT->name3[1]; - //If this VFAT entry is the last one, add a NUL terminator at the end of the string - if (VFAT->sequenceNumber & 0x40) - longFilename[n+FILENAME_LENGTH] = '\0'; - } + for (uint8_t i=0; iname1[i] : (i < 11) ? VFAT->name2[i-5] : VFAT->name3[i-11]; + // If this VFAT entry is the last one, add a NUL terminator at the end of the string + if (VFAT->sequenceNumber & 0x40) longFilename[n+FILENAME_LENGTH] = '\0'; + } } - // return if normal file or subdirectory + // Return if normal file or subdirectory if (DIR_IS_FILE_OR_SUBDIR(dir)) return n; } } + //------------------------------------------------------------------------------ // Read next directory entry into the cache // Assumes file is correctly positioned diff --git a/Marlin/cardreader.cpp b/Marlin/cardreader.cpp index 4b6017218..7afa0c444 100644 --- a/Marlin/cardreader.cpp +++ b/Marlin/cardreader.cpp @@ -40,24 +40,43 @@ char *createFilename(char *buffer, const dir_t &p) { //buffer > 12characters return buffer; } +/** + * Dive into a folder and recurse depth-first to perform a pre-set operation lsAction: + * LS_Count - Add +1 to nrFiles for every file within the parent + * LS_GetFilename - Get the filename of the file indexed by nrFiles + * LS_SerialPrint - Print the full path of each file to serial output + */ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=NULL*/) { dir_t p; uint8_t cnt = 0; + // Read the next entry from a directory while (parent.readDir(p, longFilename) > 0) { - if (DIR_IS_SUBDIR(&p) && lsAction != LS_Count && lsAction != LS_GetFilename) { // hence LS_SerialPrint - char path[FILENAME_LENGTH*2]; + + // If the entry is a directory and the action is LS_SerialPrint + if (DIR_IS_SUBDIR(&p) && lsAction != LS_Count && lsAction != LS_GetFilename) { + + // Allocate enough stack space for the full path to a folder + int len = strlen(prepend) + FILENAME_LENGTH + 1; + char path[len]; + + // Get the short name for the item, which we know is a folder char lfilename[FILENAME_LENGTH]; createFilename(lfilename, p); - path[0] = 0; - if (prepend[0] == 0) strcat(path, "/"); //avoid leading / if already in prepend + // Append the FOLDERNAME12/ to the passed string. + // It contains the full path to the "parent" argument. + // We now have the full path to the item in this folder. + path[0] = '\0'; + if (prepend[0] == '\0') strcat(path, "/"); // a root slash if prepend is empty strcat(path, prepend); strcat(path, lfilename); strcat(path, "/"); - //Serial.print(path); + // Serial.print(path); + // Get a new directory object using the full path + // and dive recursively into it. SdFile dir; if (!dir.open(parent, lfilename, O_READ)) { if (lsAction == LS_SerialPrint) { @@ -67,14 +86,13 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m } } lsDive(path, dir); - //close done automatically by destructor of SdFile + // close() is done automatically by destructor of SdFile } else { char pn0 = p.name[0]; if (pn0 == DIR_NAME_FREE) break; if (pn0 == DIR_NAME_DELETED || pn0 == '.') continue; - char lf0 = longFilename[0]; - if (lf0 == '.') continue; + if (longFilename[0] == '.') continue; if (!DIR_IS_FILE_OR_SUBDIR(&p)) continue; @@ -82,24 +100,27 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m if (!filenameIsDir && (p.name[8] != 'G' || p.name[9] == '~')) continue; - //if (cnt++ != nr) continue; - createFilename(filename, p); - if (lsAction == LS_SerialPrint) { - SERIAL_PROTOCOL(prepend); - SERIAL_PROTOCOLLN(filename); - } - else if (lsAction == LS_Count) { - nrFiles++; - } - else if (lsAction == LS_GetFilename) { - if (match != NULL) { - if (strcasecmp(match, filename) == 0) return; - } - else if (cnt == nrFiles) return; - cnt++; + switch (lsAction) { + case LS_Count: + nrFiles++; + break; + case LS_SerialPrint: + createFilename(filename, p); + SERIAL_PROTOCOL(prepend); + SERIAL_PROTOCOLLN(filename); + break; + case LS_GetFilename: + createFilename(filename, p); + if (match != NULL) { + if (strcasecmp(match, filename) == 0) return; + } + else if (cnt == nrFiles) return; + cnt++; + break; } + } - } + } // while readDir } void CardReader::ls() { From e114662cfaf3d16e95a142a8400215653b86af21 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 15 May 2015 03:23:49 -0700 Subject: [PATCH 109/126] Adjust SdBaseFile spacing --- Marlin/SdBaseFile.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Marlin/SdBaseFile.cpp b/Marlin/SdBaseFile.cpp index 0bbfd2b75..f92f48e14 100644 --- a/Marlin/SdBaseFile.cpp +++ b/Marlin/SdBaseFile.cpp @@ -1097,8 +1097,9 @@ int16_t SdBaseFile::read(void* buf, uint16_t nbyte) { fail: return -1; } -//------------------------------------------------------------------------------ -/** Read the next directory entry from a directory file. + +/** + * Read the next entry in a directory. * * \param[out] dir The dir_t struct that will receive the data. * @@ -1130,16 +1131,16 @@ int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) { // Fill the long filename if we have a long filename entry. // Long filename entries are stored before the short filename. if (longFilename != NULL && DIR_IS_LONG_NAME(dir)) { - vfat_t *VFAT = (vfat_t*)dir; - // Sanity-check the VFAT entry. The first cluster is always set to zero. And the sequence number should be higher than 0 - if (VFAT->firstClusterLow == 0 && (VFAT->sequenceNumber & 0x1F) > 0 && (VFAT->sequenceNumber & 0x1F) <= MAX_VFAT_ENTRIES) { - // TODO: Store the filename checksum to verify if a none-long filename aware system modified the file table. - n = ((VFAT->sequenceNumber & 0x1F) - 1) * FILENAME_LENGTH; + vfat_t *VFAT = (vfat_t*)dir; + // Sanity-check the VFAT entry. The first cluster is always set to zero. And the sequence number should be higher than 0 + if (VFAT->firstClusterLow == 0 && (VFAT->sequenceNumber & 0x1F) > 0 && (VFAT->sequenceNumber & 0x1F) <= MAX_VFAT_ENTRIES) { + // TODO: Store the filename checksum to verify if a none-long filename aware system modified the file table. + n = ((VFAT->sequenceNumber & 0x1F) - 1) * FILENAME_LENGTH; for (uint8_t i=0; iname1[i] : (i < 11) ? VFAT->name2[i-5] : VFAT->name3[i-11]; // If this VFAT entry is the last one, add a NUL terminator at the end of the string if (VFAT->sequenceNumber & 0x40) longFilename[n+FILENAME_LENGTH] = '\0'; - } + } } // Return if normal file or subdirectory if (DIR_IS_FILE_OR_SUBDIR(dir)) return n; From d2563804c834ead54111acd9d5a1d6e5cae66f05 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 15 May 2015 04:37:22 -0700 Subject: [PATCH 110/126] Add LF to file errors --- Marlin/cardreader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/cardreader.cpp b/Marlin/cardreader.cpp index 7afa0c444..a2a6d8eb5 100644 --- a/Marlin/cardreader.cpp +++ b/Marlin/cardreader.cpp @@ -259,7 +259,7 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/) char *dirname_start, *dirname_end; if (name[0] == '/') { dirname_start = &name[1]; - while(dirname_start > 0) { + while (dirname_start > 0) { dirname_end = strchr(dirname_start, '/'); //SERIAL_ECHO("start:");SERIAL_ECHOLN((int)(dirname_start - name)); //SERIAL_ECHO("end :");SERIAL_ECHOLN((int)(dirname_end - name)); @@ -309,14 +309,14 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/) else { SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL); SERIAL_PROTOCOL(fname); - SERIAL_PROTOCOLCHAR('.'); + SERIAL_PROTOCOLPGM(".\n"); } } else { //write if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) { SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL); SERIAL_PROTOCOL(fname); - SERIAL_PROTOCOLCHAR('.'); + SERIAL_PROTOCOLPGM(".\n"); } else { saving = true; From 76438195f093f6041f6be7609a17da232d103ef1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 16 May 2015 02:47:20 -0700 Subject: [PATCH 111/126] NO_TIMEOUTS and ADVANCED_OK off by default --- Marlin/Configuration_adv.h | 9 +++++---- Marlin/configurator/config/Configuration_adv.h | 9 +++++---- Marlin/example_configurations/Felix/Configuration_adv.h | 9 +++++---- .../example_configurations/Hephestos/Configuration_adv.h | 9 +++++---- Marlin/example_configurations/K8200/Configuration_adv.h | 9 +++++---- Marlin/example_configurations/SCARA/Configuration_adv.h | 9 +++++---- Marlin/example_configurations/WITBOX/Configuration_adv.h | 9 +++++---- .../delta/biv2.5/Configuration_adv.h | 9 +++++---- .../delta/generic/Configuration_adv.h | 9 +++++---- .../delta/kossel_mini/Configuration_adv.h | 9 +++++---- .../example_configurations/makibox/Configuration_adv.h | 9 +++++---- .../tvrrug/Round2/Configuration_adv.h | 9 +++++---- 12 files changed, 60 insertions(+), 48 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 44f2f96dd..fd41e9d0d 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -393,12 +393,13 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define BUFSIZE 4 // Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. -// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. -#define NO_TIMEOUTS 1000 +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -#define ADVANCED_OK +//#define ADVANCED_OK // @section fwretract diff --git a/Marlin/configurator/config/Configuration_adv.h b/Marlin/configurator/config/Configuration_adv.h index b03d42a61..1119e5181 100644 --- a/Marlin/configurator/config/Configuration_adv.h +++ b/Marlin/configurator/config/Configuration_adv.h @@ -401,12 +401,13 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define BUFSIZE 4 // Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. -// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. -#define NO_TIMEOUTS 1000 +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -#define ADVANCED_OK +//#define ADVANCED_OK // @section fwretract diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 244ec0652..678ebbe08 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -401,12 +401,13 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define BUFSIZE 4 // Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. -// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. -#define NO_TIMEOUTS 1000 +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -#define ADVANCED_OK +//#define ADVANCED_OK // @section fwretract diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index 6d5102ca4..e1ec3fa6a 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -401,12 +401,13 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define BUFSIZE 4 // Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. -// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. -#define NO_TIMEOUTS 1000 +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -#define ADVANCED_OK +//#define ADVANCED_OK // @section fwretract diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 244ec0652..678ebbe08 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -401,12 +401,13 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define BUFSIZE 4 // Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. -// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. -#define NO_TIMEOUTS 1000 +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -#define ADVANCED_OK +//#define ADVANCED_OK // @section fwretract diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 60a58797c..af4429b7e 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -401,12 +401,13 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define BUFSIZE 4 // Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. -// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. -#define NO_TIMEOUTS 1000 +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -#define ADVANCED_OK +//#define ADVANCED_OK // @section fwretract diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index 6382b6c1e..da2281eaf 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -401,12 +401,13 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define BUFSIZE 4 // Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. -// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. -#define NO_TIMEOUTS 1000 +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -#define ADVANCED_OK +//#define ADVANCED_OK // @section fwretract diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h index e5e3a11fd..e193015cc 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h @@ -402,12 +402,13 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define BUFSIZE 4 // Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. -// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. -#define NO_TIMEOUTS 1000 +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -#define ADVANCED_OK +//#define ADVANCED_OK // @section fwretract diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 4f2b11454..a003186d8 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -402,12 +402,13 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define BUFSIZE 4 // Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. -// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. -#define NO_TIMEOUTS 1000 +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -#define ADVANCED_OK +//#define ADVANCED_OK // @section fwretract diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index f4cb49222..c8ac659c3 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -401,12 +401,13 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define BUFSIZE 4 // Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. -// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. -#define NO_TIMEOUTS 1000 +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -#define ADVANCED_OK +//#define ADVANCED_OK // @section fwretract diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 7d33bd9ee..b08e8bc2f 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -401,12 +401,13 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define BUFSIZE 4 // Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. -// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. -#define NO_TIMEOUTS 1000 +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -#define ADVANCED_OK +//#define ADVANCED_OK // @section fwretract diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 2747e0098..a86b3279d 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -401,12 +401,13 @@ const unsigned int dropsegments=5; //everything with less than this number of st #define BUFSIZE 4 // Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients go after 30 seconds in a timeout. Some other clients start sending commands while receiving a 'wait'. -// This wait is only send when the buffer is empty. The timeout-length is in milliseconds. 1000 is a good value. -#define NO_TIMEOUTS 1000 +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -#define ADVANCED_OK +//#define ADVANCED_OK // @section fwretract From 513077c3175e3e394d3d677db8ded12c42f64e0f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 16 May 2015 19:42:28 -0700 Subject: [PATCH 112/126] Minor change to fan kick --- Marlin/planner.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index 0b9efb8d7..3cd9894ca 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -429,11 +429,12 @@ void check_axes_activity() { #ifdef FAN_KICKSTART_TIME static millis_t fan_kick_end; if (tail_fan_speed) { + millis_t ms = millis(); if (fan_kick_end == 0) { // Just starting up fan - run at full power. - fan_kick_end = millis() + FAN_KICKSTART_TIME; + fan_kick_end = ms + FAN_KICKSTART_TIME; tail_fan_speed = 255; - } else if (fan_kick_end > millis()) + } else if (fan_kick_end > ms) // Fan still spinning up. tail_fan_speed = 255; } else { From 46d59784ad399e075aca6f6eb367063d0ba057cd Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 16 May 2015 20:47:40 -0700 Subject: [PATCH 113/126] Rename preocess_command to process_next_command --- Marlin/Marlin.h | 1 - Marlin/Marlin_main.cpp | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index af362457d..592b4027a 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -113,7 +113,6 @@ FORCE_INLINE void serialprintPGM(const char *str) { } void get_command(); -void process_commands(); void manage_inactivity(bool ignore_stepper_queue=false); diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 003abb7a4..081d56a9d 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -399,6 +399,8 @@ bool target_direction; //================================ Functions ================================ //=========================================================================== +void process_next_command(); + bool setTargetedHotend(int code); void serial_echopair_P(const char *s_P, float v) { serialprintPGM(s_P); SERIAL_ECHO(v); } @@ -697,17 +699,17 @@ void loop() { // Write the string from the read buffer to SD card.write_command(command); if (card.logging) - process_commands(); // The card is saving because it's logging + process_next_command(); // The card is saving because it's logging else SERIAL_PROTOCOLLNPGM(MSG_OK); } } else - process_commands(); + process_next_command(); #else - process_commands(); + process_next_command(); #endif // SDSUPPORT @@ -5178,7 +5180,7 @@ inline void gcode_T() { * Process Commands and dispatch them to handlers * This is called from the main loop() */ -void process_commands() { +void process_next_command() { if ((marlin_debug_flags & DEBUG_ECHO)) { SERIAL_ECHO_START; From ce218cafdbfaa6beddfbfa013dce5c9e44793d06 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 16 May 2015 20:54:58 -0700 Subject: [PATCH 114/126] Add gcode_line_error to reduce code size --- Marlin/Marlin_main.cpp | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 003abb7a4..e0d3c429b 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -721,6 +721,15 @@ void loop() { lcd_update(); } +void gcode_line_error(const char *err, bool doFlush=true) { + SERIAL_ERROR_START; + serialprintPGM(err); + SERIAL_ERRORLN(gcode_LastN); + //Serial.println(gcode_N); + if (doFlush) FlushSerialRequestResend(); + serial_count = 0; +} + /** * Add to the circular command queue the next command from: * - The command-injection queue (queued_commands_P) @@ -766,12 +775,7 @@ void get_command() { strchr_pointer = strchr(command, 'N'); gcode_N = (strtol(strchr_pointer + 1, NULL, 10)); if (gcode_N != gcode_LastN + 1 && strstr_P(command, PSTR("M110")) == NULL) { - SERIAL_ERROR_START; - SERIAL_ERRORPGM(MSG_ERR_LINE_NO); - SERIAL_ERRORLN(gcode_LastN); - //Serial.println(gcode_N); - FlushSerialRequestResend(); - serial_count = 0; + gcode_line_error(PSTR(MSG_ERR_LINE_NO)); return; } @@ -782,33 +786,22 @@ void get_command() { strchr_pointer = strchr(command, '*'); if (strtol(strchr_pointer + 1, NULL, 10) != checksum) { - SERIAL_ERROR_START; - SERIAL_ERRORPGM(MSG_ERR_CHECKSUM_MISMATCH); - SERIAL_ERRORLN(gcode_LastN); - FlushSerialRequestResend(); - serial_count = 0; + gcode_line_error(PSTR(MSG_ERR_CHECKSUM_MISMATCH)); return; } - //if no errors, continue parsing + // if no errors, continue parsing } else { - SERIAL_ERROR_START; - SERIAL_ERRORPGM(MSG_ERR_NO_CHECKSUM); - SERIAL_ERRORLN(gcode_LastN); - FlushSerialRequestResend(); - serial_count = 0; + gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM)); return; } gcode_LastN = gcode_N; - //if no errors, continue parsing + // if no errors, continue parsing } else { // if we don't receive 'N' but still see '*' if ((strchr(command, '*') != NULL)) { - SERIAL_ERROR_START; - SERIAL_ERRORPGM(MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM); - SERIAL_ERRORLN(gcode_LastN); - serial_count = 0; + gcode_line_error(PSTR(MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM), false); return; } } From ca79282eaf17c924d71c271db0e26a418ddb9d24 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 16 May 2015 20:59:04 -0700 Subject: [PATCH 115/126] Hide M117 with no LCD --- Marlin/Marlin_main.cpp | 51 ++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 003abb7a4..cfefe4c18 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -740,24 +740,32 @@ void get_command() { last_command_time = ms; } #endif - - while (MYSERIAL.available() > 0 && commands_in_queue < BUFSIZE) { + + // + // Loop while serial characters are incoming and the queue is not full + // + while (commands_in_queue < BUFSIZE && MYSERIAL.available() > 0) { + #ifdef NO_TIMEOUTS last_command_time = ms; #endif + serial_char = MYSERIAL.read(); - if (serial_char == '\n' || serial_char == '\r' || - serial_count >= (MAX_CMD_SIZE - 1) - ) { + // + // If the character ends the line, or the line is full... + // + if (serial_char == '\n' || serial_char == '\r' || serial_count >= MAX_CMD_SIZE-1) { + // end of line == end of comment comment_mode = false; - if (!serial_count) return; // shortcut for empty lines + if (!serial_count) return; // empty lines just exit char *command = command_queue[cmd_queue_index_w]; command[serial_count] = 0; // terminate string + // this item in the queue is not from sd #ifdef SDSUPPORT fromsd[cmd_queue_index_w] = false; #endif @@ -839,7 +847,7 @@ void get_command() { serial_count = 0; //clear buffer } else if (serial_char == '\\') { // Handle escapes - if (MYSERIAL.available() > 0 && commands_in_queue < BUFSIZE) { + if (MYSERIAL.available() > 0 && commands_in_queue < BUFSIZE) { // if we have one more character, copy it over serial_char = MYSERIAL.read(); command_queue[cmd_queue_index_w][serial_count++] = serial_char; @@ -3854,15 +3862,16 @@ inline void gcode_M115() { SERIAL_PROTOCOLPGM(MSG_M115_REPORT); } -/** - * M117: Set LCD Status Message - */ -inline void gcode_M117() { - char* codepos = strchr_pointer + 5; - char* starpos = strchr(codepos, '*'); - if (starpos) *starpos = '\0'; - lcd_setstatus(codepos); -} +#ifdef ULTIPANEL + + /** + * M117: Set LCD Status Message + */ + inline void gcode_M117() { + lcd_setstatus(strchr_pointer + 5); + } + +#endif /** * M119: Output endstop states to serial output @@ -5412,9 +5421,13 @@ void process_commands() { case 115: // M115: Report capabilities gcode_M115(); break; - case 117: // M117: Set LCD message text - gcode_M117(); - break; + + #ifdef ULTIPANEL + case 117: // M117: Set LCD message text + gcode_M117(); + break; + #endif + case 114: // M114: Report current position gcode_M114(); break; From 16032f149f8112151f4114306b5a86f7e30c849e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 16 May 2015 23:17:35 -0700 Subject: [PATCH 116/126] Rename to codenum as a consistency --- Marlin/Marlin_main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 4f48a2f11..ba192da4e 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -5191,9 +5191,9 @@ void process_next_command() { if (code_seen('G')) { - int gCode = code_value_short(); + int codenum = code_value_short(); - switch(gCode) { + switch (codenum) { // G0, G1 case 0: @@ -5205,7 +5205,7 @@ void process_next_command() { #ifndef SCARA case 2: // G2 - CW ARC case 3: // G3 - CCW ARC - gcode_G2_G3(gCode == 2); + gcode_G2_G3(codenum == 2); break; #endif @@ -5218,7 +5218,7 @@ void process_next_command() { case 10: // G10: retract case 11: // G11: retract_recover - gcode_G10_G11(gCode == 10); + gcode_G10_G11(codenum == 10); break; #endif //FWRETRACT @@ -5245,7 +5245,7 @@ void process_next_command() { case 31: // G31: dock the sled case 32: // G32: undock the sled - dock_sled(gCode == 31); + dock_sled(codenum == 31); break; #endif // Z_PROBE_SLED From 072625ccadf763ecef74e49792682ca42b83b605 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 17 May 2015 01:44:53 -0700 Subject: [PATCH 117/126] Update headings in Marlin_main.cpp and stepper.cpp --- Marlin/Marlin_main.cpp | 70 ++++++++++++++++++++++-------------------- Marlin/stepper.cpp | 39 +++++++++++------------ 2 files changed, 57 insertions(+), 52 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 4f48a2f11..1a5bb6c12 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1,30 +1,30 @@ -/* -*- c++ -*- */ - -/* - Reprap firmware 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 . - */ - -/* - This firmware is a mashup between Sprinter and grbl. - (https://github.com/kliment/Sprinter) - (https://github.com/simen/grbl/tree) - - It has preliminary support for Matthew Roberts advance algorithm - http://reprap.org/pipermail/reprap-dev/2011-May/003323.html +/** + * Marlin Firmware + * + * 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 . + * + * About Marlin + * + * This firmware is a mashup between Sprinter and grbl. + * - https://github.com/kliment/Sprinter + * - https://github.com/simen/grbl/tree + * + * It has preliminary support for Matthew Roberts advance algorithm + * - http://reprap.org/pipermail/reprap-dev/2011-May/003323.html */ #include "Marlin.h" @@ -73,13 +73,12 @@ * - http://objects.reprap.org/wiki/Mendel_User_Manual:_RepRapGCodes * * Help us document these G-codes online: + * - http://www.marlinfirmware.org/index.php/G-Code * - http://reprap.org/wiki/G-code - * - https://github.com/MarlinFirmware/Marlin/wiki/Marlin-G-Code - */ - -/** + * + * ----------------- * Implemented Codes - * ------------------- + * ----------------- * * "G" Codes * @@ -163,7 +162,7 @@ * M205 - advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk * M206 - Set additional homing offset * M207 - Set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop], stays in mm regardless of M200 setting - * M208 - Set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/sec] + * M208 - Set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/min] * M209 - S<1=true/0=false> enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction. * M218 - Set hotend offset (in mm): T X Y * M220 - Set speed factor override percentage: S @@ -215,6 +214,11 @@ * * M928 - Start SD logging (M928 filename.g) - ended by M29 * M999 - Restart after being stopped by error + * + * "T" Codes + * + * T0-T3 - Select a tool by index (usually an extruder) [ F ] + * */ #ifdef SDSUPPORT diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 29d77048c..357f6fd65 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -1,22 +1,23 @@ -/* - stepper.c - stepper motor driver: executes motion plans using stepper motors - Part of Grbl - - Copyright (c) 2009-2011 Simen Svale Skogsrud - - Grbl 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. - - Grbl 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 Grbl. If not, see . -*/ +/** + * stepper.cpp - stepper motor driver: executes motion plans using stepper motors + * Marlin Firmware + * + * Derived from Grbl + * Copyright (c) 2009-2011 Simen Svale Skogsrud + * + * Grbl 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. + * + * Grbl 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 Grbl. If not, see . + */ /* The timer calculations of this module informed by the 'RepRap cartesian firmware' by Zack Smith and Philipp Tiefenbacher. */ From c54a2ea0425dd3289710328c37368d979767f542 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 17 May 2015 01:47:02 -0700 Subject: [PATCH 118/126] Adjust spacing in Marlin_main.cpp and stepper.* --- Marlin/Marlin_main.cpp | 332 +++++++++++++++++++++-------------------- Marlin/stepper.cpp | 5 +- Marlin/stepper.h | 6 +- 3 files changed, 172 insertions(+), 171 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 1a5bb6c12..4afb61290 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -561,9 +561,9 @@ void servo_init() { // Set position of Servo Endstops that are defined #ifdef SERVO_ENDSTOPS - for (int i = 0; i < 3; i++) - if (servo_endstops[i] >= 0) - servo[servo_endstops[i]].write(servo_endstop_angles[i * 2 + 1]); + for (int i = 0; i < 3; i++) + if (servo_endstops[i] >= 0) + servo[servo_endstops[i]].write(servo_endstop_angles[i * 2 + 1]); #endif #if SERVO_LEVELING @@ -1317,21 +1317,21 @@ static void setup_for_endstop_move() { st_synchronize(); - #ifdef Z_PROBE_ENDSTOP - bool z_probe_endstop = (READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING); - if (z_probe_endstop) - #else - bool z_min_endstop = (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING); - if (z_min_endstop) - #endif - { - if (IsRunning()) { - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM("Z-Probe failed to engage!"); - LCD_ALERTMESSAGEPGM("Err: ZPROBE"); + #ifdef Z_PROBE_ENDSTOP + bool z_probe_endstop = (READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING); + if (z_probe_endstop) + #else + bool z_min_endstop = (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING); + if (z_min_endstop) + #endif + { + if (IsRunning()) { + SERIAL_ERROR_START; + SERIAL_ERRORLNPGM("Z-Probe failed to engage!"); + LCD_ALERTMESSAGEPGM("Err: ZPROBE"); + } + Stop(); } - Stop(); - } #endif // Z_PROBE_ALLEN_KEY @@ -1394,21 +1394,21 @@ static void setup_for_endstop_move() { st_synchronize(); - #ifdef Z_PROBE_ENDSTOP - bool z_probe_endstop = (READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING); - if (!z_probe_endstop) - #else - bool z_min_endstop = (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING); - if (!z_min_endstop) - #endif - { - if (IsRunning()) { - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM("Z-Probe failed to retract!"); - LCD_ALERTMESSAGEPGM("Err: ZPROBE"); + #ifdef Z_PROBE_ENDSTOP + bool z_probe_endstop = (READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING); + if (!z_probe_endstop) + #else + bool z_min_endstop = (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING); + if (!z_min_endstop) + #endif + { + if (IsRunning()) { + SERIAL_ERROR_START; + SERIAL_ERRORLNPGM("Z-Probe failed to retract!"); + LCD_ALERTMESSAGEPGM("Err: ZPROBE"); + } + Stop(); } - Stop(); - } #endif @@ -6093,82 +6093,83 @@ void prepare_move() { #endif // HAS_CONTROLLERFAN #ifdef SCARA -void calculate_SCARA_forward_Transform(float f_scara[3]) -{ - // Perform forward kinematics, and place results in delta[3] - // The maths and first version has been done by QHARLEY . Integrated into masterbranch 06/2014 and slightly restructured by Joachim Cerny in June 2014 - - float x_sin, x_cos, y_sin, y_cos; - + + void calculate_SCARA_forward_Transform(float f_scara[3]) { + // Perform forward kinematics, and place results in delta[3] + // The maths and first version has been done by QHARLEY . Integrated into masterbranch 06/2014 and slightly restructured by Joachim Cerny in June 2014 + + float x_sin, x_cos, y_sin, y_cos; + //SERIAL_ECHOPGM("f_delta x="); SERIAL_ECHO(f_scara[X_AXIS]); //SERIAL_ECHOPGM(" y="); SERIAL_ECHO(f_scara[Y_AXIS]); - + x_sin = sin(f_scara[X_AXIS]/SCARA_RAD2DEG) * Linkage_1; x_cos = cos(f_scara[X_AXIS]/SCARA_RAD2DEG) * Linkage_1; y_sin = sin(f_scara[Y_AXIS]/SCARA_RAD2DEG) * Linkage_2; y_cos = cos(f_scara[Y_AXIS]/SCARA_RAD2DEG) * Linkage_2; - - // SERIAL_ECHOPGM(" x_sin="); SERIAL_ECHO(x_sin); - // SERIAL_ECHOPGM(" x_cos="); SERIAL_ECHO(x_cos); - // SERIAL_ECHOPGM(" y_sin="); SERIAL_ECHO(y_sin); - // SERIAL_ECHOPGM(" y_cos="); SERIAL_ECHOLN(y_cos); - + + //SERIAL_ECHOPGM(" x_sin="); SERIAL_ECHO(x_sin); + //SERIAL_ECHOPGM(" x_cos="); SERIAL_ECHO(x_cos); + //SERIAL_ECHOPGM(" y_sin="); SERIAL_ECHO(y_sin); + //SERIAL_ECHOPGM(" y_cos="); SERIAL_ECHOLN(y_cos); + delta[X_AXIS] = x_cos + y_cos + SCARA_offset_x; //theta delta[Y_AXIS] = x_sin + y_sin + SCARA_offset_y; //theta+phi //SERIAL_ECHOPGM(" delta[X_AXIS]="); SERIAL_ECHO(delta[X_AXIS]); //SERIAL_ECHOPGM(" delta[Y_AXIS]="); SERIAL_ECHOLN(delta[Y_AXIS]); -} + } -void calculate_delta(float cartesian[3]){ - //reverse kinematics. - // Perform reversed kinematics, and place results in delta[3] - // The maths and first version has been done by QHARLEY . Integrated into masterbranch 06/2014 and slightly restructured by Joachim Cerny in June 2014 - - float SCARA_pos[2]; - static float SCARA_C2, SCARA_S2, SCARA_K1, SCARA_K2, SCARA_theta, SCARA_psi; - - SCARA_pos[X_AXIS] = cartesian[X_AXIS] * axis_scaling[X_AXIS] - SCARA_offset_x; //Translate SCARA to standard X Y - SCARA_pos[Y_AXIS] = cartesian[Y_AXIS] * axis_scaling[Y_AXIS] - SCARA_offset_y; // With scaling factor. - - #if (Linkage_1 == Linkage_2) - SCARA_C2 = ( ( sq(SCARA_pos[X_AXIS]) + sq(SCARA_pos[Y_AXIS]) ) / (2 * (float)L1_2) ) - 1; - #else - SCARA_C2 = ( sq(SCARA_pos[X_AXIS]) + sq(SCARA_pos[Y_AXIS]) - (float)L1_2 - (float)L2_2 ) / 45000; - #endif - - SCARA_S2 = sqrt( 1 - sq(SCARA_C2) ); - - SCARA_K1 = Linkage_1 + Linkage_2 * SCARA_C2; - SCARA_K2 = Linkage_2 * SCARA_S2; - - SCARA_theta = ( atan2(SCARA_pos[X_AXIS],SCARA_pos[Y_AXIS])-atan2(SCARA_K1, SCARA_K2) ) * -1; - SCARA_psi = atan2(SCARA_S2,SCARA_C2); - - delta[X_AXIS] = SCARA_theta * SCARA_RAD2DEG; // Multiply by 180/Pi - theta is support arm angle - delta[Y_AXIS] = (SCARA_theta + SCARA_psi) * SCARA_RAD2DEG; // - equal to sub arm angle (inverted motor) - delta[Z_AXIS] = cartesian[Z_AXIS]; - - /* - SERIAL_ECHOPGM("cartesian x="); SERIAL_ECHO(cartesian[X_AXIS]); - SERIAL_ECHOPGM(" y="); SERIAL_ECHO(cartesian[Y_AXIS]); - SERIAL_ECHOPGM(" z="); SERIAL_ECHOLN(cartesian[Z_AXIS]); - - SERIAL_ECHOPGM("scara x="); SERIAL_ECHO(SCARA_pos[X_AXIS]); - SERIAL_ECHOPGM(" y="); SERIAL_ECHOLN(SCARA_pos[Y_AXIS]); - - SERIAL_ECHOPGM("delta x="); SERIAL_ECHO(delta[X_AXIS]); - SERIAL_ECHOPGM(" y="); SERIAL_ECHO(delta[Y_AXIS]); - SERIAL_ECHOPGM(" z="); SERIAL_ECHOLN(delta[Z_AXIS]); - - SERIAL_ECHOPGM("C2="); SERIAL_ECHO(SCARA_C2); - SERIAL_ECHOPGM(" S2="); SERIAL_ECHO(SCARA_S2); - SERIAL_ECHOPGM(" Theta="); SERIAL_ECHO(SCARA_theta); - SERIAL_ECHOPGM(" Psi="); SERIAL_ECHOLN(SCARA_psi); - SERIAL_ECHOLN(" ");*/ -} + void calculate_delta(float cartesian[3]){ + //reverse kinematics. + // Perform reversed kinematics, and place results in delta[3] + // The maths and first version has been done by QHARLEY . Integrated into masterbranch 06/2014 and slightly restructured by Joachim Cerny in June 2014 + + float SCARA_pos[2]; + static float SCARA_C2, SCARA_S2, SCARA_K1, SCARA_K2, SCARA_theta, SCARA_psi; + + SCARA_pos[X_AXIS] = cartesian[X_AXIS] * axis_scaling[X_AXIS] - SCARA_offset_x; //Translate SCARA to standard X Y + SCARA_pos[Y_AXIS] = cartesian[Y_AXIS] * axis_scaling[Y_AXIS] - SCARA_offset_y; // With scaling factor. + + #if (Linkage_1 == Linkage_2) + SCARA_C2 = ( ( sq(SCARA_pos[X_AXIS]) + sq(SCARA_pos[Y_AXIS]) ) / (2 * (float)L1_2) ) - 1; + #else + SCARA_C2 = ( sq(SCARA_pos[X_AXIS]) + sq(SCARA_pos[Y_AXIS]) - (float)L1_2 - (float)L2_2 ) / 45000; + #endif + + SCARA_S2 = sqrt( 1 - sq(SCARA_C2) ); + + SCARA_K1 = Linkage_1 + Linkage_2 * SCARA_C2; + SCARA_K2 = Linkage_2 * SCARA_S2; + + SCARA_theta = ( atan2(SCARA_pos[X_AXIS],SCARA_pos[Y_AXIS])-atan2(SCARA_K1, SCARA_K2) ) * -1; + SCARA_psi = atan2(SCARA_S2,SCARA_C2); + + delta[X_AXIS] = SCARA_theta * SCARA_RAD2DEG; // Multiply by 180/Pi - theta is support arm angle + delta[Y_AXIS] = (SCARA_theta + SCARA_psi) * SCARA_RAD2DEG; // - equal to sub arm angle (inverted motor) + delta[Z_AXIS] = cartesian[Z_AXIS]; + + /* + SERIAL_ECHOPGM("cartesian x="); SERIAL_ECHO(cartesian[X_AXIS]); + SERIAL_ECHOPGM(" y="); SERIAL_ECHO(cartesian[Y_AXIS]); + SERIAL_ECHOPGM(" z="); SERIAL_ECHOLN(cartesian[Z_AXIS]); + + SERIAL_ECHOPGM("scara x="); SERIAL_ECHO(SCARA_pos[X_AXIS]); + SERIAL_ECHOPGM(" y="); SERIAL_ECHOLN(SCARA_pos[Y_AXIS]); + + SERIAL_ECHOPGM("delta x="); SERIAL_ECHO(delta[X_AXIS]); + SERIAL_ECHOPGM(" y="); SERIAL_ECHO(delta[Y_AXIS]); + SERIAL_ECHOPGM(" z="); SERIAL_ECHOLN(delta[Z_AXIS]); + + SERIAL_ECHOPGM("C2="); SERIAL_ECHO(SCARA_C2); + SERIAL_ECHOPGM(" S2="); SERIAL_ECHO(SCARA_S2); + SERIAL_ECHOPGM(" Theta="); SERIAL_ECHO(SCARA_theta); + SERIAL_ECHOPGM(" Psi="); SERIAL_ECHOLN(SCARA_psi); + SERIAL_EOL; + */ + } -#endif +#endif // SCARA #ifdef TEMP_STAT_LEDS @@ -6399,7 +6400,78 @@ void kill() st_synchronize(); } } -#endif + +#endif // FILAMENT_RUNOUT_SENSOR + +#ifdef FAST_PWM_FAN + + void setPwmFrequency(uint8_t pin, int val) { + val &= 0x07; + switch (digitalPinToTimer(pin)) { + + #if defined(TCCR0A) + case TIMER0A: + case TIMER0B: + // TCCR0B &= ~(_BV(CS00) | _BV(CS01) | _BV(CS02)); + // TCCR0B |= val; + break; + #endif + + #if defined(TCCR1A) + case TIMER1A: + case TIMER1B: + // TCCR1B &= ~(_BV(CS10) | _BV(CS11) | _BV(CS12)); + // TCCR1B |= val; + break; + #endif + + #if defined(TCCR2) + case TIMER2: + case TIMER2: + TCCR2 &= ~(_BV(CS10) | _BV(CS11) | _BV(CS12)); + TCCR2 |= val; + break; + #endif + + #if defined(TCCR2A) + case TIMER2A: + case TIMER2B: + TCCR2B &= ~(_BV(CS20) | _BV(CS21) | _BV(CS22)); + TCCR2B |= val; + break; + #endif + + #if defined(TCCR3A) + case TIMER3A: + case TIMER3B: + case TIMER3C: + TCCR3B &= ~(_BV(CS30) | _BV(CS31) | _BV(CS32)); + TCCR3B |= val; + break; + #endif + + #if defined(TCCR4A) + case TIMER4A: + case TIMER4B: + case TIMER4C: + TCCR4B &= ~(_BV(CS40) | _BV(CS41) | _BV(CS42)); + TCCR4B |= val; + break; + #endif + + #if defined(TCCR5A) + case TIMER5A: + case TIMER5B: + case TIMER5C: + TCCR5B &= ~(_BV(CS50) | _BV(CS51) | _BV(CS52)); + TCCR5B |= val; + break; + #endif + + } + } + +#endif // FAST_PWM_FAN void Stop() { disable_all_heaters(); @@ -6412,76 +6484,6 @@ void Stop() { } } -#ifdef FAST_PWM_FAN -void setPwmFrequency(uint8_t pin, int val) -{ - val &= 0x07; - switch(digitalPinToTimer(pin)) - { - - #if defined(TCCR0A) - case TIMER0A: - case TIMER0B: -// TCCR0B &= ~(_BV(CS00) | _BV(CS01) | _BV(CS02)); -// TCCR0B |= val; - break; - #endif - - #if defined(TCCR1A) - case TIMER1A: - case TIMER1B: -// TCCR1B &= ~(_BV(CS10) | _BV(CS11) | _BV(CS12)); -// TCCR1B |= val; - break; - #endif - - #if defined(TCCR2) - case TIMER2: - case TIMER2: - TCCR2 &= ~(_BV(CS10) | _BV(CS11) | _BV(CS12)); - TCCR2 |= val; - break; - #endif - - #if defined(TCCR2A) - case TIMER2A: - case TIMER2B: - TCCR2B &= ~(_BV(CS20) | _BV(CS21) | _BV(CS22)); - TCCR2B |= val; - break; - #endif - - #if defined(TCCR3A) - case TIMER3A: - case TIMER3B: - case TIMER3C: - TCCR3B &= ~(_BV(CS30) | _BV(CS31) | _BV(CS32)); - TCCR3B |= val; - break; - #endif - - #if defined(TCCR4A) - case TIMER4A: - case TIMER4B: - case TIMER4C: - TCCR4B &= ~(_BV(CS40) | _BV(CS41) | _BV(CS42)); - TCCR4B |= val; - break; - #endif - - #if defined(TCCR5A) - case TIMER5A: - case TIMER5B: - case TIMER5C: - TCCR5B &= ~(_BV(CS50) | _BV(CS51) | _BV(CS52)); - TCCR5B |= val; - break; - #endif - - } -} -#endif //FAST_PWM_FAN - bool setTargetedHotend(int code){ target_extruder = active_extruder; if (code_seen('T')) { diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 357f6fd65..7b00da34e 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -1110,9 +1110,8 @@ long st_get_position(uint8_t axis) { #ifdef ENABLE_AUTO_BED_LEVELING - float st_get_position_mm(uint8_t axis) { - float steper_position_in_steps = st_get_position(axis); - return steper_position_in_steps / axis_steps_per_unit[axis]; + float st_get_position_mm(AxisEnum axis) { + return st_get_position(axis) / axis_steps_per_unit[axis]; } #endif // ENABLE_AUTO_BED_LEVELING diff --git a/Marlin/stepper.h b/Marlin/stepper.h index d6c17d60f..15d814332 100644 --- a/Marlin/stepper.h +++ b/Marlin/stepper.h @@ -67,9 +67,9 @@ void st_set_e_position(const long &e); long st_get_position(uint8_t axis); #ifdef ENABLE_AUTO_BED_LEVELING -// Get current position in mm -float st_get_position_mm(uint8_t axis); -#endif //ENABLE_AUTO_BED_LEVELING + // Get current position in mm + float st_get_position_mm(AxisEnum axis); +#endif // The stepper subsystem goes to sleep when it runs out of things to execute. Call this // to notify the subsystem that it is time to go to work. From c966aa26ff477d1e15152588c09c57b9ba62e48b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 17 May 2015 01:47:53 -0700 Subject: [PATCH 119/126] Comments in Marlin_main.cpp --- Marlin/Marlin_main.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 4afb61290..7aa6b1b44 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1202,12 +1202,12 @@ static void setup_for_endstop_move() { plan_bed_level_matrix.set_to_identity(); feedrate = homing_feedrate[Z_AXIS]; - // move down until you find the bed + // Move down until the probe (or endstop?) is triggered float zPosition = -10; line_to_z(zPosition); st_synchronize(); - // we have to let the planner know where we are right now as it is not where we said to go. + // Tell the planner where we ended up - Get this from the stepper handler zPosition = st_get_position_mm(Z_AXIS); plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS]); @@ -1410,7 +1410,7 @@ static void setup_for_endstop_move() { Stop(); } - #endif + #endif // Z_PROBE_ALLEN_KEY } @@ -4628,7 +4628,7 @@ inline void gcode_M400() { st_synchronize(); } stow_z_probe(false); } -#endif +#endif // ENABLE_AUTO_BED_LEVELING && (SERVO_ENDSTOPS || Z_PROBE_ALLEN_KEY) && !Z_PROBE_SLED #ifdef FILAMENT_SENSOR @@ -4823,7 +4823,7 @@ inline void gcode_M503() { if (code_seen('Z')) { value = code_value(); if (Z_PROBE_OFFSET_RANGE_MIN <= value && value <= Z_PROBE_OFFSET_RANGE_MAX) { - zprobe_zoffset = -value; // compare w/ line 278 of configuration_store.cpp + zprobe_zoffset = -value; SERIAL_ECHO_START; SERIAL_ECHOLNPGM(MSG_ZPROBE_ZOFFSET " " MSG_OK); SERIAL_EOL; @@ -5078,6 +5078,8 @@ inline void gcode_M999() { /** * T0-T3: Switch tool, usually switching extruders + * + * F[mm/min] Set the movement feedrate */ inline void gcode_T() { int tmp_extruder = code_value(); @@ -5600,7 +5602,7 @@ void process_next_command() { case 402: gcode_M402(); break; - #endif + #endif // ENABLE_AUTO_BED_LEVELING && (SERVO_ENDSTOPS || Z_PROBE_ALLEN_KEY) && !Z_PROBE_SLED #ifdef FILAMENT_SENSOR case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width From 7dfb8becdb0e6ab3e3fc2c3824d7e3276617e45f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 17 May 2015 01:48:51 -0700 Subject: [PATCH 120/126] Adjust some names and types in Marlin_main.cpp --- Marlin/Marlin_main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 7aa6b1b44..28207b838 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -997,7 +997,7 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR); #endif //DUAL_X_CARRIAGE -static void axis_is_at_home(int axis) { +static void axis_is_at_home(AxisEnum axis) { #ifdef DUAL_X_CARRIAGE if (axis == X_AXIS) { @@ -1422,27 +1422,27 @@ static void setup_for_endstop_move() { }; // Probe bed height at position (x,y), returns the measured z value - static float probe_pt(float x, float y, float z_before, ProbeAction retract_action=ProbeDeployAndStow, int verbose_level=1) { + static float probe_pt(float x, float y, float z_before, ProbeAction probe_action=ProbeDeployAndStow, int verbose_level=1) { // move to right place do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z_before); // this also updates current_position do_blocking_move_to(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]); // this also updates current_position #if !defined(Z_PROBE_SLED) && !defined(Z_PROBE_ALLEN_KEY) - if (retract_action & ProbeDeploy) deploy_z_probe(); + if (probe_action & ProbeDeploy) deploy_z_probe(); #endif run_z_probe(); float measured_z = current_position[Z_AXIS]; #if Z_RAISE_BETWEEN_PROBINGS > 0 - if (retract_action == ProbeStay) { + if (probe_action == ProbeStay) { do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS); // this also updates current_position st_synchronize(); } #endif #if !defined(Z_PROBE_SLED) && !defined(Z_PROBE_ALLEN_KEY) - if (retract_action & ProbeStow) stow_z_probe(); + if (probe_action & ProbeStow) stow_z_probe(); #endif if (verbose_level > 2) { @@ -5082,7 +5082,7 @@ inline void gcode_M999() { * F[mm/min] Set the movement feedrate */ inline void gcode_T() { - int tmp_extruder = code_value(); + uint16_t tmp_extruder = code_value_short(); if (tmp_extruder >= EXTRUDERS) { SERIAL_ECHO_START; SERIAL_CHAR('T'); @@ -5595,7 +5595,7 @@ void process_next_command() { gcode_M400(); break; - #if defined(ENABLE_AUTO_BED_LEVELING) && (defined(SERVO_ENDSTOPS) || defined(Z_PROBE_ALLEN_KEY)) && not defined(Z_PROBE_SLED) + #if defined(ENABLE_AUTO_BED_LEVELING) && (defined(SERVO_ENDSTOPS) || defined(Z_PROBE_ALLEN_KEY)) && !defined(Z_PROBE_SLED) case 401: gcode_M401(); break; From b83e3f090578f0c49ff798b931ad529128518976 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 17 May 2015 01:49:52 -0700 Subject: [PATCH 121/126] Combine "Bed X: " strings --- Marlin/Marlin_main.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 28207b838..2efac9fd1 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1446,8 +1446,7 @@ static void setup_for_endstop_move() { #endif if (verbose_level > 2) { - SERIAL_PROTOCOLPGM("Bed"); - SERIAL_PROTOCOLPGM(" X: "); + SERIAL_PROTOCOLPGM("Bed X: "); SERIAL_PROTOCOL_F(x, 3); SERIAL_PROTOCOLPGM(" Y: "); SERIAL_PROTOCOL_F(y, 3); @@ -2796,8 +2795,7 @@ inline void gcode_G28() { feedrate = homing_feedrate[Z_AXIS]; run_z_probe(); - SERIAL_PROTOCOLPGM("Bed"); - SERIAL_PROTOCOLPGM(" X: "); + SERIAL_PROTOCOLPGM("Bed X: "); SERIAL_PROTOCOL(current_position[X_AXIS] + 0.0001); SERIAL_PROTOCOLPGM(" Y: "); SERIAL_PROTOCOL(current_position[Y_AXIS] + 0.0001); From 2f3a410cb090198491f10af7dc9b30814baa11ff Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 17 May 2015 01:50:30 -0700 Subject: [PATCH 122/126] Fix a potential hanging "else" bug --- Marlin/Marlin_main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 2efac9fd1..26bed5294 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1596,12 +1596,11 @@ static void homeaxis(AxisEnum axis) { if (axis == Z_AXIS) { if (axis_home_dir < 0) deploy_z_probe(); } - else #endif #ifdef SERVO_ENDSTOPS - { + if (axis != Z_AXIS) { // Engage Servo endstop if enabled if (servo_endstops[axis] > -1) servo[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]); From d580a0d186bde398765206380526c776d8c46a68 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 17 May 2015 01:51:14 -0700 Subject: [PATCH 123/126] Use "+=" in plane rotation --- Marlin/Marlin_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 26bed5294..0497a25c9 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2765,8 +2765,8 @@ inline void gcode_G28() { z_tmp = current_position[Z_AXIS], real_z = (float)st_get_position(Z_AXIS) / axis_steps_per_unit[Z_AXIS]; //get the real Z (since the auto bed leveling is already correcting the plane) - apply_rotation_xyz(plan_bed_level_matrix, x_tmp, y_tmp, z_tmp); //Apply the correction sending the probe offset - current_position[Z_AXIS] = z_tmp - real_z + current_position[Z_AXIS]; //The difference is added to current position and sent to planner. + apply_rotation_xyz(plan_bed_level_matrix, x_tmp, y_tmp, z_tmp); // Apply the correction sending the probe offset + current_position[Z_AXIS] += z_tmp - real_z; // The difference is added to current position and sent to planner. sync_plan_position(); } #endif // !DELTA From 21ff77383236bfc58fd757efe39a98159f992ffc Mon Sep 17 00:00:00 2001 From: wurstnase Date: Sun, 17 May 2015 14:33:09 +0200 Subject: [PATCH 124/126] rework out_bits --- Marlin/stepper.cpp | 170 +++++++++++++++++++++++---------------------- 1 file changed, 86 insertions(+), 84 deletions(-) diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 7b00da34e..e614f5a89 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -46,7 +46,7 @@ block_t *current_block; // A pointer to the block currently being traced //static makes it impossible to be called from outside of this file by extern.! // Variables used by The Stepper Driver Interrupt -static unsigned char out_bits; // The next stepping-bits to be output +static unsigned char out_bits = 0; // The next stepping-bits to be output static unsigned int cleaning_buffer_counter; #ifdef Z_DUAL_ENDSTOPS @@ -364,9 +364,58 @@ FORCE_INLINE unsigned short calc_timer(unsigned short step_rate) { return timer; } +// set the stepper direction of each axis +void set_stepper_direction() { + + // Set the direction bits (X_AXIS=A_AXIS and Y_AXIS=B_AXIS for COREXY) + if (TEST(out_bits, X_AXIS)) { + X_APPLY_DIR(INVERT_X_DIR,0); + count_direction[X_AXIS] = -1; + } + else { + X_APPLY_DIR(!INVERT_X_DIR,0); + count_direction[X_AXIS] = 1; + } + + if (TEST(out_bits, Y_AXIS)) { + Y_APPLY_DIR(INVERT_Y_DIR,0); + count_direction[Y_AXIS] = -1; + } + else { + Y_APPLY_DIR(!INVERT_Y_DIR,0); + count_direction[Y_AXIS] = 1; + } + + if (TEST(out_bits, Z_AXIS)) { + Z_APPLY_DIR(INVERT_Z_DIR,0); + count_direction[Z_AXIS] = -1; + } + else { + Z_APPLY_DIR(!INVERT_Z_DIR,0); + count_direction[Z_AXIS] = 1; + } + + #ifndef ADVANCE + if (TEST(out_bits, E_AXIS)) { + REV_E_DIR(); + count_direction[E_AXIS] = -1; + } + else { + NORM_E_DIR(); + count_direction[E_AXIS] = 1; + } + #endif //!ADVANCE +} + // Initializes the trapezoid generator from the current block. Called whenever a new // block begins. FORCE_INLINE void trapezoid_generator_reset() { + + if (current_block->direction_bits != out_bits) { + out_bits = current_block->direction_bits; + set_stepper_direction(); + } + #ifdef ADVANCE advance = current_block->initial_advance; final_advance = current_block->final_advance; @@ -439,48 +488,27 @@ ISR(TIMER1_COMPA_vect) { } if (current_block != NULL) { - // Set directions TO DO This should be done once during init of trapezoid. Endstops -> interrupt - out_bits = current_block->direction_bits; - // Set the direction bits (X_AXIS=A_AXIS and Y_AXIS=B_AXIS for COREXY) - if (TEST(out_bits, X_AXIS)) { - X_APPLY_DIR(INVERT_X_DIR,0); - count_direction[X_AXIS] = -1; - } - else { - X_APPLY_DIR(!INVERT_X_DIR,0); - count_direction[X_AXIS] = 1; - } - - if (TEST(out_bits, Y_AXIS)) { - Y_APPLY_DIR(INVERT_Y_DIR,0); - count_direction[Y_AXIS] = -1; - } - else { - Y_APPLY_DIR(!INVERT_Y_DIR,0); - count_direction[Y_AXIS] = 1; - } - - #define _ENDSTOP(axis, minmax) axis ##_## minmax ##_endstop - #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN - #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING - #define _OLD_ENDSTOP(axis, minmax) old_## axis ##_## minmax ##_endstop - #define _AXIS(AXIS) AXIS ##_AXIS - #define _HIT_BIT(AXIS) AXIS ##_MIN - #define _ENDSTOP_HIT(AXIS) endstop_hit_bits |= BIT(_HIT_BIT(AXIS)) - - #define UPDATE_ENDSTOP(axis,AXIS,minmax,MINMAX) \ - bool _ENDSTOP(axis, minmax) = (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)); \ - if (_ENDSTOP(axis, minmax) && _OLD_ENDSTOP(axis, minmax) && (current_block->steps[_AXIS(AXIS)] > 0)) { \ - endstops_trigsteps[_AXIS(AXIS)] = count_position[_AXIS(AXIS)]; \ - _ENDSTOP_HIT(AXIS); \ - step_events_completed = current_block->step_event_count; \ - } \ - _OLD_ENDSTOP(axis, minmax) = _ENDSTOP(axis, minmax); - - - // Check X and Y endstops + // Check endstops if (check_endstops) { + + #define _ENDSTOP(axis, minmax) axis ##_## minmax ##_endstop + #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN + #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING + #define _OLD_ENDSTOP(axis, minmax) old_## axis ##_## minmax ##_endstop + #define _AXIS(AXIS) AXIS ##_AXIS + #define _HIT_BIT(AXIS) AXIS ##_MIN + #define _ENDSTOP_HIT(AXIS) endstop_hit_bits |= BIT(_HIT_BIT(AXIS)) + + #define UPDATE_ENDSTOP(axis,AXIS,minmax,MINMAX) \ + bool _ENDSTOP(axis, minmax) = (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)); \ + if (_ENDSTOP(axis, minmax) && _OLD_ENDSTOP(axis, minmax) && (current_block->steps[_AXIS(AXIS)] > 0)) { \ + endstops_trigsteps[_AXIS(AXIS)] = count_position[_AXIS(AXIS)]; \ + _ENDSTOP_HIT(AXIS); \ + step_events_completed = current_block->step_event_count; \ + } \ + _OLD_ENDSTOP(axis, minmax) = _ENDSTOP(axis, minmax); + #ifdef COREXY // Head direction in -X axis for CoreXY bots. // If DeltaX == -DeltaY, the movement is only in Y axis @@ -533,15 +561,7 @@ ISR(TIMER1_COMPA_vect) { #ifdef COREXY } #endif - } - - if (TEST(out_bits, Z_AXIS)) { // -direction - - Z_APPLY_DIR(INVERT_Z_DIR,0); - count_direction[Z_AXIS] = -1; - - if (check_endstops) { - + if (TEST(out_bits, Z_AXIS)) { // z -direction #if HAS_Z_MIN #ifdef Z_DUAL_ENDSTOPS @@ -581,22 +601,12 @@ ISR(TIMER1_COMPA_vect) { { endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS]; endstop_hit_bits |= BIT(Z_PROBE); - -// if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true"); + // if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true"); } old_z_probe_endstop = z_probe_endstop; #endif - - } // check_endstops - - } - else { // +direction - - Z_APPLY_DIR(!INVERT_Z_DIR,0); - count_direction[Z_AXIS] = 1; - - if (check_endstops) { - + } + else { // z +direction #if HAS_Z_MAX #ifdef Z_DUAL_ENDSTOPS @@ -632,7 +642,7 @@ ISR(TIMER1_COMPA_vect) { #endif // !Z_DUAL_ENDSTOPS #endif // Z_MAX_PIN - + #ifdef Z_PROBE_ENDSTOP UPDATE_ENDSTOP(z, Z, probe, PROBE); z_probe_endstop=(READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING); @@ -640,25 +650,15 @@ ISR(TIMER1_COMPA_vect) { { endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS]; endstop_hit_bits |= BIT(Z_PROBE); -// if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true"); +// if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true"); } old_z_probe_endstop = z_probe_endstop; #endif - - } // check_endstops - - } // +direction - - #ifndef ADVANCE - if (TEST(out_bits, E_AXIS)) { // -direction - REV_E_DIR(); - count_direction[E_AXIS] = -1; } - else { // +direction - NORM_E_DIR(); - count_direction[E_AXIS] = 1; - } - #endif //!ADVANCE + + } + + // Take multiple steps per interrupt (For high speed moves) for (int8_t i = 0; i < step_loops; i++) { @@ -989,12 +989,12 @@ void st_init() { #endif #endif -#if (defined(Z_PROBE_PIN) && Z_PROBE_PIN >= 0) && defined(Z_PROBE_ENDSTOP) // Check for Z_PROBE_ENDSTOP so we don't pull a pin high unless it's to be used. - SET_INPUT(Z_PROBE_PIN); - #ifdef ENDSTOPPULLUP_ZPROBE - WRITE(Z_PROBE_PIN,HIGH); + #if (defined(Z_PROBE_PIN) && Z_PROBE_PIN >= 0) && defined(Z_PROBE_ENDSTOP) // Check for Z_PROBE_ENDSTOP so we don't pull a pin high unless it's to be used. + SET_INPUT(Z_PROBE_PIN); + #ifdef ENDSTOPPULLUP_ZPROBE + WRITE(Z_PROBE_PIN,HIGH); + #endif #endif -#endif #define _STEP_INIT(AXIS) AXIS ##_STEP_INIT #define _WRITE_STEP(AXIS, HIGHLOW) AXIS ##_STEP_WRITE(HIGHLOW) @@ -1073,6 +1073,8 @@ void st_init() { enable_endstops(true); // Start with endstops active. After homing they can be disabled sei(); + + set_stepper_direction(); // Init directions to out_bits = 0 } From 3feaef6526422630c07d7aa2197ecc01bb14029d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 17 May 2015 17:08:05 -0700 Subject: [PATCH 125/126] Have G92 set the nozzle position on Delta and SCARA --- Marlin/Marlin_main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 18911474c..efc14ea42 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2827,7 +2827,13 @@ inline void gcode_G92() { didXYZ = true; } } - if (didXYZ) sync_plan_position(); + if (didXYZ) { + #if defined(DELTA) || defined(SCARA) + sync_plan_position_delta(); + #else + sync_plan_position(); + #endif + } } #ifdef ULTIPANEL From 97ca1b3f4de5440f25236e98bc893a2100834897 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Mon, 18 May 2015 14:15:29 +0200 Subject: [PATCH 126/126] Name magic value 20 to MAX_OVERSHOOT_PID_AUTOTUNE to make it better findable. --- Marlin/temperature.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 9ccd1de14..07db02ab4 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -312,7 +312,8 @@ void PID_autotune(float temp, int extruder, int ncycles) } } } - if (input > temp + 20) { + #define MAX_OVERSHOOT_PID_AUTOTUNE 20 + if (input > temp + MAX_OVERSHOOT_PID_AUTOTUNE) { SERIAL_PROTOCOLLNPGM(MSG_PID_TEMP_TOO_HIGH); return; }