Siemens SINUMERIK 828D Programming Manual page 140

Hide thumbs Also See for SINUMERIK 828D:
Table of Contents

Advertisement

Flexible NC programming
1.20 Read lines in the file (READ)
<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
...
140
:
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.
STRING (max. length: 255)
of the result variable, the remaining array
[<n>,<m>]
Comment
; Definition of error variables.
; Definition of result variables.
; Filename with domain, file
; Error evaluation.
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
parameter than
<number of lines>
identifier and path
specification.
Job planning

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents