1 of 1 people found this helpful
Lindsey Hatfield, I wonder if you can take advantage of the @ collection attribute sorter within your substitution parameters (similar to XPath attribute selector). For example: '.\elements[@index=1]|Outlet Pressure'; Note, the first child is at index position one. I am not sure how you will handle N number of child attributes cleanly without switching your template or using excluded attributes.
Thanks Dan, that is what I was looking for and it worked a treat.
As you said working with the N number of children is a pain and I may have to have blank trend traces for unused variables but it beats building lots of individual displays.
Have you tried working with collections in PI Vision? At least for the bottom portion of your display, I think you could use the search criteria in a collection to return only the trends of the children of the selected group. I apologize that I'm not able to test this right now and provide more details, but hopefully this will spark some successful experimentation.
Check out videos 3 and 4 in this playlist for more details on collections, asset filters, and linking displays with context:
Also, here is a link the latest PI Vision User Guide (2017 R2):
Please keep us posted on your progress.
Thanks Brent, the bottom half of the display is a collection.
I love them as long as they do not have to many elements, I found that doing a collection with 1200 elements and returning around 30 of them was a bit slow, but it takes so much work out of the displays and can simplify displays.
3 of 3 people found this helpful
Agree with Dan...you can use collections.
Is there a maximum number of regs for a parent element?
You could use the stringbuilder to do some checks and get the value from child elements, using the Elements collection, or Elements using a specific template.
In my example I just do something that PI Vision wouldn't plot:
elements[@index=5] would get the 5th child element but of any template. You could expand it with ".\elements[@Template=Regulator][@Category=ParentInherits][@Index=5]..."
Once you have your SB configuration, you can change the Attribute types to be Double to force an error for attributes where the child doesn't exist.
Then you could just plot all the "Outlet Pressure LPDR-??" attributes and only those with valid data will be drawn.
I would probably go one better and automate the AF Structure build and synchronisation, but it depends on your source system and whether you want to write a little bit of code.
Excellent, I have done what Dan suggested on a copy of the template and it worked well, but this gives me a few more ways of cleaning up the displays.
I like using the default to "No Data" and will give that a go as well.
We have all the sites LPDR devices built automatically but this AF grouping is done with weak links to the sites and was built manually.
I am not a programmer as such (though love to play when I have time)
All the site names and IDs are in a database table along with the Pressure Network they belong to, so I technically could write something to create the structure I think.
We will see if I can find the time, these networks rarely change so I am not to fussed doing an element search then a copy and paste for building the groups, there are 30 groups.
Thank you all for your suggestions and I will detail the final results with all your suggestions taken into account.
1 of 1 people found this helpful
Guys, this is exactly the information we were after, following the suggestions of Dan and Rhys I have the Vision Display the team were after.
The only thing that would make this better would be to have the trend labels the Site Names rather than OP-1 etc.
But I don't think that can be done ATM. So I will add a variable to each device for the Element number of each site.
Thanks again to all your input.