Home › M-codes › LinuxCNC Tormach › M99
M99 Fanuc style subprogram return
LinuxCNC Tormach M-code · Mill and lathe
Returns from a Fanuc style subprogram. Native LinuxCNC subroutines end with O-word ENDSUB or RETURN.
Verify on your machine. This entry could not be fully checked against the maker manual. Check your machine manual before you run it.
Format
M99
Addresses
| Address | What it does |
|---|---|
none | No words |
How it works
Non modal.
Example program
O100 SUB
G1 Z-0.1 F10
G0 Z0.1
O100 ENDSUB (NATIVE RETURN)
G1 Z-0.1 F10
G0 Z0.1
O100 ENDSUB (NATIVE RETURN)
Example is in inch. Check offsets and clearances first.
Watch out for
- Support depends on the LinuxCNC version. Test before use.
- Native return is O100 ENDSUB or O100 RETURN.
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 |
| Mach3 Mach4 | Subprogram return |
| Centroid CNC12 Acorn | Return from subprogram or macro |
| Hurco WinMax (NC) | Subprogram return |
| Fadal | End of subprogram, or line jump |
| Swiss (Citizen Star) | Subprogram return or program loop |
Every M-code for LinuxCNC Tormach 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 LinuxCNC Tormach M-codes