Read Lines In The File (Read) - Siemens SINUMERIK 840D sl Programming Manual

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

Advertisement

Flexible NC programming

1.20 Read lines in the file (READ)

1.20
Read lines in the file (READ)
Function
The
read in an STRING type array. In this array, each read line occupies an array element.
Note
The file must be stored in the NCK's static user memory (passive file system).
Requirement
The currently set protection level must be equal to or greater than the READ right of the file.
If this is not the case, access is denied with an error message (return value of error variable
= 13).
Syntax
DEF INT <error>
DEF STRING[<string length>] <result>[<n>,<m>]
READ(<error>,"<file name>",<start line>,<number of lines>,<result>)
Meaning
READ
<error>
146
command reads one or several lines in the specified file and stores the information
READ
:
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.
Value:
INT
0
No error
1
Path not allowed
2
Path not found
3
File not found
4
Incorrect file type
11
File is being used
13
Insufficient access rights
21
Line does not exist (
parameter exceeds the number of lines in
lines>
the specified file).
22
Field length of the result variable (
small.
23
Line range too large (
selected so large that the read would go beyond
the end of the file).
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
or
<start line>
<number of
<result>
parameter
<number of lines>
Job Planning
) is too

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents