Main Content

tags

List tags from OSIsoft PI server

Description

example

tagList = tags(piClient) returns a list of all tags available from the OSIsoft® PI 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=tagName) filters the list of available tags to match the name specified by tagName. The wildcard character * is supported for partial string or pattern matching.

Examples

collapse all

Request a list of all tags from the server.

tagList = tags(piClient);

Request a list of all tags from the server containing a matching string.

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

Input Arguments

collapse all

Client connected to OSIsoft PI server, specified as an icomm.pi.Client object. You create the object with the piclient function.

Example: piClient = piclient(_)

Data Types: object

Tag name to match on, specified as a string or character vector. You can use the wildcard * character to perform partial matching. For example:

"tagName"    matches only the exact name tagName.
"tagName*"   matches tags that start with tagName.
"*tagName*"  matches tags containing tagName anywhere in their name.

Example: "Power*"

Data Types: char | string

Output Arguments

collapse all

List of tags from OSIsoft PI server, returned as an N-by-1 table of strings with one tag per row.

Version History

Introduced in R2022a

See Also

Functions