HEIDENHAIN CNC Pilot 4290 Pilot User Manual
Page 94

94
Subprograms
Calling a subprogram:
L“12345678“ V1
Meaning:
nÿ
External subprograms are defined in a separate file. They can be
called from any main program, other subprograms, or from TURN
PLUS.
nÿ
Local subprograms are in the same file as the main program. They
can only be called from the main program.
nÿ
Subprograms can be ”nested” up to 6 times. Nesting means that
another subprogram is called from within a subprogram.
nÿ
Recursion should be avoided.
nÿ
You can add up to 20 „transfer values“ to a subprogram. The
designations (parameter designations) are:
LA..LF, LH, I, J, K, O, P, R, S, U, W, X, Y, Z.
The transfer values are available as variables within the subprogram.
The identification code is: „#__..“, followed by the parameter
designation in lower-case letters (for example: #__la).
You can use the transfer values when programming with variables
within the subprogram.
nÿ
The variables #256..#285 are available in every subprogram as local
variables.
nÿ
If a subprogram is to be executed repeatedly, enter the number of
times the subprogram is to be repeated in the parameter ”number
repeats Q.”
nÿ
A subprogram ends with RETURN.
Subpr
ogr
ams
The parameter ”LN” is reserved for the
transfer of block numbers. This parameter
may receive a new value when the NC pro-
gram is renumbered.