G-code/ru

From RepRap
Revision as of 08:04, 28 February 2019 by Edlab (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Эта страница описывает особенности G-кодов, которые используются в прошивках принтеров RepRap, и как эти коды работают. Основной целью является аддитивное производство с использованием процессов FFF. Коды для движения печатающей головки придерживаются стандарта G-кода NIST RS274NGC, поэтому прошивки RepRap вполне пригодны для фрезерования с ЧПУ и также для аналогичных приложений. См. также Wikipedia's G-code article.

Существует несколько различных способов подготовки G-кода для принтера. Один из способов заключается в использовании программы слайсинга, например Slic3r, Skeinforge или Cura. Эти программы импортируют модель САПР, разрезают ее по слоям и выводят G-код, требуемый для печати каждого слоя. Слайсеры - это самый простой способ перейти от 3D-модели к напечатанной детали, однако пользователь жертвует некоторой гибкостью при их использовании. Другой вариант для получения G-кода, является использование библиотеки более низкого уровня, вроде mecode. Библиотеки, такие как mecode, дают вам точный контроль над траекторией инструмента, и, следовательно, полезны, если у вас есть сложная печать, которая не подходит для бесхитростного слайсинга. Последний вариант - просто написать G-код самостоятельно. Это может быть лучшим выбором, если необходимо выполнить несколько тестовых линий при калибровке принтера.

Поскольку существует много различных прошивок и их разработчики, как правило, реализуют новые функции без обсуждения стратегии или не глядя на то, что делали другие до них, на протяжении многих лет разрабатывались различные варианты, специфичные для 3D-печати. Данная страница является главной страницей RepRap. Nowhere in here should the same code be used for two different things; there are always more numbers to use... Правило: добавьте здесь новый код, а затем реализуйте его.

Unfortunately human nature being what it is, the best procedures aren't always followed, so some multiple uses of the same code exist. The rule which should be followed is that later appearances of a code on this page (later than the original use of a code), are deprecated and should be changed, unless there is a good technical reason (like the general G-Code standard) why a later instance should be preferred. Note that the key date is appearance here, not date of implementation.

Contents

Введение

Типичный фрагмент G-кода, отправленный на RepRap устройство, может выглядеть следующим образом:

N3 T0*57
N4 G92 E0*67
N5 G28*22
N6 G1 F1500.0*82
N7 G1 X2.0 Y2.0 F3000.0*85
N8 G1 X3.0 Y3.0*33

G-код также может храниться в файлах на SD-картах. Файл, содержащий RepRap G-код, обычно имеет расширение .g , .gco или .gcode . Файлы для BFB/RapMan имеют расширение .bfb . G-код, сохраненный в файле или создаваемый слайсером, может выглядеть следующим образом:

G92 E0
G28
G1 F1500
G1 X2.0 Y2.0 F3000
G1 X3.0 Y3.0

Смысл всех этих символов и цифр (в большей степени) объясняется ниже.

Slicers will (optionally?) add GCode scripts to the beginning and end of their output file to perform specified actions before and/or after a print such as z-probing the build-area, heating/cooling the bed and hotend, performing ooze free "nozzle wipe" startup routine, switching system power on/off, and even "ejecting" parts. Подробнее на Start GCode routines и End GCode routines страницах.

To find out which specific Gcode(s) are implemented in any given firmware, there are little tables attached to the command descriptions, like this one:

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да automatic Нет Частично Экспериментально deprecated ??? ??? ??? ??? ??? Да Частично

Это означает:

{{Да}}
G-код полностью поддерживается микропрограммным обеспечением.
{{Частично}} или {{Экспериментально}}
Существует определенная поддержка G-кода. Often it is required to check out the source code branch for the firmware (usually stored in a different branch) or to flip configuration switches on the mainboard.
{{automatic}}
Прошивка автоматически обрабатывает этот G-код, поэтому нет необходимости отправлять команду. Например G-код (M80/M81) включения/выключения электропитания в прошивке Teacup
{{???}}
Неизвестно, поддерживает ли прошивка этот G-код. Вы можете проверить это сами, прежде чем использовать его в производстве.
{{Нет}}
Микропрограмма не поддерживает этот G-код.
{{deprecated}}
The firmware deprecated this Gcode. The firmware author(s) should amend the deprecated Gcode on this page with workarounds (if needed) and the last supported firmware version that will accept this Gcode.

For the technically minded, Gcode line endings are Unix Line Endings (\n), but will accept Windows Line Endings (\r\n), so you should not need to worry about converting between the two, but it is best practice to use Unix Line Endings where possible.

Поля

RepRap G-код - это список полей, разделенных пробелами или разрывами строк. Поле можно интерпретировать как команду, параметр или для любых других специальных целей. Оно состоит из одной буквы, за которой непосредственно следует число, или может быть только автономной буквой (флагом). Буква дает информацию о значении поля (см. список ниже в этом разделе). Числа могут быть целыми (128) или дробными (12.42), в зависимости от контекста. For example, an X coordinate can take integers (X175) or fractionals (X17.62), but selecting extruder number 2.76 would make no sense. В этом описании числа в полях представлены nnn в качестве заполнителя.

В RepRapFirmware за некоторыми параметрами может следовать более одного числа, причем двоеточие используется для их разделения. Typically this is used to specify extruder parameters, with one value provided per extruder. If only one value is provided where a value is needed for each extruder, then that value is applied to all extruders.

Буква Значение
Gnnn Стандартная команда G-кода, например перемещение в точку
Mnnn RepRap-defined command, such as turn on a cooling fan
Tnnn Выбор инструмента nnn. In RepRap, a tool is typically associated with a nozzle, which may be fed by one or more extruders.
Snnn Command parameter, such as time in seconds; temperatures; voltage to send to a motor
Pnnn Command parameter, such as time in milliseconds; proportional (Kp) in PID Tuning
Xnnn Координата X, обычно для перемещения. Это может быть целое или дробное число.
Ynnn Координата Y, обычно для перемещения. Это может быть целое или дробное число.
Znnn Координата Z, обычно для перемещения. Это может быть целое или дробное число.
U,V,W Additional axis coordinates (RepRapFirmware)
Innn Parameter - X-offset in arc move; integral (Ki) in PID Tuning
Jnnn Parameter - Y-offset in arc move
Dnnn Parameter - used for diameter; derivative (Kd) in PID Tuning
Hnnn Parameter - used for heater number in PID Tuning
Fnnn Feedrate in mm per minute. (Speed of print head movement)
Rnnn Параметр - используется для температур
Qnnn Параметр - в данный момент не используется
Ennn Length of extrudate. This is exactly like X, Y and Z, but for the length of filament to consume.
Nnnn Номер строки. Used to request repeat transmission in the case of communications errors.
*nnn Контрольная сумма. Используется для проверки ошибки связи.

Чувствительность к регистру

The original NIST GCode standard requires gcode interpreters to be case-insensitive, except for characters in comments. However, not all 3D printer firmwares conform to this and some recognise uppercase command letters and parameters only.

Firmwares that are known to be case-insensitive
Версия RepRapFirmware 1.19 и позже (за исключением строк в кавычках)
Firmwares that are known to be case-sensitive
Версия RepRapFirmware 1.18 и ранее

Строки в кавычках

В RepRapFirmware некоторые команды поддерживают кавычки при предоставлении имен файлов и других параметров строки. This allows file names, WiFi passwords etc. to contain spaces, semicolons and other characters that would otherwise not be permitted. Double-quote characters are used to delimit the string, and any double-quote character within the string must be repeated.

Unfortunately, many gcode sender programs convert all characters to uppercase and don't provide any means to disable this feature. Therefore, within a quoted-string, the single-quote character is used as a flag to force the following character to lowercase. If you want to include a single quote character in the string, use two single quote characters to represent one single quote character.

Example: to add SSID MYROUTER with password ABCxyz;" 123 to the WiFi network list, use command:

M587 S"MYROUTER" P"ABCxyz;"" 123"

или если не удается отправить символы нижнего регистра:

M587 S"MYROUTER" P"ABC'X'Y'Z;"" 123"

Комментарии

Комментарии G-кода начинаются с точки с запятой и заканчиваются в конце строки:

N3 T0*57 ; Это комментарий
N4 G92 E0*67
; Так это
N5 G28*22

Some firmwares also obey the CNC GCode standard, which is to enclose comments in round brackets. Comments of this form must start and end on the same line:

(Home some axes)
G28 (here come the axes to be homed) X Y

Comments and white space will be ignored by your RepRap Printer. It's better to strip these out on the host computer before sending the Gcode to your printer, as this saves bandwidth.

Специальные поля

N: Номер строки

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да ??? Да Да ??? ??? ??? Да Да
Например
N123

При наличии номер строки должен быть первым полем в строке. Для G-кода, хранящегося в файлах на SD-картах, номер строки обычно опускается.

If checking is supported, the RepRap firmware expects line numbers to increase by 1 each line, and if that doesn't happen it is flagged as an error. But you can reset the count using M110 (see below).

Although supported, usage of N in Machinekit is discouraged as it serves no purpose.

*: Контрольная сумма

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да ??? Да ??? ??? ??? ??? Нет Да

Пример: *71

If present, the checksum should be the last field in a line, but before a comment. Для G-кода, хранящегося в файлах на SD-картах, контрольная сумма обычно опускается.

Микропрограммное обеспечение сравнивает контрольную сумму с локально вычисленным значением. Если они отличаются, он запрашивает повторную передачу строки.

Проверка

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да ??? Да ??? ??? ??? ??? Нет Да
Например
N123 [...G Code in here...] *71

Микропрограммное обеспечение RepRap проверяет номер строки и контрольную сумму. You can leave both of these out - RepRap will still work, but it won't do checking. Вы должны иметь оба или ни того, ни другого. Если отображается только один, возникает ошибка.

The checksum "cs" for a GCode string "cmd" (including its line number) is computed by exor-ing the bytes in the string up to and not including the * character as follows:

int cs = 0;
for(i = 0; cmd[i] != '*' && cmd[i] != NULL; i++)
   cs = cs ^ cmd[i];
cs &= 0xff;  // Defensive programming...

and the value is appended as a decimal integer to the command after the * character.

Буферизация

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да ??? Да ??? ??? Да ??? ??? ??? Да Да Да

If buffering is supported, the RepRap firmware stores some commands in a ring buffer internally for execution. This means that there is no (appreciable) delay while a command is acknowledged and the next transmitted. In turn, this means that sequences of line segments can be plotted without a dwell between one and the next. As soon as one of these buffered commands is received it is acknowledged and stored locally. If the local buffer is full, then the acknowledgment is delayed until space for storage in the buffer is available. This is how flow control is achieved.

Typically, the following moving commands are buffered: G0-G3 и G28-G32. The Teacup Firmware buffers also some setting commands: G20, G21, G90 и G91. All other G, M or T commands are not buffered.

RepRapFirmware also implements an internal queue to ensure that certain codes (like M106) are executed in the right order and not when the last move has been added to the look-ahead queue.

When an unbuffered command is received it is stored, but it is not acknowledged to the host until the buffer is exhausted and then the command has been executed. Thus the host will pause at one of these commands until it has been done. Short pauses between these commands and any that might follow them do not affect the performance of the machine.

G-команды

G0 & G1: Перемещение

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да Да Да Да Да Да Да Да Да
  • G0 : Rapid Move
  • G1 : Линейное перемещение
Применение
G0 Xnnn Ynnn Znnn Ennn Fnnn Snnn
G1 Xnnn Ynnn Znnn Ennn Fnnn Snnn
Параметры
Not all parameters need to be used, but at least one has to be used
Xnnn The position to move to on the X axis
Ynnn The position to move to on the Y axis
Znnn The position to move to on the Z axis
Ennn The amount to extrude between the starting point and ending point
Fnnn The feedrate per minute of the move between the starting point and ending point (if supplied)
Hnnn (RepRapFirmware) Flag to check if an endstop was hit (S1 to check, S0 to ignore, S2 see note, default is S0)1
Snnn Laser cutter/engraver power. In RepRapFirmware, when not in laser mode S in interpreted the same as H.
Примеры
G0 X12               ; move to 12mm on the X axis
G0 F1500             ; Set the feedrate to 1500mm/minute
G1 X90.6 Y13.8 E22.4 ; Move to 90.6mm on the X axis and 13.8mm on the Y axis while extruding 22.4mm of material

The RepRap firmware spec treats G0 and G1 as the same command, since it's just as efficient as not doing so.2

Most RepRap firmwares do subtle things with feedrates.

G1 F1500           ; Set feedrate to 1500mm/m
G1 X50 Y25.3 E22.4 ; Move and extrude

In the above example, we first set the feedrate to 1500mm/m, then move to 50mm on X and 25.3mm on Y while extruding 22.4mm of filament between the two points.

G1 F1500                 ; Скорость подачи 1500mm/m
G1 X50 Y25.3 E22.4 F3000 ; Ускорение до 3000mm/m

However, in the above example, we set a feedrate of 1500 mm/m, then do the same move, but accelerating to 3000 mm/m. Everything stays synchronized, so extrusion accelerates right along with X and Y movement.

The RepRap spec treats the feedrate as simply another variable (like X, Y, Z, and E) to be linearly interpolated. This gives complete control over the acceleration and deceleration of the printer head in a way that ensures everything moves smoothly together and the right volume of material is extruded at all points.3

To reverse the extruder by a given amount (for example to reduce its internal pressure while it does an in-air movement so that it doesn't dribble) simply use G0 or G1 to send an E value that is less than the currently extruded length.

Примечания

1Some firmwares allow for the RepRap to enable or disable the "sensing" of endstops during a move. Please check with whatever firmware you are using to see if they support the S parameter in this way, as damage may occur if you assume incorrectly. In RepRapFirmware, using the S1 or S2 parameter on a delta printer causes the XYZ parameters to refer to the individual tower motor positions instead of the head position, and to enable endstop detection as well if the parameter is S1.

2In the RS274NGC Spec, G0 is Rapid Move, which was used to move between the current point in space and the new point as quickly and efficiently as possible, and G1 is Controlled Move, which was used to move between the current point in space and the new point as precise as possible. In RepRapFirmware, G1 is always a linear move but G0 may not be linear (e.g. on a SCARA machine); however a G0 move will never go below the lower of the initial and final Z height of the move.

3Some firmwares may not support setting the feedrate inline with a move.

4RepRapFirmware provides an additional 'R1' parameter to tell the machine to go back to the coordinates a print was previously paused at. If this parameter is used and the code contains axis letters, an offset will be added to the pause coordinates (e.g. G1 R1 Z5).

Some older machines, CNC or otherwise, used to move faster if they did not move in a straight line. This is also true for some non-Cartesian printers, like delta or polar printers, which move easier and faster in a curve.

G2 & G3: Controlled Arc Move

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Да Да1 Да Да Да Да No ??? Да Experimental Да
Применение
G2 Xnnn Ynnn Innn Jnnn Ennn Fnnn (Clockwise Arc)
G3 Xnnn Ynnn Innn Jnnn Ennn Fnnn (Counter-Clockwise Arc)
Параметры
Xnnn The position to move to on the X axis
Ynnn The position to move to on the Y axis
Innn The point in X space from the current X position to maintain a constant distance from
Jnnn The point in Y space from the current Y position to maintain a constant distance from
Ennn The amount to extrude between the starting point and ending point
Fnnn The feedrate per minute of the move between the starting point and ending point (if supplied)
Примеры
G2 X90.6 Y13.8 I5 J10 E22.4

(Move in a Clockwise arc from the current point to point (X=90.6,Y=13.8), with a center point at (X=current_X+5, Y=current_Y+10), extruding 22.4mm of material between starting and stopping)

G3 X90.6 Y13.8 I5 J10 E22.4

(Move in a Counter-Clockwise arc from the current point to point (X=90.6,Y=13.8), with a center point at (X=current_X+5, Y=current_Y+10), extruding 22.4mm of material between starting and stopping)

Примечания

1In Marlin Firmware not implemented for DELTA and SCARA printers.

G4: Dwell

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да Да Да Да Да Да Да Да Да

Приостановка машины на некоторое время.

Параметры
Pnnn Time to wait, in milliseconds (In Teacup, P0, wait until all previous moves are finished)
Snnn Time to wait, in seconds (Only on Repetier, Marlin, Smoothieware, and RepRapFirmware 1.16 and later)
Например
G4 P200

In this case sit still doing nothing for 200 milliseconds. During delays the state of the machine (for example the temperatures of its extruders) will still be preserved and controlled.

On Marlin, Smoothie and RepRapFirmware, the "S" parameter will wait for seconds, while the "P" parameter will wait for milliseconds. "G4 S2" и "G4 P2000" являются эквивалентными.

G6: Direct Stepper Move

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Применяйте G1 S2 или G1 H2 instead Нет Нет Нет Нет Нет Нет

Perform a direct, uninterpolated, and non-kinematic synchronized move of one or more steppers directly. Units may be linear (e.g., mm or inches on DELTA) or specified in degrees (SCARA). This command is useful for initialization, diagnostics, and calibration, and should be disabled on production equipment. This type of move can be potentially dangerous, especially for deltabots, so implementations should do their best to limit movement to prevent twerking and damaging the carriage assembly.

Параметры
Annn Stepper A position or angle
Bnnn Stepper B position or angle
Cnnn Stepper C position or angle
R Флаг относительного перемещения
SCARA примеры
G6 A45     ; Move SCARA A stepper to the 45° position
G6 B20 R   ; Move SCARA B stepper 20° counter-clockwise
DELTA пример
G6 C10 R   ; Move DELTA C carriage up by 10mm

G10: Set tool Offset and/or workplace coordinates and/or tool temperatures

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Да Да Нет ??? ??? Нет Нет
Применение
G10 Pnnn Xnnn Ynnn Znnn Rnnn Snnn1
Параметры
Pnnn Номер инструмента
Lnnn Offset mode (optional)5
Xnnn координата X
Ynnn координата Y
Znnn координата Z2
U,V,W,A,B,Cnnn other axis offsets4
Rnnn Standby temperature(s) (RepRapFirmware)
Snnn Действительная температура(ры) (RepRapFirmware)
Примеры
G10 P2 X17.8 Y-19.3 Z0.0

(sets the offset for tool 2 to the X, Y, and Z values specified)

G10 P1 R140 S205

(RepRapFirmware only - set standby and active temperatures3 for tool 1)

Remember that any parameter that you don't specify will automatically be set to the last value for that parameter. That usually means that you want explicitly to set Z0.0. RepRapFirmware will report the tool parameters if only the tool number is specified.

The precise meaning of the X, Y (and other offset) values is: with no offset this tool is at this position relative to where a tool with offset (0, 0, 0) would be. So if the tool is 10mm to the left of a zero-offset tool the X value would be -10, and so on.

The R value is the standby temperature in oC that will be used for the tool, and the S value is its operating temperature. If you don't want the tool to be at a different temperature when not in use, set both values the same. See the T code (select tool) below. In tools with multiple heaters the temperatures for them all are specified thus: R100.0:90.0:20.0 S185.0:200.0:150.0 .

См. также M585.

Примечания

1Marlin uses G10/G11 for executing a retraction/unretraction move. Smoothie uses G10 for retract and G10 Ln for setting workspace coordinates. RepRapFirmware interprets a G10 command with no P or L parameter as a retraction command.

2It's usually a bad idea to put a non-zero Z value in as well unless the tools are loaded and unloaded by some sort of tool changer or are on indepedent carriages. When all the tools are in the machine at once they should all be set to the same Z height.

3If the absolute zero temperature (-273.15) is passed as active and standby temperatures, RepRapFirmware will only switch off the tool heater(s) without changing their preset active or standby temperatures. RepRapFirmware-dc42 does not support this setting.

4Tool offsets are applied after any X axis mapping has been performed. Therefore if for example you map X to U in your M563 command to create the tool, you should specify a U offset not an X offset. If you map X to both X and U, you can specify both offsets.

5L1 (the default) sets the offsets of the current tool relative to the head reference point to the specified values. L2 sets the current workplace coordinate offsets to the specified values. L20 adjusts the current workplace coordinate offsets so that the current tool head position has the specified coordinates.

G10: Retract

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Да: 0.92 Да Да Нет Нет ??? ??? Нет Да
Параметры
Snnn retract length (S1 = long retract, S0 = short retract = default) (Repetier only)
Например
G10

Retracts filament according to settings of M207 (Marlin, RepRapFirmware) or according to the S value (Repetier).

RepRapFirmware recognizes G10 as a command to set tool offsets and/or temperatures if the P parameter is present, and as a retraction command if it is absent.

G11: Unretract

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Да: 0.92 Да Да Нет Нет ??? ??? Нет Да
Параметры
Snnn retract length (S1 = long retract, S0 = short retract = default) (Repetier only)
Например
G11

Unretracts/recovers filament according to settings of M208 (Marlin, RepRapFirmware) or according to the S value (Repetier).

G12: Очистить Инструмент

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да: 1.1.0 Нет Нет Use a macro instead Нет Нет ??? ??? Нет Да
Применение
[P<0|1>] [S<count>] [T<count>]
G12 Pnnn Snnn Tnnn
Параметры
Pnnn1 Pattern style selection
Snnn Number of strokes (i.e. back-and-forth movements)
Tnnn Количество повторений
Примеры

G12 ; stroke pattern (default)

To generate a three triangle zig-zag pattern which will be stroked three times time use the following command. G12 P1 S3 T2 ; zig-zag pattern with 2 triangles

Примечания

1In Marlin firmware and Derivatives Mk4duo this is implemented by hard-coded firmware behaviours As defined for variables NOZZLE_CLEAN_STROKES, NOZZLE_CLEAN_START_POINT, NOZZLE_CLEAN_END_POINT and NOZZLE_CLEAN_PARK.

With NOZZLE_CLEAN_PARK enabled, the nozzle will automatically return to the XYZ position after G12 is run.

More on this behaviour is documented inside of the code base.

The use of G12 for tool cleaning clashes with the established use of G12 for circular pocket milling on CNC machines. For this reason, RepRapFirmware does not support G12.

G17..19: Plane Selection (CNC specific)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? Да:1.1.4 ??? ??? Нет Да ??? ??? Да Нет Нет

These codes set the current plane as follows:

  • G17 : XY (по умолчанию)
  • G18 : ZX
  • G19 : YZ

This mode applies to G2/G3 arc moves. Normal arc moves are in the XY plane, and for most applications that's all you need. For CNC routing it can be useful to do small "digging" moves while making cuts, so to keep the G-code compact it uses G2/G3 arcs involving the Z plane.

These commands are supported in Marlin 1.1.4 and later with ARC_SUPPORT and CNC_WORKSPACE_PLANES enabled.

G20: Установить единицы измерения в дюймах

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да Да Да Да Нет ??? Да Нет Да
Например
G20

Единицы измерения теперь в дюймах.

G21: Установить единицы измерения в миллиметрах

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да Да Да Да Да ??? Да Да Да
Например
G21

Теперь единицы измерения в миллиметрах. (Это значение RepRap по умолчанию.)

G22 & G23: Firmware controlled Retract/Precharge

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Да Нет ??? ??? Нет Нет
Применение
G22 ; Retract
G23 ; Unretract/Precharge

Relying on machine's firmware to execute extrusion retract/precharge move, instead of having slicer generating to E axis G1 movement. The retract/precharge length, velocity is handled by the machine firmware.

G26: Mesh Validation Pattern

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да: 1.1.0 Нет Нет Нет Нет Нет Нет Нет Нет Да
Применение
G26 C P O2.25 ; Do a typical test sequence

The G26 Mesh Validation Pattern is designed to be used in conjunction with various Mesh Bed Leveling systems – those that adjust for an uneven —rather than just tilted— bed. The G26 command prints a single layer pattern over the entire print bed, giving a clear indication of how accurately every mesh point is defined. G26 can be used to determine which areas of the mesh are less-than-perfect and how much to adjust each mesh point.

G26 has large feature list, including a built-in test that extrudes material onto the bed. By default this is configured for PLA temperatures and a nozzle size of 0.4mm. (This will be adjustable in an upcoming version of Marlin.)

See the G26_Mesh_Validation_Tool.cpp file in the Marlin source code for full documentation of the G26 parameter list.

G28: Move to Origin (Home)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да Да Да Да Да Да Да Да Да1
Параметры
This command can be used without any additional parameters.
X Flag to go back to the X axis origin
Y Flag to go back to the Y axis origin
Z Flag to go back to the Z axis origin
Примеры
G28     ; Home all axes
G28 X Z ; Home the X and Z axes

When the firmware receives this command, it quickly moves the specified axes (or all axes if none are given) to the endstops, backs away from each endstop by a short distance, and slowly bumps the endstop again to increase positional accuracy. This process, known as "Homing", is required to determine the position of the print carriage(s). Some firmware may even forbid movement away from endstops and other operations until the axes have been homed.

The X, Y, and Z parameters act only as flags. Любые заданные координаты игнорируются. For example, G28 Z10 results in the same behavior as G28 Z. Delta printers cannot home individual axes, but must always home all three towers, so the X Y Z parameters are simply ignored on these machines.

Marlin firmware (version 1.1.0 and later) provides an option called Z_SAFE_HOMING for printers that use a Z probe to home Z instead of an endstop. With this option, the XY axes are homed first, then the carriage moves to a position –usually the middle of the bed– where it can safely probe downward to home Z.

RepRapFirmware uses macro files to home either all axes or individual axes. If all axes are homed, the file homeall.g is processed. For individual axes the homex.g, homey.g, or homez.g file will be used. On Delta printers, G28 command will always home all three towers by processing the homedelta.g file, regardless of any X Y Z parameters.

Because the behavior of G28 is unspecified, it is recommended not to automatically include G28 in your ending GCode. On a Cartesian this will result in damaging the printed object. If you need to move the carriage at the completion of a print, use G0 or G1.

Примечания

1 MK4duo has a B parameter that tells the printer to return to the coordinates it was at before homing.
2 Original Prusa i3 Mk2/Mk3 supports a W parameter to suppress mesh bed leveling. If W is omitted, G28 will home and perform mesh bed leveling.

G29: Detailed Z-Probe

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Да: 0.91.7 Нет: см. G32 1.17 и позже Да Нет ??? ??? Да Да

This command uses a probe to measure the bed height at 3 or more points to determine its tilt and overall flatness. It then enables compensation so that the nozzle will remain parallel to the bed. The printer must be homed with G28 before using this command.

Each firmware behaves differently and depends on the type of bed leveling that's been configured. For example, Marlin 1.0.2 provides 3 different types of automatic bed leveling (probe required) and a manual bed leveling option. See your firmware's documentation for the specific options available.

Применение
G29
G29 Snnn
Параметры
Snnn Firmware-dependent behavior
Pfile.csv Optional file name for bed height map file (RepRapFirmware only)
Примеры
G29    ; Probe the bed and enable compensation
G29 S2 ; Special operation - see below
G29 P1 ; UBL automated probe - see below
G29 Auto Bed Leveling (Marlin)

Marlin 1.0.2 and earlier provides three options for automatic bed leveling:

  • The 3-point method probes the bed at three points to produce a matrix, adjusting for a flat but tilted bed.
  • The planar grid method (non-Delta) probes a grid pattern to produce a matrix by the "least-squares" method, adjusting for a flat but tilted bed.
  • The bilinear grid method (Delta only) probes a grid pattern to produce a mesh, using bilinear interpolation to adjust for an uneven bed.

Marlin 1.1.0 and later allows the bilinear grid (i.e., "mesh") method to be used on all types of machines, not just deltas. This is the recommended leveling method going forward.

Also in Marlin 1.1.0 and later, the PROBE_MANUALLY option allows all forms of Auto Bed Leveling to be used without a probe. The procedure is similar to that of MESH_BED_LEVELING (see below). Begin the process with G29 to move the nozzle to the first point. Adjust the Z axis using G1 or your host software. Send G29 again to move to the next point and repeat until all points have been sampled.

Параметры
P Set the size of the grid that will be probed (P x P points). Not supported by non-linear delta printer bed leveling. Пример: G29 P4
S Set the XY travel speed between probe points (in units/min)
D Dry-Run mode. Just evaluate the bed Topology - Don't apply or clean the rotation Matrix. Useful to check the topology after a first run of G29.
V Set the verbose level (0-4). Пример: G29 V3
T Generate a Bed Topology Report. Пример: G29 P5 T for a detailed report. This is useful for manual bed leveling and finding flaws in the bed (to assist with part placement). Not supported by non-linear delta printer bed leveling.
F Set the Front limit of the probing grid
B Set the Back limit of the probing grid
L Set the Left limit of the probing grid
R Set the Right limit of the probing grid
Глобальные параметры
E By default G29 will engage the Z probe, test the bed, then disengage. Include E or E1 to engage/disengage the Z probe for each sample. (This has no effect for fixed probes.)
G29 Unified Bed Leveling (Marlin)

Marlin firmware (version 1.1.0 and later) includes the AUTO_BED_LEVELING_UBL option for Unified Bed Leveling. UBL combines mesh leveling, tilted plane adjustment, 3-point leveling, and manual editing tools all together in a single package. To accomplish so much, UBL overloads `G29` with several new parameters and provides an additional G26 Mesh Tuning feature.

See the MarlinFW website for a dedicated Unified Bed Leveling page and complete documentation on `G29` for UBL and `G26` Mesh Validation.

G29 UBL Parameters (synopsis)
A     Activate   Activate the Unified Bed Leveling system. (i.e., M420 S1)
D     Disable    Disable the Unified Bed Leveling system. (i.e., M420 S0)

B#    Business   Do Manual Probing in 'Business Card' mode.
H#    Height     Height to raise the nozzle after each Manual Probe of the bed.

C     Continue   Continue, Constant, or Current Location, depending on Phase.
E     Every      Stow the probe after every sampled point.
F#    Fade       Fade leveling compensation gradually, until it ceases at the given height.
I#    Invalidate Invalidate a specified number of Mesh Points (X and Y).
J#    Grid       Do a grid (planar) leveling of the current Mesh using a grid with n points on a side.
K#    Kompare    Compare (diff) current Mesh with stored Mesh #, replacing current Mesh with the result.

L     Load       Load Mesh from the previously activated location in the EEPROM.
L#    Load       Load Mesh from the specified location in the EEPROM.
S     Store      Store the current Mesh in the Activated area of the EEPROM. Also save all settings.
S #   Store      Store the current Mesh at the specified area in EEPROM, set as the Activated area.
S -1  Store      Store the current Mesh as a print-out suitable to be fed back into the system.

O     Map        Display the Mesh Map Topology.

P0    Phase 0    Zero Mesh Data and turn off the Mesh Compensation System.
P1    Phase 1    Invalidate the Mesh and do Automatic Probing to generate new Mesh data.
P2    Phase 2    Probe unpopulated areas of the Mesh (those that couldn't be auto-probed).
P3    Phase 3    Fill unpopulated Mesh points with a fixed value. No 'C' for "smart fill" extrapolation.
P4    Phase 4    Fine tune the Mesh. ** Delta Mesh Compensation requires an LCD panel. **
P5    Phase 5    Find Mean Mesh Height and Standard Deviation.
P6    Phase 6    Shift Mesh height. All Mesh points are adjusted by the amount specified with 'C'.

Q     Test       Load specified Test Pattern to help check system operation.

R #   Repeat     Repeat the command the specified number of times. Default: grid points X * Y.

T     3-Point    Perform a 3-Point Bed Leveling on the current Mesh.

U     Unlevel    Perform a probe of the outer perimeter to assist in physically leveling the bed.

W     Что?      Print a report of Unified Bed Leveling stored data.

X #              The X location for the command
Y #              The Y location for the command

Z     Zero       Do a single probe to set the Z Height of the nozzle.
Z #   Zero       Raise/lower the entire Mesh to conform with the specified difference (plus zprobe_zoffset).
G29 Manual Bed Leveling (Marlin)

Marlin firmware (version 1.0.2 and later) also provides a MESH_BED_LEVELING feature that can be used to perform bed leveling on machines lacking a probe. This form of bed leveling compensates for uneven Z height across the surface of the bed using a mesh and bilinear interpolation.

Manual Bed Leveling Usage
G29 S1 ; Move to the first point and wait for a measurement
G29 S2 ; Store the current Z, move to the next point
G29 S3 Xn Yn Zn.nn ; Modify the Z height of a single point
Options for the S parameter
S0 Produces a mesh report
S1 Start probing mesh points
S2 Probe the next mesh point
S3 Xn Yn Zn.nn Manually modify a single point
S4 Zn.nn Set z offset. Positive away from bed, negative closer to bed.
G29 Auto Bed Leveling (Repetier-Firmware)

Repetier firmware since v0.91 supports G29 with the optional Snnn parameter as described below. Useful to simply detect the Z bed angle so you can manually readjust your bed and get it as close to in plane as possible. If you wish to apply automatic software Z plane compensation on Repetier, use G32 instead with firmware 0.92.8 and above.

S0 Значение по умолчанию. Z bed heights are calculated at the measured points, relative to current Z position before issuing G29.
S1 Same as S0, except printer immediately moves to Z maximum position (Z max endstop required!), and calculates new Z maximum height. You must first issue G28 Z to home to Z maximum position before issuing G29 Snnn for this to work correctly, or the printer height will be invalid.
S2 Same as S1, except new calculated Z height is also stored to EEPROM.
G29 Mesh Bed Compensation (RepRapFirmware)

RepRapFirmware:

S0 (default if no S parameter) Probe the bed, save the height map in a file on the SD card, and activate the height map. The default folder for the height map file is /sys and the default file name is heightmap.csv.
S1 Load the height map from file and activate bed compensation. The default folder and filename as for S0.
S2 Clear the currently-loaded bed height map

To define the grid, see M557.

G29.1: Set Z probe head offset

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Да Нет ??? ??? Нет Нет
Например
G29.1 X30 Y20 Z0.5

Set the offset of the Z probe head. The offset will be subtracted from all probe moves.

G29.2: Set Z probe head offset calculated from toolhead position

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Да Нет ??? ??? Нет Нет
Например
G29.2 Z0.0

Set the offset of the Z probe head. The offset will be subtracted from all probe moves. The calculated value is derived from the distance of the toolhead from the current axis zero point.

The user would typically place the toolhead at the zero point of the axis and issue the G29.2 command.

G30: Single Z-Probe

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет: Применяйте G28 и G92 Нет Да Да Да Да Да Нет ??? ??? Да Да1
Применение
G30 Pnnn Xnnn Ynnn Znnn Hnnn Snnn
Параметры
Pnnn Probe point number
Xnnn X координата
Ynnn Y координата
Znnn Z координата
Hnnn Коррекция высоты
Snnn Установить параметр
Например
G30
Примеры (RepRapFirmware)
G30                          ; Probe the bed at the current XY position. When the probe is triggered, set the Z coordinate to the probe trigger height.
G30 S-1                      ; Probe the bed at the current XY position. When the probe is triggered, do not adjust the Z coordinate.
G30 P0 X20 Y50 Z-99999       ; Probe the bed at X20 Y50 and save the XY coordinates and the height error as point 0
G30 P3 X180 Y180 Z-99999 S4  ; Probe the bed at X180 Y180, save the XY coordinates and the height error as point 3 and calculate 4-point compensation or calibration
G30 P3 X180 Y180 Z-99999 S-1 ; As previous example but just report the height errors

In its simplest form probes bed at current XY location.

RepRapFirmware supports additional behaviour: if a Pn field is specified the probed X, Y, and Z values are saved as point n on the bed for calculating the offset plane or for performing delta printer calibration. If X, Y, or Z values are specified (e.g. G30 P1 X20 Y50 Z0.3) then those values are used instead of the machine's current coordinates. A silly Z value (less than -9999.0) causes the machine to probe at the current point to get Z, rather than using the given value. If an S field is specified (e.g. G30 P1 Z0.3 S) the bed plane is computed for compensation and stored. The combination of these options allows for the machine to be moved to points using G1 commands, and then probe the bed, or for the user to position the nozzle interactively and use those coordinates. The user can also record those values and place them in a setup GCode file for automatic execution.

RepRapFirmware uses the value of the S parameter to specify what computation to perform. If the value is -1 then the Z offsets of all the points probed are printed, but no calibration is done. If the value is zero or not present, then this specifies that the number of factors to be calibrated is the same as the number of points probed. Otherwise, the value indicates the number of factors to be calibrated, which must be no greater than the number of points probed. In version 1.09, the number of factors may be 3, 4 or 5 when doing auto bed compensation on a Cartesian or CoreXY printer, and 3, 4, 6 or 7 when doing auto calibration of a Delta printer.

RepRapFirmware supports an optional H parameter, which is a height correction for that probe point. It allows for the Z probe having a trigger height that varies with XY position. The nominal trigger height of the Z probe (e.g. at bed centre) is declared in the Z parameter of the G31 command in the config.g file. When you probe using G30 and the probe triggers, the firmware will assume that the nozzle is at the nominal trigger height plus the value you have in the H parameter.

1MK4duo Firmware support an optional parameter for Delta.

Применение
G30 Xnnn Ynnn S Z P
Параметры
Xnnn X координата
Ynnn Y координата
Sn Stows the probe if 1 (default=1)
Zn <bool> with a non-zero value will apply the result to current delta_height
Pn <bool> with a non-zero value will apply the result to current zprobe_zoffset

G31: Set or Report Current Probe status

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да: 0.91.7 Да Да Нет Нет ??? ??? Нет Нет
Применение
G31 Pnnn Xnnn Ynnn Znnn Cnnn Snnn
Параметры
Pnnn Значение триггера
Xnnn Probe X offset1
Ynnn Probe Y offset1
Znnn Trigger Z height
Cnnn Температурный коэффициент2
Snnn Калибровка температуры2
Tnnn (RepRapFirmware 1.17 and later) Z probe type to which these parameters apply, defaults to the current Z probe type as defined by M558 P parameter
Примеры
G31 P500 Z2.6
G31 X16.0 Y1.5

When used on its own this reports whether the Z probe is triggered, or gives the Z probe value in some units if the probe generates height values. If combined with a Z and P field (example: G31 P312 Z0.7) this will set the Z height to 0.7mm when the Z-probe value reaches 312 when a G28 Z0 (zero Z axis) command is sent. The machine will then move a further -0.7mm in Z to place itself at Z = 0. This allows non-contact measuring probes to approach but not touch the bed, and for the gap left to be allowed for. If the probe is a touch probe and generates a simple 0/1 off/on signal, then G31 Z0.7 will tell the RepRap machine that it is at a height of 0.7mm when the probe is triggered.

In RepRapFirmware, separate G31 parameters may be defined for different probe types (i.e. 0+4 for switches, 1+2 for IR probes and 3 for alternative sensors). To specify which probe you are setting parameters for, send a M558 command to select the probe type before sending the G31 command, or use the T parameter.

In Repetier, G31 supports no parameters and simply prints the high/low status of the Z probe.

Примечания

1X and Y offsets of the Z probe relative to the print head (i.e. the position when the empty tool is selected) can be specified in RepRapFirmware. This allows you to calculate your probe coordinates based on the geometry of the bed, without having to correct them for Z probe X and Y offset.

2In RepRapFirmware, additional parameters 'S' (bed temperature in oC at which the specified Z parameter is correct, default is current bed temperature) and 'C' (temperature coefficient of Z parameter in mm/oC, default zero) can be set for the alternative (ultrasonic) sensor. This is useful for probes that are affected by temperature. This facility is deprecated and likely to be removed in a future version of RepRapFirmware.

G31: Dock Z Probe sled

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да ??? Нет Нет Нет Нет ??? ??? Да Да

G32: Probe Z and calculate Z plane

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет: См. G29 Да: 0.92.8 Да Да Нет Нет ??? ??? Нет Нет
Применение
G32           ; Probe and calculate
G32 Snnn      ; Each firmware has its own parameters
G32 Snnn Pnnn ; Refer to their specific documentation

This command is implemented as a more sophisticated form of bed leveling (which uses a transformation matrix or motorized correction. Smoothieware uses this code instead of `G29`.

Each firmware behaves differently. For example, Repetier firmware allows for motorized rotation of the bed whilst ReprapFirmware probes the bed with a transformation matrix.

Probe and calculate in Reprapfirmware

RepRapFirmware executes macro file bed.g in response to the G31 command. The bed.g file is typically used to probe the bed and then perform delta calibration if the printer is a delta, or to perform individual leadscrew adjustment to level the bed if the printer has multiple independently-controlled Z motors, or to advise the user on how much to adjust each bed levelling adjustment screw.

Probe and calculate in Repetier firmware

This command probes the bed at 3 or more pre-defined points and implements bed leveling compensation by either moving the A axis during printing (as with regular bed leveling, G29) or by tilting the bed with motors.

Параметры
Snnn Метод выравнивания стола
Pnnn Метод коррекции стола

The values for Snnn and Pnnn are as follows:

S0 This method measures at the 3 probe points and creates a plane through these points. If you have a really planar bed this gives the optimum result. The 3 points must not be in one line and have a long distance to increase numerical stability.
S1 This measures a grid. Probe point 1 is the origin and points 2 and 3 span a grid. We measure BED_LEVELING_GRID_SIZE points in each direction and compute a regression plane through all points. This gives a good overall plane if you have small bumps measuring inaccuracies.
S2 Bending correcting 4 point measurement. This is for cantilevered beds that have the rotation axis not at the side but inside the bed. Here we can assume no bending on the axis and a symmetric bending to both sides of the axis. So probe points 2 and 3 build the symmetric axis and point 1 is mirrored to 1m across the axis. Using the symmetry we then remove the bending from 1 and use that as plane.
P0 Use a rotation matrix. This will make z axis go up/down while moving in x/y direction to compensate the tilt. For multiple extruders make sure the height match the tilt of the bed or one will scratch. Это по умолчанию.
P1 Моторизованная коррекция. This method needs a bed that is fixed on 3 points from which 2 have a motor to change the height. The positions are defined in firmware by BED_MOTOR_1_X, BED_MOTOR_1_Y, BED_MOTOR_2_X, BED_MOTOR_2_Y, BED_MOTOR_3_X, BED_MOTOR_3_Y Motor 2 and 3 are the one driven by motor driver 0 and 1. These can be extra motors like Felix Pro 1 uses them or a system with 3 z axis where motors can be controlled individually like the Sparkcube does. This method requires a Z max endstop.

G32: Undock Z Probe sled

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да ??? Нет Нет Нет Нет ??? ??? Да Да

G33: Зависит от прошивки

G33: Measure/List/Adjust Distortion Matrix (Repetier - Redeem)
Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да: v0.92.8 Нет Нет Нет Нет ??? ??? Да Нет
Применение
G33
G33 Lnnn
G33 Rnnn
G33 Xnnn Ynnn Znnn
Параметры
L0 List distortion matrix in a report
R0 Reset distortion matrix
X[pos] Y[pos] Z[zCorrection] Set correction for nearest point
Примеры
G33
G33 R0

When used with no parameters, G33 will measure a grid of points and store the distortion dips and valleys in the bed surface, and then enable software distortion correction for the first few or several layers. The values will be stored in EEPROM if enabled in firmware. You must previously have G28 homed, and your Z minimum/maximum height must be set correctly for this to work. Use the optional parameters to list, reset or modify the distortion settings. Distortion correction behavior can be later turned on or off by code M323.

G33: Delta Auto Calibration (Marlin 1.1.x or MK4duo)
Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Применяйте G32 Нет Нет Нет Нет Нет Да

End-stops and tower angle corrections are normalized (P0);

Performs a 1-4-7 point calibration of delta height (P1), end-stops, delta radius (P2) and tower angle corrections (P>=3) by a least squares iteration process based on the displacement method.

Применение
G33
G33 Pn T Cx.xx Fn Vn E
Параметры
Pn Number of probe points: n*n (n= 0-10), when P is omitted the default set in Configuration.h is used.
T Do not calibrate tower angle corrections (if used with P>=3); do not use the probe points near the towers, but the probe points opposite to the towers (if used with P=2)
Cx.xx Force the iterations to stop when a standard deviation from the zero plane less then x.xx mm is achieved; when C is omitted the iterations go on until the best possible standard deviation is reached.
Fn Force to run at least n iterations (n=1-30) and take the best result
Vn Verbose level: (n=0-3) 0 = dry run without calibration; 1(default) = settings at start and end; 2 = settings at all iterations; 3 = settings and probe results
E Engage the probe for each point
Примеры
G33 : calibrates with the default settings.
G33 Автоматическая калибровка
Проверка... AC
.Высота:297.77    Ex:+0.00  Ey:+0.00  Ez:+0.00    Радиус:100.00
.Tower angle :    Tx:+0.00  Ty:+0.00  Tz:+0.00
Повтор : 01                                    std dev:0.306
Повтор : 02                                    std dev:0.049
Повтор : 03                                    std dev:0.033
Повтор : 04                                    std dev:0.031
Calibration OK                                    rolling back.
.Height:297.69    Ex:-0.10  Ey:-0.12  Ez:+0.00    Radius:100.91
.Tower angle :    Tx:-0.03  Ty:+0.25  Tz:+0.00
Save with M500 and/or copy to Configuration.h
G33 P6 V0 : probes 36 points in dry run mode.
G33 Автоматическая калибровка
Проверка... AC (DRY-RUN)
.Высота:297.77    Ex:+0.00  Ey:+0.00  Ez:+0.00    Радиус:100.00
.Tower angle :    Tx:+0.00  Ty:+0.00  Tz:+0.00
.      c:+0.03     x:+0.32   y:+0.34   z:+0.41
.                 yz:+0.37  zx:+0.32  xy:+0.17
End DRY-RUN                                       std dev:0.306
G33 P4 C0.05 T : probes 16 points and
                 stops when a standard deviation of 0.05mm is reached;
                 calibrates delta height, endstops and delta radius,
                 leaves the tower angle corrections unaltered.
G33 Автоматическая калибровка
Проверка... AC
.Высота:297.78    Ex:+0.00  Ey:+0.00  Ez:+0.00    Радиус:100.00
Повтор : 01                                    std dev:0.317
Повтор : 02                                    std dev:0.059
Calibration OK                                    std dev:0.042
.Height:297.66    Ex:-0.17  Ey:-0.13  Ez:+0.00    Radius:100.91
Save with M500 and/or copy to Configuration.h
G33 P2 : probes center and tower positions and
         calibrates delta height, endstops and delta radius.
G33 Автоматическая калибровка
Проверка... AC
.Высота:297.78    Ex:+0.00  Ey:+0.00  Ez:+0.00    Радиус:100.00
Повтор : 01                                    std dev:0.374
Повтор : 02                                    std dev:0.054
Повтор : 03                                    std dev:0.007
Calibration OK                                    rolling back.
.Высота:297.68    Ex:-0.14  Ey:-0.14  Ez:+0.00    Радиус:101.23
Save with M500 and/or copy to Configuration.h
G33 P1 : probes the center and calibrates the delta height only.
G33 Автоматическая калибровка
Проверка... AC
.Height:261.40                                Offset:+0.30
Calibration OK                                std dev:0.000
.Height:261.58                                Offset:+0.10
Save with M500 and/or copy to Configuration.h

"примечание: Height = delta height; Ex, Ey, Ez = end-stop corrections; Radius = delta radius; Tx, Ty, Tz = tower angular corrections; c, x, y, z, yz, zx, xy = probe results at center, towers and opposite to towers; std dev = standard deviation of the probe results towards the zero plane.

G34: Set Delta Height calculated from toolhead position (only DELTA)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? Нет ??? Нет Нет ??? ??? ??? Нет Нет Да
Например
G34

The values specified are added to the calculated end stop position when the axes are referenced. The calculated value is derived from the distance of the toolhead from the current axis zero point. The user would typically place the toolhead at the zero point of the axis and issue the G34 command. This value can be saved to EEPROM using the M500 command.

G38.x Straight Probe (CNC specific)

G38.2 probe toward workpiece, stop on contact, signal error if failure
Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? Да: 1.1.0 ??? Да Нет ??? ??? ??? Да Нет Да
G38.3 probe toward workpiece, stop on contact
Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? Да: 1.1.0 ??? Да Нет ??? ??? ??? Да Нет Да
G38.4 probe away from workpiece, stop on loss of contact, signal error if failure
Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? ??? Нет ??? ??? ??? Да Нет Нет
G38.5 probe away from workpiece, stop on loss of contact
Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? ??? Нет ??? ??? ??? Да Нет Нет

G40: Compensation Off (CNC specific)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? Нет ??? Нет Нет Да ??? ??? Да Нет Нет

G40 turns off cutter compensation. If tool compensation was on the next move must be a linear move and longer than the tool diameter. It is OK to turn compensation off when it is already off.

G42: Move to Grid Point

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да: 1.1.2 Нет Нет Нет Нет Нет Нет Нет Нет Да

G42 does a fast move in XY to any of the intersection points in the bed calibration grid. This is useful during calibration to align the nozzle or probe.

Параметры
Inn Grid X index (zero-based). If omitted, the nearest latitude.
Jnn Grid Y index (zero-based). If omitted, the nearest longitude.
P Probe flag. Moves the probe to the grid point (instead of the nozzle).
Fnnn Feedrate (mm/m)
Например
G42 I3 J4 P F3000 ; Move the probe to grid coordinate 3, 4

G53..59: Выбор системы координат (для ЧПУ)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? Нет ??? Да 1.21 и позже Да ??? ??? Да Нет Нет

См. linuxcnc.org для получения дополнительной помощи

Not all builds of RepRapFirmware support these commands. For those that do (e.g. Duet WiFi/Ethernet and Duet 3), from firmware version 2.02 the workplace coordinate offsets are included in the data saved to config-override.g by the M500 command.

G60: save current position to slot

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? ??? 1.21 и позже ??? ??? ??? ??? ??? Да
Применение
G60 Snn
Параметры
Snn <nn> specifies memory slot # (0-based) to save into (default 0)

Implementation in RepRapFirmware:

  • Slots 0, 1 and 2 are available from RepRapFirmware 1.21, also slots 4 and 5 in RRF 2.02. When a print is paused the coordinates are saved to slot 1 automatically, and at the start of a tool change the coordinates are saved to slot 2 automatically. Use G0 or G1 with the R0, R1 or R2 parameter to move the current tool to a saved position.

G61: Apply/restore saved coordinates to the active extruder.

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? ??? Используйте G0 или G1 с параметром R ??? ??? ??? ??? ??? Да
Применение
G61 Xnnn Ynnn Znnn Ennn Fnnn Snn
Параметры
Xnnn X координата
Ynnn Y координата
Znnn Z координата
Ennn E координата
Fnnn F Установить скорость подачи
Snn S specifies memory slot # (0-based)

G80: Cancel Canned Cycle (CNC specific)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? ??? Нет ??? ??? ??? Да Нет Нет

It cancel canned cycle modal motion. G80 is part of modal group 1, so programming any other G code from modal group 1 will also cancel the canned cycle.

G90: Set to Absolute Positioning

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да Да Да Да Да Да Да Да Да
Например
G90

All coordinates from now on are absolute relative to the origin of the machine. (This is the RepRap default.)

G91: Set to Relative Positioning

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да Да Да Да Нет Да Да Да Да
Например
G91

All coordinates from now on are relative to the last position. Примечание: RepRapFirmware latest revision firmware uses M83 to set the extruder to relative mode: extrusion is NOT set to relative by ReprapFirmware on G91: only X,Y and Z are set to relative. By contrast, Marlin (for example) DOES also set extrusion to relative on a G91 command, as well as setting X, Y and Z.

G92: Задать положение

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да Да Да Да Да Да Да Да Да
Параметры
This command can be used without any additional parameters.
Xnnn новое положение оси X
Ynnn новое положение оси Y
Znnn новое положение оси Z
Ennn новое положение экструдера
Например
G92 X10 E90

Allows programming of absolute zero point, by reseting the current position to the values specified. This would set the machine's X coordinate to 10, and the extrude coordinate to 90. No physical motion will occur.

A G92 without coordinates will reset all axes to zero on some firmware. This does not apply to RepRapFirmware.

G92.x: Reset Coordinate System Offsets (CNC specific)
Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? Да Нет ??? ??? ??? Да Нет Нет
  • G92.1 - reset axis offsets to zero and set parameters 5211 - 5219 to zero. (X Y Z A B C U V W)
  • G92.2 - reset axis offsets to zero.

G93: Feed Rate Mode (Inverse Time Mode) (CNC specific)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? ??? Нет ??? ??? ??? Да Нет Нет

G93 is Inverse Time Mode. In inverse time feed rate mode, an F word means the move should be completed in (one divided by the F number) minutes. For example, if the F number is 2.0, the move should be completed in half a minute.

When the inverse time feed rate mode is active, an F word must appear on every line which has a G1, G2, or G3 motion, and an F word on a line that does not have G1, G2, or G3 is ignored. Being in inverse time feed rate mode does not affect G0 (rapid move) motions.

G94: Feed Rate Mode (Units per Minute) (CNC specific)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? ??? Нет ??? ??? ??? Да Нет Нет

G94 is Units per Minute Mode. In units per minute feed mode, an F word is interpreted to mean the controlled point should move at a certain number of inches per minute, millimeters per minute, or degrees per minute, depending upon what length units are being used and which axis or axes are moving.

G100: Calibrate floor or rod radius

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да: 0.92 Нет Нет Нет Нет ??? ??? Нет Нет
Параметры
X Flag to set floor for X axis
Y Flag to set floor for Y axis
Z Flag to set floor for Z axis
Rnnn Radius to add
Примеры
G100 X Y Z ; set floor for argument passed in. Number ignored and may be absent.
G100 R5    ; Add 5 to radius. Adjust to be above floor if necessary
G100 R0    ; Set radius based on current z measurement. Moves all axes to zero

G130: Set digital potentiometer value

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет Да ??? Нет Нет
Например
G130 X10 Y18 Z15 A20 B12

Set the digital potentiometer value for the given axes. This is used to configure the current applied to each stepper axis. The value is specified as a value from 0-127; the mapping from current to potentimeter value is machine specific.

G131: Remove offset

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да: 0.91 Нет Нет Нет Нет ??? ??? Нет Нет

G132: Calibrate endstop offsets

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да: 0.91 Нет Нет Нет Нет ??? ??? Нет Нет

G133: Measure steps to top

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да: 0.91 Нет Нет Нет Нет ??? ??? Нет Нет

G161: Home axes to minimum

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Нет Нет Нет Нет Нет Нет Нет Да ??? Нет Нет
Параметры
X Flag to home the X axis to its minimum position
Y Flag to home the Y axis to its minimum position
Z Flag to home the Z axis to its minimum position
Fnnn Desired feedrate for this command
Например
G161 X Y Z F1800

Instruct the machine to home the specified axes to their minimum position. Similar to G28, which decides on its own in which direction to search endstops.

G162: Home axes to maximum

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Нет Нет Нет Нет Нет Нет Нет Да ??? Нет Нет
Параметры
X Flag to home the X axis to its maximum position
Y Flag to home the Y axis to its maximum position
Z Flag to home the Z axis to its maximum position
Fnnn Desired feedrate for this command
Например
G162 X Y Z F1800

Instruct the machine to home the specified axes to their maximum position.

G425: Perform auto-calibration with calibration cube

Support FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
No No No 2.0.x or later1 No No No No No ??? ??? No No

This performs an automatic calibration of backlash, positional errors and nozzle offset by touching the nozzle on the sides of a bed mounted, electrically conductive cube, washer or bolt.

Параметры
B Perform calibration of backlash only.
Tnnn Perform calibration of toolhead only.
V Probe cube and print position, error, backlash and hotend offset.
Unnn Uncertainty, how far to start probe away from the cube (mm)
Примеры (Marlin)
G425                ; Perform full calibration sequence
T1                  ; Switch to second nozzle
G425 V              ; Validate by showing report for T1
T0                  ; Switch to second nozzle
G425 V              ; Validate by showing report for T0
Примечания

1 Implemented in Lulzbot Marlin 2.0.x (devel branch), currently awaiting merge into Marlin 2.0.x

M-commands

M0: Stop or Unconditional stop

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Нет Да Нет Нет Да Да Нет ??? Да Нет Да
Параметры
This command can be used without any additional parameters.
Pnnn Time to wait, in milliseconds1
Snnn Time to wait, in seconds2
Например
M0

The RepRap machine finishes any moves left in its buffer, then shuts down. Все двигатели и нагреватели выключены. It can be started again by pressing the reset button on the master microcontroller, although this step is not mandatory on RepRapFirmware. См.также M1, M112.

The Marlin Firmware does wait for user to press a button on the LCD, or a specific time. "M0 P2000" waits 2000 milliseconds, "M0 S2" waits 2 seconds.

RepRapFirmware executes cancel.g if this file is present, if the print is paused and if the axes are homed. Otherwise stop.g is run and the drives are put into idle mode. Also the heaters are turned off if no 'H1' parameter is specified.

Примечания

1Not available in RepRapFirmware, but as a work-around G4 can be run before M0.

2Only available on Marlin.

M1: Sleep or Conditional stop

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет ??? Нет Да Нет Нет Да Нет Нет ??? Да Нет Да
Например
M1

The RepRap machine finishes any moves left in its buffer, then shuts down. Все двигатели и нагреватели выключены. It can still be sent G and M codes, the first of which will wake it up again. См. также M0, M112.

The Marlin Firmware does the same as M0.

If Marlin is emulated in RepRapFirmware, this does the same as M25 if the code was read from a serial or Telnet connection, else the macro file sleep.g is run before all heaters and drives are turned off.

M2: Program End

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Нет Нет Нет ??? Нет Нет Нет Да Да Нет Нет
Например
M2

Teacup firmware does the same as M84.

M3: Spindle On, Clockwise (CNC specific)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Нет Нет Да Да Да Нет Нет ??? Да Нет Нет
Параметры
Snnn Spindle RPM
Например
M3 S4000

The spindle is turned on with a speed of 4000 RPM.

Teacup firmware turn extruder on (same as M101).

RepRapFirmware interprets this code only if a Roland mill has been configured.

In Repetier-Firmware in laser mode you need S0..S255 to set laser intensity. Normally you use S255 to turn it on full power for moves. Laser will only fire during G1/G2/G3 moves and in laser mode (M452).

M4: Spindle On, Counter-Clockwise (CNC specific)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да Нет Нет Нет Нет ??? Да Нет Нет
Например
M4 S4000

The spindle is turned on with a speed of 4000 RPM.

M5: Spindle Off (CNC specific)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Нет Нет Да Да Да Нет Нет ??? Да Нет Нет
Например
M5

Шпиндель выключен.

Teacup firmware turn extruder off (same as M103).

M6: Tool change

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Нет Нет Нет ??? Нет Нет Нет ??? ??? Нет Нет
Например
M6

M7: Mist Coolant On (CNC specific)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да: Применяйте M106 Нет Нет Нет Нет Нет Нет Нет ??? Да Нет Нет
Например
M7

Mist coolant is turned on (if available)

Teacup firmware turn on the fan, and set fan speed (same as M106).

M8: Flood Coolant On (CNC specific)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да: Применяйте M106 Нет Нет Нет Нет Нет Нет Нет ??? Да Нет Нет
Например
M8

Flood coolant is turned on (if available)

M9: Coolant Off (CNC specific)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да: Применяйте M106 Нет Нет Нет Нет Нет Нет Нет ??? Да Нет Нет
Например
M9

All coolant systems are turned off.

M10: Vacuum On (CNC specific)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да: Примененяйте M106 Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Например
M10

Dust collection vacuum system turned on.

M11: Vacuum Off (CNC specific)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да: Примененяйте M106 Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Например
M11

Dust collection vacuum system turned off.

M17: Enable/Power all stepper motors

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет (automatic) Нет Да Нет Да Нет Нет Нет ??? ??? Да Да
Например
M17

M18: Disable all stepper motors

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да: Применяйте M2 Нет Да: Вызов M84 Нет Да Да Нет Нет Да ??? Да Да: Вызов M84
Параметры
This command can be used without any additional parameters.1
X ось X
Y ось Y
Z ось Z
E Extruder drive(s)2
Примеры
M18
M18 X E0

Disables stepper motors and allows axes to move 'freely.'

On Marlin, M18 is a synonym of M84, so it can also be used to configure or disable the idle timeout.

Примеры
M18 S10  ; Idle steppers after 10 seconds of inactivity
M18 S0   ; Disable idle timeout
Примечания

1Some firmware implementations do not support parameters to be passed, but at least Marlin and RepRapFirmware do.

2RepRapFirmware allows stepper motors to be disabled selectively. For example, M18 X E0:2 will disable the X, extruder 0 and extruder 2 motors.

M20: Список файлов SD-карты

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Да Да Да Да Да Нет Нет ??? ??? Нет Да
Параметры
This command can be used without any additional parameters.
Snnn Output style1
Pnnn Directory to list2
Примеры
M20
M20 S2 P/gcodes/subdir

This code lists all files in the root folder or G-code directory of the SD card to the serial port. One name per line, like:

ok
SQUARE.G
SQCOM.G
ZCARRI~2.GCO
CARRIA~1.GCO

On Marlin, a file list response is usually encapsulated. Standard configurations of RepRapFirmware mimic this style in emulation mode:

Начало списка файлов:
SQUARE.G
ZCARRI~2.GCO
Конец списка файлов
ok

If RepRapFirmware emulates no firmware compatibility, a typical response looks like:

Файлы G-кода:
"Traffic cone.g","frog.gcode","calibration piece.g"

Note that some firmwares list file names in upper case, but - when sent to the M23 command (below) they must be in lower case. Teacup and RepRapFirmware have no such trouble and accept both. RepRapFirmware always returns long filenames in the case in which they are stored.

Примечания

1If the S2 parameter is used on RepRapFirmware, then the file list is returned in JSON format as a single array called "files" with each name that corresponds to a subdirectory preceded by an asterisk, and the directory is returned in variable "dir".

Например
M20 S2 P/gcodes
{"dir":"\/gcodes","files":["4-piece-1-2-3-4.gcode","Hinged_Box.gcode","Hollow_Dodecahedron_190.gcode","*Calibration pieces"]}

2This parameter is only supported by RepRapFirmware and defaults to the 0:/gcodes directory, which is the directory that printable gcode files are normally stored in.

M21: Инициализация SD карты

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Да Да Да Да Да Нет Нет ??? ??? Нет Да
Параметры
Pnnn номер SD-карты (только RepRapFirmware, по умолчанию 0)
Примеры
M21
M21 P1

Указанная SD-карта инициализируется. Если при включении устройства установлена SD-карта, это произойдет по умолчанию. SD card must be initialized for the other SD functions to work.

M22: Извлечение SD карты

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Да Да Да Нет Да Нет Нет ??? ??? Нет Да
Параметры
Pnnn номер SD-карты (только RepRapFirmware, по умолчанию 0)
Примеры
M22
M22 P1

The specified SD card is released, so further (accidental) attempts to read from it are guaranteed to fail. Полезно, но не обязательно, перед физическим удалением карты .

M23: Выбор файла на SD

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Да Да Да Да Да Нет Нет ??? ??? Нет Да
Например
M23 имя_файла.gco

The file specified as filename.gco (8.3 naming convention is supported) is selected ready for printing. RepRapFirmware поддерживает длинные имена файлов, а также формат 8.3.

M24: Start/resume SD print

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Да Да Да Да Да Нет Нет ??? ??? Да Да
Например
M24

Устройство печатает данные из файла, выбранного с помощью команды M23. Если печать ранее была приостановлена с помощью M25, печать возобновляется с этого момента. Чтобы перезапустить файл с самого начала, используйте M23 для его сброса, затем M24.

When this command is used to resume a print that was paused, RepRapFirmware runs macro file resume.g prior to resuming the print.

M25: Pause SD print

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Да Да Да Да Да Нет Нет ??? ??? Да Да
Например
M25

The machine pauses printing at the current position within the file. To resume printing, use M24. Do not use this code to pause the print in a G-code file, use M226 instead.

Prior to pausing, RepRapFirmware runs macro file pause.g. This allows the head to be moved away from the print, filament to be retracted, etc.

RepRapFirmware 1.20 and later also save the current state of the print to file /sys/resurrect.g. This is so that if the printer is turned off after pausing, the print can subsequently be resumed.

M26: Set SD position

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Да Да Да aborts Да Нет Нет ??? ??? Нет Да
Параметры
Snnn File position from start of file in bytes
Pnnn (Optional, RepRapFirmware only) Proportion of the first move to be skipped, default 0.0, must be less than 1.0
Например
M26 S49315

Set the file offset in bytes from the start of the SD card file selected by M23. The offset must correspond to the start of a GCode command.

M27: Report SD print status

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Да Да Да Да Да Нет Нет ??? ??? Нет Да
Параметры
C Report the open file's name and long name (Marlin 1.1.9 and up)
Sn Set the auto-report interval (Marlin 1.1.9 and up)
Например
M27

Report SD print status.

Marlin and RepRapFirmware report the number of bytes processed in this format, which can be processed by Pronterface:

SD printing byte 2134/235422

If no file is being printed, only this message is reported:

Not SD printing.

In Marlin 1.1.9 and up M27 C reports the open file's DOS 8.3 name and long filename, if any.

Например
M27 C
Current file: filena~1.gco Filenagotcha.gcode

In Marlin 1.1.9 and up M27 Sn sets the auto-report interval. This requires the AUTO_REPORT_SD_STATUS configuration option to be enabled. Marlin reports this capability in M115 as Cap: AUTO_REPORT_SD_STATUS 1 when this option is available.

Например
M27 S2 ; Report the SD card status every 2 seconds

M28: Начать запись на SD карту

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Да Да Да Да Да Нет Нет ??? ??? Нет Да
Например
M28 имя_файла.gco

File specified by filename.gco is created (or overwritten if it exists) on the SD card and all subsequent commands sent to the machine are written to that file.

M29: Остановить запись на SD карту

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Да Да Да Нет Да Нет Нет ??? ??? Нет Да
Например
M29 имя_файла.gco

File opened by M28 command is closed, and all subsequent commands sent to the machine are executed as normal.

M30: Удалить файл на SD-карте

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Да Да Да Да Да Нет Нет ??? Да Нет Да
Например
> M30 имя_файла.gco
> имя_файла.gco удален.
М30 в grbl

M30 exchange pallet shuttles and end the program. Pressing cycle start will start the program at the beginning of the file.

M31: Output time since last M109 or SD card start to serial

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Нет Нет Нет ??? ??? Нет Да
Например
M31

The response looks like:

 echo:54 min, 38 sec

M32: Выбор файла и запуск печати с SD-карты

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Да Да Нет Нет ??? ??? Нет Да
Например
M32 имя_файла.gco

Он может быть использован при печати с SD-карты и делает то же самое, что и M23 и M24.

tba available in marlin(14/6/2014)

M33: Get the long name for an SD card file or folder

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Не требуется Нет Нет ??? ??? Нет Нет

Get the long name for a file or folder on the SD card from a dos path. Introduced in Marlin firmware 1.1.0 September 2015.

M33: Stop and Close File and save restart.gcode

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? ??? Нет: Применяйте M25 ??? ??? ??? ??? ??? Да

Stop the printing from SD and save all position in restart.gcode for restart printing in future

M34: Set SD file sorting options

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Нет Нет Нет ??? ??? Нет Да

Enable and disable SD card file-sorting, and/or set the folder sorting order. Предложено прошивкой Marlin, май 2015 года.

M35: Загрузка прошивки NEXTION с SD-карты

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? Да

M36: Возвращает информацию о файле

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Да Нет Нет Нет ??? Нет Нет
Например
M36 имя_файла.gco

Returns information for the specified SD card file in JSON format. Пример ответа:

{"err":0,"size":436831,"lastModified":"2017-09-21T16:58:07","height":5.20,"firstLayerHeight":0.20,"layerHeight":0.20,"printTime":660,"simulatedTime":1586,"filament":[1280.7],"generatedBy":"Simplify3D(R) Version 4.0.0"}

The "err" field is zero if successful, nonzero if the file was not found or an error occurred while processing it. The "size" field should always be present if the operation was successful. The presence or absence of other fields depends on whether the corresponding values could be found by reading the file. The "filament" field is an array of the filament lengths required from each spool. The size is in bytes, the times are in seconds, all other values are in mm. 'printTime' is the printing time estimated by the slicer, 'simulationTime' is the time measured when the print was simulated by the firmware. The fields may appear in any order, and additional fields may be present.

If the file name parameter is not supplied and a file on the SD card is currently being printed, then information for that file is returned including additional field "fileName". This feature is used by the web interface and by PanelDue, so that if a connection is made when a file is already being printed, the name and other information about that file can be shown.

M37: Режим моделирования

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Да Нет Нет ??? ??? Нет Нет
Параметры
S1 Enter simulation mode
S0 Leave simulation mode
P"filename" (optional) Simulate printing a file from SD card
Примеры
M37 S1
M37 P"MyModel.g"

Used to switch between printing mode and simulation mode. Simulation mode allows the electronics to compute an accurate printing time, taking into account the maximum speeds, accelerations etc. that are configured.

M37 S1 enters simulation mode. All G and M codes will not be acted on, but the time they would take to execute will be calculated.

M37 S0 leaves simulation mode and prints the total time taken by simulated moves since entering simulation mode.

M37 with no S parameter prints the time taken by the simulation, from the time it was first entered using M37 S1, up to the current point (if simulation mode is still active) or the point that the simulation was ended (if simulation mode is no longer active).

M37 P"filename" enters simulation mode, prints the specified file, exits simulation mode, reports the print time, and appends it to the GCode file as a comment for later retrieval.

M38 Compute SHA1 hash of target file

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Да Нет Нет ??? ??? Нет Нет

Used to compute a hash of a file on the SD card. Примеры:

> M38 gcodes/myfile.g
> Не удается найти файл
> M38 www/reprap.htm
> 91199139dbfadac15a18cfb962dfd4853db83999

Returns a hexadecimal string which is the SHA1 of the file. If the file cannot be found, then the string "Cannot find file" is returned instead.

M39 Report SD card information

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Да: 1.20.1 and later Нет Нет ??? ??? Нет Да
Параметры
Pn SD slot number, default 0
Sn Response format. S0 returns a plain text response, S2 returns a response in JSON format.
Примеры
M39  ; report information for SD card 0 in plain text format
M39 P1 S2 ; report information for SD card 1 in JSON format

This command returns information about the SD card in the specified slot in the requested format. At least the following is returned:

  • Whether or not a usable card is present in the slot
  • The capacity of the card in bytes (if a card is present)
  • The amount of free space on the card in bytes (if a card is present)

The JSON response has the following format (more fields may be added in future):

{"SDinfo":{"slot":0,"present":1,"capacity":4294967296,"free":2147485184,"speed":20971520,"clsize":32768}}

The capacity, free space and cluster size are in bytes, and the interface speed is in bytes/second.

M40: Извлечь

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет

If your RepRap machine can eject the parts it has built off the bed, this command executes the eject cycle. This usually involves cooling the bed and then performing a sequence of movements that remove the printed parts from it. The X, Y and Z position of the machine at the end of this cycle are undefined (though they can be found out using the M114 command, q.v.).

See also M240 and M241 below.

M41: Loop

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Например
M41

If the RepRap machine was building a file from its own memory such as a local SD card (as opposed to a file being transmitted to it from a host computer) this goes back to the beginning of the file and runs it again. So, for example, if your RepRap is capable of ejecting parts from its build bed then you can set it printing in a loop and it will run and run. Use with caution - the only things that will stop it are:

  1. When you press the reset button,
  2. When the build material runs out (if your RepRap is set up to detect this), and
  3. When there's an error (such as a heater failure).

M42: Переключение контактов ввода/вывода

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Да Да Да Нет Да Нет Нет Нет ??? Нет Да
Параметры
Pnnn Номер контакта
Snnn Pin value
Например
M42 P7 S255

M42 switches a general purpose I/O pin. Use M42 Px Sy to set pin x to value y, when omitting Px the LEDPIN will be used.

In Teacup, general purpose devices are handled like a heater, see M104.

In RepRapFirmware, the S field may be in the range 0..1 or 0..255. The pin reference is an internal firmware reference named "digital pin", see Duet pinout. It maps on different connector pins depending the hardware. On Duet 0.6 and 0.8.5 hardware using pre-1.16 firmware, the supported pin numbers and their names on the expansion connector are:

Duet M42 P value to Expansion Port Pin Mapping
P Имя Expansion Port Pin
16 TXD1 11
17 RXD1 12
18 TXD0 13
19 RXD0 14
20 TWD1 35
21 TWCK1 36
23 PA14 10
36 PC4 18
52 AD14 41
67 PB16 32

В прошивке 1.16 изменилась нумерация контактов.

Duet 0.6 and 0.8.5 v1.16+ M42 P value to Expansion Port Pin Mapping
P Имя Expansion Port Pin
60 PA10/RXD0 14
61 PA11/TXD0 13
62 PA12/RXD1 12
63 PA13/TXD1 11
64 PA14/RTS1 10
65 PB12/TWD1 35
66 PB13/TWCK1 36
67 PB16/DAC1* 32
68 PB21/AD14 41
69 PC4 18
  • Also used as CS signal on external SD card socket
Duet WiFi v1.16+ M42 P value to Expansion Port Pin Mapping
P Название сигнала Expansion Connector Label Expansion Pin
60 CS5 CS5 50
61 CS6 E3_STOP 9
62 CS7 E4_STOP 14
63 CS8 E5_STOP 19

See Using servos and controlling unused I/O pins for all pin definitions.

Pre-1.16 example:

M42 P20 S1 ;set the connector pin 35 to high.

On RADDS hardware running RepRapFirmware-dc42, the supported Arduino Due pin numbers and their names are:

5 TIOA6, 6 PWML7, 39 PWMH2, 58 AD3, 59 AD2, 66 DAC0, 67 DAC1, 68 CANRX0, 69 CANTX0, 70 SDA1, 71 SCL1, 72 RX LED, 73 TX LED.

See also M583.

M43: Stand by on material exhausted

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Например
M43

If your RepRap can detect when its material runs out, this decides the behaviour when that happens. The X and Y axes are zeroed (but not Z), and then the machine shuts all motors and heaters off except the heated bed, the temperature of which is maintained. The machine will still respond to G and M code commands in this state.

M43: Pin report and debug

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Нет Нет Нет ??? ??? Нет Да
Применение
M43 En Pnnn Wn In
Параметры
En Enable / disable background endstop monitoring
Pnnn Pin to read or watch. If omitted, read/watch all pins
Wn bool watch pins -reporting changes- until reset, click, or M108
In bool Flag to ignore pin protection
Примечание
You must have PINS_DEBUGGING uncommented in your Configuration_adv.h file for M43 to work.

M44: Codes debug - report codes available

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? Да
Параметры
In G-code list
Jn M-code list

M48: Measure Z-Probe repeatability

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Нет Нет Нет ??? ??? Нет Да
Параметры
Pnnn number of points
Xnnn position on the X axis
Ynnn position on the Y axis
Vnnn verbosity
E engage
Lnnn legs of travel
S schizoid

As with G29, the E flag causes the probe to stow after each probe.

The S flag will result is a random sized, 5 pointed star, being traced (X and Y axis) between each sample. Usually a user will get worse repeat-ability numbers with S specified because the X axis and Y axis movements will add to the machine's positioning errors.

M49: Turn on or off G26 debug flag for verbose output

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? Да

M70: Display message

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет: См. M117 Нет: См. M117 Нет: См. M117 Нет: См. M117 Нет Нет Да ??? Нет: См. M117 Нет: См. M117
Например
M70 P200 Сообщение

Instruct the machine to display a message on its interface LCD. P is the time to display message for.

M72: Воспроизведение тона или песни

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет: См. M300 Нет Нет Нет: См. M300 Нет Нет Да ??? Нет Нет: См. M300
Например
M72 P2

Instruct the machine to play a preset song. Acceptable song IDs are machine specific. P is the ID of the song to play.

M73: Set build percentage

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Нет Нет Нет Да ??? Нет Да
Например
M73 P50

Instruct the machine that the build has progressed to the specified percentage. The machine is expected to display this on it's interface board. If the percentage is exactly 0, then a Build Start Notification is sent. If the percentage is exactly 100, then a Build End notification is sent.

M75: Start the print job timer

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? Да

M76: Pause the print job timer

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? Да

M77: Stop the print job timer

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? Да

M78: Show statistical information about the print jobs

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? Да

M80: Питание ATX включено

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет automatic Да Да Да Нет Да Нет Нет ??? ??? Нет Да
Примеры
M80    ; Turn on the power supply
M80 S  ; Report power supply state (Marlin 1.1.1)

Turns on the ATX power supply from standby mode to fully operational mode. No-op on electronics without standby mode.

Примечания
  • Marlin requires the POWER_SUPPLY configuration option to be set to a non-zero value to enable M80.
  • Some firmwares (e.g., Teacup) handle power on/off automatically, so this is redundant there. Also, see RAMPS wiring for ATX on/off.

M81: Питание ATX выключено

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет automatic Да Да Да Нет Да Нет Нет ??? ??? Да Да
Параметры
P quit the daemon (redeem only)
R restart the daemon (redeem only)
Sn n=0 turn power off immediately (default), n=1 turn power off when all thermostatic fans have turned off (RepRapFirmware 1.20 and later only)
Примеры
M81 ; немедленное выключение питания
M81 S1 ; turn power off when everything has cooled down (RepRapFirmware)

Выключает питание ATX. Counterpart to M80.

M82: Set extruder to absolute mode

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Да Да Да Да Да Нет Нет ??? ??? Нет Да
Например
M82

Makes the extruder interpret extrusion as absolute positions.

This is the default in repetier.

M83: Set extruder to relative mode

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Да Да Да Да Да Нет Нет ??? ??? Нет Да
Например
M83

Makes the extruder interpret extrusion values as relative positions.

M84: Stop idle hold

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Да Да Да Да Да Нет Нет ??? ??? Да Да
Параметры
This command can be used without any additional parameters.
Innn Reset flags1
Например
M84

Stop the idle hold on all axis and extruder. In some cases the idle hold causes annoying noises, which can be stopped by disabling the hold. Be aware that by disabling idle hold during printing, you will get quality issues. This is recommended only in between or after printjobs.

On Marlin, Repetier and RepRapFirmware, M84 can also be used to configure or disable the idle timeout. For example, "M84 S10" will idle the stepper motors after 10 seconds of inactivity. "M84 S0" will disable idle timeout; steppers will remain powered up regardless of activity.

Примечания

1RepRapFirmware-dc42 and other firmware may not support this parameter.

M85: Set inactivity shutdown timer

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Да Да Да Нет Нет Нет Нет ??? ??? Нет Да
Например
M85 S30

Set inactivity shutdown timer with parameter S<seconds>. "M85 S0" will disable the inactivity shutdown time (default)

M92: Set axis_steps_per_unit

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Да Да Да Да Да Нет Нет ??? ??? Да Да
Параметры
Xnnn Steps per unit for the X drive
Ynnn Steps per unit for the Y drive
Znnn Steps per unit for the Z drive
Ennn Steps per unit for the extruder drive(s)
Snnn Defines in which microstepping the above steps per unit are given. If omitted it will use the microstepping currently set by M350.1
Примеры
M92 X87.489 Y87.489 Z87.489
M92 E420:420

Allows programming of steps per unit (usually mm) for motor drives. These values are reset to firmware defaults on power on, unless saved to EEPROM if available (M500 in Marlin) or in the configuration file (config.g in RepRapFirmware). Очень полезно для калибровки.

RepRapFirmware will report the current steps/mm if you send M92 without any parameters.

Примечания

1 Only available in RepRapFirmware >=2.03

M93: Send axis_steps_per_unit

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Да Нет ??? Нет Применяйте M92 Нет Нет ??? ??? Нет Нет

M98: Вызов макроса/подпрограммы

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Да Нет Нет Нет ??? Нет Нет
Параметры
Pnnn Macro filename
Например
M98 Pмой_макрос.g 

Runs the macro in the file mymacro.g. In conventional G Codes for CNC machines the P parameter normally refers to a line number in the program itself (P2000 would run the Macro starting at line O2000, say). For RepRap, which almost always has some sort of mass storage device inbuilt, it simply refers to the name of a GCode file that is executed by the G98 call. That GCode file does not need to end with an M99 (return) as the end-of-file automatically causes a return. RepRapFirmware supports nested macro calls up to a depth of 5.

Certain machine parameters are saved at the start of the macro call and restored at the end. For RepRapFirmware these are: axis movement relative/absolute mode, extruder movement absolute/relative mode, feed rate.

RepRapFirmware also allows the filename to include a path to a subdirectory. For relative paths, the default folder is /sys, but some implementations may check the /macros directory too. Absolute file paths are supported on RepRapFirmware too.

M99: Return from Macro/Subprogram

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Да Нет Нет Нет ??? Нет Нет
Например
M99

Returns from an M98 call.

RepRapFirmware closes the currently active macro file. If a nested macro is being run, RepRapFirmware goes up one stack level.

M98: Get axis_hysteresis_mm

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет

Deprecated - clashes with the G Code standard M98 above

Например
M98

Report the current hysteresis values in mm for all of the axis.

Предложено для Marlin

M99: Set axis_hysteresis_mm

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Да

Deprecated - clashes with the G Code standard M99 above

Например
M99 X<mm> Y<mm> Z<mm> E<mm>

Allows programming of axis hysteresis. Mechanical pulleys, gears and threads can have hysteresis when they change direction. That is, a certain number of steps occur before movement occurs. You can measure how many mm are lost to hysteresis and set their values with this command. Every time an axis changes direction, these extra mm will be added to compensate for the hysteresis.

Предложено для Marlin

M101: Turn extruder 1 on (Forward), Undo Retraction

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Нет Нет Нет Нет Да: 1.17c и позже Нет Да ??? ??? Нет Нет

В прошивке Teacup: If a DC extruder is present, turn that on. Else, undo filament retraction, which means, make the extruder ready for extrusion. Complement to M103.

В прошивке BFB/RapMan: Turn extruder on (forward/filament in).

In RepRapFirmware: undo filament retraction. Длина и скорость задаются командой M207. RepRapFirmware supports this command for compatibility with Simplify3D.

В других прошивках: Deprecated. Regarding filament retraction, see G10, G11, M207, M208, M227, M228, M229.

M102: Turn extruder 1 on (Reverse)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Да ??? ??? Нет Нет

В прошивке BFB/RapMan: Turn extruder on Reverse (Still to add)

В других прошивках: Deprecated.

M103: Turn all extruders off, Extruder Retraction

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Нет Нет Нет Нет Да: 1.17c и позже Нет Да ??? ??? Нет Нет

В прошивке Teacup: If a DC extruder is present, turn that off. Else, retract the filament in the hope to prevent nozzle drooling. Complement to M101.

В прошивке BFB/RapMan: Выключается экструдер.

In RepRapFirmware: retract filament. Длина и скорость задаются командой M207. RepRapFirmware supports this command for compatibility with Simplify3D.

В других прошивках: Deprecated. Regarding filament retraction, see G10, G11, M207, M208, M227, M228, M229.

M104: Установка температуры экструдера

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да Да Да Да Да Да ??? Да Да
Параметры
Snnn Целевая температура
Например
M104 S190

Set the temperature of the current extruder to 190oC and return control to the host immediately (i.e. before that temperature has been reached by the extruder). Duet-dc42 and other firmware also supports the optional T parameter (as generated by slic3r) to specify which tool the command applies to. См. также M109.

This is deprecated because temperatures should be set using the G10 and T commands (q.v.).

Deprecation is subject to discussion. --Traumflug 11:33, 19 July 2012 (UTC)

M104 в прошивке Teacup

In Teacup Firmware, M104 can be additionally used to handle all devices using a temperature sensor. It supports the additional P parameter, which is a zero-based index into the list of sensors in config.h. Для устройств без датчика температуры см. M106.

Например
M104 P1 S100

Set the temperature of the device attached to the second temperature sensor to 100°C.

M105: Получить температуру экструдера

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да Да Да Нет Нет Да ??? Да Да
Параметры
This command can be used without any additional parameters.
Rnnn Response sequence number1
Snnn Response type1
Примеры
M105
M105 S2

Request the temperature of the current extruder and the build base in degrees Celsius. The temperatures are returned to the host computer. For example, the line sent to the host in response to this command looks like:

ok T:201 B:117

Expansion/generalization of M105 to be considered using S1 parameter as noted in Pronterface I/O Monitor

In Repetier and MK4duo you can add X0 (X1 MK4duo) to get raw values as well:

M105 X0
==> 11:05:48.910 : T:23.61 /0 @:0 T0:23.61 /0 @0:0 RAW0:3922 T1:23.89 /0 @1:0 RAW1:3920

Recent versions of RepRapFirmware also report the current and target temperatures of all active heaters.

Примечания

1These parameters are only supported by RepRapFirmware, which returns a JSON-formatted response if parameter S2 or S3 is specified. Additionally, parameter Rnn may be provided, where nn is the sequence number of the most recent G-code response that the client has already received. M105 S2 is equivalent to M408 S0, and M105 S3 is equivalent to M408 S2. Usage of these forms of M105 is deprecated, please use M408 instead.

M106: Включение вентилятора

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да Да Да Да Да ??? ??? Да Да
Параметры
Pnnn Fan number (optional, defaults to 0)2
Snnn Fan speed (0 to 255; RepRapFirmware also accepts 0.0 to 1.0))
Extra Parameters
Innn Invert signal, or disable fan1 3
Fnnn Set fan PWM frequency, in Hz1 3
Lnnn Set minimum fan speed (0 to 255 or 0.0 to 1.0)1 3
Xnnn Set maximum fan speed (0 to 255 or 0.0 to 1.0)1 3
Bnnn Blip time - fan will be run at full PWM for this number of seconds when started from standstill1
Hnn:nn:nn... Select heaters monitored when in thermostatic mode1 3
Rnnn Restore fan speed to the value it has when the print was paused1
Tnnn Set thermostatic mode trigger temperature
Cnnn Set custom name (RRF > 2.01 only)1
Например
M106 S127
Примеры (RepRapFirmware)
M106 P1 I1 S87
M106 P1 T45 H1:2
M106 P2 B0.1 L0.05

Первый пример включает охлаждающий вентилятор по умолчанию с половиной скоростью. The second one inverts the cooling fan signal of the second fan and sets its value to 1/3 of its maximum. The third one sets the second fan to a thermostatic fan for heaters 1 and 2 (e.g. the extruder heaters in a dual-nozzle machine) such that the fan will be on when either hot end is at or above 45C.

Mandatory parameter 'S' declares the PWM value (0-255). M106 S0 turns the fan off. In some implementations like RepRapFirmware the PWM value may alternatively be specified as a real fraction: M106 S0.7.

Примечания

1These parameters are only available in RepRapFirmware.

2Marlin 1.0 to 1.1.6 only supports a single fan. Marlin 1.1.7 и выше поддерживает до 3 вентиляторов.

3These parameters are only available in MK4duo.

M106 в RepRapFirmware

If an S parameter is provided but no other parameter is present, then the speeds of the print cooling fans associated with the current tool will be set (see the F parameter in the M563 command). If no tool is active then the speed of Fan 0 will be set. Either way, the speed is remembered so that it can be recalled using the R2 parameter (see below).

If no S parameter is given but the R1 parameter is used, the fan speed when the print was last paused will be set. If the R2 parameter is used, then the speeds of the print cooling fans associated with the current tool will be set to the remembered value (see above).

The T and H parameters allow a fan to be configured to operate in thermostatic mode, for example to use one of the fan channels to control the hot end fan. In this mode the fan will be fully on when the temperature of any of the heaters listed in the H parameter is at or above the trigger temperature set by the T parameter, and off otherwise. Thermostatic mode can be disabled using parameter H-1.

The B parameter sets the time for which the fan will be operated at full PWM when started from cold, to allow low fan speeds t be used. Обычно достаточно значения 0.1 секунды.

Параметр L определяет минимальное значение ШИМ, которое может использоваться с этим вентилятором. If a lower value is commanded that is not zero, it will be rounded up to this value. The X parameter defines the maximum PWM value that is allowed for this fan. If a higher value is commanded, it will be rounded down to this value.

The I parameter causes the fan output signal to be inverted if its value is greater than zero. This makes the cooling fan output suitable for feeding the PWM input of a 4-wire fan via a diode. If the parameter is present and zero, the output is not inverted. If the I parameter is negative then in RRF 1.16 and later the fan is disabled, which frees up the pin for use as a general purpose I/O pin that can be controlled using M42.

M106 в прошивке Teacup

Кроме того, прошивка использует M106 для управления общими устройствами. It supports the additional P parameter, which is an zero-based index into the list of heaters/devices in config.h.

Например
M106 P2 S255

Turn on device #3 at full speed/wattage.

Примечание: When turning on a temperature sensor equipped heater with M106 and M104 at the same time, temperature control will override the value given in M106 quickly.

Note well: The ambiguous text in the note above needs to be reworded by someone who knows the actual functioning. Below is my interpretation based on language use, not practical experience or code inspection.

Note: If M104 is (or becomes) active on a heater (or other device) with a feedback sensor it will correct any M106 initiated control output value change in the time it takes for the PID (of other feedback) loop to adjust it back to minimum error. It may not be easy to observe a change in the temperature (process value) due to this brief change in the control value

M107: Выключение вентилятора

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Нет Да Да Да Да Да Да Да ??? ??? Да Да

Deprecated in Teacup firmware and in RepRapFirmware. Use M106 S0 instead.

M108: Отмена нагрева (Marlin)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Да Нет Да ??? ??? Нет Да

Breaks out of an M109 or M190 wait-for-temperature loop, continuing the print job. Use this command with caution! If cold extrusion prevention is enabled (see M302) and the temperature is too low, this will start "printing" without extrusion. If cold extrusion prevention is disabled and the hot-end temperature is too low, the extruder may jam.

This command was introduced in Marlin 1.1.0. As with other emergency commands [e.g., M112] this requires the host to leave space in the command buffer, or the command won't be executed until later.

M108: Установить скорость экструдера (BFB)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Да ??? ??? Нет Нет

Устанавливает скорость двигателя экструдера. (Deprecated in FiveD firmware, see M113)

M109: Установка температуры экструдера и ожидание

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да not needed Да Да Да Да Да Да Нет Да ??? Да Да
Параметры
Snnn minimum target temperature, waits until heating
Rnnn maximum target temperature, waits until cooling (Sprinter)
Rnnn accurate target temperature, waits until heating and cooling (Marlin)
Например
M109 S215
M109 в Teacup

Not needed. To mimic Marlin behaviour, use M104 followed by M116.

M109 in Marlin, MK4duo, Sprinter (ATmega port), RepRapFirmware

Set extruder heater temperature in degrees celsius and wait for this temperature to be achieved.

Например
M109 S185

RepRapFirmware also supports the optional T parameter (as generated by slic3r) to specify which tool the command refers to (see below).

M109 in Sprinter (4pi port)

Параметры: S (optional), set target temperature value. If not specified, waits for the temperature set by M104. R (optional), sets target temperature range maximum value.

Например
M109 S185 R240 ; set extruder temperature to 185 and wait for the temperature to be between 185 - 240.

If you have multiple extruders, use T or P parameter to specify which extruder you want to set/wait.

Another way to do this is to use G10.

M109 в MakerBot
Например
M109 S70 T0

Sets the target temperature for the current build platform. S is the temperature to set the platform to, in degrees Celsius. T is the platform to heat.

M110: Установить номер текущей строки

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да not needed Нет Да Да Да Да Нет Нет ??? ??? Да Да
Параметры
Nnnn Номер строки
Например
M110 N123

В этом примере задается номер текущей строки 123. Таким образом, ожидаемая следующая строка после этой команды будет 124.

M111: Установить уровень отладки

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Debug Нет Да Да Нет Да Нет Нет ??? ??? Да Да
Параметры
Pnnn Отлаживаемый модуль1
Snnn Отладка вкл/выкл
Примеры
M111 S6
M111 P1 S1

Включение или отключение функций отладки в прошивке. Реализация может выглядеть по-разному для каждой микропрограммы.

Примечания

1 Этот параметр доступен только в RepRapFirmware.

M111 в RepRapFirmware

RepRapFirmware allows debugging to be set for each module. If the optional 'P' parameter is not specified, debugging will be enabled for all modules. For a list of modules, send M111 S1 P15.

M111 в Repetier

Set the level of debugging information transmitted back to the host to level 6. The level is the OR of three bits:

#define DEBUG_ECHO (1<<0)
#define DEBUG_INFO (1<<1)
#define DEBUG_ERRORS (1<<2)
#define DEBUG_DRYRUN (1<<3) // repetier-firmware
#define DEBUG_COMMUNICATION (1<<4) // repetier-firmware

Thus 6 means send information and errors, but don't echo commands. (This is the RepRap default.)

For firmware that supports ethernet and web interfaces M111 S9 will turn web debug information on without changing any other debug settings, and M111 S8 will turn it off. Web debugging usually means that HTTP requests will be echoed to the USB interface, as will the responses.

M112: Аварийный останов

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Нет Да Да Да Да Нет Нет ??? ??? Да Да
Например
M112

Any moves in progress are immediately terminated, then RepRap shuts down. Все двигатели и нагреватели выключены. It can be started again by pressing the reset button on the master microcontroller. See also M0 and M1.

M113: Установка ШИМ экструдера

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Например
M113

Set the PWM for the currently-selected extruder. On its own this command sets RepRap to use the on-board potentiometer on the extruder controller board to set the PWM for the currently-selected extruder's stepper power. With an S field:

M113 S0.7

it causes the PWM to be set to the S value (70% in this instance). M113 S0 turns the extruder off, until an M113 command other than M113 S0 is sent.

M114: Получить текущую позицию

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да Да Да Нет Нет Да ??? Да Да
Например
M114

This causes the RepRap machine to report its current X, Y, Z and E coordinates to the host.

For example, the machine returns a string such as:

ok C: X:0.00 Y:0.00 Z:0.00 E:0.00

In Marlin first 3 numbers is the position for the planner. The other positions are the positions from the stepper function. This helps for debugging a previous stepper function bug.

X:0.00 Y:0.00 RZ:0.00 LZ:0.00 Count X:0.00 Y:0.00 RZ:41.02 LZ:41.02

M115: Get Firmware Version and Capabilities

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да Нет Да Нет Нет Нет ??? Да Да
Параметры
This command can be used without any additional parameters.
Pnnn Electronics type1
Примеры
M115
M115 P2

Request the Firmware Version and Capabilities of the current microcontroller The details are returned to the host computer as key:value pairs separated by spaces and terminated with a linefeed.

sample data from firmware:

ok PROTOCOL_VERSION:0.1 FIRMWARE_NAME:FiveD FIRMWARE_URL:http%3A//reprap.org MACHINE_TYPE:Mendel EXTRUDER_COUNT:1

This M115 code is inconsistently implemented, and should not be relied upon to exist, or output correctly in all cases. An initial implementation was committed to svn for the FiveD Reprap firmware on 11 Oct 2010. Work to more formally define protocol versions is currently (October 2010) being discussed. See M115_Keywords for one draft set of keywords and their meanings. See the M408 command for a more comprehensive report on machine capabilities supported by RepRapFirmware.

Примечания

1This parameter is supported only in RepRapFirmware and can be used tell the firmware about the hardware on which it is running. If the P parameter is present then the integer argument specifies the hardware being used. The following are currently supported:

M115 P0   Automatic board type selection if supported, or default if not
M115 P1   Duet 0.6
M115 P2   Duet 0.7
M115 P3   Duet 0.85

M116: Ожидание

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Нет Нет Да Нет Да Нет Нет Да ??? Да Да
Параметры
This command can be used without any additional parameters.1
Pnnn Номер инструмента
Hnnn Номер нагревателя
Cnnn Chamber number
Примеры
M116
M116 P1

Wait for all temperatures and other slowly-changing variables to arrive at their set values if no parameters are specified. См. также M109.

Примечания

1Most implementations don't support any parameters, but RepRapFirmware version 1.04 and later supports an optional 'P' parameter that is used to specify a tool number. If this parameter is present, then the system only waits for temperatures associated with that tool to arrive at their set values. This is useful during tool changes, to wait for the new tool to heat up without necessarily waiting for the old one to cool down fully.

Recent versions of RepRapFirmware also allow a list of the heaters to be specified using the 'H' parameter, and if the 'C' parameter is present, this will indicate that the chamber heater should be waited for.

M117: Get Zero Position

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Нет Нет Нет Нет Нет Нет Нет Нет Нет: См. M70 ??? Нет Нет
Например
M117

This causes the RepRap machine to report the X, Y, Z and E coordinates in steps not mm to the host that it found when it last hit the zero stops for those axes. That is to say, when you zero X, the x coordinate of the machine when it hits the X endstop is recorded. This value should be 0, of course. But if the machine has drifted (for example by dropping steps) then it won't be. This command allows you to measure and to diagnose such problems. (E is included for completeness. It doesn't normally have an endstop.)

M117: Сообщение на дисплее

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Да Да Да Нет Нет Нет ??? Да Да
Например
M117 Привет Мир

This causes the given message to be shown in the status line on an attached LCD. The above command will display Hello World. If RepRapFirmware is used and no LCD is attached, this message will be reported on the web interface.

M118: Echo message on host

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да:1.1.4 Нет Нет Нет Нет Нет ??? ??? Нет Да

Use this code to print a visible message to the host console, preceded by 'echo:'.

Например
M118 Цвет меняется на синий

M118: Negotiate Features

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Например
M118 P42

This M-code is for future proofing. NO firmware or hostware supports this at the moment. It is used in conjunction with M115's FEATURES keyword.

See Protocol_Feature_Negotiation for more info.

M119: Get Endstop Status

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Да Да Да Да Да Нет Нет ??? ??? Да Да
Например
M119

Returns the current state of the configured X, Y, Z endstops. Takes into account any 'inverted endstop' settings, so one can confirm that the machine is interpreting the endstops correctly.

In redeem, M119 can also be used to invert end stops.

Например
M119 X1 1

This will invert end stop X1 (Inverted means switch is connected in Normally Open state (NO))

M120: Push

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Да Да Нет Нет ??? ??? Нет Нет
Например
M120

Push the state of the RepRap machine onto a stack. Exactly what variables get pushed depends on the implementation (as does the depth of the stack - a typical depth might be 5). A sensible minimum, however, might be

  1. Current feedrate, and
  2. Whether moves (and separately extrusion) are relative or absolute

RepRapFirmware calls this automatically when a macro file is run. In addition to the variables above, it pushes the following values on the stack:

  1. Current feedrate
  2. Extruder positions

M121: Pop

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Да Да Нет Нет ??? ??? Нет Нет
Например
M121

Recover the last state pushed onto the stack.

M120: Enable endstop detection

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Нет Нет Нет ??? ??? Нет Да

M121: Disable endstop detection

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Нет Нет Нет ??? ??? Нет Да

M122: Зависит от прошивки

M122: Diagnose (RepRapFirmware)
Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Да Нет Нет ??? ??? Нет Нет
Например
M122

Sending an M122 causes the RepRap to transmit diagnostic information, for eaxmple via a USB serial link.

If RepRapFirmware is used and debugging is enabled for the Network module, this will also print LWIP stats to the host via USB.

M122: Set Software Endstop (MK4duo)
Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Да

Disabled or Enabled Software Endstop M122 S<0/1>

M123: Tachometer value

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет

Sending an M123 causes the RepRap to transmit filament tachometer values from all extruders.

M124: Immediate motor stop

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет

Immediately stops all motors.

M126: Open Valve

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Нет Нет Да Нет Нет Нет Нет Нет Да ??? Нет Да
Например
M126 P500

Open the extruder's valve (if it has one) and wait 500 milliseconds for it to do so.

M126 в MakerBot
Например
M126 T0

Enables an extra output attached to a specific toolhead (e.g. fan)

M127: Close Valve

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Нет Нет Да Нет Нет Нет Нет Нет Да ??? Нет Да
Например
M127 P400

Close the extruder's valve (if it has one) and wait 400 milliseconds for it to do so.

M127 в MakerBot
Например
M127 T0

Disables an extra output attached to a specific toolhead (e.g. fan)

M128: Extruder Pressure PWM

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Нет Нет Нет ??? ??? Нет Да
Например
M128 S255

PWM value to control internal extruder pressure. S255 is full pressure.

M129: Extruder pressure off

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Нет Нет Нет ??? ??? Нет Да
Например
M129 P100

In addition to setting Extruder pressure to 0, you can turn the pressure off entirely. P400 will wait 100ms to do so.

M130: Set PID P value

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Нет Нет: См. M301 Нет Нет: См. M301 Нет Нет Нет ??? ??? Да: См. M301 Нет: См. M301
Параметры
Pnnn Номер нагревателя
Snnn proportional (Kp)
Например
M130 P0 S8.0  ; Sets heater 0 P factor to 8.0

Teacup can control multiple heaters with independent PID controls. For the default shown at https://github.com/Traumflug/Teacup_Firmware/blob/master/config.default.h, heater 0 is the extruder (P0), and heater 1 is the bed (P1).

Teacup's PID proportional units are in pwm/255 counts per quarter C, so to convert from counts/C, you would divide by 4. Conversely, to convert from count/qC to count/C, multiply by 4. In the above example, S=8 represents a Kp=8*4=32 counts/C.

M131: Set PID I value

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Нет Нет: См. M301 Нет Нет: См. M301 Нет Нет Нет ??? ??? Да: См. M301 Нет: См. M301
Параметры
Pnnn Номер нагревателя
Snnn Интеграл (Ki)
Например
M131 P1 S0.5  ; Sets heater 1 I factor to 0.5

Teacup's PID integral units are in pwm/255 counts per (quarter C*quarter second), so to convert from counts/qCqs, you would divide by 16. Conversely, to convert from count/qCqs to count/Cs, multiply by 16. In the above example, S=0.5 represents a Ki=0.5*16=8 counts/Cs.

M132: Set PID D value

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Нет Нет: См. M301 Нет Нет: См. M301 Нет: См. M301 Нет Нет Да ??? Да: См. M301 Нет: См. M301
Параметры
Pnnn Номер нагревателя
Snnn Производная (Kd)
Например
M132 P0 S24  ; Sets heater 0 D factor to 24.0

Teacup's PID derivative units are in pwm/255 counts per (quarter degree per 2 seconds), so to convert from counts/C, you would divide by 4. Conversely, to convert from count/qC to count/C, multiply by 8. In the above example, S=24 represents a Kd=24*8=194 counts/(C/s).

M132 в MakerBot
Например
M132 X Y Z A B

Loads the axis offset of the current home position from the EEPROM and waits for the buffer to empty.

M133: Set PID I limit value

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Нет Нет: См. M301 Нет Нет Нет Нет Нет Да ??? Нет: См. M301 Нет: См. M301
Параметры
Pnnn Номер нагревателя
Snnn Интегральный предел (Ki)
Например
M133 P1 S264  ; Sets heater 1 I limit value to 264

Teacup's PID integral limit units are in quarter-C*quarter-seconds, so to convert from C-s, you would multiply by 16. Conversely, to convert from qC*qs to C*s, divide by 16. In the above example, S=264 represents an integral limit of 16.5 C*s.

M133 в MakerBot
Например
M133 T0 P500

Instruct the machine to wait for the toolhead to reach its target temperature. T is the extruder to wait for. При наличии P, задает ограничение по времени.

M134: Запись значений PID в EEPROM

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Нет Нет Нет Нет: См. M504 Нет: См. M500 Нет Нет Да ??? Нет Нет
Например
M134
М134 в принтере MakerBot
Например
M134 T0 P500

Instruct the machine to wait for the platform to reach its target temperature. T is the platform to wait for. При наличии P, задает ограничение по времени.

M135: Установить интервал выборки PID

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Да Нет Нет Да ??? Нет Нет
Параметры
Snnn Heat sample time in seconds
Например
M135 S300

Set the PID to measure temperatures and calculate the power to send to the heaters every 300ms.

М135 в принтере MakerBot
Например
M135 T0

Instructs the machine to change its toolhead. Also updates the State Machine's current tool_index. T is the toolhead for the machine to switch to and the new tool_index for the state machine to use.

M136: Print PID settings to host

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Debug Нет Нет Нет Нет Применяйте M301 Нет Нет ??? ??? Нет Нет
Например
M136 P1  ; print heater 0 PID parameters to host

M140: Set Bed Temperature (Fast)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Да Да Да Да Да Да Да Да Нет Да ??? Да Да
Параметры
Pnnn Bed heater index1
Hnnn Номер нагревателя1
Snnn Активная/Целевая температура
Rnnn Standby temperature1
Например
M140 S55

Set the temperature of the build bed to 55oC and return control to the host immediately (i.e. before that temperature has been reached by the bed).

Примечания

1 These parameters are only supported in RepRapFirmware. RepRapFirmware allows the bed heater to be switched off if the absolute negative temperature (-273.15) is passed as target temperature. In this case the current bed temperature is not affected:

M140 S-273.15

There is an optional R field that sets the bed standby temperature: M140 S65 R40.

Recent versions of RepRapFirmware also provide an optional 'H' parameter to set the hot bed heater number. If no heated bed is present, a negative value may be specified to disable it.

M141: Установка температуры камеры (Быстро)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Применяется M104 Нет Нет Нет Нет Да Да Нет ??? ??? Нет Да
Параметры
Pnnn Индекс камеры1
Hnnn Номер нагревателя1
Snnn Активная/Целевая температура
Rnnn Standby temperature1
Примеры
M141 S30
M141 H0

Set the temperature of the chamber to 30oC and return control to the host immediately (i.e. before that temperature has been reached by the chamber).

Примечания

1 These parameters are only supported in RepRapFirmware and work just like in M140.

M142: Holding Pressure

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Например
M142 S1

Set the holding pressure of the bed to 1 bar.

The holding pressure is in bar. For hardware which only has on/off holding, when the holding pressure is zero, turn off holding, when the holding pressure is greater than zero, turn on holding.

M143: Максимальная температура нагревателя

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Да Нет Нет ??? ??? Нет Нет
Параметры
H Heater number (RepRapFirmware 1.17 and later, default 1 which is normally the first hot end)
S Максимальная температура
Примеры
M143 S275      ; set the maximum temperature of the hot-end to 275°C
M143 H0 S125   ; set the maximum bed temperature to 125C

The default maximum temperature for all heaters was 300°C prior to RepRapFirmware version 1.13, and 262°C from 1.13 onwards. From RepRapFirmware 1.17 onwards, the default maximum temperatures are 262C for extruders and 125C for the bed.

When the temperature of the heater exceeds this value, countermeasures will be taken.

M144: Bed Standby

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Да Нет Нет ??? ??? Нет Нет
Параметры
Pnn Bed heater number, default 0
Sn 0 = set bed heater to standby (default), 1 = set bad heater active
Например
M144

Switch the bed heater to its standby temperature. M140 S1 turns it back to its active temperature.

M146: Set Chamber Humidity

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Параметры
Rnnn Relative humidity in percent
Например
M146 R60

Set the relative humidity of the chamber to 60% and return control to the host immediately (i.e. before that humidity has been reached by the chamber).

M149: Установить единицы измерения температуры

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Параметры
C флаг для обработки температуры в градусах Цельсия
K флаг для обработки температуры в градусах Кельвина
Например
M149 K

It affects the S or R values in the codes M104, M109, M140, M141, M143, M190 and G10. The default is M149 C.

M150: Установить цвет дисплея

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет См. ниже Нет Нет ??? ??? Нет Да
Параметры
Rnnn красный
Unnn зеленый
Bnnn синий
Snnn number of LEDs in strip to set, default 1 (RepRapFirmware only)
Например
M150 R255 U128 B192

Set BlinkM Color via I2C. Диапазон значений: 0-255

RepRapFirmware uses this command to control DotStar LED strips, on controllers that provides a connector for this purpose.

Marlin also appears to use parameters P and W in some configurations.

M155: Автоматически передавать температуры

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да: 1.1.0 Да Нет Нет Нет Нет ??? ??? Нет Да
Параметры
Snnn включить отправку температур = 1, отключить = 0
Например
M155 S1

Hosts normally monitor printer temperatures by sending M105 every x seconds. This not only adds traffic, but also only works while printer is not blocked by waiting commands. So frequency more depends on frequency you can send new commands and creates extra traffic. As a solution, firmware can be told to automatically send temperatures every second. This function is disabled by default for best compatibility with existing hosts. To indicate the availability of this function, M115 will add an extra line:

Cap:AUTOREPORT_TEMP:1

so hosts know about the presence of the function.

M160: Number of mixed materials

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Например
M160 S4

This command has been superseded by the tool definition command M563 (see below).

Set the number of materials, N, that the current extruder can handle to the number specified. Значение по умолчанию: 1.

When N >= 2, then the E field that controls extrusion requires N values separated by colons ":" after it like this:

M160 S4
G1 X90.6 Y13.8 E2.24:2.24:2.24:15.89
G1 X70.6 E0:0:0:42.4
G1 E42.4:0:0:0

The second line moves straight to the point (90.6, 13.8) extruding a total of 22.4mm of filament. The mix ratio for the move is 0.1:0.1:0.1:0.7.

The third line moves back 20mm in X extruding 42.4mm of filament.

The fourth line has no physical effect.

M163: Set weight of mixed material

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да: RC7 Да: 0.92 Нет Применяйте M567 Нет Нет ??? ??? Нет Да
Параметры
Snnn Номер экструдера
Pnnn Вес

Set weight for this mixing extruder drive.
See Repetier Color Mixing for more informations.

M164: Store weights

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да: RC7 Да: 0.92 Нет Нет Нет Нет ??? ??? Нет Да
Параметры
Snnn virtual extruder number
Pnnn store to eeprom (P0 = no, P1 = yes)

Store weights as virtual extruder S.

M165: Set multiple mix weights

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да: RC7 Нет: Нет Применяйте M567 Нет Нет ??? ??? Нет Да
Параметры A B C D H I
A[factor] Mix factor for extruder stepper 1
B[factor] Mix factor for extruder stepper 2
C[factor] Mix factor for extruder stepper 3
D[factor] Mix factor for extruder stepper 4
H[factor] Mix factor for extruder stepper 5
I[factor] Mix factor for extruder stepper 6
  • Set multiple mix factors for a mixing extruder.
  • Factors that are left out will be set to 0.
  • All factors together must add up to 1.0.

M170: Set clock values

Support FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
No No No Yes: Custom unit only No: No No No No ??? ??? No No
Parameters A B C
A[factor] Value for clockA
B[factor] Value for clockB
C[factor] Value for clockC
  • Set multiple timing factors for repetitive cyclic processes.
  • All factors initially set to 0.

M190: Wait for bed temperature to reach target temp

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет: См. M116 Да Да Да Да Да Да Нет ??? ??? Да Да
Параметры
Snnn minimum target temperature, waits until heating
Rnnn accurate target temperature, waits until heating and cooling (Marlin)
Например
M190 S60

This will wait until the bed temperature reaches 60 degrees, printing out the temperature of the hot end and the bed every second.

M191: Wait for chamber temperature to reach target temp

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Да: 1.17 и позже Да Нет ??? ??? Нет Да
Например
M191 P60

Set the temperature of the build chamber to 60 °C and wait for the temperature to be reached.

В MK4duo:

Параметры
Snnn minimum target temperature, waits until heating
Rnnn accurate target temperature, waits until heating and cooling (Marlin)
Например
M191 S60

M200: Установка диаметра филамента

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Да Да Да: 1.19 и позже Да Нет ??? ??? Нет Да

RepRapFirmware:

Параметры
Daaa:bbb:ccc... Sets filament diameter to aaa for extruder 0, bbb for extruder 1 and so on. If any of aaa, bbb etc. are zero then volumetric extrusion is disabled for that extruder.
Daaa Sets filament diameter (or disables volumetric extrusion) for all extruders
Примеры
M200 D0  ; disable volumetric extrusion on all extruders
M200 D1.75  ; set al extruder filament diameters to 1.75mm
M200 D1.75:3.0:1.75  ; set extruder 0 to 1.75mm, extruder 1 to 3.0mm and all remaining extruders to 1.75mm

Volumetric extrusion is an option you can set in some slicers whereby all extrusion amounts are specified in mm3 (cubic millimetres) of filament instead of mm of filament. This makes the gcode independent of the filament diameter, potentially allowing the same gcode to run on different printers. The purpose of the M200 command is to inform the firmware that the gcode input files have been sliced for volumetric extrusion, and to provide the filament diameter so that the firmware can adjust the requested extrusion amount accordingly.

Sending M200 without parameters reports the current volumetric extrusion state and (where appropriate) filament diameter for each extruder.

Note that if you use slicer-commanded retraction, the retraction amounts must be specified in mm3 too. If instead you use firmware retraction, then the firmware retraction amounts specified using the M207 command are still interpreted as mm.

Другие прошивки:

Without parameters loads default grid, and with specified extension attempts to load the specified grid. If not available will not modify the current grid. If Z was saved with the grid file, it will load the saved Z with the grid.

M200 Dm.mmm sets the filament diameter to m.mmm millimeters. It is used with 'volumetric calibration' and G-code generated for an ideal 1.128mm diameter filament, which has a volume of 1mm^3 per millimeter. The intention is to be able to generate filament-independent g-code. (See Triffid_Hunter's_Calibration_Guide#Optional:_Switch_to_volumetric_E_units and http://wooden-mendel.blogspot.com/2011/09/volumetric-stage-two.html for more information.)

M200 D0 or M200 D1.128 ; reset E multiplier to 1, since sqrt(1 / pi) * 2 = 1.128

См. также Gcode#M119:_Get_Endstop_Status

Вопрос: что делает прошивка с диаметром филамента? Has this an effect on how much an E command moves the extruder motor? --Traumflug 11:34, 14 October 2012 (UTC) Yes, Marlin uses this to set a 'volumetric_multiplier' by which the E-steps of a move are scaled in the planner. DaveX (talk) 16:44, 12 April 2014 (PDT) Smoothie implements the same thing as Marlin --Arthurwolf (talk) 05:23, 10 November 2014 (PST)

M201: Set max printing acceleration

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Да Да Да Нет Да Нет Нет ??? ??? Да Да
Параметры
Xnnn Acceleration for X axis
Ynnn Acceleration for Y axis
Znnn Acceleration for Z axis
Ennn Acceleration for extruder drives
Например
M201 X1000 Y1000 Z100 E2000

Sets the acceleration that axes can do in units/second^2 for print moves. For consistency with the rest of G Code movement this should be in units/(minute^2), but that gives really silly numbers and one can get lost in all the zeros. So for this we use seconds.

RepRapFirmware expects these values to be in mm/s².

M202: Set max travel acceleration

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет ??? Да Да Нет Нет Нет Нет ??? ??? ??? Да

Set max travel acceleration in units/s^2 for travel moves (M202 X1000 Y1000). Unused in Marlin!!

M203: Set maximum feedrate

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет ??? Да Да Да Да Нет Нет ??? ??? ??? Да
Параметры
Xnnn Maximum feedrate for X axis
Ynnn Maximum feedrate for Y axis
Znnn Maximum feedrate for Z axis
Ennn Maximum feedrate for extruder drives
Например
M203 X6000 Y6000 Z300 E10000

Sets the maximum feedrates that your machine can do in mm/min (Marlin uses mm/sec).

M203 Repetier

Set temperature monitor to Sx.

M204: Set default acceleration

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Да Да Да Да Да: 1.18 и позже Нет Нет ??? ??? ??? Да
Параметры (RepRapFimware)
Pnnn Acceleration for printing moves
Tnnn Acceleration for travel moves
Например
M204 P500 T2000

Use M201 to set per-axis accelerations and extruder accelerations. RepRapFirmware applies the M204 accelerations to the move as a whole, and also applies the limits set by M201 to each axis and extruder.

Другие прошивки:

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

Marlin notes: After Mar11-2015, the M204 options have changed in Marlin:

P = Printing moves

R = Retract only (no X, Y, Z) moves

T = Travel (non printing) moves

The command M204 P800 T3000 R9000 sets the acceleration for printing movements to 800mm/s^2, for travels to 3000mm/s^2 and for retracts to 9000mm/s^2.

M204 Repetier
Применение
M204 X[Kp] Y[Ki] Z[Kd]

Set PID parameter. Values are 100*real value.

M205: Advanced settings

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Да Да Да Да Применяйте M566 Нет Нет ??? ??? ??? Да
Sprinter / Marlin
Minimum travel speed = S[printing] T[travel]
B[min segment time] X[max XY jerk] Z[max Z jerk] E[max E jerk]
Sprinter / Marlin пример
M205 X30 Z5 ; Set X/Y Jerk to 30mm/s, Z jerk to 5mm/s

Smoothieware uses a different algorithm: [1]

X[xy junction deviation] Z[z junction deviation] S[minimum planner speed].
Z junction deviation only applies to z only moves
0 disables junction deviation for Z
-1 uses global junction deviation
Smoothie example
M205 X0.05  ; set X/Y Junction Deviation
M205 Repetier

Выходные настройки EEPROM.

M206: Смещение осей

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Да Да Нет Да Да Нет Нет ??? ??? Да Да
Параметры
Xnnn Смещение по оси X
Ynnn Смещение по оси Y
Znnn Смещение по оси Z
Например
M206 X10.0 Y10.0 Z-0.4

The values specified are added to the endstop position when the axes are referenced. The same can be achieved with a G92 right after homing (G28, G161).

With Marlin firmware, this value can be saved to EEPROM using the M500 command.

A similar command is G10, aligning these two is subject to discussion.

With Marlin 1.0.0 RC2 a negative value for z lifts(!) your printhead.

In builds of RepRapFirmware that support CNC workplace coordinates, using this command is equivalent to using G10 L2 P1 to set the coordinate offsets for workplace 1.

М206 в Repetier: Установка значения EEPROM

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да Нет Нет Нет Нет ??? ??? Нет Нет

M206 T[type] P[pos] [Sint(long] [Xfloat] Set eeprom value

Например
M206 T3 P39 X19.9

Set Jerk to 19.9

M207: Calibrate z axis by detecting z max length

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет ??? Нет Применяйте G1 S3 ... Нет Нет ??? ??? Нет Нет
Например
M207

After placing the tip of the nozzle in the position you expect to be considered Z=0, issue this command to calibrate the Z axis. It will perform a z axis homing routine and calculate the distance traveled in this process. The result is stored in EEPROM as z_max_length. For using this calibration method the machine must be using a Z MAX endstop.

This procedure is usually more reliable than mechanical adjustments of a Z MIN endstop.

M207: Set retract length

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Да Да Нет Нет ??? ??? Нет Да
Параметры
Snnn positive length to retract, in mm
Rnnn positive or negative additional length to un-retract, in mm (RepRapFirmware only)
Fnnn retraction feedrate, in mm/min
Tnnn feedrate for un-retraction if different from retraction, mm/min (RepRapFirmware 1.16 and later only)
Znnn additional zlift/hop
Например
M207 S4.0 F2400 Z0.075

Sets the retract length used by the G10 and G11 commands, stays in mm regardless of M200 setting

M208: Set axis max travel

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Да Нет Нет ??? ??? Нет Нет
Параметры
Snnn 0 = set axis maximum (default), 1 = set axis minimum
Xnnn X axis limit
Ynnn Y axis limit
Znnn Z axis limit
Например
M208 X200 Y200 Z90 ; set axis maxima
M208 X-5 Y0 Z0 S1 ; set axis minima

The values specified set the software limits for axis travel in the specified direction. The axis limits you set are also the positions assumed when an endstop is triggered.

M208: Set unretract length

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Да Применяйте M207 Нет Нет ??? ??? Нет Да
Параметры
Snnn positive length surplus to the M207 Snnn, in mm
Fnnn feedrate, in mm/sec

Sets recover=unretract length.

M209: Enable automatic retract

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Да Нет Нет Нет Нет Нет ??? Нет Да
Например
M209 S1

This boolean value S 1=true or 0=false enables automatic retract detect if the slicer did not support G10/G11: every normal extrude-only move will be classified as retract depending on the direction.

M210: Set homing feedrates

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Например
M210 X1000 Y1500

Set the feedrates used for homing to the values specified in mm per minute.

M211: Disable/Enable software endstops

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Применяйте M564 Нет Нет ??? ??? Нет Нет

The boolean value S 1=enable or 0=disable controls state of software endstop.

The boolean value X, Y or Z 1=max endstop or 0=min endstop selects which endstop is controlled.

Например
M211 X1 Y1 Z1 S0

Disables X,Y,Z max endstops

Например
M211 X0 S1

Enables X min endstop

Например
M211

Prints current state of software endstops.

M212: Set Bed Level Sensor Offset

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да* Нет Нет Применяйте G31 Нет Нет ??? ??? Нет Нет

This G-Code command is known to be available in the newer versions of PrintrBot's branch of Marlin. It may not be available in other firmware.

Например
M212 Z-0.2

Set the Z home to 0.2 mm lower than where the sensor says Z home is. This is extremely useful when working with printers with hard-to-move sensors, like the PrintrBot Metal Plus.

PrintrBot suggests that the user make minor (0.1-0.2) adjustments between attempts and immediately executes M500 & M501 after setting this.

M217: Toolchange Parameters

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Нет Нет Нет ??? ??? Нет Нет

If arguments are given, sets tool-change retract and prime length (mm), prime feedrate (mm/m), retract feedrate (mm/m), and park position/raise (mm) or Z raise (mm): S<length> P<prime_speed> R<retract_speed> X<xpos> Y<ypos> Z<zraise>. XY arguments require SINGLENOZZLE_SWAP_PARK. If no arguments are given, reports current values. Currently used to set the SINGLENOZZLE tool-change options in Marlin 2.0 and up. May be extended for other tool-changing systems in the future.

M218: Установить смещение хотенда

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Применяйте G10 Нет Нет ??? ??? Нет Да

Sets hotend offset (in mm): T<extruder_number> X<offset_on_X> Y<offset_on_Y>.

Например
M218 T1 X50 Y0.5

M220: Set speed factor override percentage

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Да Да Да Да Да Нет Нет ??? ??? Да Да
Параметры
Snnn Speed factor override percentage (0..100 or higher)
Например
M220 S80

Sets the speed factor override percentage.

M221: Set extrude factor override percentage

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Да Да Да Да Да Да Нет Нет ??? ??? Да Да
Параметры
Snnn Extrude factor override percentage (0..100 or higher), default 100%
Dnnn Extruder drive number (RepRapFirmware only), default 0
Например
M221 S70
M221 S95 D1

Sets extrude factor override percentage. In the case of RepRapFirmware, sets the extrusion factor percentage for the specified extruder drive only.

M220: Turn off AUX V1.0.5

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет No Нет Нет Да ??? ??? Нет Нет

M221: Turn on AUX V1.0.5

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Да ??? ??? Нет Нет

M222: Set speed of fast XY moves

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Да ??? ??? Нет Нет

M223: Set speed of fast Z moves

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Да ??? ??? Нет Нет

M224: Enable extruder during fast moves

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Да ??? ??? Нет Нет

M225: Disable on extruder during fast moves

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Да ??? ??? Нет Нет

M226: Gcode Initiated Pause

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Да Да Да ??? ??? Нет Нет
Например
M226

Initiates a pause in the same way as if the pause button is pressed. That is, program execution is stopped and the printer waits for user interaction. This matches the behaviour of M1 in the NIST RS274NGC G-code standard and M0 in Marlin firmware.

M226: Ожидание состояния контакта

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Да Нет см. M577 Нет Нет ??? ??? Нет Да
Параметры
Pnnn Номер контакта
Snnn Состояние контакта
Например
M226 P2 S1

Wait for a pin to be in some state.

M227: Enable Automatic Reverse and Prime

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Например
M227 P1600 S1600

P and S are steps.

"Reverse and Prime" means, the extruder filament is retracted some distance when not in use and pushed forward the same amount before going into use again. This shall help to prevent drooling of the extruder nozzle. Teacup firmware implements this with M101/M103.

M228: Disable Automatic Reverse and Prime

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Например
M228

См. также M227.

M229: Enable Automatic Reverse and Prime

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Например
M229 P1.0 S1.0

P and S are extruder screw rotations. См. также M227.

M230: Отключить / включить ожидание изменения температуры

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Например
M230 S1

S1 Disable wait for temperature change S0 Enable wait for temperature change

M231: Set OPS parameter

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да Нет Нет Нет Нет ??? ??? Нет Нет
M231 S[OPS_MODE] X[Min_Distance] Y[Retract] Z[Backslash] F[RetractMove]

M232: Read and reset max. advance values

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да Нет Нет Нет Нет ??? ??? Нет Нет

M240: Trigger camera

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Нет Нет Нет ??? ??? Нет Да
Например
M240

Triggers a camera to take a photograph. (Add to your per-layer GCode.)

M240: Start conveyor belt motor / Echo off

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Debug: Echo off Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Например
M240

The conveyor belt allows to start mass production of a part with a reprap.

Echoing may be controlled in some firmwares with M111.

M241: Stop conveyor belt motor / echo on

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Debug: Echo on Нет Нет Нет Нет Нет Нет Нет ??? ??? Нет Нет
Например
M241

Echoing may be controlled in some firmwares with M111.

M245: Пуск вентилятора

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Применяйте M106 Нет Нет ??? ??? Нет Нет
Например
M245

used to cool parts/heated-bed down after printing for easy remove of the parts after print

M246: Остановка вентилятора

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Применяйте M106 Нет Нет ??? ??? Нет Нет
Например
M246

M250: Установить контрастность ЖК-дисплея

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Нет Нет Нет Нет ??? Нет Да
Например
M250 C20

Устанавливается контраст ЖК-дисплея, C<значение контраста> (величина 0..63), если доступно.

M251: Measure Z steps from homing stop (Delta printers)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да Нет Нет Нет Нет ??? ??? Нет Нет
Примеры
M251 S0 ; Сброс
M251 S1 ; Печать
M251 S2 ; Store to Z length (also EEPROM if enabled)

(This is a Repetier-Firmware only feature.)

M260: i2c Send Data

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да: 1.1.0 Нет Нет 1.21 и позже Нет Нет Нет ??? Нет Да

Buffer and send data over the i2c bus. Используйте A, чтобы задать адрес от 0-127. Add up to 32 bytes to the buffer with each B. Send and reset the buffer with S.

Параметры (Marlin, MK4duo)
Ann I2C адрес
Bnn Byte to buffer or send
S If present, sends the bytes that have been buffered
Примеры
M260 A5 B65 S ; Send 'A' to Address 5 now
M260 A0       ; Set address to 0 (broadcast)
M260 B77  ; M
M260 B97  ; a
M260 B114 ; r
M260 B108 ; l
M260 B105 ; i
M260 B110 ; n
M260 S1   ; Send the current buffer
Параметры (RepRapFirmware)
Ann I2C адрес
Bnn:nn:nn... Байты для отправки
Snn Number of bytes to receive (optional, RepRapFirmware 2.02RC4 and later)
Примеры
M260 A5 B65                    ; Передать 'A' по адресу 5
M260 A"0x7F" B65               ; Send 'A' to address 7F (hex)
M260 A0 B82:101:112:82:97:112  ; Передать 'RepRap' по адресу 0

RepRapFirmware does not use the S parameter, instead the address and all the bytes to send are specified in a single command.

M261: i2c Request Data

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да: 1.1.0 Нет Нет 1.21 и позже Нет Нет Нет ??? Нет Да

Request data from an i2c slave device. This command simply relays the received data to the host.

Параметры
Ann I2C address
Bnn How many bytes to request
Например
M261 A99 B5 ; Request 5 bytes from Address 99

Both M260 and M261 are commands demonstrating use of the i2c bus (TWIBus class) in Marlin Firmware. Developers and vendors can make Marlin an i2c master device by enabling EXPERIMENTAL_I2CBUS, and Marlin can act as a slave device by setting I2C_SLAVE_ADDRESS from 8-127. This class can be used to divide up processing responsibilities between multiple instances of Marlin running on multiple boards. For example, one board might control a Z axis with 4 independent steppers to create a self-leveling system, or a second board could drive the graphical display while the first board handles printing.

M280: Установка положения сервопривода

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Применяйте M340 Нет 1.16 и позже Да Нет ??? ??? Да Да

Set servo position absolute.

Параметры
Pnnn Servo index
Snnn Angle or microseconds
I1 Invert polarity (RepRapFirmware only)
Например
M280 P1 S50

Marlin and RepRapFirmware treat S values below 200 as angles, and 200 or greater as the pulse width in microseconds.

In RepRapFirmware, the servo index is the same as the pin number for the M42 command. See https://duet3d.com/wiki/Using_servos_and_controlling_unused_I/O_pins for details.

RepRapFirmware supports the optional I1 parameter, which if present causes the polarity of the servo pulses to be inverted compared to normal for that output pin. The I parameter is not remembered between M280 commands (unlike the I parameter in M106 commands), so if you need inverted polarity then you must include I1 in every M280 command you send.

Duet 0.8.5 M280 P value to Expansion Port Pin Mapping
P Имя Expansion Port Pin
Use M307 H# A-1 C-1 D-1 before using these pins
3 PC23_PWML6 21
4 PC22_PWML5 22
5 PC21_PWML4 23

On the Duet 0.6, pin 18 is controlled by heater 2. On the 0.8.5, pin 18 is controlled by heater 6, but is also shared with fan1. In order to use this pin, the fan must be disabled (M106 P1 I-1). See Using servos and controlling unused I/O pins

M290: Babystepping

B
Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет 1.1.7 и позже Да Нет 1.18 и позже Нет Нет Нет ??? Нет Да
Параметры (RepRapFirmware)
Snnn Количество микрошага в мм. Positive values raise the head, negative values lower it.
Znnn Синоним для S (RepRapFirmware 1.21 и позже)
Rn (Optional, RepRapFirmware 1.21 and later) R1 = relative (add to any existing babystep amount, the default), R0 = absolute (set babystepping offset to the specified amount)
Примеры
M290 S0.05  ; микрошаг головки до 0.05 мм
M290 R0 S0  ; clear babystepping (RepRapFirmware 1.21 and later only)
Параметры (Repetier)
Znnn Amount to baby step in mm. Positive values raise the head, negative values lower it.
Примеры
M290 S0.05  ; микрошаг головки до 0.05 мм
Дополнительные параметры (Marlin 1.1.7 и выше)
Xnnn Amount to babystep X in current units. (Requires BABYSTEP_XY)
Ynnn Amount to babystep Y in current units. (Requires BABYSTEP_XY)
Znnn Amount to babystep Z in current units. Синоним для 'S' параметра.
Например
M290 X0.2 Z0.05 ; Babystep X by 0.2mm, Z by 0.05mm

This command tells the printer to move the axis (or axes) transparently to the motion system. This is like physically moving the axes by force, but much nicer to the machine.

In RepRapFirmware M290 with no parameters reports the accumulated baby stepping offset. Marlin doesn't track accumulated babysteps.

In RepRapFirmware 1.19 and earlier, the babystepping offset is reset to zero when the printer is homed or the bed is probed. In RepRapFirmware 1.21 and later, homing and bed probing don't reset babystepping, but you can reset it explicitly using M290 R0 S0.

Примечание: If the BABYSTEP_ZPROBE_OFFSET option is used in Marlin, this command also affects the Z probe offset (as set by M851) and that offset will be saved to EEPROM.

M291: Display message and optionally wait for response

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет 1.19 и позже Нет Нет Нет ??? Нет Нет
Параметры
P"message" The message to display, which must be enclosed in double quotation marks. If the message itself contains a double quotation mark, use two double quotation marks to represent it.
R"message" Optional title for the message box. Must be enclosed in double quotation marks too.
Sn Message box mode (defaults to 1)
Tn Timeout in seconds, only legal for S=0 and S=1. The message will be cancelled after this amount of time, if the user does not cancel it before then. A zero or negative value means that the message does not time out (it may still be cancelled by the user if it has a Close button). In RepRapFirmware, the default timeout for messages that do not require acknowledgement is 10 seconds.
Zn 0 = no special action, 1 = display Z jog buttons alongside the message to allow the user to adjust the height of the print head
Примеры
M291 P"Please do something and press OK when done" S2
M291 P"This message will be closed after 10 seconds" T10

This command provides a more flexible alternative to M117, in particular messages that time out, messages that suspend execution until the user acknowledges them, and messages that allow the user to adjust the height of the print head before acknowledging them.

Allowed message box modes include:

0. No buttons are displayed (non-blocking)
1. Only "Close" is displayed (non-blocking)
2. Only "OK" is displayed (blocking, send M292 to resume the execution)
3. "OK" and "Cancel" are displayed  (blocking, send M292 to resume the execution or M292 P1 to cancel the operation in progress)

The combination S0 T0 is not permitted, because that would generate a message box with no close button and that never times out, which would lock up the user interface.

M292: Подтверждение сообщения

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет 1.19 и позже Нет Нет Нет ??? Нет Нет
Параметры
Pn Whether the current operation shall be cancelled. Only legal if M291 was called with S=3 (optional)

This command is sent by the user interface when the user acknowledges a message that was displayed because of a M291 command with parameter S=2 or S=3.

M300: Подать звуковой сигнал

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Да Нет Да Да Нет Да ??? Нет Да
Параметры
Snnn частота в Гц
Pnnn длительность в миллисекундах
Например
M300 S300 P1000

Play beep sound, use to notify important events like the end of printing. See working example on R2C2 electronics.

If an LCD device is attached to RepRapFirmware, a sound is played via the add-on touch screen control panel. Else the web interface will play a beep sound.

M301: Установка параметров PID

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет См. M130-M133 Да Да Да Да Да Нет Нет ??? ??? Да Да
Параметры
Hnnn номер нагревателя (Smoothie использует 'S', Redeem использует 'E')
Pnnn proportional (Kp)
Innn интеграл (Ki)
Dnnn производная (Kd)
Примеры
M301 H1 P1 I2 D3 ; Marlin, RepRapFirmware
M301 S0 P30 I10 D10 ; Smoothie
M301 E0 P30 I10 D10 ; Redeem (E = Extruder, -1=Bed, 0=E, 1=H, 2=A, 3=B, 4=C, default = 0)

Устанавливает пропорциональные (P), интегральные (I) и производные (D) значения для хотэнда. См. также PID Tuning.

MK4duo

H[heaters] H = 0-3 Hotend, H = -1 BED, H = -2 CHAMBER, H = -3 COOLER

Marlin

Hot end only; see M304 for bed PID. H is the heater number, default 1 (i.e. first extruder heater).

RepRapFirmware 1.15 и далее

In RepRapFirmware 1.15 and later the M301 is supported as described above, but it is not normally used. Instead the heater model is defined by M307 or found by auto tuning, and the firmware calculates the PID parameters from the model. An M301 command can be used in config.g after the M307 command for that heater to override the firmware-computed PID parameters.

RepRapFirmware от 1.09 до 1.14 включительно
  • H Is the heater number, and is compulsory. H0 is the bed, H1 is the first hot end, H2 the second etc.
  • P Interprets a negative P term as indicating that bang-bang control should be used instead of PID (not recommended for the hot end, but OK for the bed heater).
  • I Интегральное значение
  • D Производное значение
  • T Is the approximate additional PWM (on a scale of 0 to 255) needed to maintain temperature, per degree C above room temperature. Used to preset the I-accumulator when switching from heater fully on/off to PID.
  • S PWM scaling factor, to allow for variation in heater power and supply voltage. Is designed to allow a correction to be made for a change in heater power and/or power supply voltage without having to change all the other parameters. For example, an S factor of 0.8 means that the final output of the PID controller should be scaled to 0.8 times the standard value, which would compensate for a heater that is 25% more powerful than the standard one or a supply voltage that is 12.5% higher than standard.
  • W Wind-up. Sets the maximum value of I-term, must be high enough to reach 245C for ABS printing.
  • B Диапазон PID. Errors larger than this cause heater to be on or off.

An example using all of these would be:

M301 H1 P20 I0.5 D100 T0.4 S1 W180 B30
Smoothie

S0 is 0 for the hotend, and 1 for the bed, other numbers may apply to your configuration, depending on the order in which you declare temperature control modules.

Другие реализации

W: Wind-up. Sets the maximum value of I-term, so it does not overwhelm other PID values, and the heater stays on. (Check firmware support - Sprinter, Marlin?)

Например
M301 W125
Teacup

См. M130, M131, M132, M133 коды для Teacup's, для настройки PID параметров.

M302: Allow cold extrudes

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да 0.92 и позже Нет Да1 Нет Нет ??? ??? Нет Да
Параметры
Snnn Cold extrude minimum temperature (also in RepRapFirmware 2.02 and later)
Pnnn Cold extrude allow state (RepRapFirmware)
Rnnn Cold retraction minimum temperature (RepRapFirmware 2.02 and later)
Examples (RepRapFirmwre)
M302       ; Report current state
M302 P1    ; Allow cold extrusion
M302 S120 R110 ; Allow extrusion starting from 120°C and retractions already from 110°C
Примеры (Другие)
M302 S0    ; Allow extrusion at any temperature
M302 S170  ; Allow extrusion above 170

This tells the printer to allow movement of the extruder motor above a certain temperature, or if disabled, to allow extruder movement when the hotend is below a safe printing temperature.

Примечания

1RepRapFirmware uses the P[0|1] parameter instead of S[temperature], and for M302 with no parameters it will report the current cold extrusion state.

M303: Запуск настройки PID

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Да Да Да Да 1.15 и позже Нет Нет ??? ??? Да Да

PID Tuning refers to a control algorithm used in some repraps to tune heating behavior for hot ends and heated beds. This command generates Proportional (Kp), Integral (Ki), and Derivative (Kd) values for the hotend or bed (E-1). Send the appropriate code and wait for the output to update the firmware.

Hot end usage:

M303 S<temperature> C<cycles>

Bed usage (repetier, not sure whether cycles work here):

M303 P1 S<температура>

Bed usage (others):

M303 E-1 C<cycles> S<temperature>
Например
M303 C8 S175

Smoothie's syntax, where E0 is the first temperature control module (usually the hot end) and E1 is the second temperature control module (usually the bed):

M303 E0 S190

In RepRapFirmware, this command computes the process model parameters (see M307), which are in turn used to calculate the PID constants. H is the heater number, P is the PWM to use (default 0.5), and S is the maximum allowable temperature (default 225). Tuning is performed asynchronously. Run M303 with no parameters to see the current tuning state or the last tuning result.

Например
M303 H1 P0.4 S240 ; tune heater 1 using 40% PWM, quit if temperature exceeds 240C
Примечания

In Marlin Firmware you can add the U1 parameter to apply the PID results to current settings upon completion.

M304: Установка параметров PID - стола

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да ??? см. M301 Да Нет Нет ??? ??? Нет Применяйте M301
Параметры
Pnnn proportional (Kp)
Innn интеграл (Ki)
Dnnn производная (Kd)
Примеры
M304 P1 I2 D3 ; set kP=3, kI=2, kD=3
M304 P1 I2 D3 T0.7 B20 W127 ; RepRapFirmware
M304          ; Report parameters

Sets Proportional, Integral and Derivative values for bed. RepRapFirmware interprets a negative P term as indicating that bang-bang control should be used instead of PID. In RepRapFirmware, this command is identical to M301 except that the H parameter (heater number) defaults to zero.

См. также PID Tuning.

M304 в RepRapPro версия Марлин: Set thermistor values

In the RepRapPro version of Marlin ( https://github.com/reprappro/Marlin ) M304 is used to set thermistor values (as M305 is in later firmwares). RRP Marlin calculates temperatures on the fly, rather than using a temperature table. M304 Sets the parameters for temperature measurement.

Например
M304 H1 B4200 R4800 T100000

This tells the firmware that for heater 1 (H parameter: 0 = heated bed, H = first extruder), the thermistor beta (B parameter) is 4200, the thermistor series resistance (R parameter) is 4.8Kohms, the thermistor 25C resistance (T parameter) is 100Kohms. All parameters other than H are optional. If only the H parameter is given, the currently-used values are displayed. They are also displayed within the response to M503.

M305: Установка параметров термистора и АЦП

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет ??? Да Да Нет Нет ??? ??? Нет Да
Параметры
Pnnn Heater number, or virtual heater number
S"name" Heater name (optional, RepRapFirmware only)
Tnnn (for thermistor sensors) Thermistor resistance at 25oC
T"c" (for MAX31856-based thermocouple sensors) The thermistor type letter, default K
Bnnn Beta value, or the reciprocal of the Steinhart-Hart thermistor model B coefficient
Cnnn Steinhart-Hart C coefficient (MK4duo and RepRapFirmware 1.17 and later), default 0
Rnnn Series resistor value
Lnnn ADC low offset correction, default 0
Hnnn ADC high offset correction, default 0
Xnnn Heater ADC channel, or thermocouple or PT100 or current loop adapter channel, defaults to the same value as the P parameter
Fnn (where nn is 50 or 60) If the sensor interface uses a MAX31856 thermocouple chip or MAX31865 PT100 chip, this is the local mains frequency. Readings will be timed to optimise rejection of interference at this frequency.
Например
M305 P1 T100000 R1000 B4200

Sets the parameters for temperature measurement. The example above tells the firmware that for heater 1 (P parameter: 0 = heated bed, 1 = first extruder) the thermistor 25C resistance (T parameter) is 100Kohms, the thermistor series resistance (R parameter) is 1Kohms, the thermistor beta (B parameter) is 4200. All parameters other than P are optional. If only the P parameter is given, the existing values are displayed.

Например
M305 P1 T100000 R1000 B4200 H14 L-11 X2

The H correction affects the reading at high ADC input voltages, so it has the greatest effect at low temperatures. The L correction affects the reading at low input voltages, which correspond to high temperatures.

The X parameter tells the firmware to use the thermistor input corresponding to a different heating channel. RepRapFirmware also allow an external SPI thermocouple interface (such as the MAX31855) or PT100 interface (MAX31865) to be configured. MAX31855 thermocouple channels are numbered from 100, MAX31856 thermocouple channels are numbered from 150, PT100 channels from 200 and current loop channels from 300. Channel 1000 is the CPU temperature indication, 1001 is the temperature of the hottest stepper motor driver on the main board, and 1001 is the temperature of the hottest drivers on the expansion board.

In the above example, the ADC high end correction (H parameter) is 14, the ADC low end correction (L parameter) is -11, and thermistor input #2 is used to measure the temperature of heater #1.

M306: Set home offset calculated from toolhead position

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет ??? Да Нет Нет Нет ??? ??? Нет Нет
Например
M306 Z0

The values specified are added to the calculated end stop position when the axes are referenced. The calculated value is derived from the distance of the toolhead from the current axis zero point.

The user would typically place the toolhead at the zero point of the axis and issue the M306 command.

This value can be saved to EEPROM using the M500 command (as M206 value).

Implemented in Smoothieware

M307: Set or report heating process parameters

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет 1.15 and later Нет Нет ??? ??? Нет Нет
Параметры
Hn Heater number (0 is usually the bed heater)
Annn gAin, expressed as ultimate temperature rise obtained in degC divided by the PWM fraction. For example, if G=180 then at 50% PWM the ultimate temperature rise would be 90C.
Cnnn dominant time Constant of the heating process in seconds
Dnnn Время простоя в секундах
Four optional additional parameters help control the heating process
Fnnn PWM frequency to use.
Bn selects Bang-bang control instead of PID if non-zero. Default at power-up is 0 for extruder heaters, 1 for bed and chamber heaters.
Snnn maximum PWM to be used used with this heater on a scale of 0 to 1. По умолчанию 1.0.
Vnnn VIN supply voltage at which the A parameter was calibrated (RepRapFirmware 1.20 and later). This allows the PID controller to compensate for changes in supply voltage. A value of zero disables compensation for changes in supply voltage.
Примеры
M307 H0 ; report the process parameters for heater 0
M307 H1 A346.2 C140 D5.3 B0 S0.8 V23.8 ; set process parameters for heater 1, use PID, and limit heater 1 PWM to 80%

Each heater and its corresponding load may be approximated as a first order process with dead time, which is characterised by the gain, time constant and dead time parameters. The model can used to calculate optimum PID parameters (including using different values for the heating or cooling phase and the steady state phase), to better detect heater faults, and to calculate feed-forward terms to better respond to changes in the load. Normally these model parameters are found by auto tuning - see M303.

RepRapFirmware 1.16 and later allow the PID controller for a heater to be disabled by setting the A, C, and D parameters to -1. This frees up the corresponding heater control pin for use as a general purpose I/O pin to use with the M42 or M280 command.

M320: Activate autolevel (Repetier)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да Нет Нет Нет Нет ??? ??? Нет Нет
Применение
M320
M320 S1
Параметры
Snnn if greater than 0, activate and store persistently in EEPROM
Примеры
M320    ; temporarily activate auto leveling
M320 S1 ; permanently activate auto leveling

Parameter Snnn is optional.

(Только Repetier)

M321: Отключить автовыравнивание (Repetier)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да Нет Нет Нет Нет ??? ??? Нет Нет
Применение
M321
M321 S1
Параметры
Snnn if greater than 0, deactivate and store persistently in EEPROM
Примеры
M321    ; temporarily deactivate auto leveling
M321 S1 ; permanently deactivate auto leveling

Parameter Snnn is optional.

(Только Repetier)

M322: Reset autolevel matrix (Repetier)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да Нет Нет Нет Нет ??? ??? Нет Нет
Применение
M322
M322 S1
Параметры
Snnn if greater than 0, also reset the matrix values saved EEPROM
Примеры
M322    ; temporarily reset auto level matrix
M322 S1 ; permanently reset auto level matrix

Parameter Snnn is optional.

(Только Repetier)

M323: Distortion correction on/off (Repetier)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да Нет Нет Нет Нет ??? ??? Нет Нет
Применение
M323
M323 Snnn
M323 Snnn Pnnn
Параметры
Snnn 0 (disable correction) or 1 (enable correction)
Pnnn 1 (store correction state persistently in EEPROM)
Примеры
M323       ; Show if distortion correction is enabled
M323 S0    ; Disable distortion correction temporarily
M323 S1 P1 ; Enable distortion correction permanently

(Только Repetier) Controls distortion correction feature after having set it up using G33.

M340: Control the servos

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да Нет Нет Нет Нет ??? ??? Нет Нет

(Repetier only ,Marlin see M280)

M340 P<servoId> S<pulseInUS> / ServoID = 0..3 pulseInUs = 500..2500

Servos are controlled by a pulse width normally between 500 and 2500 with 1500ms in center position. 0 turns servo off.

M350: Set microstepping mode

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Да Нет Да Нет Нет ??? ??? Да Да

Sets microstepping mode.

Предупреждение: Steps per unit remains unchanged; except that in RepRapFirmware the steps/mm will be adjusted automatically.

Применение
M350 Snn Xnn Ynn Znn Enn Bnn
Параметры
Not all parameters need to be used, but at least one should be used. As with other commands, RepRapFirmware reports the current settings if no parameters are used.
Snn Set stepping mode for all drivers (not supported by RepRapFirmware)
Xnn Set stepping mode for the X axis
Ynn Set stepping mode for the Y axis
Znn Set stepping mode for the Z axis
Enn Set stepping mode for Extruder 0 (for RepRapFirmware use Enn:nn:nn etc. for multiple extruders)
Bnn Set stepping mode for Extruder 1 (not supported by RepRapFirmware, see above)
Inn Enable (nn=1) or disable (nn=0) microstep interpolation mode for the specified drivers, if they support it (RepRapFirmware only)
Modes (nn)
1 = полный шаг
2 = полшага
4 = четверть шага
8 = 1/8 шага
16 = 1/16 шага
64 = 1/64 шага
128 = 1/128 шага
256 = 1/256 шага
Примеры
M350 S16    ; reset all drivers to the default 1/16 micro-stepping - not supported by RepRapFirmware
M350 Z1     ; set the Z-axis' driver to use full steps
M350 E4 B4  ; set both extruders to use quarter steps - Marlin/Repetier
M350 E4:4:4 ; set extruders 0-2 to use quarter steps - RepRapFirmware

M351: Toggle MS1 MS2 pins directly

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Нет Нет Нет ??? ??? Нет Да
Например
M351

M355: Turn case lights on/off

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Применяйте M106 Нет Да: 1.1.0 Да: 0.92.2 Нет Нет Нет Нет ??? ??? Нет Нет
Примеры
M355 S1 ; Enable lights
M355 S0 ; Disable lights
M355    ; Report status

Every call or change over LCD menu sends a state change for connected hosting software like:

Case lights on
Case lights off
No case lights

M360: Report firmware configuration

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да: 0.92.2 Нет Нет Нет Нет ??? ??? Нет Нет
Цель

This command helps hosting software to detect configuration details, which the user would need to enter otherwise. It should reduce configuration time considerably if supported.

Например
M360
Ответ
Config:Baudrate:250000
Config:InputBuffer:127
Config:NumExtruder:2
Config:MixingExtruder:0
Config:HeatedBed:0
Config:SDCard:1
Config:Fan:1
Config:LCD:1
Config:SoftwarePowerSwitch:1
Config:XHomeDir:-1
Config:YHomeDir:-1
Config:ZHomeDir:-1
Config:SupportG10G11:1
Config:SupportLocalFilamentchange:1
Config:CaseLights:0
Config:ZProbe:1
Config:Autolevel:0
Config:EEPROM:1
Config:PrintlineCache:24
Config:JerkXY:30.00
Config:JerkZ:0.30
Config:RetractionLength:3.00
Config:RetractionLongLength:13.00
Config:RetractionSpeed:40.00
Config:RetractionZLift:0.00
Config:RetractionUndoExtraLength:0.00
Config:RetractionUndoExtraLongLength:0.00
Config:RetractionUndoSpeed:0.00
Config:XMin:0.00
Config:YMin:0.00
Config:ZMin:0.00
Config:XMax:250.00
Config:YMax:150.00
Config:ZMax:90.00
Config:XSize:250.00
Config:YSize:150.00
Config:ZSize:90.00
Config:XPrintAccel:250.00
Config:YPrintAccel:250.00
Config:ZPrintAccel:100.00
Config:XTravelAccel:250.00
Config:YTravelAccel:250.00
Config:ZTravelAccel:100.00
Config:PrinterType:Cartesian
Config:MaxBedTemp:120
Config:Extr.1:Jerk:50.00
Config:Extr.1:MaxSpeed:100.00
Config:Extr.1:Acceleration:10000.00
Config:Extr.1:Diameter:0.00
Config:Extr.1:MaxTemp:220
Config:Extr.2:Jerk:50.00
Config:Extr.2:MaxSpeed:100.00
Config:Extr.2:Acceleration:10000.00
Config:Extr.2:Diameter:0.00
Config:Extr.2:MaxTemp:220

Коды калибровки SCARA (Morgan)

In order to ease calibration of Reprap Morgan, the following M-codes are used to set the machine up

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Partial Нет Да Нет Нет Нет ??? ??? ??? Partial

M360: Move to Theta 0 degree position

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Experimental Нет Да Нет Нет Нет ??? ??? Нет Experimental

The arms move into a position where the Theta steering arm is parallel to the top platform edge. The user then calibrates the position by moving the arms with the jog buttons in software like pronterface until it is perfectly parallel. Using M114 will then display the calibration offset that can then be programmed into the unit using M206 (Home offset) X represents Theta.

Smoothieware: M360 P0 will take the current position as parallel to the platform edge, and store the offset in the homing trim offset (M666) No further user interaction is needed.

M361: Move to Theta 90 degree position

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Experimental Нет Да Нет Нет Нет ??? ??? Нет Experimental

Theta move to 90 degrees with platform edge. User calibrates by using jog arms to place exactly 90 degrees. Steps per degree can then be read out by using M114, and programmed using M92. X represents Theta. Program Y (Psi) to the same value initially. Remember to repeat M360 after adjusting steps per degree.

Smoothieware: M360 P0 will accept the current position as 90deg to platform edge. New steps per angle is calculated and entered into memory (M92) No further user interaction is required, except to redo M360.

M362: Move to Psi 0 degree position

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Experimental Нет Да Нет Нет Нет ??? ??? Нет Experimental

Arms move to Psi 0 degree. Check only after other Theta calibrations

M363: Move to Psi 90 degree position

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Experimental Нет Да Нет Нет Нет ??? ??? Нет Experimental

Arms move to Psi 90 degree. Check only after other Theta calibrations

M364: Move to Psi + Theta 90 degree position

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Experimental Нет Да Нет Нет Нет ??? ??? Нет Experimental

Move arms to form a 90 degree angle between the inner and outer Psi arms. Calibrate by moving until angle is exactly 90 degree. Read out with M114, and calibrate value into Home offset M206. Psi is represented by Y.

Smoothieware: M364 P0 will accept the current position as 90deg between arms. The offset is stored as a trim offset (M666) and no further user interaction is required except to save all changes via M500.

M365: Коэффициент масштабирования SCARA

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Experimental Нет Да Применяйте M579 Нет Нет ??? ??? Нет Experimental

Adjust X Y and Z scaling by entering the factor. 100% scaling (default) is represented by 1

M366: SCARA convert trim

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Да Нет Нет Нет ??? ??? Нет Нет

Executing this command translates the calculated trim values of the SCARA calibration to real home offsets. This prevents the home and trim movement after calibration.

M370: Morgan manual bed level - clear map

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Да Применяйте M557 Нет Нет ??? ??? Нет Нет

Очистите карту и подготовьтесь к калибровке

Применение
M370
M370 X[divisions] Y[divisions]

Without parameters is defaults to X5 Y5 (25 calibration points) When specifying parameters, uneven numbers are recommended.

M371: Move to next calibration position

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Да Нет Нет Нет ??? ??? ??? Нет

Переход к следующей позиции для калибровки. User moves the bed towards the hotend until it just touches

M372: Record calibration value, and move to next position

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Да Нет Нет Нет ??? ??? ??? Нет

The position of the bed is recorded and the machine moves to the next position. Repeat until all positions programmed

M373: End bed level calibration mode

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Да Нет Нет Нет ??? ??? ??? Нет

End calibration mode and enable z correction matrix. Does not save current matrix

M374: Сохранить калибровочную сетку

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Да 1.17 и позже Нет Нет ??? ??? ??? Нет

Сохранение калибровочной сетки.

Параметры
extension (Smoothieware only) Extension of the grid file
Pfilename (RepRapFirmware only) Name of the file to save to
Z (Smoothieware only) Also save the M206 Z homing offset into the grid file
Usage (Smoothieware)
M374
M374 <расширение файла> Z
Применение (RepRapFirmware)
M374
M374 PMyAlternateHeightMap.csv

In Smoothieware, without parameters this saves the grid into the default grid file that gets loaded at boot. The optional parameter specifies the extension of the grid file - useful for special grid files such as for a special print surface like a removable print plate. Addition of Z will additionally save the M206 Z homing offset into the grid file.

In RepRapFirmware, this saves the grid parameters and height map into the specified file, or the default file heightmap.csv if no filename was specified. To load the height map automatically at startup, use command M375 in the config.g file.

M375: Display matrix / Load Matrix

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Да 1.17 и позже Нет Нет ??? ??? ??? Нет

Displays the bed level calibration matrix (Marlin), or loads the grid matrix file (Smoothieware and RepRapFirmware)

Параметры
extension (Smoothieware only)
Pfilename (RepRapFirmware only)
Применение
M375
M375 [file extension] ; (Smoothieware only)
M375 PMyAlternateHeightMap.csv ; (RepRapFirmware only)

Without parameters loads default grid, and with specified extension or specified filename attempts to load the specified grid. If not available will not modify the current grid. In Smoothieware, if Z was saved with the grid file, it will load the saved Z with the grid.

M376: Set bed compensation taper

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Да 1.17 и позже Нет Нет ??? ??? ??? Нет
Параметры
Hnnn Height (mm) over which to taper off the bed compensation
Например
M376 H10

This command specifies that bed compensation should be tapered off over the specified height, so that no bed compensation is applied at and above that height. If H is zero or negative then no tapering is applied, so compensation is performed throughout the entire print.

If the firmware does not adjust the extrusion amount to compensate for the changing layer height while tapering is being applied, you will get under- or over-extrusion. Using a large taper height will reduce this effect. For example, if the taper height is 50 times the largest bed height error, then under- or over-extrusion will be limited to 2%.

M380: Активация соленоида

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да ??? Нет Нет Нет Нет ??? ??? ??? Да
Например
M380

Активирует соленоид на активном экструдере.

M381: Отключить все соленоиды

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да ??? Нет Нет Нет Нет ??? ??? ??? Да
Например
M381

M400: Wait for current moves to finish

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Применяйте G4 Да Да Да Да Да Да Нет ??? ??? ??? Да
Например
M400

Finishes all current moves and and thus clears the buffer. That's identical to G4 P0 for Teacup printers.

M401: Lower z-probe

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да ??? Нет 1.17 и позже Нет Нет ??? ??? ??? Да
Например
M401

Lower z-probe if present. In RepRapFirmware this runs macro file sys/deployprobe.g.

M402: Raise z-probe

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да ??? Нет 1.17 и позже Нет Нет ??? ??? ??? Да
Например
M402

Raise z-probe if present. In RepRapFirmware this runs macro file sys/retractprobe.g.

M404: Filament width and nozzle diameter

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Да Нет Нет ??? ??? ??? Да
Параметры
Nnnn Ширина филамента (в мм)
Dnnn Диаметр сопла (в мм)1
Примеры
M404 N1.75
M404 N3.0 D1.0

Enter the nominal filament width (3mm, 1.75mm) or will display nominal filament width without parameters.

Примечания

1While Marlin only accepts the 'N' parameter, RepRapFirmware further allows to specify the nozzle diameter (in mm) via the 'D 'parameter. This value is used to properly detect the first layer height when files are parsed or a new print is being started.

M405: Датчик филамента включен

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Применяйте M591 Нет Нет ??? ??? ??? Да
Например
M405

Turn on Filament Sensor extrusion control. Optional D<delay in cm> to set delay in centimeters between sensor and extruder.

M406: Датчик филамента выключен

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Применяйте M591 Нет Нет ??? ??? ??? Да
Например
M406

Turn off Filament Sensor extrusion control.

M407: Отображение диаметра филамента

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Да Нет Нет ??? ??? ??? Да
Например
M407

Displays measured filament diameter. In RepRapFirmware, M407 does the same as M404.

M408: Report JSON-style response

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Да Нет Нет ??? ??? ??? Да
Параметры
Snnn Response type
Rnnn Response sequence number
Например
M408 S0

Report a JSON-style response by specifying the desired type using the 'S' parameter.

The following response types are supported:

  • Type 0 is a short-form response, similar to the response used by older versions of the web interface.
  • Type 1 is like type 0 except that static values are also included.
  • Type 2 is similar to the response provided by the web server for Duet Web Control.
  • Type 3 is an extended version of type 2 which includes some additional parameters that aren't expected to change very frequently.
  • Type 4 is an extended version of type 2 which may be used to poll for current printer statistics.
  • Type 5 reports the current machine configuration.

Here is an example of a typical type 0 response:

{"status":"I","heaters":[25.0,29.0,28.3],"active":[-273.1,0.0,0.0],"standby":[-273.1,0.0,0.0],"hstat":[0,2,1],"pos":[-11.00,0.00,0.00],"extr":[0.0,0.0],
 "sfactor":100.00, "efactor":[100.00,100.00],"tool":1,"probe":"535","fanPercent":[75.0,0.0],"fanRPM":0,"homed":[0,0,0],"fraction_printed":0.572}

The response is set as a single line with a newline character at the end. The meaning of the fields is:

статус:  I=idle, P=printing from SD card, S=stopped (i.e. needs a reset), C=running config file (i.e starting up), A=paused, D=pausing, R=resuming from a pause, B=busy (e.g. running a macro), F=performing firmware update
heaters: current heater temperatures, numbered as per the machine (typically, heater 0 is the bed)
active:  active temperatures of the heaters
standby: standby temperatures of the heaters
hstat:   status of the heaters, 0=off, 1=standby, 2=active, 3=heater fault. Heater 0 is normally the bed heater, heaters 1, 2.. are the extruder heaters.
pos:     the X, Y and Z (and U, V, W if present) axis positions of the current tool (if a tool is selected), or of the print head reference point if no tool is selected
extr:    the positions of the extruders
sfactor: the current speed factor (see M220 command)
efactor: the current extrusion factors (see M221 command), one value per extruder
tool:    the selected tool number. A negative number typically means no tool selected.
probe:   the Z-probe reading
fanPercent: the speeds of the controllable fans, in percent of maximum
fanRPM:  the print cooling fan RPM
homed:   the homed status of the X, Y and Z axes (and U, V, W if they exist), or towers on a delta. 0=axis has not been homed so position is not reliable, 1=axis has been homed so position is reliable.
fraction_printed: the fraction of the file currently being printed that has been read and at least partially processed.
message: the message to be displayed on the screen (only present if there is a message to display)
timesLeft: an array of the estimated remaining print times (in seconds) calculated by different methods. These are currently based on the proportion of the file read,
           the proportion of the total filament consumed, and the proportion of the total layers already printed. Only present if a print from SD card is in progress.
seq:     the sequence number of the most recent non-trivial G-code response or error message. Only present if the R parameter was provided and the current sequence number is greater than that.
resp:    the most recent non-trivial G-code response or error message. Only present if the R parameter was provided and the current sequence number is greater.

The type 1 response comprises these fields plus some additional ones that do not generally change and therefore do not need to be fetched as often. The extra fields include:

myName:  имя принтера
firmwareName: the name of the firmware, e.g. "RepRapFirmware", "Smoothieware" or "Repetier"
geometry: one of "cartesian", "delta", "corexy, "corexz" etc.
axes:    the number of axes
volumes: the number of SD card slots available
numTools:   the number of available tools numbered contiguously starting from 0

The fields may be in any order in the response. Other implementations may omit fields and/or add additional fields.

For a more detailed comparison of type 2 - 5, see RepRap_Firmware_Status_responses.

PanelDue currently uses only M408 S0 and M408 S1.

M410: Быстрая остановка

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет 1.1.0-RC2 и позже Нет Нет Применяйте M112 Нет Нет ??? ??? ??? Да

This command does a quick stop of all stepper motors and aborts all moves in the planner. This command is only intended for emergency situations, and due to the instant stop the actual stepper positions may be shifted. Note that if `EMERGENCY_PARSER` is disabled, the response may be delayed while the command buffer is being queued. If a print job is in progress, it will continue, so it is important to suspend the print job before using this command.

M412: Disable Filament Runout Detection

Support FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет 2.0 и позже Нет Нет Применяйте M591 Нет Нет ??? ??? ??? Нет

Включение или отключение обнаружения биения филамента. When filament sensors are enabled, the firmware responds to a filament runout by running the configured G-code (usually M600 Filament Change). When filament runout detection is disabled, no action will be taken on filament runout.

Применение: M412 S[on|off]

If no 'S' parameter if given, this command reports the current state of filament runout detection.

Примеры
M412 S1 Enable filament runout detection
M412 S0 Disable filament runout detection
M412 Report the current filament runout detection state

M413: Power-Loss Recovery

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет 2.0 и позже Нет Нет Применяйте M911 Нет Нет ??? ??? ??? Нет

Enable or disable the Power-loss Recovery feature. When this feature is enabled, the state of the current print job (SD card only) will be saved to a file on the SD card. If the machine crashes or a power outage occurs, the firmware will present an option to Resume the interrupted print job. In Marlin 2.0 the POWER_LOSS_RECOVERY option must be enabled.

This feature operates without a power-loss detection circuit by writing to the recovery file periodically (e.g., once per layer), or if a POWER_LOSS_PIN is configured then it will write the recovery info only when a power-loss is detected. The latter option is preferred, since constant writing to the SD card can shorten its life, and the print will be resumed where it was interrupted rather than repeating the last layer. (Future implementations may allow use of the EEPROM or the on-board SD card.)

Применение: M413 S[on|off]

If no 'S' parameter if given, this command reports the current state of Power-loss Recovery.

Примеры
M413 S1 Enable power-loss recovery
M413 S0 Disable power-loss recovery
M413 Report the current power-loss recovery state

M415: Host Rescue

Support FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
No No No No Yes No No No No ??? ??? ??? No

The host rescue gcode is essential to enabling host software to recover from a connection lost or power loss. The idea is that firmware stores last received position and current position in EEPROM and reports them to host after reconnect. From the last received position host can figure out the last send line. Firmware should move extruder to a parking position if during a print there is no move left and no communication is going on. This saves the print once host is back. If host continues sending, the firmware is responsible for restoring last position before executing moves.

If firmware supports this solution it should announce it with the capability: Cap:HOST_RESCUE:1

Примеры
M415 S1 Enable host rescue system
M415 S0 Disable host rescue system
M415 Z[zpos] Set Z position as if homed
M415 Report rescue state

Every call to M415 reports the state. Answers are

RESCUE_STATE: OFF

Nothing stored. Print finished.

RESCUE_STATE: LX:121.97 LY:143.33 LZ:3.30 LE:1.84 LT:0 X:0.00 Y:240.00 Z:13.30 E:1.84

Print was interrupted. Coordinates with leading L are last received positions, LT is active extruder. Normal coordinates are current position and can be omitted, if the move did not finish due to power loss.

On a power loss the firmware should respond with POWERLOSS_DETECTED as early as possible to give host time to flush log as it is likely host will also go down very soon.

Support is available in Repetier-Firmware 1.0.4 or higher. Repetier-Server 0.91.0 is the first to use this concept and can be used to validate implementation.

M420: Установить RGB цвета как ШИМ (MachineKit)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Нет Нет Нет Да Нет ??? ??? ??? Нет

Применение: M420 R[Красный ШИМ (0-255)] E[Зелёный ШИМ (0-255)] B[Синий ШИМ (0-255)]

Например
M420 R255 E255 B255

Установите цвет светодиодов RGB, подключенных к контактам с поддержкой ШИМ. Note, the Green color is controlled by the E value instead of the G value due to the G code being a primary code that cannot be overridden.

In Marlin M420 is Enable/Disable Mesh Leveling (with current values) S1=enable S0=disable

M420: Leveling On/Off/Fade (Marlin)

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Применяйте G29 и M376 Нет Нет ??? ??? ??? Да

Enable/Disable Bed Leveling (using the current stored grid or mesh).

Применение
M420 S[bool] Z[float]
Примеры
M420 S1  ; Enable compensation using current grid/mesh
M420 Z10 ; Gradually reduce compensation until Z=10

Marlin 1.1.0 adds the Z parameter to set the "fade" height. This requires the ENABLE_LEVELING_FADE_HEIGHT option.

When the Z fade height value is set non-zero, bed compensation will gradually reduce up to the given height, and cease completely above that height.

M421: Set a Mesh Bed Leveling Z coordinate

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Да Нет Нет Нет Нет Нет Нет Нет Нет Нет

Set a single Z coordinate in the Mesh, Bilinear or UBL Leveling grid. Requires MESH_BED_LEVELING or AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL.

I & J are the index for the X and Y axis respectively.

Применение
M421 I[index] J[index] Z[float] to set an absolute value to a mesh point

или

M421 I[index] J[index] Q[float] to offset a mesh point by a specified value

M425: Enable and tune backlash correction.

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет 2.0.x and later Нет Нет Нет Нет Нет ??? ??? Нет Нет
Параметры
Fnnn Enable/disable/fade-out backlash correction (0.0 = none to 1.0 = 100%)
Snnn Distance over which backlash correction is spread1 (mm)
Xnnn Set the backlash distance on X (mm; 0 to disable)
Ynnn Set the backlash distance on Y (mm; 0 to disable)
Znnn Set the backlash distance on Z (mm; 0 to disable)
X Use measured value for backlash on X (if available)
Y Use measured value for backlash on Y (if available)
Z Use measured value for backlash on Z (if available)
Примеры (Marlin)
M425 ; Отчет о текущем состоянии
M425 Z              ; Use measured value of backlash on Z
M425 F1 S3          ; Full backlash compensation while smoothing over 3mm.
M425 F0.5 S0.0      ; Compensate for 50% of the backlash with no smoothing
M425 X0.1 Y0.2 Z0.3 ; Set backlash to specific values for all axis
Примечания

1 In Marlin, backlash compensation works by adding extra steps to one or more segments after a motor direction reversal. With smoothing off, this can cause blemishes on the print. Enabling smoothing will cause those extra steps to be spread over multiple segments, minimizing artifacts.

M450: Отчет о режиме принтера

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да Нет 1.20 и позже Нет Нет ??? ??? ??? Нет
Применение
M450
Например
> M450
> PrinterMode:FFF (Режим принтера:FFF)

Printers can be used for different task by exchanging the toolhead. Depending on the tool, a different behavior of some commands can be expected. Эта команда сообщает текущий режим работы. Возможные ответы:

PrinterMode:FFF (Режим принтера:FFF)
PrinterMode:Laser (Режим принтера:Лазер)
PrinterMode:CNC (Режим принтера:ЧПУ)

M451: Выбор режима принтера FFF

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да Нет 1.20 и позже Нет Нет ??? ??? ??? Нет
Применение
M451
Например
> M451
> PrinterMode:FFF (Режим принтера:FFF)

Switches to FFF mode for filament printing.

M452: Выбор лазерного режима принтера

Поддержка FiveD Teacup Sprinter Marlin Repetier Smoothie RepRapFirmware Machinekit BFB MakerBot grbl Redeem MK4duo
Нет Нет Нет Нет Да Нет 1.20 и позже Нет Нет ??? ??? ??? Нет
Применение
M452
Например
> M452
> PrinterMode:Laser

Переключается в лазерный режим. This mode enables handling of a laser pin and makes sure that the laser is only activated during G1 moves if laser was enabled or E is increasing. G0 moves should never enable the laser. M3/M5 can be used to enable/disable the laser for moves.

<