メインコンテンツ

tags

List tags from PI Data Archive

Since R2022a

Description

tagList = tags(piClient) returns a list of all tags available from the AVEVA® PI Data Archive that the client piCient is connected to. A tag is used by the PI system as an alias or shortcut to represent an asset attribute such as voltage, current, temperature, etc. Some tag names are short, others might be long and descriptive or include a unique ID.

tagList = tags(piClient,Name=tagQuery)searches available tags and returns a list of tags that satisfy the query specified in tagQuery.

Note

You must install the AF SDK library to use this function. For more information, see AF SDK Overview.

example

Examples

collapse all

Request a list of all tags from the AVEVA PI Data Archive.

tagList = tags(piClientObj);

Request a list of all tags from the PI Data Archive containing a matching string.

tagList = tags(piClient, Name="*pressure*");

Input Arguments

collapse all

Client connected to AVEVA PI Data Archive, specified as an icomm.pi.Client object. You create the object with the piclient function.

Example: piClient = piclient(_)

Data Types: object

Query to search for tag, specified as a string or character vector. You can use any valid query string that is supported in the AFSDK. For more information, see PIPoint Query Syntax Overview.

Example: tags(piclientObj,Name="windspeed") searches for tags whose name exactly matches the specified name "windspeed".

Example: tags(piclientObj,Name="*wind*") searches for tags containing the specified substring "wind" anywhere in their name.

Example: tags(piclientObj,Name="description:weather\ data") searches for tags whose description matches the specified query "weather data".

Example: tags(piclientObj, Name="name:wind* AND description:weather\ data") searches for tags whose name starts with "wind" and has the description as "weather data".

Data Types: char | string

Output Arguments

collapse all

List of tags from the AVEVA PI Data Archive, returned as an N-by-1 table of strings with one tag per row.

Version History

Introduced in R2022a

See Also

Functions