Macro Technique (Define - Siemens SINUMERIK 840D sl Programming Manual

Nc programming
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

3.1.9
Macro technique (DEFINE ... AS)
NOTICE
Macro technology increases the complexity of the programming
Macros can significantly alter the control's programming language. Macro technology may
only be used with great care.
A macro is a sequence of individual statements which have together been assigned a name of
their own. When a macro is called during a program run, the statements programmed under the
program name are executed one after the other.
According to the range of validity (in other words, the range in which the macro definition is
active), there are the following macro categories:
● Local macros
Local macros are macros that are defined at the beginning of an NC program, which at the
time of execution is not the main program. They are created when the NC program is called,
and deleted with an end of program reset – or the next time that the control system powers
up. Local macros can only be accessed within the NC program in which they are defined.
● Program-global macros
Program-global macros are macros that are defined at the beginning of an NC program,
which is used as a main program. They are created when the NC program is called, and
deleted with an end of program reset – or the next time that the control system powers up.
Program-global macros can be accessed in the main program and in all subprograms.
Note
Availability of program-global macros
Program-global macros defined in the main program are only available in subprograms if the
following machine data is set:
MD11120 $MN_LUD_EXTENDED_SCOPE = 1
If MD11120 = 0, the program-global macros defined in the main program will only be
available in the main program.
● Global macros
Global macros are NC or channel-global macros, which are defined in a definition file
(macro file) – and are retained even after an end of program reset or the next time that the
control system powers up. Global macros can be called in any main program or subprogram
and executed.
Note
In order to use the macros of an external macro file in the NC program, the macro file must
be downloaded to the NC.
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
Work preparation
3.1 Flexible NC programming
487

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents