Flexible NC programming1.18 Write file (WRITE)Job planningProgramming Manual, 02/2011, 6FC5398-2BP40-1BA0 143General conditions• Maximum file size ( → machine manufacturer)The maximum possible file size of log files in the passive file system is set with themachine data:MD11420 $MN_LEN_PROTOCOL_FILEThe maximum file length is applicable for all files created using the WRITE command in thepassive file system. If it is exceeded an error message is output and the block or data isnot saved. If there is sufficient free memory, a new file can be created.ExamplesExample 1: WRITE command into the passive file system without absolute path dataExample 2: WRITE command into the passive file system with absolute path dataNoteWhen writing into the passive file system of the NCK, the WRITE command implicitly insertsan "LF" character (LINE FEED = new line) at the end of the output string.This behavior does not apply for output on an external device/file. If an "LF" is also to beoutput, then this must be explicitly specified in the output string.→ also refer to example 3: Implicit/explicit "LF"!Program code CommentN10 DEF INT ERROR ; Definition of errorvariables.N20 WRITE(ERROR,"PROT","LOG FROM 7.2.97") ; Write the text from "LOGFROM 7.2.97" to file_N_PROT_MPF.N30 IF ERROR ; Error evaluation.N40 MSG ("Error with WRITE command:" <N50 M0N60 ENDIF...Program code...WRITE(ERROR,"/_N_WKS_DIR/_N_PROT_WPD/_N_PROT_MPF","LOG FROM 7.2.97")...