Siemens SINUMERIK 840D sl Programming Manual page 76

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

Advertisement

Flexible NC programming
1.18 WRITE: Write file
filename
STRING
Note
If no such file exists in the NC, it is newly created and can be written to by means of the
WRITE command.
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 under the Services operating area using the
"Properties" soft key.
Example
N10 DEF INT ERROR
N20 WRITE(ERROR,"TEST1","LOG FROM
7.2.97")
N30 IF ERROR
N40 MSG ("Error with WRITE command:"
<<ERROR)
N50 M0
N60 ENDIF
...
WRITE(ERROR,
"/_N_WKS_DIR/_N_PROT_WPD/_N_PROT_MPF", "LOG
FROM 7.2.97")
1-62
Name of file in which the string is to be written. If the
filename contains spaces or control characters (characters
with decimal ASCII code <= 32), the WRITE command will be
terminated with error code 1, "path not permitted".
The file name can be specified with path and file identifier.
Path names must be absolute, that is, start with "/". If the
file name does not contain a domain identifier (_N_), it is
added accordingly. If there is no identifier (_MPF or _SPF),
the file name is automatically completed with _MPF. If there
is no path specified, the file is saved in the current
directory (= directory of selected program). The file name
length can be up to 32 bytes, the path length up to 128 bytes.
Example:
PROTFILE
_N_PROTFILE
_N_PROTFILE_MPF
/_N_MPF_DIR_/_N_PROTFILE_MPF/
Text to be written. Internally LF is then added; this means
that the text is lengthened by one character.
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
;Write the text from LOG FROM
;7.2.97 into the TEST1 file
;Absolute path
Job planning

Advertisement

Table of Contents
loading

Table of Contents