The simulation config¶
A complete LinuxCNC configuration that runs on an ordinary laptop. No Mesa card, no machine, nothing that can move.
Its purpose is to build and prove the machine's I/O logic before the hardware exists, and to be somewhere to learn LinuxCNC safely.
Written, not yet run
Written 3 September 2026 without a LinuxCNC install to test against. Expect small errors — a component name, a pin name, a version difference. They are loud: LinuxCNC prints the offending line and refuses to start. Fix, rerun.
The numbering rule¶
LinuxCNC's digital I/O index is the machine's own IF.n / OF.n address.
motion.digital-out-29 is OF.29. motion.digital-in-25 is IF.25. So M64 P9 turns on the vertical drill block motor, and the wiring diagram, the symbolic map, the PLC source, the I/O map and the config all speak one set of numbers.
Never renumber. It costs nothing and removes a whole category of mistake.
What it demonstrates¶
The locating-stop interlock. Four stop outputs OR'd, inverted, through a delay, gating the spindle:
setp timedelay.0.on-delay 2.0 # wait before PERMITTING
setp timedelay.0.off-delay 0.0 # inhibit INSTANTLY
The asymmetry is the whole point and is the thing most easily got backwards. Slow to allow, immediate to stop.
The drill and saw outputs. Ten vertical drills individually selectable, three horizontal, and the saw — all plain digital outputs driven from G-code with M64 and M65 around ordinary moves. Nothing exotic; this is how woodworking retrofits are normally done.
Deliberately incomplete¶
| Why | |
|---|---|
| The ATC | The M6 remap is commented out. It needs the IF.21 question settled — the PLC calls it "change piston down", the connector schedule calls the same wire the spindle index sensor — and the strobe-versus-bit-1 correction applied |
| The drill block motor interlock | Left out on purpose, as the first exercise. Right now M64 P10 drops a drill whether or not the motor is running. Adding the interlock teaches more HAL than any amount of reading |
| Real velocities | The original figures are in the old controller's units and have not been converted. Irrelevant for I/O work |
| The safety chain | OF.1, the enable rail, the drive-OK relays and the Z brake stay hardwired. They are not, and must never be, software |
Related¶
What the control logic has to reproduce · The Mesa wiring schedule