Home › M-codes › Mach3 Mach4 › M100
M100 User macro M codes
Mach3 Mach4 M-code · Mill
Any M code that is not built in runs a user macro. Mach3 runs the VB script file Mxx.m1s in the Macros folder. Mach4 runs the Lua file mxx.mcs in the profile Macros folder.
Verify on your machine. This entry could not be fully checked against the maker manual. Check your machine manual before you run it.
Format
M100 [P] [Q] [R]
Addresses
| Address | What it does |
|---|---|
M100 and up | Safe range for your own macros |
P Q R | Values the macro can read, if it is written to |
How it works
Depends on the macro.
Example program
G0 G20 G90 G54 G17 G40 G49 G80 (SAFE START, INCH)
T1 M6 (TOOL CHANGE)
G43 H1 Z1.0 (LENGTH OFFSET)
M100 (USER MACRO, FOR EXAMPLE DUST BOOT DOWN)
…
T1 M6 (TOOL CHANGE)
G43 H1 Z1.0 (LENGTH OFFSET)
M100 (USER MACRO, FOR EXAMPLE DUST BOOT DOWN)
…
The full 6-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Builders and screen sets often use low numbers. Pick M100 and up for your own macros to avoid a clash.
- Mach4 macros are per profile. Copy them when you make a new profile.
- Mach3 M6Start.m1s and M6End.m1s are macros too. Back up the Macros folder before an update.
Related codes
M100 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Doosan (Fanuc) | Milling spindle clamp |
| Mazak (EIA) | Workpiece measurement DIA start |
| LinuxCNC Tormach | User M codes M100 to M199 |
| Centroid CNC12 Acorn | Wait for PLC bit open or off |
Every M-code for Mach3 Mach4 in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.
Open M100 in the app All Mach3 Mach4 M-codes