Work preparation
3.5 File handling
Example
Program code
N10 DEF INT ERROR
N20 STRING[32] RESULT
N30 FILEINFO(ERROR,"/_N_MPF_DIR/_N_TESTFILE_MPF",RE-
SULT)
N40 IF ERROR <> 0
N50
MAND")
N60
N70 ENDIF
...
In the result variables RESULT, the example could supply the following result:
"77777 12345678 26.05.00 13:51:30"
574
MSG("ERROR"<<ERROR<<"FOR FILE INFORMATION COM-
M0
Comment
; Definition of error varia-
bles.
; Definition of result varia-
bles.
; File name with domain, file
ID and path data.
; Error evaluation
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
NC programming