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).
Condition
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>)
Significance
READ
<error>
138
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
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 (
parameter selected so large that the read would
go beyond the end of the file).
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
or
<start line>
<number of
<result>
<number of lines>
Job planning
) is too
Need help?
Do you have a question about the SINUMERIK 828D and is the answer not in the manual?