Siemens Sinumerik 840D sl Programming Manual page 151

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

Advertisement

<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
...
Job planning
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Result variable (call-by-reference parameter)
Variable array in which the read text is stored.
Type:
STRING (max. length: 255)
If fewer lines are specified in the <number of lines> parameter
than the array size [<n>,<m>] of the result variable, the remaining
array 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.
Flexible NC programming
1.20 Read lines in the file (READ)
Comment
; Definition of error variables.
; Definition of result variables.
; Filename with domain, file
identifier and path
specification.
; Error evaluation.
151

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents