Applies To:
  • CitectSCADA 5.xx
  • CitectHMI 5.xx

Summary:
I am having problems with using mode 512 with the WinNewAt(Page, X, Y, Mode).

In the help documentation it clearly states that mode 512 is used to open a unique Super Genie. This mode prevents a Super Genie from being opened more than once (at the same time). However, the same Super Genie with different associations can be opened.

When I use mode 512 in my Cicode it will still allow multiple copies of the same super genie to be called from the one Genie. This is not what I wanted, how can I rectify the problem.

 

Solution:
The problem here lies within the complete code and not just the WinNewAt() function. To place the Super Genie on the screen in the cicode the DspGetMouse() function was used. If this function is placed between the AssVarTags() and WinNewAt() function you have the problem of multiple copies of the same super genie been called from the one Genie. To fix the problem you simply place it earlier and mode 512 will work fine.

Please see below example Cicode on how to define and use this function correctly

FUNCTION PID_popup(STRING sTag)
INT X;
INT Y;

    DspGetMouse(X,Y);
    X = X + 40;

    AssVarTags(-2, 0, "^", sTag+ "eg1", "eg2");
    AssVarTags(-2, 8, "^", sTag+ "eg1", "eg2");
    AssVarTags(-2, 16, "^", sTag+ "eg1", "eg2");
    AssVarTags(-2, 24, "^", sTag+ "eg1", "eg2");
    // DspGetMouse(X,Y);
    // X = X + 40;
//NOTE THAT THE WinNewAt() falls outside the DspGetMouse( ) and AssVarTags Cicode Functions
    WinNewAt("!PID_Basic", X, Y, 1+4+8+32+64+256+512+1024); // AssWin

END

 

Keywords:
 

Attachments