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

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

Advertisement

1.26
Macro technique (DEFINE ... AS)
1.26
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>
Job Planning
Programming Manual, 06/2009, 6FC5398-2BP20-0BA0
CAUTION
Flexible NC programming
1.26 Macro technique (DEFINE ... AS)
229

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents