Applies To:
  • CitectSCADA 3.xx, 4.xx, 5.xx

Summary:
I have a large number of text files which I want to display in Citect runtime. I have created a single page called !File based on the File template and successfully display each file by using the PageFile function. But I would like to see the file name appear on the page so operators know what it is they are viewing. 

Solution:
Add a blank AN on your !File page. Then create your own function based on the PageFile function located in the citect.ci library in the Include project. Copy this code to one of your own Cicode libraries, then add the line DSPStr(AN,"TextFont",sFile) to the end of the function. Where AN is the animation number you pasted down on your !File page. Then call your new function rather than PageFile() to display your files.

Your code should look something like:

FUNCTION
MyPageFile(string sFile = "")
IF PageDisplay("File") THEN
PageDisplay("!File");
END
DspFile(21, DspFontHnd("TextFont"), 24, 95);
DspFileSetName(21, sFile);
DspStr(33,"TextFont",sFile)
END

 

Keywords:
 

Attachments