Directory Description
7 /_N_CMA_DIR /
name_SPF
Manufacturer cycle directory
8 /_N_CST_DIR /
name_SPF
Standard cycle directory
1)
//DEV2:" For example represents the drive on which the global part program memory has been
created.
The following rules apply for the search:
● The search path is run through for each individual subprogram call, this means that it is
irrelevant where the higher-level program is located.
● Depending on the directory, different file types are taken into account.
● A search is made in a directory, and not in lower-level, i.e. nested directories.
3.4.1.5 Interrogating the path and file name
The following system variables, which can be read in the part program, are available to
interrogate the path and file name of an NC program:
System variable Type Meaning
$P_STACK INT Supplies the program level in which the current NC program is
executed.
$P_PATH[ <n>] STRING Supplies the path of the NC program, which is processed at the
program level selected using field index <n>.
Examples:
$P_PATH[0] supplies the path for the main program, e.g. "/
_N_WKS_DIR/_N_WELLE_WPD/".
$P_PATH[$P_STACK - 1] supplies the path of the calling pro‐
gram.
If the path refers to an NC program, which is saved in the pas‐
sive file system of the NC or in the global part program memory
(GDIR), then the path is supplied in the NC notation.
If the path refers to an NC program, which is executed by an
external program memory other than the global part program
memory then $P_PATH supplies the path in the EES notation.
$P_PROG[ <n>] STRING Supplies the name of the NC program, which is processed at
the program level selected using field index <n>.
If the NC program is saved in the passive file system of the NC
or in the global part program memory, then the program name
is supplied in the NC notation.
If the NC program is executed by an external drive other than
the global part program memory, then $P_PROG supplies the
name in the EES notation.
$P_PROGPATH STRING Supplies the path of the NC program that is presently being
processed.
Calling $P_PROGPATH is identical to $P_PATH[$P_STACK].
Work preparation
3.4 File and Program Management
NC programming
560 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0