2 basics of pr ogr amming – HEIDENHAIN CNC Pilot 4290 User Manual
Page 82

4 DIN PLUS
70
4.2 Basics of Pr
ogr
amming
4.2.6 NC Subprograms
Subprograms are used to program the contour or the machining
process.
In the subprograms, transfer parameters are available as variables.
You can fix the designation of the transfer parameter (see ”
4.16
Subprograms”).
In every subprogram, the variables #256 to #285 are available for
internal calculations.
Subprograms can be nested up to six times. This means that a
subprogram calls in a further subprogram, etc.
If a subprogram is to be executed repeatedly, enter the number of
times the subprogram is to be repeated in the parameter Q.
The CNC PILOT distinguishes between local and external
subprograms. Local subprograms and the NC main program are
stored in the same file. Local subprograms can only be called in from
their corresponding main programs. External subprograms are stored
in separate NC files and can be called in from any NC main program
or other NC subprograms.
Expert programs
The machine manufacturer usually provides subroutines, which are
tailored to the machine configuration, for complex processes such as
workpiece transfer for full-surface machining. (Example: workpiece
transfer for full-surface machining). Refer to the machine manual.
4.2.7 Template Control
”Templates” are predefined NC code blocks integrated in the NC
program.They reduce programming input and help standardize the
program format.
Templates are defined by the machine tool builder. Your machine tool
builder can tell you whether he offers templates and how they can be
used.
4.2.8 NC Program Interpretation
For variable programming and user communication, keep in mind that
the CNC PILOT interprets the complete NC program before it can be
run (see ”
3.5 Automatic Mode of Operation).
The CNC PILOT differentiates between:
■
#-variables are calculated during the interpretation of the NC
program.
■
V-variables are calculated at runtime, which means during the
execution of an NC block.
■
Input/output during NC program interpretation.
■
Input/output during NC program run.