Siemens SINUMERIK 840D sl Programming Manual page 497

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

Advertisement

Call-by-value
The calling program transfers only the value of a variable to the subprogram on a call-by-value
parameter transfer. Thus the subprogram is not given direct access to the variable. In this way,
only the value visible in the subprogram is modified when the parameter value is changed. The
value of the variables defined in the calling program remains unchanged. As a consequence,
the call-by-value parameter transfer does not affect the calling program.
Syntax
PROC <program name> (<parameter type> <parameter
name>=<init_value>, ...)
Note
Up to 127 parameters can be transferred.
Meaning
PROC:
<program name>:
<parameter type>:
<parameter name>:
<init_value>:
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
Main program
Value assignment
LENGTH=12
WIDTH=10
Subprogram
LENGTH, WIDTH
Old values valid
New value
assignment
LENGTH=20
WIDTH=15
New values
valid
Definition operation at the beginning of a program
Name of the program
Data type of the parameter (e.g. REAL, INT, BOOL)
Name of the parameter
Optional value for the initialization of the parameter (optional)
If no parameter is specified when calling the subprogram, the param‐
eter is assigned the initialization value.
Work preparation
3.2 Subprogram technique
497

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents