Siemens SINUMERIK 840D sl Programming Manual page 566

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

Advertisement

Work preparation
3.5 File handling
<file name>:
<ExtG>:
<block/data>:
Note
When writing to the passive file system or to an external program memory, the WRITE
command implicitly inserts an "LF" character (LINE FEED = new line) at the end of the output
string.
This behavior does not apply for output to an external device/file using the "Process
DataShare" function. If an "LF" is also to be output, then this must be explicitly specified in the
output string.
→ also refer to example 3: Implicit/explicit "LF"!
Supplementary conditions
● Maximum file size (→ machine manufacturer)
The maximum possible file size of log files in the passive file system is set with the machine
data:
MD11420 $MN_LEN_PROTOCOL_FILE
The maximum file length is applicable for all files created using the WRITE command in the
passive file system. If it is exceeded, an error message is output and the block or data is not
saved. If there is sufficient free memory, a new file can be created.
Examples
Example 1: WRITE command into the passive file system without absolute path data
Program code
N10 DEF INT ERROR
N20 WRITE(ERROR,"PROT","LOG FROM 7.2.97")
N30 IF ERROR
566
Parameter 2: The name of the file in which the specified block or specified data is
to be added.
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 selected
program).
Rules regarding path data, see "Addressing program memory files (Page 554)".
If the data is to be output to an external device/file using the "Process DataShare"
function, then the symbolic identifiers for the external device/file to be opened must
be specified instead of the file name.
Type:
STRING
For further information, see "Process DataShare - Output to an external device/file
(EXTOPEN, WRITE, EXTCLOSE): (Page 997)".
Note:
The identifier must be identical to the identifier specified in the EXTOPEN command.
Parameter 3: The block or data to be added to the specified file.
Type:
STRING
Comment
; Definition of error variables.
; Write the text "LOG FROM 7.2.97"
to file _N_PROT_MPF.
;Error evaluation.
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