Equipment Reference to Popup(s)

Hello All

i would like to ask you if it's possible to make a Equipment item reference in a Popup Page like that we can use in a Faceplate:

The scope is to open a few popups pages related to a equipement.

At moment we are using the function AssVarTag to pass the tags for Popups. 

 

 Thank you

  • I'm a bit confused. You already use equipment references in your first popup. The only thing you have to do is associate the existing equipment reference to the next pop-up. There is no need for associating the individual tags using AssVarTags (except maybe TrendTag).
    You can use AssChain(-2, WinNumber(), 0) to copy all associations (including the equipment reference) from the current window to the next popup. In your child popup you can then use the same ?__EquipmentRef?.<item> notation like in your main popup.
    For more info look at the AssChain, AssChainPage, AssChainPopUp, AssChainWin ans AssChainWinFree functions in the Help.
  • Hello Patrick.

    Maybe i cannot explain well my doubts about this matter. So, my scope is to have more than one popup open... each popup make reference for it's equipment.

    Now, we are using the old method to use assvartag to pass more than 8 variables to Popup. Now, we would like to make equipment data reference using dynamic equipment item (like we can use in Equipment faceplate).

    Our doubt is how we can open more that one popup, and in each popup make reference to its own equipment.

    Thank you
  • Have you already tried using AssChain() ? That should do what you want.
  • Hello Patrick

    Sorry for my insistence, but maybe i don't understand your suggestion.

    We would like to open many popup pages of the same type (example: MOTOR_DATA) and on each page make reference to different equipment instances, creating a dynamic popup page for show the equipement instance data.

    At the moment, we are using the old method to make reference to the equipment instance TagPrefix, using AssVarTag function before to open the popup page.

    Now, we are interest to change this method, using a Equipment Reference Item and not the equipment TagPrefix, like we are doing before.

    I would like to know if you already use the function AssEquipReferences. we don't have any example to check the functionality of this function.

    Regards

    Miguel
  • Hi Miguel,

    I have no experience with AssEquipReferences and I'm not sure what you want to do with that.

    If you follow my previous advice you can use ?__EquipmentRef?.V12 to display the Tensilo U12 value, etc.

    But it might be that I misunderstand the details of your problem. I read it like this:
    1. You have a pop-up that works with equipment.item references (partial assignment method), like ?__EquipmentRef?.PActM in your first screenshot.
    2. From that screenshot you would like to open a second pop-up with details. You could pass the equipment reference by calling AssChain(-2, WinNumber(), 0) and then call WinNewAt() to open the second pop-up.
    3. In your second pop-up you can now use the same equipment reference as in the first pop-up. So use ?__EquipmentRef?.V12 instead of ?7?. I assumed that this variable tag has V12 as equipment item name.

    If I'm interpreting your issue wrong, please give more details.

    Regards,
    Patrick
  • Hello Patrick

    Ok.. let me explain you better. Please, check the image below.

    If the operator give a one click over genie, we change the reference of equipment instance.

    If the operator give double click, appears a popup page with further information of equipment instance. to do that, we use the old method that includes the AssVarTag function before display the page. You can see in genie configuration that we need pass the tagPrefix of Equipment instance.

    our scope is, open a popup page with further information but using a equipment reference and not a TagPrefix. We believe that we can simplify the system and reduce the own cicode code.

    The configuration in Popup Page for displayed values change from "?xx?" to "?__EquipmentRef?.V12". Is more easy to maintenance or new changes.

    As you see in picture above, you can open several popups to see the data of several equipment instances. 

    We don't know if is possible, and we can't have any example or tutorial.

    I hope that you understand our issue / doubt.

    Miguel

  • So just remove the AssVarTags() calls from your cicode and replace it with Ass(-2, "__EquipmentRef", sEquipment);
    The only thing that you have to do first is retrieve the equipment name (sEquipment) from the place you stored it in when clicking on it. But I suppose you can do this in the same way you retrieve the tag prefix (sTag) in the current solution.
  • In the Citect Help, search for "partial" to find a topic called "Using Equipment References wit Dynamic Associations".
    It gives an example on how to do this.
  • Hello Patrick

    thank you for your suggestion.

    //--------------------------------------
    //Display o Super Genie
    Ass(-2,"Equip",ClusterFirst() + "." + sEquip,0);
    WinNewAt(sPage, Xf, Yf, 2);
    WinPos(Xf, Yf);

    //Encontra nome da Cela através da Cela.
    sTag = EquipGetProperty(sEquip, "TagPrefix");
    sComment = EquipGetProperty(sEquip, "Comment");

    CellName = sTag + " - " + sComment;

    AssTitle(4,CellName);

    it's work.

    Regards