Siemens SINUMERIK 840D sl Programming Manual page 126

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

Advertisement

Subroutines, Macros
2.19 Macro technique (DEFINE...AS)
Three-digit M/G function
Supports programming of three-digit M and G functions.
Example:
N20 DEFINE M100 AS M6
N80 DEFINE M999 AS M6
Note
Macros can also be declared in the NC program. Only identifiers are permissible as macro
names. G function macros can only be defined in the macro module globally for the entire
control.
Nesting of macros is not possible.
Example: macro definitions
DEFINE M6 AS L6
DEFINE G81 AS DRILL(81)
DEFINE G33 AS M333 G333
Example: macro file
After reading the macro file into the control, activate the macros (see above). The macros
can now be used in the parts program.
%_N_UMAC_DEF
;$PATH=/_N_DEF_DIR
DEFINE PI AS 3.14
DEFINE TC1 AS M3 S1000
DEFINE M13 AS M3 M7
DEFINE M14 AS M4 M7
DEFINE M15 AS M5 M9
DEFINE M6 AS L6
DEFINE G80 AS MCALL
M30
2-42
A subroutine is called at tool change to handle the
necessary data transfer. The actual M function is
output in the subroutine (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.
;Customer-specific macros
;Spindle right, coolant on
;Spindle left, coolant on
;Spindle stop, coolant off
;Call tool change program
;Deselect drilling cycle
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Job planning

Advertisement

Table of Contents
loading

Table of Contents