Home › M-codes › Mach3 Mach4 › M62
M62 Output on with motion, Mach4
Mach3 Mach4 M-code · Mill
Mach4 as documented by MachMotion. Turns a digital output on in sync with the next motion command.
Verify on your machine. This entry could not be fully checked against the maker manual. Check your machine manual before you run it.
Format
M62 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)
G0 X0 Y0 Z0.1 (START)
M62 P1 (OUTPUT 1 ON AT NEXT MOVE)
G1 X2.0 F50.0 (OUTPUT TURNS ON HERE)
…
G0 X0 Y0 Z0.1 (START)
M62 P1 (OUTPUT 1 ON AT NEXT MOVE)
G1 X2.0 F50.0 (OUTPUT TURNS ON HERE)
…
The full 6-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Not listed in the Newfangled Mach4 Mill guide. Check your build and motion plugin before you use it.
- Mach3 has no M62.
Related codes
M62 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Haas NGC | Built in M code relay 2 off |
| Doosan (Fanuc) | Left spindle winding change high speed |
| LinuxCNC Tormach | Digital output on, synced with motion |
| Fadal | B axis brake on |
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 M62 in the app All Mach3 Mach4 M-codes