AnsweredAssumed Answered

Building the PI tag data reference configstring dynamically

Question asked by JanvanderVen on Nov 12, 2015
Latest reply on Nov 28, 2018 by sraposo

Hi everyone,

 

 

I was asked to model some assets today that only differed in the UoM for one attribute. One was measured in m and the other in cm. I wanted to use the same template for both assets, overriding the attribute in a derived template would greatly increase the number of templates and would make it very difficult to select the right one for new elements. So I thought I would place the UoM in a sub attribute, build the configstring dynamically and use that string as the configstring for the PI Point Data Reference:

levels.png

I then create 2 instances with a different uom attribute: m and cm...

 

Funny enough the configstring of the Level element now shows the following: "\\WIN-J1BLILKVRJJ\SINUSOID;UOM=m";UOM=m

 

And the second level (with cm) has: "\\WIN-J1BLILKVRJJ\SINUSOID;UOM=cm";UOM=cm

 

When I copy and paste the value of the Level attribute I get:

The Attribute's Data Reference Configuration String is not the same as what is stored in the database.GoodTankTemplateIs Not HiddenLevel0,03312987 m
The Attribute's Data Reference Configuration String is not the same as what is stored in the database.GoodTankTemplateIs Not HiddenLevel3,312987 m

 

The Level configstring in the template is: %@.|configstring%

 

The questions are:

1) Why does AF add the UOM?

2) Is it bad in some way that the "The Attribute's Data Reference Configuration String is not the same as what is stored in the database."?

3) At first this solution did not work, and then all of a sudden it did. Is this a valid solution? Stable?

 

Thanks in advance,

 

 

Jan

Outcomes