Subprogram Call With Parameter Transfer (Extern) - Siemens SINUMERIK 840D sl Programming Manual

Nc programming
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Work preparation
3.2 Subprogram technique
3.2.3.2

Subprogram call with parameter transfer (EXTERN)

For a subprogram call with parameter transfer, variables or values can be transferred directly
(but not VAR parameters).
Subprograms with parameter transfer must be declared with EXTERNAL in the main program
before they are called in the main program (e.g. at the beginning of the program). The name of
the subprogram and the variable types are thereby specified in the sequence in which they are
transferred.
NOTICE
Risk of confusion
Both the variable types and the sequence of the transfer must match the definitions declared
under PROC in the subprogram. The parameter names can be different in the main program
and the subprogram.
Syntax
EXTERNAL <program name>(<type_Par1>,<type_Par2>,<type_Par3>)
...
<program name>(<value_Par1>,<value_Par2>,<value_Par3>)
Note
The subprogram call must always be programmed in a separate NC block.
Meaning
<program name>:
EXTERNAL:
<type_par1>,<type_par2>,<type_par3>:
<value_par1>,<value_par2>,<value_par3>:
524
Name of subprogram
Keyword to declare a subprogram with pa‐
rameter transfer.
Note:
You only have to specify EXTERNAL if the
subprogram is in the workpiece or in the
global subprogram directory. Cycles do not
have to be declared as EXTERNAL.
Variable types of the parameters to be trans‐
ferred in the sequence of the transfer
Variable values for the parameters to be
transferred
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
NC programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents