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

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

Advertisement

1.25.3.2

Subprogram call with parameter transfer (EXTERN)

Function
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.
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>)
The subprogram call must always be programmed in a separate NC block.
Significance
<program name>:
EXTERN:
<type_par1>,<type_par2>,<type_par3>:
<value_par1>,<value_par2>,<value_par3>: Variable values for the parameters to
Job planning
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
CAUTION
CAUTION
Flexible NC programming
1.25 Subprogram technique
Name of subprogram
Keyword to declare a subprogram
with parameter transfer.
Note:
You only have to specifyEXTERNALif
the subprogram is in the workpiece
or in the global subprogram directory.
Cycles do not have to be declared as
EXTERN.
Variable types of the parameters to
be transferred in the sequence of the
transfer
be transferred
195

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents