1
02.98 Flexible NC Programming
1.20 ISFILE: File available in user memor
NCK
as from SW 5.2
1
840D
NCU 571
840D
NCU 572
NCU 573
810D
840Di
ï›™
Siemens AG 2000. All rights reserved
SINUMERIK 840D/840Di/810D/FM-NC Programming Guide Advanced (PGA)
−
04.00 Edition
1-87
1.20 ISFILE: File available in user memory NCK (as from SW 5.2)
Programming
result=isfile(string[160]file)
With the ISFILE command you check whether a file exists in the user memory of the NCK
(passive file system). As a result either TRUE (file exists) or False (file does not exist) is returned.
Explanation of the parameters
file
Name/path of the file to be read (call-by-value parameter of type
STRING with a max. length of 160 bytes).
The file must be stored in the user memory of the NCK (passive file
system). The file name can be preceded by the domain identifier _N_.
If the domain identifier is missing, it is added correspondingly.
The file identifier ("_" plus three characters, e.g. _SPF) is optional. If
there is no identifier, the file name is automatically added _MPF.
If there is no path specified in "file", the file is searched for in the current
directory (=directory of selected program). If a path is specified in "file",
it must start with a slash "/" (absolute path indication).
result
Variable for storage of the result of type BOOL (TRUE or FALSE)
Programming example
N10 DEF BOOL RESULT
N20 RESULT=ISFILE("TESTFILE")
N30 IF(RESULT==FALSE)
N40 MSG("FILE DOES NOT EXIST")
N50 M0
N60 ENDIF
...
or:
N30 IF(NOT ISFILE("TESTFILE"))
N40 MSG("FILE DOES NOT EXIST")
N50 M0
N60 ENDIF
...