# Mach3 and Mach4

For Mach3 and Mach4. Both read the same file.

## What the file looks like

The file starts with comments naming the project, the machine and the tools, then:

```
G21 G90 G17 G94 G54
```

Millimetres are `G21`; a profile that outputs inches writes `G20` instead. The spindle starts with
`M3 S{rpm}` followed by a dwell (`G4 P` seconds) for the spin-up time in your profile, unless spindle
control is set to none. Cutting moves are straight lines only — `G0` for rapids and `G1` for cuts,
never arcs — and every line is 80 characters or fewer.

The file ends with:

```
G0 Z{safe}
M5
M30
```

## Tool changes

- **One file per tool** works: run the files in order and change the tool between them.
- **M6 and pause** writes `T{n} M6` then `M0`; Mach runs its own M6 macro first.
- **M6 with G43** writes `T{n} M6` and `G43 H{h}`, where `h` is the tool's length offset number, from Mach's tool table.

## Before the first run

Mach's dwell is in seconds by default, which is what the file assumes. If you have changed Mach to
milliseconds, change it back or the spin-up dwell will be a thousand times too short.

Set X and Y zero at the front-left corner of the piece and Z zero on the top of the stock, and run
the first file with the tool well above the work and a hand on the feed hold.
