Home › M-codes › Mach3 Mach4 › M64
M64 Output on now, Mach4
Mach3 Mach4 M-code · Mill
Mach4 as documented by MachMotion. Turns a digital output on right away, not tied to motion.
Verify on your machine. This entry could not be fully checked against the maker manual. Check your machine manual before you run it.
Format
M64 P
Addresses
| Address | What it does |
|---|---|
P | Output number |
How it works
Non modal.
Example program
G0 G20 G90 G54 G17 G40 G49 G80 (SAFE START, INCH)
M64 P2 (OUTPUT 2 ON NOW)
G4 P1.0 (WAIT 1 SECOND)
M65 P2 (OUTPUT 2 OFF NOW)
M64 P2 (OUTPUT 2 ON NOW)
G4 P1.0 (WAIT 1 SECOND)
M65 P2 (OUTPUT 2 OFF NOW)
Example is in inch. Check offsets and clearances first.
Watch out for
- Not listed in the Newfangled Mach4 Mill guide. Check your build first.
Related codes
M64 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Haas NGC | Built in M code relay 4 off |
| Doosan (Fanuc) | Left spindle reverse & upper coolant on |
| LinuxCNC Tormach | Digital output on, immediate |
| Fadal | MP spindle probe active |
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 M64 in the app All Mach3 Mach4 M-codes