主要内容

About AVEVA PI Asset Framework

AVEVA® PI Asset Framework (AF) provides a contextual data modeling layer built on top of the PI Data Archive, which functions as a traditional time-series data historian. The PI Data Archive stores data as name-value pairs called PI Points, each identified by a unique tag name. However, this system does not organize data hierarchically or store static metadata.

AF addresses these limitations by enabling hierarchical data organization and associating attributes with elements that represent physical or logical assets. This structure adds context to raw data and makes it easier to interpret and analyze. AF also supports static data storage, metadata tagging, and advanced analytics such as calculations and event frames. The framework streamlines data management and access through a user-friendly interface, efficient search tools, and scalable template-based models.

If you want to work with contextualized data rather than raw PI Points, AF is the recommended approach. The Industrial Communication Toolbox™ provides an interface for MATLAB® to connect to AF servers, navigate the hierarchy, and retrieve data.

Workflow for Accessing Data on AF Server from MATLAB

A typical workflow for accessing data on an AF server from MATLAB involves some or all of these steps. For a detailed example illustrating this workflow, see Get Started with Accessing Data from AVEVA PI Asset Framework.

Connect to AF Server

Create an icomm.af.Client object using the afclient function. This client initiates and maintains the session with the AF server and provides access to databases, elements, and attributes.

Select AF Database

Before selecting a database, you can list all available databases on the connected AF server using listDatabases. This helps you identify the database you want to work with. Then use selectDatabase to choose the database for your session.

Find and Query Elements

Search for the element that represents your logical or physical asset using functions, such as findElementByName, findElementByPath, and findElementByTemplate. These functions return an icomm.af.Element object.

You can use the element object with these functions to query for element information.

  • getAttributes — Get attributes of AF element by name

  • getChildren — Get all child elements of AF element object

  • getParent — Get parent element of AF element object

Find and Query Attributes

Search for the attribute that stores the required data points of your asset using functions, such as findAttributeByPath and getAttributes. These functions return an icomm.af.Attribute object or icomm.af.Attribute array. Or, you can use the Asset Framework Browser to graphically browse the AF database, and then select an attribute or attributes to create an icomm.af.Attribute object or array of AF attribute objects, respectively.

You can use the attribute object with these functions to query for attribute information.

Read Data from AF Server

AF attributes hold time-series or static values, and support analytics and event detection. You can read current data or historical time series data of the selected attributes using the read or readHistory functions, respectively.

When you create element and attribute objects during the workflow, you can access their properties to retrieve metadata or structure information. The tables below summarize these properties.

AF Element Properties

When you create an icomm.af.Element object, you can access these properties.

  • Name — Name of the AF element, represented as a string.

  • Path — Absolute path of the element in the AF database, represented as a string.

  • Database — Database associated with the AF element, represented as a string.

  • Categories — Categories associated with the AF element, represented as a string.

  • Template — Associated template of the AF element, represented as a string.

  • Description — Description available for the AF element in the database, represented as a string.

  • NumChildren — Number of child elements of the AF element, represented as a double.

  • NumAttributes — Number of attributes owned by the AF element, represented as a double.

AF Attribute Properties

When you create an icomm.af.Attribute object, you can access these properties.

  • Name — Name of the AF attribute, represented as a string.

  • Path — Absolute path of the attribute in the AF database, represented as a string.

  • Categories — Categories associated with the AF attribute, represented as a string.

  • Description — Description available for the AF attribute in the database, represented as a string.

  • ElementName — Parent element of the AF attribute, represented as a string.

  • ServerDataType — Data type of the AF attribute configured in the database, represented as a string.

  • DefaultUnit — Default unit of measure of the AF attribute, represented as a string.

  • ReadAccess — Whether the client has read access for the data in the AF attribute, represented as a logical value.

  • WriteAccess — Whether the client has write access for the data in the AF attribute, represented as a logical value.

  • HasTimeSeriesData — Whether the AF attribute contains time-series data (historical data), represented as a logical value.

See Also

Functions

Apps

Topics