In this video we will cover Element Reference Types and how you can use them in your PI
AF Hierarchy. Whenever you create a new element in your Asset Hierarchy
you are asked to choose a reference type to relate this new element to its parent.
In a majority of use cases, the default option of Parent-Child will be suitable.
However there may be other use cases that require a different approach. Say you to have one view of
your AF Hierarchy organized by Location, but want to have another view of your Hierarchy organized
by Equipment Type. Each of these AF hierarchies hold the same elements just displayed under
different parents by using element references. When we remove an element on one view, we want it
and its references to be also removed on the other to simplify our hierarchy maintenance. To
accomplish this, we would use a Weak Reference for element references in the second view.
Another possible scenario is to have an element that can only exist because of its relationship to
its parent. For example, a motor that runs a pump may be represented as a separate element in PI AF,
but is really just a part of the pump and cannot exist outside of it. Removing the pump from a site
would remove the motor as well. For these types of references, we would use a Composition reference.
When referring to these Reference Types we consider Composition and Parent-Child
references to be strong and Weak Reference as the name suggests to be weak. This will
be important to remember as we go through examples of each of the reference types next.In
this first example we have a Heat Exchanger called HeatExchanger01 in Production Line B.
It has a valve that is an integral part of the heat exchanger that can not exist on
its own. Therefore, the relation between the valve and the heat exchanger is Composition.
We can confirm this in PI System Explorer by clicking on the Heat Exchanger Parent Element
and then selecting the Child Elements Tab. Once on this tab, on the upper right select group by
Reference Type and we will see that the child element Valve has a Composition Reference Type.
We also have the valve element references elsewhere in the tree under a parent Valves
Element and in a Secondary View Element. Each of these has a different Reference Type,
Parent-Child and Weak Reference respectively. We can tell these
are element references because of the white and black shortcut icon next to the element.
To show how the composition reference type affects this structure lets delete the parent
Heat Exchanger and observe its effect on the valve element and element references.
To do this I Select Heat Exchanger01 and right click to select Delete.
Then Select the Delete option to delete the object and all references to it. Check-In and Refresh.
The Result is the valve element and all the valve element references disappear.
Note this is independent from whether the valve element reference
has a strong or weak reference to the parent element
as shown by the different parent elements that the valve previously existed under. Next lets
show an example of a weak reference enabling two different views of our Hierarchy in PI AF.
Pump01 is located as a child under Production Line A - Pumps. This is the main view for Pump01 and
has a Parent-Child Reference. An element reference for Pump01 also exists below the Secondary View
element. For this view, the reference Type between Secondary View and the Pump01 element reference
is Weak Reference. To show how the weak reference enables us to manage element deletions from one
view lets delete the Pumps Element. To do this I am going to select Pumps and right click to
select Delete. Then Select the Delete option to delete the object and all references to it.
Check-In and Refresh. The result is the element reference for Pump01 below Secondary
View disappears, because by deleting Pumps and Pump01 you have deleted the last strong parent.
Lastly let’s explore the use of Parent-Child References. Pump02 is located as a child under
Production Line A - SiteABC. However, this is not considered the only view for this pump,
because an element reference for Pump02 is also below the Strong Families element,
which is another view that is considered to have the same importance.
The Reference Type between Strong Families and Pump02 element reference is Parent-Child. To see
the effect deletion has in this case I am going to select Site ABC and right click select Delete.
Then select the Delete option to delete the object and all references to it.
Lastly Check-In and Refresh. The result is the element reference for Pump02 is promoted
to an element. It changes from an element reference icon to an element icon because
there was a remaining strong reference to the element. With these examples, you
should be able to make good use of the different Element Reference Types in your AF Hierarchy.