Parametric subroutine call (LL / L V.E. or macro)

Instead of using fixed names, local and global subroutines can also be called by external variables or macros. This permits a parametrisable flow of the NC program.

External variables of the string or string array type (see also Section External variables (V.E.)). The maximum string length of local subroutines is 83 characters. It is also 83 characters for global subroutines but this includes an absolute or relative path name.

Macros must be defined by L or LL before they are used. The macro content has a maximum string length of 80 characters.

A local subroutine is called by

LL V.E. ... (Caution: Blank character between "LL" and V.E.... is mandatory).

or

LL "<Makroname>" (Caution: Blank character between "LL" and macro name is mandatory).

V.E. ...

Name of local subroutine parameterised by external variable

"<macro name>"

Name of local subroutine parameterisable by macro. If the macro is not defined, the <macro name> is treated as a normal local subroutine name.

A global subroutine is called by

LV.E. … or L V.E. …

or

L"<Makroname>" or L "<Makroname>"

V.E. ...

Name of the file in which this global subroutine is stored when the file is parametrised by an external variable.

"<macro name>"

Name of the file in which this
Subroutine is stored when the file is parametrised by macro. If the macro is not defined, the <macro name> is treated as a normal global subroutine name.

Programing Example

prg_example

Parametric subroutine call (LL / L V.E. or macro)

Call of subroutines by "string”-type external variables

;local subroutine

%L TASCHE

N10 .....

.

N99 M17

;Main program

%MAIN

N100 .....

N105 .....

;Call of local subroutine by ext. Variable V.E.LUP,

;which contains the string TASCHE

N110 LL V.E.LUP

.

;(Call of global subroutine via ext. Variable V.E.GUP,

;which contains the string of a file name

N200 L V.E.GUP

N300 M30

Programing Example

prg_example

Parametric subroutine call (LL / L V.E. or macro)

Call of subroutines by macros

;local subroutine 1

%L TASCHE_1

N10 .....

.

N99 M17

;local subroutine 2

%L TASCHE_2

N10 .....

.

N99 M17

;local subroutine 3

%L TASCHE_3

N10 .....

.

N99 M17

;Main program

%MAIN

;Macro definitions

N10 "LUP_1" = "TASCHE_1"

N20 "LUP_2" = "TASCHE_2"

N30 "LUP_3" = "TASCHE_3"

N40 "GUP_1" = "gup_1.nc"

N50 "GUP_2" = "D:\prog\ini_1.nc"

N100 .....

;Call of local subroutines by macros,

;which contain the strings TASCHE_1, TASCHE_2,

;TASCHE_3

N110 LL "LUP_1"

N120 LL "LUP_2"

N130 LL "LUP_3"

N200 .....

;Call of global subroutines by macros

;which contain file name strings

N210 L "GUP_1"

N220 L "GUP_2"

N300 M30