Save Modal G Functions (Save) - Siemens SINUMERIK 840D sl Programming Manual

Nc programming
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Work preparation
3.2 Subprogram technique
[<m>,<n>,<o>]:
Note
● The program name specified after the PROC keyword must match the program name
assigned on the user interface.
● With arrays of an undefined array length, subprograms can process arrays of variable length
as formal parameter. When defining a two-dimensional array as a formal parameter, for
example, the length of the 1st dimension is not specified. However, the comma must be
written.
Example: PROC <program name> (VAR REAL ARRAY[,5])
Example
Definition of a subprogram with two parameters as reference to REAL type:
Program code
; Parameter 1: Reference to type: REAL, name: LENGTH
; Parameter 2: Reference to type: REAL, name: WIDTH
PROC SUB_PROG(VAR REAL LENGTH, VAR REAL WIDTH)
See also
Subprogram call with parameter transfer (EXTERN) (Page 524)
3.2.2.4

Save modal G functions (SAVE)

The SAVE attribute means that before the subprogram call, active modal G commands are
saved and are reactivated after the end of the subprogram.
NOTICE
Interrupt continuous-path mode
If, for active continuous-path mode, a subprogram is called with the SAVE attribute, the
continuous-path mode is interrupted at the end of the subprogram (return jump).
Syntax
PROC <subprogram name> SAVE
500
Array size
Currently, up to 3-dimensional arrays are possible:
Array size for 1st dimension
<m>:
Array size for 2nd dimension
<n>:
Array size for 3rd dimension
<o>:
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
NC programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents