Macro Call Via G Function (G21) - Siemens SINUMERIK 808D Programming And Operating Manual

Iso turning/milling
Hide thumbs Also See for SINUMERIK 808D:
Table of Contents

Advertisement

N10 DEF REAL X_AXIS ,Y_AXIS, S_SPEED, FEED
N15 X_AXIS = $C_X Y_AXIS = $C_Y S_SPEED = $C_S FEED = $C_F
N20 G01 F=FEED G95 S=S_SPEED
...
N80 M17
Macro program in ISO mode:
_N_0010_SPF:
G290; Changeover to Siemens mode,
; to read the transfer parameters
N15 X_AXIS = $C_X Y_AXIS = $C_Y S_SPEED = $C_S FEED = $C_F
N20 G01 F=$C_F G95 S=$C_S
N10 G1 X=$C_X Y=$C_Y
G291; Changeover to ISO mode,
N15 M3 G54 T1
N20
...
N80 M99
4.4.6.3

Macro call via G function (G21)

Macro call
A macro can be called with a G number analogous to G65.
The replacement of 50 G functions can be configured via machine data:
10816 $MN_EXTERN_G_NO_MAC_CYCLE and
10817 $MN_EXTERN_G_NO_MAC_CYCLE_NAME.
The parameters programmed in the block are stored in the $C_Variables. The number of macro repetitions is programmed
with Address L. The number of the programmed G macros is stored in the variable $C_G. All the other G functions
programmed in the block are treated as normal G functions. The programming sequence of the addresses and G functions
in the block is random, and it does not have any effect on the functionality.
Further information about the parameters programmed in this block is available in Chapter "Macro Program Call (G65, G66,
G67)".
Restrictions
● The macro call with a G function can be executed only in ISO mode (G290).
● Only one G function can be replaced per part program line (or in general, only one subroutine call). If there are possible
conflicts with other subroutine calls, e.g. if a modal subroutine is active, the system outputs Alarm 12722 "Several
ISO_M/T macro- or cycle calls in block".
● No other G or M macro or M subroutine can be called if a G macro is active. In this case, M macros or M subroutines are
executed as M functions. G macros are executed as G functions, provided a corresponding G function exists; otherwise
Alarm 12470 "Unknown G function" is output.
● Otherwise the same restrictions are applicable as for G65.
Configuration examples
Calling the subroutine G21_MAKRO via G function G21
$MN_EXTERN_G_NO_MAC_CYCLE[0] = 21
$MN_EXTERN_G_NO_MAC_CYCLE_NAME[0] = "G21_MAKRO"
$MN_EXTERN_G_NO_MAC_CYCLE[1] = 123
$MN_EXTERN_G_NO_MAC_CYCLE_NAME[1] = "G123_MAKRO"
$MN_EXTERN_G_NO_MAC_CYCLE[2] = 421
$MN_EXTERN_G_NO_MAC_CYCLE_NAME[2] = "G123_MAKRO"
Programming and Operating Manual (ISO Turning/Milling)
01/2017
157

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 808d advanced

Table of Contents