Switch the motors off when the designs are done or stopped

After the last design (or a Stop), the player sends $SLP (GRBL and FluidNC
sleep), so the motors stop holding and the table is quiet. The page shows
"Motors off"; the next design wakes the controller (reset + unlock) and homes
first, since the arm can be moved by hand while the motors are off. The jog
panel wakes it too. Setting: motion.motors_off_when_done (default true).

Checked on the real Uno: Idle -> $SLP -> Sleep -> reset -> Alarm -> $X -> Idle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ckochandClaude Opus 5.5 committed 2026-11-01 14:19:12 -05:00
1 parent 8967271e90
commit 7afe562124
10 files changed
+104 -10

No files matched your search

+6 -1
View File
@@ -24,6 +24,9 @@ This opens http://127.0.0.1:8765 in your browser. The table stays on the USB cab
- **STOP** at the top stops everything at once;
- the position is kept after a stop, so the next design starts without homing again.
- **Speed and "erase first":** these apply from the next design on, and reset when the program restarts. Lasting defaults go in `sandtable.toml`.
- **Motors off when done:** when the designs finish, or you press Stop, the motors switch off, so the table is quiet and they don't sit warm. The status then reads "Motors off".
- The arm can be turned by hand then, so the next design homes first.
- To keep them powered, set `motors_off_when_done = false` under `[motion]` in `sandtable.toml`.
- **Upload .thr / .svg:** adds your own designs. They go in `patterns/uploads/`.
- `.thr`: for example from [Sandify](https://sandify.org).
- `.svg`: a line drawing. Every line in it is joined into one path for the ball (see "Line drawings" below).
@@ -73,7 +76,8 @@ python3 -m sandtable erase # spiral-erase, bal
```
- **Homing:** each `play` homes rho first. The Uno restarts whenever the port is opened, so it doesn't remember where the carriage was.
- **Erasing:** before each pattern the ball spirals across the whole tray (7 mm apart) and finishes exactly where the pattern starts. Turn it off with `--no-erase`.
- **Pause and stop:** press Ctrl-C to pause (feed hold), then choose resume or stop. Stopping keeps the position.
- **Pause and stop:** press Ctrl-C to pause (feed hold), then choose resume or stop.
- **Motors off:** when `play` finishes or is stopped, it switches the motors off (`$SLP`), unless `motors_off_when_done = false`.
- **Home switch guard:** see the next section.
- **Preview first:** add `--dry-run --preview out.png` to see the pattern and its running time without moving anything; `--gcode out.gcode` also writes the G-code.
- **Other options:** `--rotate DEG` and `--mirror` change how a pattern is placed.
@@ -127,6 +131,7 @@ The ball can't lift, so a drawing's separate lines have to become one line. `san
| `machine.theta_offset_deg` | 0 | Turns every pattern |
| `motion.ball_speed_mm_s` | 25 | Drawing speed. Slower is crisper and quieter |
| `motion.max_theta_deg_s` | 60 | Arm spin limit, which also limits speed near the centre |
| `motion.motors_off_when_done` | true | Switch the motors off when the designs finish or are stopped; the next design homes first |
| `erase.pitch_mm`, `erase.speed_mm_s` | 7, 35 | Erase spiral spacing and speed |
All other defaults (steps, accelerations, homing speeds) are in `sandtable/config.py`.