Applies To:
  • CitectSCADA 5.xx

Summary:
Question : If I try to rename a file, with the FileRename() function, and either the Source file does not exist or the destination file already exists then Citect will generate a hardware alarm. The function will still return 0 as if successful. 

Solution:
Confirmed : Tasked for support programmers.

Work Around -

    IF (FileExist("d:\ross.bak") AND NOT FileExist("d:\ross.new")) THEN
        FileRename("d:\ross.bak","d:\ross.new")
    End;

Thus the function will only be called if conditions are satisfactory for its execution.

NB. The same idea can be used with the FileCopy() function. 


Keywords:
 

Attachments