Flexible NC-Programmierung
1.25 Unterprogrammtechnik
1.25.3.6
Indirekter Unterprogrammaufruf mit Angabe des auszuführenden Programmteils (CALL
BLOCK ... TO ...)
Funktion
Mit CALL und der Schlüsselwortkombination BLOCK ... TO wird ein Unterprogramm
indirekt aufgerufen und der mit Start- und Endmarke gekennzeichnete Programmteil
ausgeführt.
Syntax
CALL <Programmname> BLOCK <Startmarke> TO <Endmarke>
CALL BLOCK <Startmarke> TO <Endmarke>
Bedeutung
CALL:
<Programmname>:
BLOCK ... TO ... :
<Startmarke>:
<Endmarke>:
Beispiel
Hauptprogramm:
Programmcode
...
DEF STRING[20] STARTLABEL, ENDLABEL
STARTLABEL="LABEL_1"
ENDLABEL="LABEL_2"
...
202
Befehl für den indirekten Unterprogrammaufruf
Name des Unterprogramms (Variable oder Konstante), das
den zu bearbeitenden Programmteil enthält (Angabe optional).
Typ:
STRING
Hinweis:
Ist kein <Programmname> programmiert, wird der mit
<Startmarke> und <Endmarke> gekennzeichnete
Programmteil im aktuellen Programm gesucht und ausgeführt.
Schlüsselwortkombination für indirekte
Programmteilausführung
Variable, die auf den Beginn des zu bearbeitenden
Programmteils verweist.
Typ:
STRING
Variable, die auf das Ende des zu bearbeitenden
Programmteils verweist.
Typ:
STRING
Programmierhandbuch, 02/2011, 6FC5398-2BP40-1AA0
Kommentar
; Variablendefinition für die
Start- und Endmarke.
Arbeitsvorbereitung