Flexible NC programming
1.25 Subprogram technique
1.25.3.6
Indirect subprogram call with specification of the calling program part (CALL BLOCK ... TO
...)
Function
CALL and the keyword combination BLOCK ... TO is used to call a subprogram indirectly
and execute the program part designated by the start and end labels.
Syntax
CALL <program name> BLOCK <start label> TO <end label>
CALL BLOCK <start label> TO <end label>
Significance
CALL:
<program name>:
BLOCK ... TO ... :
<start label>:
<end label>:
Example
Main program:
Program code
...
DEF STRING[20] STARTLABEL, ENDLABEL
STARTLABEL="LABEL_1"
ENDLABEL="LABEL_2"
...
CALL "CONTUR_1" BLOCK STARTLABEL TO ENDLABEL
...
202
Command for the indirect subprogram call.
Name of the subprogram (variable or constant) that contains
the program part to be executed (specification optional).
Type:
STRING
Note:
If a <program name> has not been programmed, the
program part designated by <start label> and <end
label> is searched for in the current program and executed.
Keyword combination for indirect program part execution
Variable that refers to the start of the program part to be
executed.
Type:
STRING
Variable that refers to the end of the program part to be
executed.
Type:
STRING
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Comment
; Variable definition for the
start and end labels.
; Indirect subprogram call and
identifier associated with
the calling program part.
Job planning