EasyManuals Logo
Home>Siemens>Control Systems>SINUMERIK 828D

Siemens SINUMERIK 828D Programming Manual

Siemens SINUMERIK 828D
822 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #154 background imageLoading...
Page #154 background image
Flexible NC programming
1.25 Subprogram technique
Job planning
154 Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
1.25.1.6 Parameter transfer
Definition of a subprogram with parameter transfer
A subprogram with parameter transfer is defined using the PROC keyword and a complete list
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 Comment
PROC SUB_PROG (REAL X, REAL Y, REAL Z) ; Formal parameters: X, Y, and Z
...
N100 RET
Main program:
Program code Comment
PROC MAIN_PROG
...
N30 SUB_PROG(1.0,2.0,3.0) ; Subprogram call with complete parameter transfer:
X=1.0, Y=2.0, Z=3.0
…
N100 M30
Examples for the subprogram call in N30 with incomplete parameter transfer:
N30 SUB_PROG( ,2.0,3.0) ; X=0.0, Y=2.0, Z=3.0
N30 SUB_PROG(1.0, ,3.0) ; X=1.0, Y=0.0, Z=3.0
N30 SUB_PROG(1.0,2.0) ; X=1.0, Y=2.0, Z=0.0
N30 SUB_PROG( , ,3.0) ; X=0.0, Y=0.0, Z=3.0
N30 SUB_PROG( , , ) ; X=0.0, Y=0.0, Z=0.0

Table of Contents

Other manuals for Siemens SINUMERIK 828D

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SINUMERIK 828D and is the answer not in the manual?

Siemens SINUMERIK 828D Specifications

General IconGeneral
BrandSiemens
ModelSINUMERIK 828D
CategoryControl Systems
LanguageEnglish

Related product manuals