AF TagValues

By using the AF TagValues activity, you can set tag values and get tag values, including the most recent value, the historical values, a specified number of historical values, and the archived value for a specified time. The following sections describe the tabs for this activity.

General

On the General tab, you can specify the name of the activity in the process, establish a connection to the PI Data Archive server, select which type of operation you want to use, and the type of value that you want to retrieve.

The following table lists the fields on the General tab of the AF TagValues activity:
Field Module Property? Visual Diff? Description
Name No Yes A unique name of the activity in a process.
Server Connection Yes Yes The PI AF shared resource selected to connect to a PI Data Archive server.

Click the icon to select an OSIsoft PI System AF connection resource. If no matching PI AF connection resource is found, click Create Shared Resource to create one.

Note: This activity supports only PI Data Archive server as server type.
Operation No Yes The type of operation you want to perform on the tag values:
  • getTagValues: retrieves tag values.
  • setTagValues: sets tag values.
Value Type
Note: This field is available only when you select getTagValues in the Operation list.
No Yes The type of value that you want to retrieve for the tag:
  • Snapshot: the value with the most recent timestamp.
  • ValueHistory: the specified number of historical values when you input a positive integer for the count parameter on the Input tab or the historical values within a specified time frame when you input nothing for the count parameter on the Input tab.
  • ArcValue: the archived value with a specified timestamp.

Description

On the Description tab, you can type a short description for the AF TagValues activity.

Input

On the Input tab, you can specify the tag that you want to retrieve or set.

Input items on this tab are different depending on the operation name and value type you select on the General tab:

  • ArcValue: the archived value with a specified timestamp.
  • If you select the getTagValues operation, depending on the value type you select, different input items are available:
  • If you select the setTagValues operation, the following input items are available:
    Input Item Data Type Description
    requestHeader Complex The request message header
    tagList Complex The list of tags and their attributes to be set

    For descriptions of all the attributes in the previous two input items, see setTagValues: Input Items.

Output

On the Output tab, you can find the output results of the AF TagValues activity.

Note: All the timestamps are in UTC time zone.

Output items on this tab are different depending on the operation name and value type you select on the General tab:

  • If you select the getTagValues operation, depending on the value type you selected, different output items are displayed:
  • If you select the setTagValues operation, the following output items are displayed:
    Output Item Data Type Description
    responseHeader Complex The response message header
    failureList Complex The list of failures
    pointsUpdated Integer The number of tags that are successfully updated

Fault

On the Fault tab, you can find the error messages and error codes of the AF TagValues activity. For more information about errors, see Error Codes.

The following table lists the error schema elements on the Fault tab:

Element Name Data Type Description
msg String Displays the error message.
msgCode String Displays the error code.