Applies To:
  • CitectSCADA
  • CitectHMI

Summary:
I would like to be able to mask (hide) from the left of the title string in my supergenie page.

The AssTitle function only masks from the right:

AssTitle(Mask, Prefix, Suffix)

Mask:
The number of characters to mask (hide) from the right of the title string
(optional).

Prefix:
A string to add to the beginning of the title string (optional).

Suffix:
A string to add to the end of the title string (optional).

 

Solution:
You can workaround this by making your own function based on the included AssTtile().  The existing function is in the tag.ci cicode file in the CitectSCADA Include project:

FUNCTION
AssTitle
(INT CharMask=0, STRING Prefix="", STRING Suffix="")
    WinTitle
(Prefix + StrLeft(AssInfo(1, 0),StrLength(AssInfo(1,0))-CharMask) + Suffix);
END

You can copy, rename this function in your own project.

Then modify as follows:

FUNCTION
MyAssTitle
(INT CharMaskR=0, STRING Prefix="", STRING Suffix="", INT CharMaskL=0)
    WinTitle
(Prefix + StrMid(AssInfo(1, 0),CharMaskL,StrLength(AssInfo(1, 0))-CharMaskL-CharMaskR) + Suffix);
END

//CharMaskL is added to input the number of characters to mask from the left.


For example, in a Genie Input Touch command you could call this function as follows:

AssPopUp("glone","%tag1%"); MyAssTitle(%RightMask%,"%Prefix%","%Suffix%",%LeftMask%);


Then via the genie form, if you can supply the tag and mask values for example:

AssPopUp("glone","LOOP_2_PV"); MyAssTitle(2,"Stn_1","Unit_2",4)
! masks 2 right and 4 left characters i.e.  "Stn_1_2_
Unit_2"

 

 

Keywords:
 

Attachments