Siemens Sinumerik 840D sl Programming Manual page 217

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

Advertisement

Rules when defining a macro
Any identifier, G, M, H functions and L program names can be defined in a macro.
Macros can also be defined in the NC program.
G function macros can only be defined in the macro module globally for the entire control
(modal).
H and L functions can be programmed with 2 digits.
M and G functions can be programmed using 3 digits.
Keywords and reserved names may not be re-defined using macros.
General conditions
Nesting of macros is not possible.
Examples
Example 1: Macro definition at the beginning of the program
Program code
DEFINE LINE AS G1 G94 F300
...
...
N70 LINE X10 Y20
...
Example 2: Macro definitions in a macro file
Program code
DEFINE M6 AS L6
DEFINE G81 AS DRILL(81)
DEFINE G33 AS M333 G333
Job planning
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
CAUTION
1.26 Macro technique (DEFINE ... AS)
Comments
; Macro definition
; Macro call
Comments
; A subprogram is called at tool change to handle
the necessary data transfer. The actual M function
is output in the subprogram (e.g., M106).
; Emulation of the DIN-G function.
; During thread cutting synchronization is requested
with the PLC. The original G function G33 was
renamed to G333 by machine data so that the
programming is identical for the user.
Flexible NC programming
217

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents