Isfile: File Present In The Nck User Memory - Siemens SINUMERIK 840D sl Programming Manual

Job planning
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Flexible NC programming

1.21 ISFILE: File present in the NCK user memory

1.21
ISFILE: File present in the NCK user memory
1.21
Function
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.
Programming
result=ISFILE(STRING[160]file)
Parameters
ISFILE
file
result
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
...
1-66
Checks whether the file exists in the NCK user memory.
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 3 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).
Variable for storage of the result of type BOOL (TRUE or
FALSE)
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Job planning

Advertisement

Table of Contents
loading

Table of Contents