mirror of
https://github.com/QIDITECH/klipper.git
synced 2026-01-31 07:58:42 +03:00
plus4的klipper版本
This commit is contained in:
214
docs/G-Codes.md
214
docs/G-Codes.md
@@ -146,14 +146,15 @@ The following commands are available when the
|
||||
(also see the [bed mesh guide](Bed_Mesh.md)).
|
||||
|
||||
#### BED_MESH_CALIBRATE
|
||||
`BED_MESH_CALIBRATE [METHOD=manual] [<probe_parameter>=<value>]
|
||||
[<mesh_parameter>=<value>]`: This command probes the bed using
|
||||
generated points specified by the parameters in the config. After
|
||||
probing, a mesh is generated and z-movement is adjusted according to
|
||||
the mesh. See the PROBE command for details on the optional probe
|
||||
parameters. If METHOD=manual is specified then the manual probing tool
|
||||
is activated - see the MANUAL_PROBE command above for details on the
|
||||
additional commands available while this tool is active.
|
||||
`BED_MESH_CALIBRATE [METHOD=manual] [HORIZONTAL_MOVE_Z=<value>]
|
||||
[<probe_parameter>=<value>] [<mesh_parameter>=<value>]`: This command probes
|
||||
the bed using generated points specified by the parameters in the config. After
|
||||
probing, a mesh is generated and z-movement is adjusted according to the mesh.
|
||||
See the PROBE command for details on the optional probe parameters. If
|
||||
METHOD=manual is specified then the manual probing tool is activated - see the
|
||||
MANUAL_PROBE command above for details on the additional commands available
|
||||
while this tool is active. The optional `HORIZONTAL_MOVE_Z` value overrides the
|
||||
`horizontal_move_z` option specified in the config file.
|
||||
|
||||
#### BED_MESH_OUTPUT
|
||||
`BED_MESH_OUTPUT PGP=[<0:1>]`: This command outputs the current probed
|
||||
@@ -207,13 +208,14 @@ The following commands are available when the
|
||||
[bed_tilt config section](Config_Reference.md#bed_tilt) is enabled.
|
||||
|
||||
#### BED_TILT_CALIBRATE
|
||||
`BED_TILT_CALIBRATE [METHOD=manual] [<probe_parameter>=<value>]`: This
|
||||
command will probe the points specified in the config and then
|
||||
recommend updated x and y tilt adjustments. See the PROBE command for
|
||||
details on the optional probe parameters. If METHOD=manual is
|
||||
specified then the manual probing tool is activated - see the
|
||||
MANUAL_PROBE command above for details on the additional commands
|
||||
available while this tool is active.
|
||||
`BED_TILT_CALIBRATE [METHOD=manual] [HORIZONTAL_MOVE_Z=<value>]
|
||||
[<probe_parameter>=<value>]`: This command will probe the points specified in
|
||||
the config and then recommend updated x and y tilt adjustments. See the PROBE
|
||||
command for details on the optional probe parameters. If METHOD=manual is
|
||||
specified then the manual probing tool is activated - see the MANUAL_PROBE
|
||||
command above for details on the additional commands available while this tool
|
||||
is active. The optional `HORIZONTAL_MOVE_Z` value overrides the
|
||||
`horizontal_move_z` option specified in the config file.
|
||||
|
||||
### [bltouch]
|
||||
|
||||
@@ -262,13 +264,14 @@ The following commands are available when the
|
||||
is enabled (also see the [delta calibrate guide](Delta_Calibrate.md)).
|
||||
|
||||
#### DELTA_CALIBRATE
|
||||
`DELTA_CALIBRATE [METHOD=manual] [<probe_parameter>=<value>]`: This
|
||||
command will probe seven points on the bed and recommend updated
|
||||
endstop positions, tower angles, and radius. See the PROBE command for
|
||||
details on the optional probe parameters. If METHOD=manual is
|
||||
specified then the manual probing tool is activated - see the
|
||||
MANUAL_PROBE command above for details on the additional commands
|
||||
available while this tool is active.
|
||||
`DELTA_CALIBRATE [METHOD=manual] [HORIZONTAL_MOVE_Z=<value>]
|
||||
[<probe_parameter>=<value>]`: This command will probe seven points on the bed
|
||||
and recommend updated endstop positions, tower angles, and radius. See the
|
||||
PROBE command for details on the optional probe parameters. If METHOD=manual is
|
||||
specified then the manual probing tool is activated - see the MANUAL_PROBE
|
||||
command above for details on the additional commands available while this tool
|
||||
is active. The optional `HORIZONTAL_MOVE_Z` value overrides the
|
||||
`horizontal_move_z` option specified in the config file.
|
||||
|
||||
#### DELTA_ANALYZE
|
||||
`DELTA_ANALYZE`: This command is used during enhanced delta
|
||||
@@ -307,9 +310,33 @@ The following command is available when the
|
||||
enabled.
|
||||
|
||||
#### SET_DUAL_CARRIAGE
|
||||
`SET_DUAL_CARRIAGE CARRIAGE=[0|1]`: This command will set the active
|
||||
carriage. It is typically invoked from the activate_gcode and
|
||||
deactivate_gcode fields in a multiple extruder configuration.
|
||||
`SET_DUAL_CARRIAGE CARRIAGE=[0|1] [MODE=[PRIMARY|COPY|MIRROR]]`:
|
||||
This command will change the mode of the specified carriage.
|
||||
If no `MODE` is provided it defaults to `PRIMARY`. Setting the mode
|
||||
to `PRIMARY` deactivates the other carriage and makes the specified
|
||||
carriage execute subsequent G-Code commands as-is. `COPY` and `MIRROR`
|
||||
modes are supported only for `CARRIAGE=1`. When set to either of these
|
||||
modes, carriage 1 will then track the subsequent moves of the carriage 0
|
||||
and either copy relative movements of it (in `COPY` mode) or execute them
|
||||
in the opposite (mirror) direction (in `MIRROR` mode).
|
||||
|
||||
#### SAVE_DUAL_CARRIAGE_STATE
|
||||
`SAVE_DUAL_CARRIAGE_STATE [NAME=<state_name>]`: Save the current positions
|
||||
of the dual carriages and their modes. Saving and restoring DUAL_CARRIAGE
|
||||
state can be useful in scripts and macros, as well as in homing routine
|
||||
overrides. If NAME is provided it allows one to name the saved state
|
||||
to the given string. If NAME is not provided it defaults to "default".
|
||||
|
||||
#### RESTORE_DUAL_CARRIAGE_STATE
|
||||
`RESTORE_DUAL_CARRIAGE_STATE [NAME=<state_name>] [MOVE=[0|1] [MOVE_SPEED=<speed>]]`:
|
||||
Restore the previously saved positions of the dual carriages and their modes,
|
||||
unless "MOVE=0" is specified, in which case only the saved modes will be
|
||||
restored, but not the positions of the carriages. If positions are being
|
||||
restored and "MOVE_SPEED" is specified, then the toolhead moves will be
|
||||
performed with the given speed (in mm/s); otherwise the toolhead move will
|
||||
use the rail homing speed. Note that the carriages restore their positions
|
||||
only over their own axis, which may be necessary to correctly restore COPY
|
||||
and MIRROR mode of the dual carraige.
|
||||
|
||||
### [endstop_phase]
|
||||
|
||||
@@ -549,8 +576,9 @@ clears any error state from the micro-controller.
|
||||
The following standard G-Code commands are available if a
|
||||
[gcode_arcs config section](Config_Reference.md#gcode_arcs) is
|
||||
enabled:
|
||||
- Controlled Arc Move (G2 or G3): `G2 [X<pos>] [Y<pos>] [Z<pos>]
|
||||
[E<pos>] [F<speed>] I<value> J<value>`
|
||||
- Arc Move Clockwise (G2), Arc Move Counter-clockwise (G3): `G2|G3 [X<pos>] [Y<pos>] [Z<pos>]
|
||||
[E<pos>] [F<speed>] I<value> J<value>|I<value> K<value>|J<value> K<value>`
|
||||
- Arc Plane Select: G17 (XY plane), G18 (XZ plane), G19 (YZ plane)
|
||||
|
||||
### [gcode_macro]
|
||||
|
||||
@@ -746,6 +774,20 @@ scheduled to run after the stepper move completes, however if a manual
|
||||
stepper move uses SYNC=0 then future G-Code movement commands may run
|
||||
in parallel with the stepper movement.
|
||||
|
||||
### [mcp4018]
|
||||
|
||||
The following command is available when a
|
||||
[mcp4018 config section](Config_Reference.md#mcp4018) is
|
||||
enabled.
|
||||
|
||||
#### SET_DIGIPOT
|
||||
|
||||
`SET_DIGIPOT DIGIPOT=config_name WIPER=<value>`: This command will
|
||||
change the current value of the digipot. This value should typically
|
||||
be between 0.0 and 1.0, unless a 'scale' is defined in the config.
|
||||
When 'scale' is defined, then this value should be between 0.0 and
|
||||
'scale'.
|
||||
|
||||
### [led]
|
||||
|
||||
The following command is available when any of the
|
||||
@@ -792,13 +834,22 @@ commands to manage the LED's color settings).
|
||||
### [output_pin]
|
||||
|
||||
The following command is available when an
|
||||
[output_pin config section](Config_Reference.md#output_pin) is
|
||||
[output_pin config section](Config_Reference.md#output_pin) or
|
||||
[pwm_tool config section](Config_Reference.md#pwm_tool) is
|
||||
enabled.
|
||||
|
||||
#### SET_PIN
|
||||
`SET_PIN PIN=config_name VALUE=<value> CYCLE_TIME=<cycle_time>`:
|
||||
Note - hardware PWM does not currently support the CYCLE_TIME
|
||||
parameter and will use the cycle time defined in the config.
|
||||
`SET_PIN PIN=config_name VALUE=<value> [CYCLE_TIME=<cycle_time>]`: Set
|
||||
the pin to the given output `VALUE`. VALUE should be 0 or 1 for
|
||||
"digital" output pins. For PWM pins, set to a value between 0.0 and
|
||||
1.0, or between 0.0 and `scale` if a scale is configured in the
|
||||
output_pin config section.
|
||||
|
||||
Some pins (currently only "soft PWM" pins) support setting an explicit
|
||||
cycle time using the CYCLE_TIME parameter (specified in seconds). Note
|
||||
that the CYCLE_TIME parameter is not stored between SET_PIN commands
|
||||
(any SET_PIN command without an explicit CYCLE_TIME parameter will use
|
||||
the `cycle_time` specified in the output_pin config section).
|
||||
|
||||
### [palette2]
|
||||
|
||||
@@ -874,6 +925,18 @@ the paused state is fresh for each print.
|
||||
#### CANCEL_PRINT
|
||||
`CANCEL_PRINT`: Cancels the current print.
|
||||
|
||||
### [print_stats]
|
||||
|
||||
The print_stats module is automatically loaded.
|
||||
|
||||
#### SET_PRINT_STATS_INFO
|
||||
`SET_PRINT_STATS_INFO [TOTAL_LAYER=<total_layer_count>] [CURRENT_LAYER=
|
||||
<current_layer>]`: Pass slicer info like layer act and total to Klipper.
|
||||
Add `SET_PRINT_STATS_INFO [TOTAL_LAYER=<total_layer_count>]` to your
|
||||
slicer start gcode section and `SET_PRINT_STATS_INFO [CURRENT_LAYER=
|
||||
<current_layer>]` at the layer change gcode section to pass layer
|
||||
information from your slicer to Klipper.
|
||||
|
||||
### [probe]
|
||||
|
||||
The following commands are available when a
|
||||
@@ -980,7 +1043,7 @@ frequency response is calculated (across all probe points) and written into
|
||||
|
||||
#### SHAPER_CALIBRATE
|
||||
`SHAPER_CALIBRATE [AXIS=<axis>] [NAME=<name>] [FREQ_START=<min_freq>]
|
||||
[FREQ_END=<max_freq>] [HZ_PER_SEC=<hz_per_sec>]
|
||||
[FREQ_END=<max_freq>] [HZ_PER_SEC=<hz_per_sec>] [CHIPS=<adxl345_chip_name>]
|
||||
[MAX_SMOOTHING=<max_smoothing>]`: Similarly to `TEST_RESONANCES`, runs
|
||||
the resonance test as configured, and tries to find the optimal
|
||||
parameters for the input shaper for the requested axis (or both X and
|
||||
@@ -994,7 +1057,9 @@ frequency responses and the different input shapers values are written
|
||||
to a CSV file(s) `/tmp/calibration_data_<axis>_<name>.csv`. Unless
|
||||
specified, NAME defaults to the current time in "YYYYMMDD_HHMMSS"
|
||||
format. Note that the suggested input shaper parameters can be
|
||||
persisted in the config by issuing `SAVE_CONFIG` command.
|
||||
persisted in the config by issuing `SAVE_CONFIG` command, and if
|
||||
`[input_shaper]` was already enabled previously, these parameters
|
||||
take effect immediately.
|
||||
|
||||
### [respond]
|
||||
|
||||
@@ -1043,16 +1108,17 @@ is enabled (also see the
|
||||
|
||||
#### SCREWS_TILT_CALCULATE
|
||||
`SCREWS_TILT_CALCULATE [DIRECTION=CW|CCW] [MAX_DEVIATION=<value>]
|
||||
[<probe_parameter>=<value>]`: This command will invoke the bed screws
|
||||
adjustment tool. It will command the nozzle to different locations (as
|
||||
defined in the config file) probing the z height and calculate the
|
||||
number of knob turns to adjust the bed level. If DIRECTION is
|
||||
specified, the knob turns will all be in the same direction, clockwise
|
||||
(CW) or counterclockwise (CCW). See the PROBE command for details on
|
||||
the optional probe parameters. IMPORTANT: You MUST always do a G28
|
||||
before using this command. If MAX_DEVIATION is specified, the command
|
||||
will raise a gcode error if any difference in the screw height
|
||||
relative to the base screw height is greater than the value provided.
|
||||
[HORIZONTAL_MOVE_Z=<value>] [<probe_parameter>=<value>]`: This command will
|
||||
invoke the bed screws adjustment tool. It will command the nozzle to different
|
||||
locations (as defined in the config file) probing the z height and calculate
|
||||
the number of knob turns to adjust the bed level. If DIRECTION is specified,
|
||||
the knob turns will all be in the same direction, clockwise (CW) or
|
||||
counterclockwise (CCW). See the PROBE command for details on the optional probe
|
||||
parameters. IMPORTANT: You MUST always do a G28 before using this command. If
|
||||
MAX_DEVIATION is specified, the command will raise a gcode error if any
|
||||
difference in the screw height relative to the base screw height is greater
|
||||
than the value provided. The optional `HORIZONTAL_MOVE_Z` value overrides the
|
||||
`horizontal_move_z` option specified in the config file.
|
||||
|
||||
### [sdcard_loop]
|
||||
|
||||
@@ -1180,8 +1246,9 @@ The following commands are available when any of the
|
||||
are enabled.
|
||||
|
||||
#### DUMP_TMC
|
||||
`DUMP_TMC STEPPER=<name>`: This command will read the TMC driver
|
||||
registers and report their values.
|
||||
`DUMP_TMC STEPPER=<name> [REGISTER=<name>]`: This command will read all TMC
|
||||
driver registers and report their values. If a REGISTER is provided, only
|
||||
the specified register will be dumped.
|
||||
|
||||
#### INIT_TMC
|
||||
`INIT_TMC STEPPER=<name>`: This command will initialize the TMC
|
||||
@@ -1191,16 +1258,22 @@ turned off then back on.
|
||||
#### SET_TMC_CURRENT
|
||||
`SET_TMC_CURRENT STEPPER=<name> CURRENT=<amps> HOLDCURRENT=<amps>`:
|
||||
This will adjust the run and hold currents of the TMC driver.
|
||||
(HOLDCURRENT is not applicable to tmc2660 drivers.)
|
||||
`HOLDCURRENT` is not applicable to tmc2660 drivers.
|
||||
When used on a driver which has the `globalscaler` field (tmc5160 and tmc2240),
|
||||
if StealthChop2 is used, the stepper must be held at standstill for >130ms so
|
||||
that the driver executes the AT#1 calibration.
|
||||
|
||||
#### SET_TMC_FIELD
|
||||
`SET_TMC_FIELD STEPPER=<name> FIELD=<field> VALUE=<value>`: This will
|
||||
alter the value of the specified register field of the TMC driver.
|
||||
`SET_TMC_FIELD STEPPER=<name> FIELD=<field> VALUE=<value> VELOCITY=<value>`:
|
||||
This will alter the value of the specified register field of the TMC driver.
|
||||
This command is intended for low-level diagnostics and debugging only
|
||||
because changing the fields during run-time can lead to undesired and
|
||||
potentially dangerous behavior of your printer. Permanent changes
|
||||
should be made using the printer configuration file instead. No sanity
|
||||
checks are performed for the given values.
|
||||
A VELOCITY can also be specified instead of a VALUE. This velocity is
|
||||
converted to the 20bit TSTEP based value representation. Only use the VELOCITY
|
||||
argument for fields that represent velocities.
|
||||
|
||||
### [toolhead]
|
||||
|
||||
@@ -1208,8 +1281,11 @@ The toolhead module is automatically loaded.
|
||||
|
||||
#### SET_VELOCITY_LIMIT
|
||||
`SET_VELOCITY_LIMIT [VELOCITY=<value>] [ACCEL=<value>]
|
||||
[ACCEL_TO_DECEL=<value>] [SQUARE_CORNER_VELOCITY=<value>]`: Modify the
|
||||
printer's velocity limits.
|
||||
[ACCEL_TO_DECEL=<value>] [SQUARE_CORNER_VELOCITY=<value>]`: This
|
||||
command can alter the velocity limits that were specified in the
|
||||
printer config file. See the
|
||||
[printer config section](Config_Reference.md#printer) for a
|
||||
description of each parameter.
|
||||
|
||||
### [tuning_tower]
|
||||
|
||||
@@ -1267,13 +1343,43 @@ print.
|
||||
#### SDCARD_RESET_FILE
|
||||
`SDCARD_RESET_FILE`: Unload file and clear SD state.
|
||||
|
||||
### [axis_twist_compensation]
|
||||
|
||||
The following commands are available when the
|
||||
[axis_twist_compensation config
|
||||
section](Config_Reference.md#axis_twist_compensation) is enabled.
|
||||
|
||||
#### AXIS_TWIST_COMPENSATION_CALIBRATE
|
||||
`AXIS_TWIST_COMPENSATION_CALIBRATE [SAMPLE_COUNT=<value>]`: Initiates the X
|
||||
twist calibration wizard. `SAMPLE_COUNT` specifies the number of points along
|
||||
the X axis to calibrate at and defaults to 3.
|
||||
|
||||
### [z_thermal_adjust]
|
||||
|
||||
The following commands are available when the
|
||||
[z_thermal_adjust config section](Config_Reference.md#z_thermal_adjust)
|
||||
is enabled.
|
||||
|
||||
#### SET_Z_THERMAL_ADJUST
|
||||
`SET_Z_THERMAL_ADJUST [ENABLE=<0:1>] [TEMP_COEFF=<value>] [REF_TEMP=<value>]`:
|
||||
Enable or disable the Z thermal adjustment with `ENABLE`. Disabling does not
|
||||
remove any adjustment already applied, but will freeze the current adjustment
|
||||
value - this prevents potentially unsafe downward Z movement. Re-enabling can
|
||||
potentially cause upward tool movement as the adjustment is updated and applied.
|
||||
`TEMP_COEFF` allows run-time tuning of the adjustment temperature coefficient
|
||||
(i.e. the `TEMP_COEFF` config parameter). `TEMP_COEFF` values are not saved to
|
||||
the config. `REF_TEMP` manually overrides the reference temperature typically
|
||||
set during homing (for use in e.g. non-standard homing routines) - will be reset
|
||||
automatically upon homing.
|
||||
|
||||
### [z_tilt]
|
||||
|
||||
The following commands are available when the
|
||||
[z_tilt config section](Config_Reference.md#z_tilt) is enabled.
|
||||
|
||||
#### Z_TILT_ADJUST
|
||||
`Z_TILT_ADJUST [<probe_parameter>=<value>]`: This command will probe
|
||||
the points specified in the config and then make independent
|
||||
adjustments to each Z stepper to compensate for tilt. See the PROBE
|
||||
command for details on the optional probe parameters.
|
||||
`Z_TILT_ADJUST [HORIZONTAL_MOVE_Z=<value>] [<probe_parameter>=<value>]`: This
|
||||
command will probe the points specified in the config and then make independent
|
||||
adjustments to each Z stepper to compensate for tilt. See the PROBE command for
|
||||
details on the optional probe parameters. The optional `HORIZONTAL_MOVE_Z`
|
||||
value overrides the `horizontal_move_z` option specified in the config file.
|
||||
|
||||
Reference in New Issue
Block a user