Home › G-codes › Siemens 808D › L
L Subprogram call by name or L number
Siemens 808D G-code · Mill and lathe
Calls a subprogram by its name or by L with a number, then returns to the next block. P in the same block sets how many times it runs, up to 9999.
Format
NAME [P] or L123 [P]
Addresses
| Address | What it does |
|---|---|
NAME or L123 | Subprogram name. Leading zeros count, so L128 and L0128 are different. |
P | Number of passes, 1 to 9999 |
How it works
Non modal. The call needs a block of its own.
Example program
G54 G90 G0 X10 Y10 Z2 ; START OF PATTERN
L785 P3 ; RUN L785 THREE TIMES
LRAHMEN7 ; CALL SUBPROGRAM BY NAME
G0 Z100 ; RETRACT
…
L785 P3 ; RUN L785 THREE TIMES
LRAHMEN7 ; CALL SUBPROGRAM BY NAME
G0 Z100 ; RETRACT
…
The full 5-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- End the subprogram with M17, M2 or RET. RET keeps continuous path mode G64 running.
- Up to 8 program levels including the main program. Siemens cycles need up to 4 of them.
- Modal settings changed in the subprogram stay active after the return. The name LL6 is reserved for tool change.
Related codes
L on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Siemens 840D 828D | Subprogram call by name or L number |
Every G-code for Siemens 808D 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 L in the app All Siemens 808D G-codes