Indirect Subprogram Call (Call) - Siemens Sinumerik 840D sl Programming Manual

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

Advertisement

1.25.3.5

Indirect subprogram call (CALL)

Function
Depending on the prevailing conditions at a particular point in the program, different
subprograms can be called. The name of the subprogram is stored in a variable of type
STRING. The subprogram call is realized with CALL and the variable name.
The indirect subprogram call is only possible for subprograms without parameter transfer.
For a direct subprogram call, save the name in a STRING constant.
Syntax
CALL <program name>
Significance
CALL:
<program name>:
Example
Direct call with STRING constant:
Program code
...
CALL "/_N_WKS_DIR/_N_SUBPROG_WPD/_N_PART1_SPF"
...
Indirect call via variable:
Program code
...
DEF STRING[100] PROGNAME
PROGNAME="/_N_WKS_DIR/_N_SUBPROG_WPD/_N_PART1_SPF"
CALL PROGNAME
...
Job planning
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
CAUTION
Command for the indirect subprogram call.
Name of the subprogram (variable or constant)
Type:
STRING
Flexible NC programming
1.25 Subprogram technique
Comment
; Direct call to subprogram
PART1 with CALL.
Comment
; Define variable.
; Assign subprogram
PART1 to the
PROGNAME variable.
; Indirect call to
subprogram PART1 via
CALL and the
PROGNAME variable.
201

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents