Using CitectSCADA > Genies and Super Genies > Super Genies > Using structured tags with Super Genies

Using structured tags with Super Genies

Super Genies do not support direct concatenation of the Super Genie tag with other information (as do Genies). For example, ?INT 1?_PV is not valid and will generate a compiler error. However, you can concatenate the tag using a Cicode expression. You need to use a unique Super Genie variable for each real tag, and concatenate the tag with the Ass Cicode function. For example, if you have defined a loop controller with three bar graphs (created using the fill property in a rectangle) to display the tags DEV1_PV, DEV1_SP and DEV1_OP, you can configure a Super Genie as follows:

Each rectangle has a separate vGenie tag:

Level expression

?INT 1?

Level expression

?INT 2?

Level expression

?INT 3?

If you do not use structured tags, you can call the Ass function for the above Super Genie as follows:

AssPage("PageName", "DEV1_PV", "DEV1_SP", "DEV1_OP");

To concatenate information for the Super Genie, you could also write your own Cicode function, as follows:

AssMine(STRING sPage, STRING sTag)
AssPage(sPage, sTag + "_PV", sTag + "_SP", sTag + "_OP");

With this function, you can call your AssMine() function (for example, from a command button), and pass a single tag (DEV1), as follows:

AssMine("PageName", "DEV1");

Writing your own Cicode function to call a Super Genie provides extra flexibility; however, you can also use a Super Genie (for example, from a button command) to call the Ass function, as follows:

Execute command

AssPage("%Page%", "%tag%_PV", "%tag%_SP", "%tag%_OP");

When you use the above Super Genie, you only enter the page name and tag once.

You need to pass the tag name (by enclosing it in quotation marks) to the Super Genie functions. You cannot pass the tag values. For example, if you pass %tag%_SP (no quotes), the value of the variable and not the tag name is passed to the Super Genie, and the association will not succeed, and a runtime error may result.

See Also