2
12.98 Subprograms, Macros
2.3 Sub
ro
rams with
arameter transfer
2
840D
NCU 571
840D
NCU 572
NCU 573
FM-NC 810D 840Di
ï›™
Siemens AG 2000. All rights reserved
SINUMERIK 840D/840Di/810D/FM-NC Programming Guide Advanced (PGA)
−
04.00 Edition
2-97
Programming
The parameters relevant for parameter transfer must be
listed at the beginning of the subprogram with their type
and name.
Parameter transfer call-by-value
PROC PROGRAM_NAME(VARIABLE_TYPE1 VARIABLE1,VARIABLE_TYPE2 VARIABLE2,...)
Example:
PROC CONTOUR(REAL LENGTH, REAL WIDTH)
Parameter transfer call-by-reference,
identification with vocabulary word VAR
PROC PROGRAM_NAME(VARIABLE_TYPE1 VARIABLE1,VARIABLE_TYPE2 VARIABLE2, ...)
Example:
PROC CONTOUR(VAR REAL LENGTH, VAR REAL WIDTH)
Array transfer with call-by-reference,
identification with vocabulary word VAR
PROC PROGRAM_NAME(VAR VARIABLE_TYPE1 ARRAY_NAME1[array size],
VAR VARIABLE_TYPE2 ARRAY_NAME2[array size], VAR VARIABLE_TYPE3
ARRAY_NAME3[array size1, array size2], VAR VARIABLE_TYPE4 ARRAY_NAME4[ ],
VAR VARIABLE_TYPE5 ARRAY_NAME5 [,array size])
Example:
PROC PALLET (VAR INT ARRAY[,10])
Additional notes
The definition statement with PROC must be
programmed in a separate NC block. A maximum of
127 parameters can be declared for parameter transfer.