Call Subroutines (L Or Extern) - Siemens SINUMERIK 840D sl Programming Manual

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

Advertisement

2.4

Call subroutines (L or EXTERN)

2.4
Function
Calling subroutines without parameter transfer
In the main program, you call the subroutine either
• with the L address and the subroutine number or
• with the program name.
Example:
N10 L47 or
N10 SPIGOT_2
Programming
Subroutine with parameter transfer, explanation of EXTERN
EXTERN
Subroutines with parameter transfer must be listed with EXTERN in the main program before
they are called, e.g., at the beginning of the program.
The name of the subroutine and the variable types are declared in the sequence in which
they are transferred, see example.
Subroutines with parameter transfer
In the main program you call the subroutine by specifying the program name and parameter
transfer. When transferring parameters you can transfer variables or values directly (not for
VAR parameters), see example.
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Subroutines, Macros
2.4 Call subroutines (L or EXTERN)
2-9

Advertisement

Table of Contents
loading

Table of Contents