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

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

Advertisement

Flexible NC programming
1.26 Macro technique (DEFINE ... AS)
1.26
Macro technique (DEFINE ... AS)
Use of macros can significantly alter the control's programming language! Therefore,
exercise caution when using macros.
Function
A macro is a sequence of individual statements, which have together been assigned a name
of their own. G, M and H functions or L subprogram names can also be used as macros.
When a macro is called during a program run, the statements programmed under the
program name are executed one after the other.
Application
Instruction sequences that are repeated are only programmed once as macro in a dedicated
macro block (macro file) or once at the beginning of the program. The macro can then be
called in any main program or subprogram and executed.
Activating
In order to use the macros of a macro file in the NC program, the macro file must be
downloaded into the NC.
Syntax
Macro definition:
DEFINE <Macro name> AS <instruction 1> <instruction 2> ...
Call in the NC program:
<macro name>
Significance
DEFINE ... AS :
<macro name>:
<operation>:
216
CAUTION
Keyword combination to define a macro
Macro name
Only identifiers are permissible as macro names.
The macro is called from the NC program using the macro name.
Programming instruction that should be included in the macro.
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Job planning

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents