Macro Technique (Define - Siemens SINUMERIK 828D Programming Manual

Hide thumbs Also See for SINUMERIK 828D:
Table of Contents

Advertisement

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>
Job planning
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
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.
Flexible NC programming
1.26 Macro technique (DEFINE ... AS)
203

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents