M198 Subprogram call from external device
Fanuc M-code · Mill and lathe
Calls a subprogram stored on the memory card, USB, data server or other external device instead of control memory.
Format
M198 P [L]
Addresses
| Address | What it does |
|---|---|
P | File number or program number on the external device |
L | Repeat count |
How it works
Non-modal.
Example program
G00 X3. Z1. (CLEAR)
M198 P1234 (RUN O1234 FROM MEMORY CARD)
G28 U0 W0 (HOME)
M198 P1234 (RUN O1234 FROM MEMORY CARD)
G28 U0 W0 (HOME)
Example is in inch. Check offsets and clearances first.
Watch out for
- The device to read from is set by parameter and I O channel setting.
- A program running from an external device usually cannot call another external program.
Related codes
M198 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| DMG Mori MAPPS (Fanuc) | Subprogram call in external I or O device |
| Mazak (EIA) | EIA → MAZATROL program call |
| Mitsubishi M70 M80 | Subprogram call from external device |
Every M-code for Fanuc 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 M198 in the app All Fanuc M-codes