Parameter Transfer - Siemens SINUMERIK 840D sl Programming Manual

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

Advertisement

1.24.1.6

Parameter transfer

Definition of a subprogram with parameter transfer
A subprogram with parameter transfer is defined using the
of all the parameters expected by the subprogram.
Incomplete parameter transfer
When the subprogram is called, not all the parameters defined in the subprogram interface
have to be transferred explicitly. If a parameter is omitted, the default value "0" is transferred
for it.
So that the parameter sequence can be uniquely identified, however, the commas used as
parameter separators always have to be included. The last parameter is an exception. If it is
omitted from the call, the last comma can also be left out.
Example:
Subprogram:
Program code
PROC SUB_PROG (REAL X, REAL Y, REAL Z)
...
N100 RET
Main program:
Program code
PROC MAIN_PROG
...
N30 SUB_PROG(1.0,2.0,3.0)
...
N100 M30
Examples for the subprogram call in
N30 SUB_PROG( ,2.0,3.0)
N30 SUB_PROG(1.0, ,3.0)
N30 SUB_PROG(1.0,2.0)
N30 SUB_PROG( , ,3.0)
N30 SUB_PROG( , , )
Job Planning
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
Comment
;
Formal parameters: X, Y, and Z
Comment
; Subprogram call with complete parameter transfer:
X=1.0, Y=2.0, Z=3.0
with incomplete parameter transfer:
N30
; X=0.0, Y=2.0, Z=3.0
; X=1.0, Y=0.0, Z=3.0
; X=1.0, Y=2.0, Z=0.0
; X=0.0, Y=0.0, Z=3.0
; X=0.0, Y=0.0, Z=0.0
Flexible NC programming
1.24 Subprogram technique
keyword and a complete list
PROC
159

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents