As you work in asset framework,
you may need to configure element attributes or
use an existing hierarchy and need to identify attribute
configurations. Let's take a look at the configuration of
many data reference types and how they can work together to give you a better
idea of what's possible with asset framework. You
may already be aware of PI Point data references where we
assign a PI tag to an attribute preferably using a human
friendly name. But there are many others
too. We can look up values from tables internal
to AF or from linked external sources, perform simple
calculations using formula data references
and manipulate
elements and attributes with string builder. Use analysis service to complete
more complex calculations that may or
may not be saved to PI tags. And finally build web links, in this
case a link to a PI Vision display specific to our line one
element. Let's start with PI Point data references.
Here
we have an attribute oil
temperature assigned to the PI tag L1IPBT.
And we've told AF that the incoming unit of measure
is degrees Celsius. We've also told AF
that we want the attribute displayed in degrees Fahrenheit
as you can see here.
As a user of asset framework, you no longer need
to tag name to find the oil temperature of this asset. Instead you'll be
browsing through your hierarchy as shown up here at the upper
left. And then looking for the oil temperature
process data information in your attributes. Let's take a
look at the configuration of another PI Point data reference,
in this case the inlet flow rate. Here we have a slightly
different configuration where we are doing an average
on the incoming information. We'll click on the
settings tab to configure some more in-depth
information. In this case we are even using
value retrieval methods which is more advanced than we'll be discussing
here. But it allows us to do an average over the last
five minutes of information for this tag. You should be
aware that even when attributes are assigned a PI Point data
reference, there is still maybe some simple calculations that are done with
them using value retrieval methods.
AF allows you to build tables,
import tables from external sources or have refreshing
links to external tables. These tables are viewed and
configured in the library as you can see
here. Let's take a look at the pump details table.
You can see that we have a table with
the line number, the pump type and then we have the manufacturer
and serial number. We'd like to be able to pull
this information into our attributes based on the elements that we
have selected in our hierarchy
in the upper left. Let's start with the manufacturer
attribute and we'll write out the SQL query with the line number and pump
type. And then we'll generalize it with the serial number attribute.
We are using the SQL query to pull the result of the manufacturer
column from the pump details table
based on the line number and pump type. You won't need to
learn how to write these SQL query to pull information from
tables. The configuration can be completed under the settings
tab.
As a more complex example,
here we are pulling in the serial number from the same
table. But instead of directly writing out line one
and inlet pump, we are using what's known as substitution parameters
denoted with the percent signs
here, % element % references the element containing the
attribute. While the other substitution
parameter references the element
one level higher up in the
hierarchy. You can even use a table look-up to interpolate
values. Let's take a look at a second
table. Here we have the target oil temperature
table. Our inlet process flow rate
is shown here. Based on that process flow
rate, we have a target oil temperature.
If we go back to our element, we can see that our inlet
flow rate is 228.4. However
we wouldn't be able to find that exact
value in the table. We can still find the oil temperature target by
using the interpolate function which
will interpolate between the nearest values in the table. In
this case resulting in a value of
152 degrees Fahrenheit. Using the simple
formula data reference, we then want to take the difference
between that target oil temperature and our current oil
temperature which is a PI tag here. That difference
is calculated using a formula
data reference. This allows you to do
simple calculations with their history not being saved to PI
tags. There are some simple functions that are available
again going under the settings tab and you can see
here that we are using the absolute value function which is
right here. Sometimes
you may want to manipulate the names of assets or attributes
or the results to construct new values. In
this case I have a table
pumper pairs with a list of serial numbers and repair dates
and times. However
this is an externally linked table. And for
the pumper pairs table, they were only using the last
four digits of the serial number.
We'd like a way to take the last four digits of the serial number that we pulled
in here so that we can then pull in information
from the repair date table. We do this using String Builder.
In this example, I'm pulling the right
four characters of the attribute serial number
to obtain
8LGG. Based on that
information, I then build a table look-up which
pulls the repair date from the pump repairs
table.
Since I've told
AF the timezone information for that
table, it also knows to convert it to my local
timezone. I then configured a
simple formula data reference to determine
the date since the last repair.
[inaudible] Builder allows you to build links to websites
similar to String Builder. In this case I have a
link to a PI Vision display.
I've referenced the name of my parent
element in this particular link which would be line
one. So depending on where I'm working in my hierarchy,
the links that are shown here will update
to make sure that when I click on it, it opens up a display
with the same line number that I'm working in in
AF. Finally we do not configure analysis
from the analysis service on the attributes
tab. That instead would be done under the analysis
tab. However we often output the
results of analysis as attributes. In this case
we have two outputs. One where we are saving the history
to a PI tag and the other where we aren't. Let's start
with the case where we aren't saving the history. If
we go ahead and hover over the orange
diamond, we can see the formula that's used for this
calculation. Also on the right, our data
reference is showing up as analysis.
In the case where we are saving the history of the
tag, we can again hover over the orange
diamond to see the formula that's used for the
calculation. However on the far right, the data reference shows as
PI Point. In this case, this is the tag that we are outputting to
from the analysis so that we can save its
history. Let's take one more look
at the attributes in a different way. Instead of
following the data flow through our attributes
to show you how we use different data reference types
together. We started out by
using PI Point data references to map
three PI tags to attributes in AF. In two of
the cases, we did some simple calculations using
value retrieval method. We did a table look-up
to find the manufacturer of our pump. We
also looked up the serial number from the table
using substitution parameters. If we were to templatize
this element, we would use substitution
parameters for many more of our attributes.
We use String Builder to pull the last four digits of our
serial number and then did another table look-up
to find the most recent repair
date. Based on that repair date, we did a formula
calculation to determine the number of days since last
repair with AF handling all the timezone information.
We looked up the oil
temperature target using interpolation
and then did a simple calculation to determine the
oil temperature differential. We
also looked at the outputs from the analysis services.
In one case where we were not saving the history and in one case where we
were. And
finally we built a web link to a PI Vision display
that's specific to the line number that we are currently
working under. You should now better understand the
types of attributes you can configure with
AF. See how they can work together to provide even more power and
flexibility. And to be able to identify the source
data of attributes if you are working with an existing AF hierarchy.