Check For Presence Of File (Isfile) - 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 Check for presence of file (ISFILE)

<result>
Note
Binary files cannot be read in. The "incorrect data type" error is output (return value of the
error variable = 4). The following types of file are not readable: _BIN, _EXE, _OBJ, _LIB,
_BOT, _TRC, _ACC, _CYC, _NCK.
Example
Program code
N10 DEF INT ERROR
N20 DEF STRING[255] RESULT[5]
N30
READ(ERROR,"/_N_CST_DIR/_N_TESTFILE_MPF",1,5,RESULT)
N40 IF ERROR <>0
N50 MSG("ERROR"<<ERROR<<"ON READ COMMAND")
N60 M0
N70 ENDIF
...
1.21
Check for presence of file (ISFILE)
Function
The
memory (passive file system).
Syntax
<result>=ISFILE("<file name>")
148
:
Result variable (call-by-reference parameter)
Variable array in which the read text is stored.
Type:
If fewer lines are specified in the
the array size
elements will not be modified.
Termination of a line by means of the control characters "LF" (Line
Feed) or "CR LF" (Carriage Return Line Feed) is not stored in the
result variable.
Read lines are cropped if the line is longer than the defined string
length. An error message is not output.
command can be used to check whether a file exists in the NCK's static user
ISFILE
STRING (max. length: 255)
<number of lines>
of the result variable, the remaining array
[<n>,<m>]
Comment
;Definition of error variables.
;Definition of result variables.
;File name with domain and file identifier
;and path name.
;Error evaluation.
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
parameter than
Job Planning

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents