Home › M-codes › Centroid CNC12 Acorn › M99
M99 Return from subprogram or macro
Centroid CNC12 Acorn M-code · Mill and lathe
Ends a subprogram or macro and goes back to the calling program. It runs last on its line. In the main program it ends the job.
Format
M99
Addresses
| Address | What it does |
|---|---|
none | No words |
How it works
One shot.
Example program
O9101 ; SUBPROGRAM START
G91 G81 X0 Y0 R-.4 Z-.6 F10. ; DRILL
Y1.5 ; NEXT HOLE
G80 G90 ; CANCEL, ABSOLUTE
…
G91 G81 X0 Y0 R-.4 Z-.6 F10. ; DRILL
Y1.5 ; NEXT HOLE
G80 G90 ; CANCEL, ABSOLUTE
…
The full 5-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- If a subprogram file has no M99, the end of file acts as M99.
Machine builders set many M codes, and they change by model and options. Check the M code list for your machine.
Related codes
M99 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Subprogram end and return |
| Haas NGC | Subprogram return or loop |
| Doosan (Fanuc) | End of sub program |
| DMG Mori MAPPS (Fanuc) | Sub-program end Repeat program |
| Mazak (EIA) | EIA → EIA Return to main EIA program |
| Okuma OSP | Subprogram return (Lathes & Mills) |
| Mitsubishi M70 M80 | Subprogram end and return |
| Brother Speedio | Subprogram end |
| Heidenhain TNC (ISO) | Cycle call in a positioning block |
| LinuxCNC Tormach | Fanuc style subprogram return |
| Mach3 Mach4 | Subprogram return |
| Hurco WinMax (NC) | Subprogram return |
| Fadal | End of subprogram, or line jump |
| Swiss (Citizen Star) | Subprogram return or program loop |
Every M-code for Centroid CNC12 Acorn 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 M99 in the app All Centroid CNC12 Acorn M-codes