CNC Machinist Calculator Ultra

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

AddressWhat it does
M126No addresses

How it works

Modal. Cancel with M127.

Example program

N40 M126 *
N50 G00 C+350 *
N60 C+10 *
N70 M127 *

Example is in inch. Check offsets and clearances first.

Watch out for

Related codes

M127 · M94

M126 on other controls

The same number can mean something different on another control.

ControlMeaning
Haas NGCBuilt in M code relay 6 with M-Fin
Doosan (Fanuc)Synchro control cancel
DMG Mori MAPPS (Fanuc)External output
Centroid CNC12 AcornProtected 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

App Store Google Play