Siemens SINUMERIK 840D sl Programming Manual page 570

Nc programming
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Work preparation
3.5 File handling
Meaning
READ:
<error>:
<file name>:
<start line>:
<number of
lines>:
<result>:
570
Command for reading lines from the specified file and storing these lines in a
variable array.
Variable for returning the error value (call-by-reference parameter)
Type.
INT
Value:
0
No error
1
Path not allowed
2
Path not found
3
File not found
4
Incorrect file type
11
The file is in use
13
Insufficient access rights
21
Line does not exist (<start line> or <number of
lines> parameter exceeds the number of lines in the
specified file).
22
Field length of the result variable (<result>) is too
small.
23
Line range too large (<number of lines> parameter
selected so large that the read would go beyond the end
of the file).
Name of the file to be read (call-by-value parameter)
Type:
STRING
The absolute path can be specified before the actual file name. If a path is not
specified, the file is searched for in the current directory (= directory of selec‐
ted program).
Rules regarding path data, see "Addressing program memory files
(Page 554)".
Start line of the file section to be read (call-by-value parameter)
Type:
INT
Value:
0
1 to n
Number of lines to be read (call-by-value parameter)
Type:
INT
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.
Reads the number of lines specified with
the <number of lines> parameter before the
end of the file.
Number of the first line to be read.
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
NC programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents