Skip to content

Commit 34f4bd4

Browse files
committed
add G28/G29/M420
1 parent 269f622 commit 34f4bd4

3 files changed

Lines changed: 105 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Description
2+
DexArm supported TMC2209 StallGuard.
3+
4+
# Notes
5+
![avatar](DexArm's_Coordinate_System.png)
6+
Because of the particularity of dexarm, We have made some customization to the G28.
7+
- `G28` Go to X0 Y300 Z0. Similar to M1112. Based on the position sensor of 3 Axiss.
8+
- `G28 C` or `G28 Z` Home C Axis to the machine home position. Based on the stallguard of TMC2209.
9+
- `G28 B` or `G28 Y` Home B Axis to the machine home position. Based on the stallguard of TMC2209.
10+
- `G28 A` or `G28 X` Home A Axis to the machine home position. Based on the stallguard of TMC2209.
11+
- Home C/Z before Home AB/XY.
12+
13+
# Examples
14+
Modify some mesh points and view the new mesh:
15+
```
16+
> G28
17+
> G28 C
18+
> G28 B
19+
> G28 A
20+
```
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# G029 - Bed Leveling (Manual)
2+
3+
# Description
4+
Mesh Bed Leveling (MBL) allows interactively measuring a Z height mesh without a bed probe. The only tool required is a piece of paper or a feeler gauge. MBL uses the mesh to compensate for variations in height across the bed.
5+
6+
1. Use `G29 S0` to get the current status and mesh. If there’s an existing mesh, you can send M420 S1 to use it.
7+
2. Use `G29 S1` to move to the first point for Z adjustment.
8+
3. Adjust Z so a piece of paper can just pass under the nozzle.
9+
4. Use `G29 S2` to save the Z value and move to the next point.
10+
5. Repeat steps 3-4 until completed.
11+
6. Use [`M500`](/docs/gcode/M500.html) to save the mesh to EEPROM, if desired.
12+
13+
# Notes
14+
- Requires the `MESH_BED_LEVELING` option in `Configuration.h`.
15+
- "[`G28`](/docs/gcode/G028.html) disables bed leveling. Follow with `M420 S` to turn leveling on, or use `RESTORE_LEVELING_AFTER_G28` to automatically keep leveling on after [`G28`](/docs/gcode/G028.html)."
16+
17+
18+
# Usage
19+
`G29` `[I<index>]` `[J<index>]` `S<0|1|2|3|4|5>` `[X<count>]` `[Y<count>]` `[Z<linear>]`
20+
## Parameters
21+
- `[I<index>]` With S3, the (0…n-1) X index of the mesh value to modify.
22+
- `[J<index>]` With S3, the (0…n-1) Y index of the mesh value to modify.
23+
- `[S<0|1|2|3|4|5>]`
24+
- S0: Produce a mesh report (see examples below).
25+
- S1: Start probing mesh points.
26+
- S2: Probe the next mesh point.
27+
- S3: Manually modify a single point with X Y Z parameters. (See also M421.)
28+
- S4: Set a global Z offset. Positive values are away from the bed; negative values are closer.
29+
- S5: Reset and disable mesh.
30+
31+
# Examples
32+
S0 mesh report:
33+
```
34+
> G29 S0
35+
Num X,Y: 3,3
36+
Z offset: 0
37+
Measured points:
38+
0 1 2
39+
0 +0.011 -0.020 -0.026
40+
1 +0.017 +0.002 -0.019
41+
2 +0.022 -0.030 -0.013
42+
```
43+
Modify some mesh points and view the new mesh:
44+
```
45+
> G29 S3 I2 J2 Z0.042
46+
> G29 S3 I1 J1 Z-0.666
47+
> G29 S0
48+
3x3 mesh. Z offset: 0
49+
Measured points:
50+
0 1 2
51+
0 +0.011 -0.020 -0.026
52+
1 +0.017 -0.666 -0.019
53+
2 +0.022 -0.030 +0.042
54+
```
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# M420 - Bed Leveling State(Manual)
2+
3+
# Description
4+
Get and/or set bed leveling state. For mesh-based leveling systems use `Z` parameter to set the Z Fade Height.
5+
6+
# Notes
7+
- The "current position" may change in response to `M420 Sn`.
8+
9+
# Usage
10+
`M420` `[S<bool>]` `[V<bool>]` `[Z<linear>]`
11+
12+
## Parameters
13+
- `[S<bool>]` Set enabled or disabled. A valid mesh is required to enable bed leveling. If the mesh is invalid / incomplete leveling will not be enabled.
14+
- `[V<bool>]` Verbose: Print the stored mesh / matrix data
15+
- `[Z<linear>]` Set Z fade height (Requires ENABLE_LEVELING_FADE_HEIGHT)
16+
- With Fade enabled, bed leveling correction is gradually reduced as the nozzle gets closer to the Fade height. Above the Fade height no bed leveling compensation is applied at all, so movement is machine true.
17+
- Set to 0 to disable fade, and leveling compensation will be fully applied to all layers of the print.
18+
19+
# Examples
20+
Enable bed leveling:
21+
```
22+
M420 S1
23+
```
24+
Disable bed leveling:
25+
```
26+
M420 S0
27+
```
28+
Print the stored mesh / matrix data
29+
```
30+
M420 V
31+
```

0 commit comments

Comments
 (0)