Siemens Sinumerik 840D sl Programming Manual page 171

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

Advertisement

Note
Call-by-reference parameter transfer is then only necessary if the transferred variable was
defined in the calling program (LUD). Channel-global or NC-global variables do not have to
be transferred, since these cannot be accessed directly from within the subprogram.
Syntax
PROC <program name> (VAR <parameter type> <parameter name>, etc.)
PROC <program name> (VAR <array type> <array name>, [<m>,<n>,<o>],
etc.)
Significance
PROC:
VAR:
<program name>:
<parameter type>:
<parameter name>:
<array type>:
<array name>:
[<m>,<n>,<o>]:
NOTICE
The program name specified after the PROC keyword must match the program name
assigned on the user interface.
Note
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])
Job planning
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Definition operation at the beginning of a program
Keyword for parameter transfer via reference
Name of the program
Data type of the parameter (e.g. REAL, INT, BOOL)
Name of the parameter
Data type of the array elements (e.g. REAL, INT, BOOL)
Name of the array
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>:
Flexible NC programming
1.25 Subprogram technique
171

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents