Main Content

piclient

Create PI Data Archive client

Since R2022a

Description

The PI client object provides access to an AVEVA® PI Data Archive so that you can search tags and read their data.

Creation

Description

example

piClient = piclient(piServer) creates a PI client object piClient, and connects to the AVEVA PI Data Archive specified by piServer.

piClient = piclient(piServer,Username="WinUserID",Password="WinPwd") uses Windows® credentials if required by the PI Data Archive. WinUserID and WinPwd are your Windows login name and password, specified as strings. Credential information is used only to connect to the PI Data Archive, and is not retained in the piClient object properties.

piClient = piclient(piServer,Username="WinUserID",Password="WinPwd",Domain="WinDomain") specifies the domain name, as a string, associated with the user credentials, if required by the PI Data Archive.

If an invalid argument is specified or the connection to the server cannot be established, the object is not created.

Input Arguments

expand all

Host ID of AVEVA PI Data Archive server, specified as a string or character vector, indicating host name or IP address.

Example: "pi-host-55"

Data Types: string | char

Properties

expand all

This property is read-only.

Name of connected AVEVA PI Data Archive, returned as a string. This is the value provided as the piServer input argument to the function.

Example: "pi-host-55"

Data Types: string

This property is read-only.

Name of domain associated with user credentials, returned as a string. This is the value provided as the Domain input argument to the function.

Example: "MY-NET3"

Data Types: string

Object Functions

tagsList tags from PI Data Archive
readRead data from PI Data Archive
viewerVisualize data from PI Data Archive

Examples

collapse all

Construct a PI client object and connect to the AVEVA PI Data Archive on host pi-host-55.

piClient = piclient("pi-host-55");

Create a client object and connect to the AVEVA PI Data Archive server on host pi-host-55 using Windows credentials.

p = piclient("pi-host-55",Username="myID",Password="myPwd");

Version History

Introduced in R2022a

See Also

Functions