Siemens SINUMERIK 840D sl Programming Manual page 488

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

Advertisement

Work preparation
3.1 Flexible NC programming
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:
<Macro_name>:
<Operation_1>:
<Operation_2>:
Examples
Example 1: Macro definition at the beginning of the program
Program code
DEFINE LINE AS G1 G94 F300
...
N70 LINE X10 Y20
...
488
Keyword combination to define a macro
Macro name
Only identifiers are permissible as macro names.
The macro is called from the NC program by the macro name.
First programming instruction in the macro
Second programming instruction in the macro
Comment
; Macro definition
; Macro call
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
NC programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents