Programming
2.3 Variables
Expanding the user interface
2-40 Commissioning Manual, 11/2006, 6FC5397-0DP10-0BA0
2.3.18 FILE_ERR variable
Description
Variable FILE_ERR can be used to check whether the preceding GC or CP command has
been executed correctly.
Programming
Syntax: FILE_ERR
Description: The FILE_ERR variable is read-only.
Return Value: Possible results are:
0 = Operation okay
1 = Drive/path not available
2 = Path/file access error
3 = Drive not ready
4 = Incorrect file name
5 = File is already open
6 = Access denied
7 = Target path not available or not permitted
8 = Copy source same as target
10 = Internal error: FILE_ERR = 10 means that the error cannot be
classified in the other categories.
Example
CP("D:\source.mpf","E:\target.mpf")
; Copy from source.mpf to E:\target.mpf
IF FILE_ERR > 0 ; Scan to ascertain whether error has occurred
IF FILE_ERR == 1 ; Scan specific error numbers and output
associated error text
VAR5 = "Drive/path not available"
ELSE
IF FILE_ERR == 2
VAR5 = "Path/file access error"
ELSE
IF FILE_ERR == 3
VAR5 = "Wrong file name"
ENDIF
ENDIF
ENDIF
ELSE