Interrogating The Path And File Name - Siemens SINUMERIK 840D sl Programming Manual

Nc programming
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Work preparation
3.4 File and Program Management
7
8
//DEV2:" For example represents the drive on which the global part program memory has been
1)
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
$P_STACK
$P_PATH[ <n>]
$P_PROG[ <n>]
$P_PROGPATH
560
Directory
name_SPF
/_N_CMA_DIR /
name_SPF
/_N_CST_DIR /
Type
INT
STRING
STRING
STRING
Description
Manufacturer cycle directory
Standard cycle directory
Meaning
Supplies the program level in which the current NC program is
executed.
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.
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.
Supplies the path of the NC program that is presently being
processed.
Calling $P_PROGPATH is identical to $P_PATH[$P_STACK].
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
NC programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents