Heidenhain M Codes

Heidenhain M Codes ( Miscellaneous functions) for Heidenhain TNC 640/530/410/426/430/320

Heidenhain TNC 320

Heidenhain TNC 320

Heidenhain M Codes

M CodeDescription
M0Stop program run (Spindle STOP, Coolant OFF)
M1Optional program STOP (Spindle STOP, Coolant OFF)
M2Stop program run (Spindle STOP,Coolant OFF,Go to block 1,Clear the status display(depending on machine parameter))
M3Spindle ON clockwise
M4Spindle ON counterclockwise
M5Spindle STOP
M6Tool change (STOP program run (depending on machine parameter),Spindle STOP)
M8Coolant ON
M9Coolant OFF
M13Spindle ON clockwise (Coolant ON)
M14Spindle ON counterclockwise (Coolant ON)
M30Same as M2
M89Vacant miscellaneous function or Cycle call, modally effective (depending on machine parameter)
M91Within the positioning block: Coordinates are referenced to machine datum
M92Within the positioning block: Coordinates are referenced to position defined by machine tool builder, such as tool change position
M94Reduce the rotary axis display to a value below 360°
M97Machine small contour steps
M98Machine open contours completely
M99Blockwise cycle call (Cycle call, NON-MODAL)
M101Automatic tool change with replacement tool if maximum tool life has expired
M102Reset M101
M103Reduce feed rate during plunging to factor F (percentage)
M104Reactivate the datum as last defined
M105Machining with second kv factor
M106Machining with first kv factor
M107Suppress error message for replacement tools with oversize
M108Reset M107
M109Constant contouring speed at tool cutting edge (increase and decrease feed rate)
M110Constant contouring speed at tool cutting edge (feed rate decrease only)
M111Reset M109/M110
M112Enter contour transition between two contour elements
M113Reset M112
M114Automatic compensation of machine geometry when working with tilted axes
M115Reset M114
M116Feed rate for rotary axes in mm/min
M117Reset M116
M118Superimpose handwheel positioning during program run
M120Pre-calculate radius-compensated contour (LOOK AHEAD)
M124Contour filter
M126Shortest-path traverse of rotary axes
M127Reset M126
M128Retain the position of the tool tip when positioning the tilted axes (TCPM)
M129Reset M128
M130Moving to position in an untilted coordinate system with a tilted working plane
M134Exact stop at nontangential contour transitions when positioning with rotary axes
M135Reset M134
M136Feed rate F in millimeters per spindle revolution
M137Reset M136
M138Selection of tilted axes
M140Retraction from the contour in the tool-axis direction
M141Suppress touch probe monitoring
M142Delete modal program information
M143Delete basic rotation
M144Compensating the machine’s kinematics configuration for ACTUAL/NOMINAL positions at end of block
M145Reset M144
M148Retract the tool automatically from the contour at NC stop
M149Reset M148
M150Suppress limit switch message
M200Laser cutting: Output programmed voltage directly
M201Laser cutting: Output voltage as a function of distance
M202Laser cutting: Output voltage as a function of speed
M203Laser cutting: Output voltage as a function of time (ramp)
M204Laser cutting: Output voltage as a function of time (pulse)