Applies To:
  • CitectSCADA

How do I customise the genie substitution input form? 


When a genie is placed on a graphics page the tag substitution is entered in the Genie Form. By default this form lists the substitution field down the page one by one. For a large project using a genie repeatedly the Genie Form could be modified to speed up the entry of genie substitution. The form could be modified to include drop down boxes filtered to limit the possible entries, add line breaks or put fields side by side.

First the "Disable genie forms" needs to be unchecked in the Graphics Builder --> Tools --> Options menu (see Q2493).

Knowledge Base articles Q2493 and Q2493 have more information how to set the custom genie forms up using "genie form files".This KB article is intended to demonstrate further features of genie form files.

The genie form files are place in the directory the genie library resides. Looking at the include and example project's genie form files (*.FRM) in notepad can assist building custom genie form files.

The Example demo project also demonstrates the use of these genie forms. If you open the Genie page in the Graphics builder you can see the use of the genie forms. The Number_Pad field genies in the demonstrates a more complex genie form showing line breaks and substitution fields placed side by side. The Number_Pad genie is from the KeyEntry genie library in the Include project. The corresponding genie form file for the library is called keyentry.frm in the include project directory.

Below is the form for the Number_Pad showing the use of field breaks, placing fields on one line and the use of drop down lists.

FORM "Number_Pad", "Genie - Number Pad ";

1: "Tag", 254, readwrite, "Variable Tags", "NAME";
2: "Font", 16, readwrite, "Fonts", "NAME";
3: "Comment", 48, readwrite;
4: "Title", 32, readwrite;
5: "Default", 254, readwrite, "Variable Tags", "NAME";
6: "PW", 6, readwrite, "HELP", "BOOLEAN";
7: "PM", 6, readwrite, "HELP", "BOOLEAN";
8: "SL", 6, readwrite, "HELP", "BOOLEAN";
9: "DP", 6, readwrite, "HELP", "BOOLEAN";
10: "SC", 6, readwrite, "HELP", "BOOLEAN";
11: "AMPM", 6, readwrite, "HELP", "BOOLEAN";

"Tag {1 }
Font {2 }
Comment {3 }
Form Title {4 }
Form Default Value {5 }
Numbers: [+/-] Key {7 } [\] Key {8 } [.] Key {9 }
Time: [:] Key{10 } [AM/PM] {11 }
Password: Hide Echo {6 }"

The screenshot below shows the resulting genie substitution entry form in the Example project

KB Q2493 demonstrating filtering the list based on partial name by using

..."Variable Tags", "NAME", "*_PV";

You can use the filter to also specify other fields to filter like TYPE or ADDR too. For example

..."Variable Tags", "NAME","TYPE=Digital";

Or combine them by

..."Variable Tags", "NAME","*_PV,TYPE=DIGITAL"

Please note incorrectly written genie form files may cause citect crash in versions earlier than 5.40 – see Q2493.