Applies To:
  • CitectSCADA 5.50, 5.50A
  • CitectHMI 5.50, 5.50A

Summary:
When the cicode function FileExist() is used within a cicode object, or in a tightly looped cicode function, it generates a hardware alarm:

----------------------------------------------------------------------------------------------------------

12:12:40 PM Cicode General Bad handle specified FileExist Test

----------------------------------------------------------------------------------------------------------

This did not occur in v5.42.

 

Solution:
To fix this problem, use FileFind() instead, as shown in the following code example (note the FileExist() equivalent that is commented out):

FUNCTION Test()
    !IF FileExist("c:\variable.dbf") THEN
    IF FileFind("c:\variable.dbf", 0) <> "" THEN
        TraceMsg("File does exist.")
    ELSE
        TraceMsg("File does not exist.")
    END
END

 

Keywords:
 

Attachments