Home › M-codes › Haas NGC › M96
M96 Jump if no input / Jump if no signal
Haas NGC M-code · Mill, Lathe
On mills: Jump if no input
Jumps to line P if discrete input Q is off. Used to check sensors and switches.
Format
M96 P Q
Addresses
| Address | What it does |
|---|---|
P | Line number to jump to |
Q | Discrete input number to test |
How it works
Not modal. Acts once on the line where it is commanded.
Example program
G103 P1 (LIMIT LOOKAHEAD)
M96 P100 Q2 (IF INPUT 2 IS OFF GO TO N100)
G103 (REMOVE THE LIMIT)
M96 P100 Q2 (IF INPUT 2 IS OFF GO TO N100)
G103 (REMOVE THE LIMIT)
Example is in inch. Check offsets and clearances first.
Watch out for
- The P line number must be in the current program.
- Use G103 P1 so the input is tested at the right time.
On lathes: Jump if no signal
Tests a discrete input. If the input is 0, the program jumps to block P in the same program.
Format
M96 P Q
Addresses
| Address | What it does |
|---|---|
P | Block number to jump to |
Q | Discrete input number, 0 to 63 |
How it works
Non-modal.
Example program
N05 M96 P10 Q8 (IF INPUT 8 IS OFF GO TO N10)
M00 (INPUT ON, STOP)
N10 (CONTINUE HERE)
M00 (INPUT ON, STOP)
N10 (CONTINUE HERE)
Example is in inch. Check offsets and clearances first.
Watch out for
- The P block must be in the same program.
- Useful to wait for a door, clamp or accessory signal.
Related codes
M96 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Interrupt type macro enable |
| DMG Mori MAPPS (Fanuc) | Macro interrupt mode |
| Mazak (EIA) | User macro interruption, valid |
| Mitsubishi M70 M80 | Macro interrupt enable |
| Fadal | Roll cutter comp at corners |
Every M-code for Haas NGC 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 M96 in the app All Haas NGC M-codes