Siemens SINUMERIK 840D sl Programming Manual page 567

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

Advertisement

Program code
N40 MSG ("Error with WRITE command:" <<ERROR)
N50 M0
N60 ENDIF
...
Example 2: WRITE command into the passive file system with absolute path data
Program code
...
WRITE(ERROR,"/_N_WKS_DIR/_N_PROT_WPD/_N_PROT_MPF","LOG FROM 7.2.97")
...
Example 3: Implicit/explicit "LF"
a) Write to the passive file system with implicitly generated "LF"
Program code
...
N110 DEF INT ERROR
N120 WRITE(ERROR,"/_N_MPF_DIR/_N_MYPROTFILE_MPF","MY_STRING")
N130 WRITE(ERROR,"/_N_MPF_DIR/_N_MYPROTFILE_MPF","MY_STRING")
N140 M30
Output result:
MY_STRING
MY_STRING
b) Write to an external file without implicitly generated "LF"
Program code
...
N200 DEF STRING[30] DEV_1
N210 DEF INT ERROR
N220 DEV_1="LOCAL_DRIVE/myprotfile.mpf"
N230 EXTOPEN(ERROR,DEV_1)
N240 WRITE(ERROR,DEV_1,"MY_STRING")
N250 WRITE(ERROR,DEV_1,"MY_STRING")
N260 EXTCLOSE(ERROR,DEV_1)
N270 M30
Output result:
MY_STRINGMY_STRING
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
Work preparation
3.5 File handling
Comment
567

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents