2
12.98 Subprograms, Macros
2.4 Callin
sub
ro
rams
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-101
Incomplete parameter transfer
In a subprogram call only mandatory values and
parameters can be omitted. In this case, the
parameter in question is assigned the value
zero
in
the subprogram.
The comma must always be written to indicate the
sequence. If the parameters are at the end of the
sequence you can omit the comma as well.
Back to the last example:
N40 BORDER(15.3, ,5)
The mean value 20.2 was omitted here.
Note
Main program
N30 LENGTH=15.3 WIDTH=20.2 DEPTH=5
N40 BORDER(15.3,20.2,5)
The current parameter of type AXIS must not be
omitted.
VAR parameters must be passed on completely.
SW 4.4 and higher:
With incomplete parameter transfer, it is possible to
tell by the system variable
$P_SUBPAR[i]
whether
the transfer parameter was programmed for
subprograms or not.
The system variable contains as argument (
i
) the
number of the transfer parameter.
The system variable
$P_SUBPAR
returns
•
TRUE, if the transfer parameter was
programmed
•
FALSE, if no value was set as transfer
parameter.
If an impermissible parameter number was
specified, part program processing is aborted with
alarm output.