Using Include (Text) Files
- Last UpdatedJul 18, 2023
- 2 minute read
There is a maximum number of characters that you can type in a Command or Expression field (usually 128). If you need to include many commands (or expressions) in a property field, you can define a separate include file that contains the commands or expressions.
An include file is a separate and individual ASCII text file containing only one sequence of Plant SCADA commands or expressions that would otherwise be too long or complicated to type into the Command or Expression field within Plant SCADA. The include file name is entered instead, and the whole file is activated when called.
When you compile the project, the commands (or expressions) in the include file are substituted for the property field, just as if you had typed them directly into the field.
Use a text editor such as Notepad to create the text file.
Enter the name of the include file (either upper- or lower case) in the property, in the following format:
@<filename>
where <filename> is any valid DOS file name. Be aware that the bracket characters (< >) are part of the syntax.
You can use include files with many properties (except record names), but they are commonly used for commands and expressions, for example:
-
Key sequence: F5 ENTER
-
Command: @<setvars.cii>
In the above example, the setvars.cii include file would contain commands to be substituted for the Command property when you compile your project, for example:
PV12 = 10;
PV22 = 20;
PV13 = 15;
PV23 = 59;
PageDisplay("Mimic");
Note:
-
Include files can not be used for genie properties.
-
Do not confuse include files and includedprojects. Include files contain Plant SCADA commands and/or expressions and are used as substitutions in a Plant SCADA command or expression property field. Included projects are separate (usually smaller) Plant SCADA projects that can be included in another Plant SCADA project so that they appear together as one project.
-
The include file name can contain a maximum of 64 characters, or 253 characters including a path, and can consist of any characters other than the semi-colon (;) or the single quote('). There is no need to include the .cii extension, but if the file is not in the project directory, you need to enter the full path to the file. If the file is not in the project directory, it will not be backed up with the Backup facility.
-
If modifying an Include file with the Cicode Editor, when you save your changes a .ci file extension will be appended to the file name. Change this to a .cii file extension in Windows Explorer.