Flexible NC programming
1.18 Write file (WRITE)
Job planning
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
135
General conditions
● Maximum file size (→ machine manufacturer)
The maximum possible file size of log files 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. 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 without absolute path data
Program code Comment
N10 DEF INT ERROR ; Definition of error
variables.
N20 WRITE(ERROR,"TEST1","LOG FROM 7.2.97") ; Write the text from "LOG
FROM 7.2.97" to file
_N_TEST1_MPF.
N30 IF ERROR ; Error evaluation.
N40 MSG ("Error with WRITE command:" <<ERROR)
N50 M0
N60 ENDIF
...
Example 2: WRITE command with absolute path data
Program code
...
WRITE(ERROR,"/_N_WKS_DIR/_N_PROT_WPD/_N_PROT_MPF","LOG FROM 7.2.97")
...