Macro Programs; Differences With Subroutines; Macro Program Call (G65, G66, G67) - Siemens Sinumerik 840D sl Programming Manual

Iso milling
Hide thumbs Also See for Sinumerik 840D sl:
Table of Contents

Advertisement

4.7

Macro programs

Macros may consist of several part program blocks that are completed with M99. In principle,
macros are subroutines that are called with G65 Pxx or G66 Pxx in the part program.
Macros that are called with G65 are non-modal. Macros that are called with G68 are modal
and are deselected again with G67.
4.7.1

Differences with subroutines

Macro programs (G65, G66) can be used to specify parameters that can be evaluated in the
macro programs. No parameters can be specified in subroutine calls (M98).
4.7.2

Macro program call (G65, G66, G67)

Macro programs are generally executed immediately after their call.
The procedure of calling a macro program is described in the following table.
Table 4- 4
Call method
Simple call
Modal call (a)
Simple call (G65):
Format
G65 P_ L_ ;
A macro program to which a program number was assigned with "P" is called and executed
"L" times by specifying "G65 P ... L... <Argument>; ".
The required parameters must be programmed in the same block (with G65).
Explanation
In a part program block containing G65 or G66, the address Pxx is interpreted as program
number of the subroutine in which the macro functionality is programmed. The number of
passes of the macro can be defined with the address Lxx. All other addresses in this part
program block are interpreted as transfer parameters and their programmed values are
stored in the system variables $C_A to $C_Z. These system variables can be read in the
subroutine and evaluated for the macro functionality. If other macros with parameter transfer
are called in a macro (subroutine), then the transfer parameters in the subroutine must be
saved in internal variable before the new macro call.
To enable internal variable definitions, one must switch automatically to the Siemens mode
during macro call. One can do this by inserting the instruction PROC<Program name> in the
first line of the macro program. If another macro call is programmed in the subroutine, then
the ISO-dialect-mode must be reselected in advance.
ISO Milling
Programming Manual, 06/09, 6FC5398-7BP10-1BA0
Format for calling a macro program
Command code
G65
G66
Additional functions
4.7 Macro programs
Remarks
Deselection through G67
125

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840di slSinumerik 828dSinumerik 802d sl

Table of Contents