Macros must be defined before they can be used. The following rules must be observed in this
context:
● Any identifier, G, M, H functions and L subprogram names can be defined in a macro.
● The macro can be defined at the beginning of the program or in a dedicated definition file
(macro file).
● Local and program-global macros are defined at the beginning of the program.
● Global macros must be defined in a macro file, e.g._N_DEF_DIR/_N_UMAC_DEF.
● G command macros can only be defined as global macros.
● H and L functions can be programmed with 2 digits.
● M and G commands can be programmed with 3 digits.
Note
Keywords and reserved names may not be overwritten with macros. This also applies to all
jump destinations within a GOTO command, and to the keywords in program loops, such as
FOR, WHILE, LOOP, REPEAT.
Syntax
Macro definition:
DEFINE <Macro_name> AS <Operation_1> <Operation_2> ...
Call in the NC program:
<Macro_name>
Meaning
DEFINE ... AS: Keyword combination to define a macro
<Macro_name>: Macro name
Only identifiers are permissible as macro names.
The macro is called from the NC program by the macro name.
<Operation_1>: First programming instruction in the macro
<Operation_2>: Second programming instruction in the macro
Examples
Example 1: Macro definition at the beginning of the program
Program code Comment
DEFINE LINE AS G1 G94 F300 ; Macro definition
...
N70 LINE X10 Y20 ; Macro call
...
Work preparation
3.1 Flexible NC programming
NC programming
488 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0