M17 End of subroutine, Format 1
Fadal M-code · Mill
Ends a Format 1 L word subroutine and returns to the line after the call. It must be alone on its line.
Format
M17
How it works
Non modal.
Example program
N1 L100 (START OF SUBROUTINE 1)
N2 G81 G99 R0+.1 Z-.5 F10. (DRILL)
N3 G80
N4 M17 (END OF SUBROUTINE 1)
…
N2 G81 G99 R0+.1 Z-.5 F10. (DRILL)
N3 G80
N4 M17 (END OF SUBROUTINE 1)
…
The full 10-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- A sub starts with L0100 or L100 for sub 1. Call it with L NN KK, sub number then repeats. L101 runs sub 1 once.
- After the last M17 put M30 to end the subroutine section. The main program follows.
Related codes
M17 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Haas NGC | Pallet unclamp and open APC door |
| Doosan (Fanuc) | Machine lock act |
| Mazak (EIA) | Spindle orientation 120° (for AJC) |
| Okuma OSP | CEJ MATIC : Request of Data transfer |
| Siemens 840D 828D | End of subprogram |
| Centroid CNC12 Acorn | Prepare for tool change, macro |
| Hurco WinMax (NC) | Automatic buffering off |
Every M-code for Fadal 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 M17 in the app All Fadal M-codes