CNC Machinist Calculator Ultra

Home › G-codes › Siemens 840D 828D › L

L Subprogram call by name or L number

Siemens 840D 828D G-code · Mill and lathe

Runs a subprogram, then returns to the next block. The subprogram is called by its name or by L with a number. P sets how many times it runs.

Format

NAME [P] or L123 [P]

Addresses

AddressWhat it does
NAME or L123Subprogram name. Leading zeros count, so L007 and L7 are different.
PNumber of passes, 1 if not written

How it works

Non modal. Write the call in a block of its own.

Example program

G0 X10 Y10 Z2 ; START OF PATTERN
L10 P3 ; RUN L10 THREE TIMES
POCKET_A ; CALL SUBPROGRAM BY NAME
M30

Example is in inch. Check offsets and clearances first.

Watch out for

Related codes

M17 · MCALL · REPEAT

Every G-code for Siemens 840D 828D 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 840D 828D G-codes

App Store Google Play