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

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

Advertisement

Flexible NC programming
1.25 Subprogram technique
Example
Definition of a subprogram with 2 parameters as reference to REAL type:
Program code
PROC SUB_PROG(VAR REAL LENGTH, VAR REAL WIDTH)
...
N100 RET
1.25.2.4

Save modal G functions (SAVE)

Function
The SAVE attribute means that before the subprogram call, active modal G functions are
saved and are re-activated after the end of the subprogram.
CAUTION
Interrupt continuous-path mode
If, for active continuous-path mode, a sub-program is called with the SAVE attribute, the
continuous-path mode is interrupted at the end of the sub-program (return jump).
Syntax
PROC <subprogram name> SAVE
Meaning
SAVE:
Example
The modal G function G91 is effective in the CONTOUR subprogram (incremental
dimension). The modal G function G90 is effective in the main program (absolute dimension).
G90 is again effective in the main program after the end of the subprogram due to the
subprogram definition with SAVE.
Subprogram definition:
Program code
PROC CONTOUR (REAL VALUE1) SAVE
N10 G91 ...
N100 M17
172
Saves the modal G functions before the subprogram call and restores after the
end of the subprogram.
Comment
; Parameter 1: Reference to type: REAL,
name: LENGTH
Parameter 2: Reference to type: REAL,
name: WIDTH
Comment
; Subprogram definition with the SAVE
parameter
; Modal G function G91: Incremental dimension
; Subprogram end
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Job planning

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents