asset framework examples: https://learning.osisoft.com/asset-based-af-example-kits
OSI PI asset framework quick overview
Source sensor data stream into OSI PI Archive.
Asset framework is for organizing the raw data in some sort of strucuture or hierachy so it is easier to use.
Creating an asset framework should use templates so as not to repeat the same config for same types of equipments over and over again.
From PI System Explorer
1. go to Library tab
1.1. create a new Element Template, give it a name 'Pump'
under the element template, switch to Attribute Templates
1.2. add new Attribute Template
This is about the attributes of the element, we specify the name, Unit of Measurement (UOM) default values, etc.
Put in 'Temperature' attribute, select UOM as Degree Celsius
Go the 'Settings' of the attribute:
search the tag name (the sensor tag), e.g. *Pump*
select the Tag that you want to map the attribute to.
select the source units as 'degree Celsius', don't leave it to default otherwise can be confusing down the track.
NOTE the source unit and the attribute's UOM can be different, and OSIPI will convert it automatically.
Hardcoding the unit avoids a lot of confusion in the future.
When the tag is mapped, the PI Point path, e.g. \\PISRV01\%Element%.TI.PV;UOM=°C will be displayed.
NOTE PI Point is one common type of data reference to sensor data, but an attribute can also be mapped to Table Lookup in (SQL database), String builder (concating dynamic strings), etc.
1.3 For calculated attribute, go to Analysis Templates
Put in a name and description
Add a new variable, give it a name and click on the expression
There are different functions for calculation
To reference an attribute, use single quotation, e.g. 'Discharge Flow Rate'
To use a string/data type/UOM, use double quotation, e.g. "m3/s"
An example calc is:
//check if the pump is running
If 'Discharge Flow Rate' < 10
THEN Exit()
ELSE Convert('Discharge Flow Rate',"m3/s")
NOTE, two types of scheduling to run the calc.
a. event-triggered, when any new data, re-calc
b. periodic
If it is high frequency data, and large window calc, the average for one day.
e.g. TagAvg('Instantaneous Efficiency', '*-1d', '*')
Then it is better to run it hourly using periodic. Otherwise it can cause huge computation for the PI system and bring it down.
When a calculation formula is done, click on 'Map' to create 'New Attribute Template'
so it appears in the attribute template as well.
This way it creates a new attribute template, you can overwrite an old one as well.
There are other analysis type for the calc, e.g. 'Event Frame Generation' which looks at start and end of events to do calc.
2. create elements based on template
switch to 'Elements'
Click New Element, and choose the 'Pump' template
Call the element pump01, it will have all the attributes defined in the template straightaway.
create pump02, pump03, etc. they will have exactly the same attributes settings.
A quick way is to copy and paste pump01, it will automatically increment the suffix number.
NOTE
However, all the pump's attributes are pointing to the same Tag for now.
e.g. the temperature attribute is mapped to pi point \\PISRV01\Pump01.TI.PV;UOM=°C
To make it dynamically work for different pumps, go back to the Library and attribute template
replace the element name 'Pump01' in the path with %Element%
So the pi point path becomes:
\\PISRV01\%Element%.TI.PV;UOM=°C
The %var% refers to a variable dynamically, so different element will be using different actual tags for the attributes.
3. check in and backfill
When the calculated attributes are created
it only has data since it's created, we can back fill data
Go to the 'Management' tab, select the analyses that you want to back fill
select the start and end time,
choose permanently delete existing data as it will be re-calc anyway
click 'Queue' to run the backfill
4. Use PI Vision to visualize data
Go to PI Vision
select the asset framework from left hand side
choose the element
drag attributes on to the design pane
right click the attribute to 'format' or to 'Switch Symbol to' trend or chart or etc.