Files
2026-09-05 13:39:34 +02:00

28 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# G-code (dieses Setup)
Befehle, die p5-wallplotter und Marlin Polargraph hier verwenden. Setup: [tutorial.md](tutorial.md). Hardware: [hardware.md](hardware.md).
| G-code | Funktion hier |
|--------|----------------|
| `G0` / `G1 X… Y… F…` | Fahren. `F` ist Vorschub in **mm/min** (nicht mm/s). Pen-up = Travel-Speed, Pen-down = Draw-Speed. |
| `G92 X0 Y0` | „Hier ist der Ursprung.“ Kein physikalisches Homing mit Endschaltern. |
| `G4 P…` | Pause in Millisekunden (`wp.wait()`). |
| `M17` | Motoren einschalten. |
| `M114` | Position melden (`X:… Y:…`). |
| `M280 P0 S…` | Servo 0 auf Winkel `S` Grad. Stift hoch/runter. |
| `M400` | Motion-Queue leeren: erst `ok`, wenn die letzte Bewegung fertig ist. Ohne das würde der Browser den nächsten Punkt schicken, während die Gondel noch fährt. |
| `M665` | Polargraph-Geometrie lesen/setzen: `L`/`R` X-Grenzen, `T`/`B` Y-Grenzen, `H` max. Riemenlänge, `S` Segmente/s. |
| `M906 X… Y…` | Motorstrom in mA (TMC). |
Protokoll: **eine Zeile, warten auf `ok`**. Die Library schickt nicht den ganzen Job auf einmal. Timeout ohne `ok` pausiert den Plot, damit **Resume** weitermachen kann.
Geschwindigkeiten in der Library (`setSpeed(travel, draw)`) landen als `F` auf `G1`. Bereich 1–10000 mm/min. Die Preview-Zeit im Test ist eine Schätzung aus Distanz und diesen Feeds; der echte Plot folgt Marlins Tempo plus `M400`.
Beispiel einer Fahrt mit Stift unten:
```gcode
M280 P0 S30 ; Servo 0 auf 30° → Stift aufs Papier
G1 X120 Y-40 F2500 ; Gerade zu (120, −40) mm mit 2500 mm/min
M400 ; warten, bis die Bewegung wirklich fertig ist
```