Siemens SINUMERIK 840D sl Programming Manual page 79

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

Advertisement

result
If the number of lines specified in the parameter "number" is smaller than the array length of
"result", the other array elements are not altered.
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 target variables "result". Read lines are cut
off, if the line is longer than the string length of the target variable "result". An error message
is not output.
Note
Binary files cannot be read in.
The error message error=4: Wrong type of file is output. The following types of file are not
readable: _BIN, _EXE, _OBJ, _LIB, _BOT, _TRC, _ACC, _CYC, _NCK.
Examples
N10 DEF INT ERROR
N20 STRING[255] RESULT[5]
...
N30 READ(ERROR, "TESTFILE", 1, 5,
RESULT)
...
N30 READ(ERROR, "TESTFILE_MPF", 1, 5,
RESULT)
...
N30 READ(ERROR,"_N_TESTFILE_MPF",1,5,
RESULT)
...
N30 READ(ERROR,"/_N_CST_DIR/_N_TESTFILE
_MPF", 1, 5 RESULT)
^...
N40 IF ERROR <>0
N50 MSG("ERROR "<<ERROR<<"
WITH READ COMMAND")
N60 M0
N70 ENDIF
...
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Array of type STRING, where the read text is stored
(call-by-reference parameter with a length of 255).
Flexible NC programming
1.20 READ: Read lines in the file
;error variable
;result variable
;file name without domain and file
;identifier
;file name without domain and with
;file identifier
;file name with domain and file
;identifier
;file name with domain and file
;identifier and path specification
;error evaluation
1-65

Advertisement

Table of Contents
loading

Table of Contents