Siemens SINUMERIK 828D Programming Manual page 204

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

Advertisement

Flexible NC programming
1.26 Macro technique (DEFINE ... AS)
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
● H and L functions can be programmed with 2 digits.
● M and G functions can be programmed using 3 digits.
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
204
(modal).
CAUTION
Keywords and reserved names may not be re-defined using macros.
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.
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
Job planning

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents