Home › Technical articles

Đọc bằng tiếng Việt

PI Asset Framework (PI AF): element templates, attributes, data references, analyses and event frames

TDL Industrial Automation · Last updated:

From AVEVA's PI Server 2024 R2 documentation: the PI AF server and its SQL database, elements, attributes and hierarchies, element and attribute templates, the six data references, the four analysis types (expression, rollup, event frame generation, SQC), event-triggered and periodic scheduling, backfilling and recalculation, and event frames as PI Vision 2025 shows them.

PI Asset Framework (PI AF) is the asset model of a PI Server: each pump or tank becomes an element, its data become attributes that point to PI points, formulas or tables, and templates let a hundred identical pumps be configured once. PI Analysis Service runs analyses on those attributes and writes calculated values or event frames, records of a downtime, an excursion or a batch with a start and end time. This article follows AVEVA's PI Server 2024 R2 documentation, the newest PI Server set on docs.aveva.com, and the PI Vision 2025 user guide. How PI compares with AVEVA Historian: AVEVA Historian vs PI System.

From PI points to event frames: PI AF and PI Analysis ServiceFive layers from top to bottom. Data Archive: PI points hold time-series data from the interfaces; analysis outputs mapped to PI point attributes are also stored here as history. Read through PI point data references into the PI AF database (SQL Server, through the PI AF Application Service): an element template, for example Pump, holds attribute templates and analysis templates; each pump is an element made from the template; attributes get their values through data references: PI point, PI point array, Formula, String Builder, Table lookup, URI Builder. PI Analysis Service reads the attribute values on a periodic or event-triggered schedule: Expression, Rollup, Event frame generation, SQC. Results are written back into PI AF: output attributes with history in PI points, and event frames made from an event frame template that reference the element. Clients: PI Vision (related events, event details, acknowledgement), PI Datalink and PI WebParts, PI OLEDB Enterprise, PI JDBC Driver and PI Web Services for reporting tools, PI Notifications Service rules on event frames. Based on AVEVA PI Server 2024 R2 and PI Vision 2025 documentation.From PI points to event frames: PI AF and PI Analysis ServiceData ArchivePI pointsPI points hold time-series data from the interfacesanalysis outputs mapped to PI point attributes are storedhere as historyread through PI point data referencesPI AF databaseSQL Server, through thePI AF Application Serviceelement template, for example Pump: attribute templatesand analysis templateseach pump is an element made from the templateattributes get values through data references: PI point,PI point array, Formula, String Builder,Table lookup, URI Builderattribute values readPI Analysis Serviceperiodic or event-triggeredExpression · values calculated from expressionsRollup · statistics over attributes or child elementsEvent frame generation · start and end triggersSQC · Western Electric pattern testsresults writtenResultswritten back into PI AFoutput attributes, with history in PI pointsevent frames made from an event frame template,referencing the elementshown and usedClientsread the PI AF dataPI Vision: related events, event details, acknowledgementPI Datalink, PI WebPartsPI OLEDB Enterprise, PI JDBC Driver, PI Web Services forreporting toolsPI Notifications Service: notification rules on event framesBased on AVEVA, PI Server 2024 R2 documentation (Asset Framework and PI System Explorer; Analytics andNotifications; Installation and Configuration) and PI Vision 2025 (read 17 November 2026). Pump is an examplename. Figure: drawn by TDL.
Figure 1: From PI points to event frames: PI AF and PI Analysis Service. On a phone, swipe sideways to see the whole figure.

1. Where PI AF sits in PI Server 2024 R2

AVEVA lists Data Archive, PI AF and PI Notifications Service as the parts of PI Server, with PI Analysis Service as a further server role in the same install kit. Data Archive stores the time-series data; PI AF gives it the context of assets and equipment.

The PI AF server consists of the PI AF Application Service, through which clients read and write PI AF data, and the PI AF SQL database. In 2024 R2 that database runs on SQL Server or on a cloud database (Microsoft Azure SQL, Azure SQL Managed Instance or Amazon RDS for SQL Server); the last two are new in 2024 R2.

Item What the 2024 R2 documentation says
Tiers a client or the AF SDK, the PI AF Application Service, the PI AF SQL database; any of them can share a computer
Install order PI AF server normally first, because PI Analysis Service and PI Notifications Service store their configuration in it
SQL Server Express 1 GB memory and 10 GB database limits, no PI AF high availability, no SQL agent for maintenance jobs
Disk estimate about 3 GB for 50,000 elements with 20 double attributes each; event frames add more
High availability load-balanced PI AF servers, SQL Server AlwaysOn availability groups, mirroring, replication or Windows Server Failover Clustering
Ports TCP 5457 for AF SDK clients such as PI System Explorer and PI Vision, TCP 5459 for PI SQL for AF clients, TCP 1433 from the PI AF server to SQL Server

AVEVA recommends separate, redundant computers for PI AF and SQL Server, and Data Archive away from SQL Server. One PI AF server holds several PI AF databases; the one named Configuration is used by clients such as PI Web API and should not hold application data.

2. Elements, attributes and the hierarchy

Each piece of equipment in the asset model is an element, and its data are attributes: a fixed value such as a tank diameter, or a reference to a PI point, a formula, a relational database, a file and more. In AVEVA's pump example, users read pressure and temperatures on the pump element without knowing the PI point names.

Elements form a tree, like folders on a Windows computer, grouped for example by equipment type or by plant; an element reference places one asset in both trees. AVEVA advises 10 levels or fewer and a small start, with one asset type or one group of users. Clients show the tree too: PI Vision uses it to find related assets, elements built from the same template. Categories are user-defined groups that filter searches, separate for each object type.

Data types differ between PI AF and Data Archive: the PI AF Int16 is signed while the Data Archive Int16 holds only positive numbers, Int64 has no Data Archive equivalent, and Data Archive strings are limited to 976 characters and are not Unicode.

3. Element templates and attribute templates

A template is a model of an asset type. Every element created from it gets an attribute for each attribute template, with all its properties, though each attribute still needs its own value. A change to the template reaches every element based on it, and AVEVA recommends basing elements on templates in almost every case. Event frames, transfers, models and notifications have templates too.

  • Base and derived templates. A base template passes its attributes, ports and analyses to derived templates. A Base Template Only template cannot create elements directly. A derived template overrides an inherited attribute with one of the same name, and can hide it from clients such as PI Vision with the Excluded property.
  • Extensions. If the template allows them, single elements carry extra attributes and ports.
  • Deleting a template also deletes the analysis and notification templates that target it.

An attribute template with a PI point data reference can also create the PI points, named through substitution parameters such as %Element%, when Create or Update Data Reference is run on the element. That command also locks the data reference in: later template changes no longer reach the attribute until it is reset to the template.

4. Data references

A data reference tells an attribute where its value comes from. PI Server 2024 R2 documents six:

Data reference What it returns
PI point a PI point value, or a summary or other operation on it
PI point array one value from an array of PI points
Formula a calculation on other attributes
String Builder a string built from attribute values and text; no unit conversion, no calculation
Table lookup a value from a PI AF table, entered in PI AF, imported or linked from an external source such as SQL Server
URI Builder a dynamic link (web or PI Vision) built from attribute values

A direct PI point reference names server and point, for example \\MyPIServer\sinusoid, or \\%Server%\sinusoid in a template for the database's default Data Archive. An indirect reference points at another PI point attribute: in AVEVA's example a tank Level attribute has children for the daily average, minimum and maximum, so only Level changes when the point does. A PI point reference returns the value at a time or a calculation over a time range, such as an hourly average.

Units of measure are based on SI and kept in one UOM database shared by all PI AF databases; clients convert, for example metres to feet. AVEVA warns that table lookup is not built for time series, which belong in PI points, and advises against Excel files as linked tables.

5. Analyses and PI Analysis Service

An analysis reads PI AF attribute values, calculates on a schedule and writes results to other attributes or creates event frames. Every analysis belongs to an element or element template, and PI Analysis Service runs all analyses of the PI AF server. There are four types:

Type What it does
Expression one or more expressions, in rows evaluated top to bottom; at least one row mapped to an output attribute
Rollup Sum, Average, Minimum, Maximum, Count, Median and population or sample standard deviation over attributes of the element or of its child elements; bad values are left out
Event frame generation starts and ends event frames from trigger conditions
SQC Statistical Quality Control tests based on the Western Electric SQC Handbook: Outside Control, Outside 2 Sigma, Outside 1 Sigma, One Side of Center Line, Stratification, Mixture and Trend

An analysis template on an element template gives each of its elements the same analysis with its own inputs and outputs. A checked-in change is picked up at once, even while analyses run.

AVEVA recommends mapping outputs to attributes with a PI point data reference: the history stays in Data Archive for trends, and PI AF performs better. Data Archive applies compression to these outputs, not exception settings. An output on an analysis data reference is calculated only when a client asks, which suits a value needed only as its latest result.

6. Scheduling, backfilling and recalculation

Event-triggered scheduling, the default, evaluates when an input changes, by default any input. Periodic scheduling runs on UTC clock time, at most 120 times per second; a period that does not divide the day, such as 7 minutes, restarts at midnight. Outputs carry the trigger time unless an offset or a fixed time of day is set.

Option What it does
Backfilling fills missing results in a chosen time range and keeps existing ones
Recalculation deletes the results in the range and calculates them again; for event frame generation analyses this deletes the event frames with their annotations, acknowledgements and reason codes
Automatic backfilling fills gaps after PI Analysis Service downtime, up to 72 hours by default (MaximumAllowedAutoBackfillingSpanInHours)
Automatic recalculation recalculates on late or out-of-order inputs; enabled globally, switched on per analysis or template; not for analyses that create event frames

Expression, rollup and SQC analyses can be backfilled or recalculated only with outputs mapped to PI point attributes, and the user needs Execute permission, for example through the Asset Analytics Recalculation identity. Both may write out-of-order events, which Data Archive stores without compression. By default the service waits 5 seconds before a real-time evaluation (CalculationWaitTimeInSeconds) for late inputs, and skips the oldest evaluations once more than 50 are queued, unless load shedding is switched off.

7. Event frames

An event frame has a name, a start time, an end time, attributes and one or more referenced elements. AVEVA names two uses: events tracked as normal business, such as shifts or products, and unexpected ones such as shutdowns or excursions. Event frames can overlap on one element, and a batch is just one kind of event. Event frame templates define the attributes of each kind, such as a reason code or a maximum temperature, and can index those users search most. A path like .\Elements[.]|RPM reads an attribute of whichever element the frame refers to, so one template serves many assets.

AVEVA strongly recommends creating event frames with asset analytics; PI EFGen, PI interfaces for batch and MES systems and AF SDK programs can also create them, and manual creation is strongly discouraged. The settings of an event frame generation analysis:

Setting What it does
Start trigger opens the frame and keeps it open while true; AVEVA recommends a start trigger only
End trigger optional; if both triggers are true at once, frames of zero length can result
True for the start condition must hold this long before a frame opens, against spikes; the start time does not move
Pulse, step, step continuous modes since the 2018 release that open and close frames on changes of an integer, string or enumeration attribute
Several start triggers each with a severity from None to Critical; a change of the effective trigger creates child event frames
Root cause a child frame that captures the interval before the event
Outputs at Close values written to event frame attributes when the frame closes; the analysis's element is the primary referenced element

Capture Values stores attribute values in the PI AF database so they display faster and do not change later. A template with Can Be Acknowledged enables acknowledgement, which needs the Annotate permission, and notification rules can use event frames from any source.

PI Datalink, PI Vision and PI WebParts show event frames, and PI OLEDB Enterprise, PI JDBC Driver and PI Web Services pass them to other reporting tools; PI BatchView and PI Manual Logger do not. PI Vision 2025 compares events on one trend and, on the event details page, lets users acknowledge, comment, attach files and set a reason. AVEVA advises PI Batch users to move to event frames.

What we check first

This is TDL's practice, not an AVEVA requirement.

  • The PI Server, PI AF and PI Analysis Service versions on each node, and the SQL Server edition under the PI AF database.
  • Elements not based on a template, templates that allow extensions, and data references locked in.
  • Which analysis outputs write to PI points, and how those points are named.
  • The Service Summary and Service Details tabs of PI Analysis Service before we add analyses.
  • Annotations, acknowledgements and reason codes on event frames before any event frame generation analysis is recalculated.
  • For missing data, the interface and buffering first: PI System troubleshooting.

How TDL approaches it

TDL Industrial Automation is a System Integrator member of the AVEVA Partner Ecosystem. Our AVEVA service page lists the AVEVA PI System among the AVEVA software on which we build, extend and maintain SCADA, HMI, batch and historian applications. When a PI AF model is planned, we start from the people who will look for the data, then build one template per asset type before creating elements. Background: What is a process historian, AVEVA system integrator in Vietnam and SCADA, HMI and plant data integration.

Frequently asked questions

What is the difference between an element and an element template in PI AF?

An element represents one piece of equipment, such as one pump, and holds its attributes. An element template is the model of the asset type: every element created from it gets the same attributes, and a change to the template reaches all of them.

Which analysis types does PI Analysis Service run?

Four: expression, rollup, event frame generation and SQC (Statistical Quality Control). Every analysis belongs to an element or an element template, and analysis templates give every element of a template the same analysis.

Is event-triggered or periodic scheduling the default for an analysis?

Event-triggered scheduling is the default, triggered by a change of any input attribute. Periodic scheduling runs on UTC clock time, at most 120 times per second.

What happens to event frames when an event frame generation analysis is recalculated?

The event frames in the selected time range are deleted and created again, and their annotations, acknowledgements and reason codes are lost.

Does PI AF need SQL Server?

Yes. The PI AF server consists of the PI AF Application Service and the PI AF SQL database, which in PI Server 2024 R2 runs on SQL Server or on Azure SQL, Azure SQL Managed Instance or Amazon RDS for SQL Server. SQL Server Express has 1 GB memory and 10 GB database limits and does not support PI AF high availability.

Sources

Read 17 November 2026. This article paraphrases the sources and does not quote them; read the original documents before designing or working on a system.

Related services:
SCADA & historian AVEVA (Wonderware)