From 05ec7ca7ff713bb18e64e2c274e505d673ac109c Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 8 Mar 2018 14:06:24 -0500 Subject: [PATCH] docs: Add a G-Codes.md file with the list of available commands Signed-off-by: Kevin O'Connor --- docs/G-Codes.md | 114 +++++++++++++++++++++++++++++++++++++++++++++++ docs/Overview.md | 3 +- 2 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 docs/G-Codes.md diff --git a/docs/G-Codes.md b/docs/G-Codes.md new file mode 100644 index 00000000..e2de4448 --- /dev/null +++ b/docs/G-Codes.md @@ -0,0 +1,114 @@ +This document describes the commands that Klipper supports. These are +commands that one may enter into the OctoPrint terminal tab. + +# G-Code commands + +Klipper supports the following standard G-Code commands: +- Move (G0 or G1): `G1 [X] [Y] [Z] [E] [F]` +- Dwell: `G4 P` +- Move to origin: `G28 [X] [Y] [Z]` +- Turn off motors: `M18` or `M84` +- Wait for current moves to finish: `M400` +- Use absolute/relative distances for extrusion: `M82`, `M83` +- Use absolute/relative coordinates: `G90`, `G91` +- Set position: `G92 [X] [Y] [Z] [E]` +- Set speed factor override percentage: `M220 S` +- Set extrude factor override percentage: `M221 S` +- Get extruder temperature: `M105` +- Set extruder temperature: `M104 [T] [S]` +- Set extruder temperature and wait: `M109 [T] S` +- Set bed temperature: `M140 [S]` +- Set bed temperature and wait: `M190 S` +- Set fan speed: `M106 S` +- Turn fan off: `M107` +- Emergency stop: `M112` +- Get current position: `M114` +- Get firmware version: `M115` +- Set home offset: `M206 [X] [Y] [Z]` +- Run PID tuning: `M303 [E] S` + +For further details on the above commands see the +[RepRap G-Code documentation](http://reprap.org/wiki/G-code). + +Klipper's goal is to support the G-Code commands produced by common +3rd party software (eg, OctoPrint, Printrun, Slic3r, Cura, etc.) in +their standard configurations. It is not a goal to support every +possible G-Code command. Instead, Klipper prefers human readable +["extended G-Code commands"](#extended-g-code-commands). + +## G-Code SD card commands + +Klipper also supports the following standard G-Code commands if the +"virtual_sdcard" config section is enabled: +- List SD card: `M20` +- Initialize SD card: `M21` +- Select SD file: `M23 ` +- Start/resume SD print: `M24` +- Pause SD print: `M25` +- Set SD position: `M26 S` +- Report SD print status: `M27` + +# Extended G-Code Commands + +Klipper uses "extended" G-Code commands for general configuration and +status. These extended commands all follow a similar format - they +start with a command name and may be followed by one or more +parameters. For example: `SET_SERVO SERVO=myservo ANGLE=5.3`. In this +document, the commands and parameters are shown in uppercase, however +they are not case sensitive. (So, "SET_SERVO" and "set_servo" both run +the same command.) + +The following standard commands are supported: +- `QUERY_ENDSTOPS`: Probe the axis endstops and report if they are + "triggered" or in an "open" state. This command is typically used to + verify that an endstop is working correctly. +- `RESTART`: This will cause the host software to reload its config + and perform an internal reset. This command will not clear error + state from the micro-controller (see FIRMWARE_RESTART) nor will it + load new software (see + [the FAQ](FAQ.md#how-do-i-upgrade-to-the-latest-software)). +- `FIRMWARE_RESTART`: This is similar to a RESTART command, but it + also clears any error state from the micro-controller. +- `STATUS`: Report the Klipper host software status. +- `HELP`: Report the list of available extended G-Code commands. + +## Custom Pin Commands + +The following command is available when a "digital_output" or +"pwm_output" config section is enabled: +- `SET_PIN PIN=config_name VALUE=` + +## Servo Commands + +The following commands are available when a "servo" config section is +enabled: +- `SET_SERVO SERVO=config_name WIDTH=` +- `SET_SERVO SERVO=config_name ANGLE=` + +## Probe + +The following commands are available when a "probe" config section is +enabled: +- `PROBE`: Move the nozzle downwards until the probe triggers. +- `QUERY_PROBE`: Report the current status of the probe ("triggered" + or "open"). + +## Delta Calibration + +The following commands are available when the "delta_calibrate" config +section is enabled: +- `DELTA_CALIBRATE`: This command will probe seven points on the bed + and recommend updated endstop positions, tower angles, and radius. + - `NEXT`: If manual bed probing is enabled, then one can use this + command to move to the next probing point during a DELTA_CALIBRATE + operation. + +## Bed Tilt + +The following commands are available when the "bed_tilt" config +section is enabled: +- `BED_TILT_CALIBRATE`: This command will probe the points specified + in the config and then recommend updated x and y tilt adjustments. + - `NEXT`: If manual bed probing is enabled, then one can use this + command to move to the next probing point during a + BED_TILT_CALIBRATE operation. diff --git a/docs/Overview.md b/docs/Overview.md index 9358bc27..2d1c334c 100644 --- a/docs/Overview.md +++ b/docs/Overview.md @@ -16,7 +16,8 @@ on tuning the pressure advance config. The [kinematics](Kinematics.md) document provides some technical details on how Klipper implements motion. The [FAQ](FAQ.md) answers -some common questions. +some common questions. The [G-Codes](G-Codes.md) document lists +currently supported run-time commands. The history of Klipper releases is available at [releases](Releases.md). See [contact](Contact.md) for information on