Home › M-codes › Heidenhain TNC (ISO) › M126
M126 Shortest path for rotary axes
Heidenhain TNC (ISO) M-code · Mill
Moves rotary axes the shortest way to the target angle. Reset with M127.
Format
M126
Addresses
| Address | What it does |
|---|---|
M126 | No addresses |
How it works
Modal. Cancel with M127.
Example program
N40 M126 *
N50 G00 C+350 *
N60 C+10 *
N70 M127 *
N50 G00 C+350 *
N60 C+10 *
N70 M127 *
Example is in inch. Check offsets and clearances first.
Watch out for
- Works only on axes with display mod 360.
Related codes
M126 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Haas NGC | Built in M code relay 6 with M-Fin |
| Doosan (Fanuc) | Synchro control cancel |
| DMG Mori MAPPS (Fanuc) | External output |
| Centroid CNC12 Acorn | Protected probe move plus, no contact expected |
| Hurco WinMax (NC) | Shortest rotary path on |
Every M-code for Heidenhain TNC (ISO) 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 M126 in the app All Heidenhain TNC M-codes