From 5ddb8d94e2eb1d767bcca994773130bfcc2cc92a Mon Sep 17 00:00:00 2001 From: alexborro Date: Wed, 18 Mar 2015 11:08:41 -0300 Subject: [PATCH 1/2] Update Documentation related to M204 --- Documentation/GCodes.md | 2 +- Marlin/Marlin_main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/GCodes.md b/Documentation/GCodes.md index fde843593..57b95cdee 100644 --- a/Documentation/GCodes.md +++ b/Documentation/GCodes.md @@ -66,7 +66,7 @@ * 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: S normal moves T filament only moves (M204 S3000 T7000) im mm/sec^2 also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate +* 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 * M207 - set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop], stays in mm regardless of M200 setting diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 5ad45ef2e..58c7d1707 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -143,7 +143,7 @@ // 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: S normal moves T filament only moves (M204 S3000 T7000) in mm/sec^2 also sets minimum segment time in ms (B20000) to prevent buffer under-runs and M20 minimum feedrate +// 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 // M207 - Set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop], stays in mm regardless of M200 setting From 4521f6655b1245e1b72cbd165b0483e0024ae55d Mon Sep 17 00:00:00 2001 From: alexborro Date: Wed, 18 Mar 2015 12:19:30 -0300 Subject: [PATCH 2/2] Restore "S" parameter of M204 for retrocompatibility. --- Marlin/Marlin_main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 58c7d1707..6762767d8 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3525,6 +3525,13 @@ inline void gcode_M203() { * Also sets minimum segment time in ms (B20000) to prevent buffer under-runs and M20 minimum feedrate */ inline void gcode_M204() { + if (code_seen('S')) // Kept for legacy compatibility. Should NOT BE USED for new developments. + { + acceleration = code_value(); + travel_acceleration = acceleration; + SERIAL_ECHOPAIR("Setting Printing and Travelling Acceleration: ", acceleration ); + SERIAL_EOL; + } if (code_seen('P')) { acceleration = code_value();