Flexible NC programming
1.18 Write file (WRITE)
Job planning
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
133
1.18 Write file (WRITE)
Function
The WRITE command can be used to write blocks/data from the part program to the end of a
specific file (log file) or to the end of the part program currently being executed. The
blocks/data are/is inserted at the end of the file, i.e. after
M30.
Note
If no such file exists in the NC, one will be created and can be written to using the
WRITE
command.
The storage location is the static NC memory. In the case of SINUMERIK 840D sl this is the
CompactFlash Card. Unlike SINUMERIK 840D this increases the runtime of the
WRITE
command by approx. 75 ms.
If a file with the same name exists on the hard disk, it is overwritten after the file is closed (in
the NC). Remedy: Change the name in the NC in the "Services" operating area using the
"Properties" softkey.
Condition
The currently set protection level must be equal to or greater than the WRITE 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>
WRITE(<error>,"<file name>","<block/data>")
Significance
WRITE: Command for appending a block or data to the end of the specified file.
Variable for returning the error value.
Type. INT
0 No error
1 Path not allowed
2 Path not found
3 File not found
4 Incorrect file type
10 File is full
11 The file is in use
12 No resources available
13 No access rights
<error>:
Value:
20 Other error