M-code reference

M96 M-Code: Jump if Input Is Zero (Haas)

Jump if Input Is Zero (Haas) — Haas: jumps to block P if discrete input Q is 0. Used for simple sensor logic without macros, for example checking a part-present switch.

By cnccode · Updated
PropertyValue
CodeM96
FunctionJump if Input Is Zero (Haas)
Used onMills and lathes

What does M96 do?

Haas: jumps to block P if discrete input Q is 0. Used for simple sensor logic without macros, for example checking a part-present switch.

M96 example

Example
M96 P100 Q8
(…)
N100 M00 (NO PART)

Tips

  • Macros give more flexible logic with IF/GOTO.

M-codes vary between machine builders. Codes from M00 to M09, M30 and M98/M99 are nearly universal; most others are defined by the machine builder. Always check the M-code list in your machine manual.

Most-used M-codes

CodeFunction
M00Program Stop
M01Optional Stop
M03Spindle On Clockwise
M04Spindle On Counter-Clockwise
M05Spindle Stop
M06Tool Change
M08Flood Coolant On
M09Coolant Off
M30Program End and Rewind
M98Subprogram Call
M99Subprogram Return / Loop

Frequently asked questions

What does M96 mean on a CNC machine?
M96 is Jump if Input Is Zero (Haas). Haas: jumps to block P if discrete input Q is 0. Used for simple sensor logic without macros, for example checking a part-present switch.