Programming principles
1.11 Subroutine technique
Turning Part 2: Programming (Siemens instructions)
98 Programming and Operating Manual, 05/2012, 6FC5398-5DP10-0BA0
Programming with path specification in SD42700 EXT_PROGRAM_PATH
EXTCALL ("<program name>")
Parameter
EXTCALL ; Keyword for subroutine call
<program name> ; Constant/variable of STRING type
Example:
EXTCALL ("RECTANGULAR POCKET")
Programming without path specification in SD42700 EXT_PROGRAM_PATH
EXTCALL ("<path\program name>")
Parameter
EXTCALL ; Keyword for subroutine call
<Path\program name> ; Constant/variable of STRING type
Example:
EXTCALL ("D:\EXTERNE_UP\RECHTECKTASCHE")
Note
External subroutines must not contain jump statements such as
GOTOF, GOTOB, CASE, FOR, LOOP,
WHILE, or REPEAT.
IF-ELSE-ENDIF constructions are possible.
Subroutine calls and nested
EXTCALL calls may be used.
RESET, POWER ON
RESET and POWER ON cause external subroutine calls to be interrupted and the
associated load memory to be erased.
Example
Processing of external customer USB memory sticker
The "Main.mpf" main program is stored in NC memory and is selected for execution:
N010 PROC MAIN
N020 G0 X0 Z0
N030 EXTCALL ("N:\EXTERNE_UP\BOHRUNG")
N040 G0 X100 Z100
N050 M30