Flexible NC programming
1.25 Subprogram technique
Job planning
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
195
Example
Program code
CALLPATH ("/_N_WKS_DIR/_N_MYWPD_WPD")
This means that the following search path is set (position 5. is new):
1. Current directory / subprogram name
2. Current directory / subprogram identifier_SPF
3. Current directory / subprogram identifier_MPF
4. /_N_SPF_DIR/subprogram identifier_SPF
5. /_N_WKS_DIR/_N_MYWPD/subprogram identifier_SPF
6. /N_CUS_DIR/_N_MYWPD/subprogram identifier_SPF
7. /_N_CMA_DIR/subprogram identifier_SPF
8. /_N_CST_DIR/subprogram identifier_SPF
Supplementary conditions
● CALLPATH checks whether the programmed path name actually exists. In the case of an
error part program execution is interrupted with correction block alarm 14009.
●
CALLPATH can also be programmed INI files. It is only effective for the time it takes to
process the INI file(WPD-INI file or initialization program for NC active data, e.g. frames in
the 1st channel
_
N
_
CH1_UFR_INI). The search path is again reset.
1.25.3.10 Execute external subroutine (EXTCALL)
Function
Using the EXTCALL command, it is possible to subsequently download a subprogram from an
external program memory (local drive, network drive, USB drive) and execute it.
The path for the external subprogram directory can be preset using setting data:
SD42700 $SC_EXT_PROG_PATH
Together with the subprogram path or identifier specified with the
EXTCALL call, this forms the
entire path for the program to be called.
Note
External subprograms must not contain jump statements such as
GOTOF, GOTOB, CASE, FOR,
LOOP, WHILE, or REPEAT.
IF-ELSE-ENDIF constructions are possible.
Subprogram calls and nested
EXTCALL calls may be used.