Nesting Of Subprograms - Siemens SINUMERIK 840D sl Programming Manual

Job planning
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Flexible NC programming
1.24 Subprogram technique
Program name expansion
The program name assigned when the program is created is expanded within the control
with the addition of a prefix and a suffix.
● Prefix: _N_
● Suffix:
Using the program name
When using the program name, e.g. in the context of a subprogram call, all combinations of
prefix, program name, and suffix are possible.
Example:
The subprogram with the program name "SUB_PROG" can be started using the following
calls:
1.
2.
3.
4.
Note
Main programs and subprograms with the same name
If there are main programs (.MPF) and subprograms (.SPF) with the same program name,
when the program name is used in the part program, the relevant suffix must be specified in
order that the program can be uniquely identified.
1.24.1.3

Nesting of subprograms

A main program can call subprograms which in turn call more subprograms. As such, the
sequences of the programs are nested within each other. Each program runs on a dedicated
program level.
Nesting depth
The NC language currently provides 16 program levels. The main program always runs at
the uppermost program level, 0. A subprogram always runs at the next lowest program level
following the call. Program level 1 is, therefore, the first subprogram level.
156
– Main programs: _MPF
– Subprograms: _SPF
SUB_PROG
_N_SUB_PROG
SUB_PROG_SPF
_N_SUB_PROG_SPF
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
Job Planning

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents