Skip to content

Commit 3d88f8d

Browse files
committed
📝 Update G60 / G61
MarlinFirmware/Marlin#27281
1 parent 37725c4 commit 3d88f8d

File tree

3 files changed

+105
-23
lines changed

3 files changed

+105
-23
lines changed

_gcode/G060.md

+77-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
22
tag: g060
3-
title: Save Current Position
4-
brief: Save current position to specified slot
3+
title: Stored Positions
4+
brief: Save, restore, and delete stored positions
55
author: shitcreek
66
contrib: Hans007a, TwoRedCells, thinkyhead
7+
8+
group: motion
9+
requires: SAVED_POSITIONS
710
codes: [ G60 ]
811
related: [ G61 ]
912

10-
group: coordinates
11-
1213
parameters:
1314
- tag: S
1415
optional: true
@@ -17,14 +18,83 @@ parameters:
1718
- tag: slot
1819
type: int
1920

21+
- tag: D
22+
since: 2.1.3
23+
optional: true
24+
description: Delete stored position(s). Include a slot index to delete one stored position. If no slot number is given, delete all stored positions.
25+
values:
26+
- tag: slot
27+
type: int
28+
optional: true
29+
30+
- tag: Q
31+
since: 2.1.3
32+
optional: true
33+
description: Restore (move to) a stored position. Equivalent to `G61 S`.
34+
values:
35+
- tag: slot
36+
type: int
37+
38+
- tag: F
39+
since: 2.1.3
40+
optional: true
41+
description: 'With `G60 Q`: Requested feedrate. (Actual feedrate may be limited.)'
42+
values:
43+
- tag: rate
44+
type: float
45+
46+
- tag: X
47+
since: 2.1.3
48+
optional: true
49+
description: 'With `G60 Q`: Restore the X axis (with optional offset).'
50+
values:
51+
- type: offset
52+
optional: true
53+
54+
- tag: Y
55+
since: 2.1.3
56+
optional: true
57+
description: 'With `G60 Q`: Restore the Y axis (with optional offset).'
58+
values:
59+
- type: offset
60+
optional: true
61+
62+
- tag: Z
63+
since: 2.1.3
64+
optional: true
65+
description: 'With `G60 Q`: Restore the Z axis (with optional offset).'
66+
values:
67+
- type: offset
68+
optional: true
69+
70+
- tag: E
71+
since: 2.1.3
72+
optional: true
73+
description: 'With `G60 Q`: Restore the E axis (with optional offset). The extruder will not be moved.'
74+
values:
75+
- type: offset
76+
optional: true
77+
2078
notes:
2179
- The total number of slots is configured with the `SAVED_POSITIONS` option.
22-
- All slots are initially set to 0, 0, 0.
80+
- All slots are initially empty. Restoring an empty slot does nothing.
2381

24-
example:
82+
examples:
2583
- pre: Save current position to slot 0
2684
code: G60 S0
85+
- pre: Delete the position in slot 3
86+
code: G60 D3
87+
- pre: Restore the XYZE position in slot 5, with X offset
88+
code: G60 Q5 X10 Y Z E
89+
- pre: Report all stored positions
90+
code: G60
2791

2892
---
2993

30-
Save the current position of all axes in an SRAM buffer for later recall with [`G61`](/docs/gcode/G061.html).
94+
This command is used to maintain a set of stored positions. Use `G60 S<slot>` to store the current position (all axes) to an SRAM buffer. You can then move back to a stored position at any time with [`G61 S<slot>`](/docs/gcode/G061.html).
95+
96+
Since Marlin 2.1.3 you can use:
97+
- `G60` with no parameters for a stored positions report,
98+
- `G60 Q<slot>` to move back to a stored position,
99+
- `G60 D<slot>` to delete one stored position, and
100+
- `G60 D` to delete all stored positions.

_gcode/G061.md

+27-15
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ brief: Return to saved position of specified slot
55
author: shitcreek
66
contrib: Hans007a, thinkyhead
77

8-
group: coordinates
9-
8+
group: motion
9+
requires: SAVED_POSITIONS
1010
codes: [ G61 ]
1111
related: [ G60 ]
1212

1313
parameters:
1414

1515
- tag: F
1616
optional: true
17-
description: Move feedrate
17+
description: Requested feedrate. (Actual feedrate may be limited.)
1818
values:
1919
- tag: rate
2020
type: float
@@ -28,32 +28,44 @@ parameters:
2828

2929
- tag: X
3030
optional: true
31-
description: Flag to restore the X axis
31+
description: Restore the X axis (with optional offset).
3232
values:
33-
- type: flag
33+
- type: offset
34+
optional: true
3435

3536
- tag: Y
3637
optional: true
37-
description: Flag to restore the Y axis
38+
description: Restore the Y axis (with optional offset).
3839
values:
39-
- type: flag
40+
- type: offset
41+
optional: true
4042

4143
- tag: Z
4244
optional: true
43-
description: Flag to restore the Z axis
45+
description: Restore the Z axis (with optional offset).
4446
values:
45-
- type: flag
47+
- type: offset
48+
optional: true
4649

4750
- tag: E
4851
optional: true
49-
description: Flag to restore the E axis
52+
description: Restore the E axis (with optional offset). The extruder will not be moved.
5053
values:
51-
- type: flag
54+
- type: offset
55+
optional: true
56+
57+
examples:
58+
- pre: Move to the position in slot 2
59+
code: G61 S2
60+
- pre: Move to the XY position in slot 0
61+
code: G61 S0 XY
62+
- pre: Move to the XYZE position in slot 4, with Y offset by 50mm
63+
code: G61 S4 X Y50 Z E
5264

53-
example:
54-
- pre: Move to the XY coordinates stored in slot 0
55-
code: G61 XY S0
65+
notes:
66+
- Restoring an empty slot does nothing.
67+
- Since Marlin 2.1.3 the command `G61 S<slot>` is the same as [`G60 Q<slot>`](/docs/gcode/G060.html)
5668

5769
---
5870

59-
Use this command to move to a saved position. To limit the move to only some axes, include one or more axis letters. Otherwise all axes will be included.
71+
Use this command to move to (restore) a saved position. By default this will restore all axes. If you need to apply an offset to an axis or limit the move to only some axes, include one or more axis names. Apply an offset to an axis by including a distance after the axis letter (in current units).

_setting/extruder.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ settings:
1313
since: 1.0.0
1414
brief: Total number of extruders.
1515
long: The number of addressable extruder tools that can be selected with `T0`, `T1`, etc.
16-
options: [0, 1, 2, 3, 4, 5, 6, 7,8]
16+
options: [0, 1, 2, 3, 4, 5, 6, 7, 8]
1717
example:
1818
- value: 2
1919

0 commit comments

Comments
 (0)