Siemens SINUMERIK 840D sl Programming Manual page 96

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

Advertisement

Subroutines, Macros
2.4 Call subroutines (L or EXTERN)
Description
Caution
Subroutine definition corresponds to subroutine call
Both the variable types and the sequence of transfer must match the definitions declared
under PROC in the subroutine name. The parameter names can be different in the main
program and subroutines.
Definition in the subroutine:
PROC BORDER(REAL LENGTH, REAL WIDTH, REAL DEPTH)
Call in the main program:
N30 BORDER(LENGTH, WIDTH, DEPTH)
Incomplete parameter transfer
Back to the last example:
N40 BORDER(15.3, ,5)
The mean value 20.2 was omitted here.
With incomplete parameter transfer, it is possible to tell by the system variable
$P_SUBPAR[i] whether the transfer parameter was programmed for subroutines or not.
The system variable contains as argument (i) the number of the transfer parameter.
2-12
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Job planning

Advertisement

Table of Contents
loading

Table of Contents