piba_findaliaspoint

This function retrieves the PI point and tagname for passed alias/unit combination. If the alias is a valid PI tagname, the unit is ignored and the corresponding PI point will be returned; therefore this function can replace pipt_findpoint in applications.

C format

int32 piba_findaliaspoint (

char PIPTR * unit,

char PIPTR * alias,

int32 PIPTR * point,

char PIPTR * tagname,

int32 len );

Returns

>0

System error

Success

-1

No valid point for unit alias combination

-3

Unit not found

-5

Alias not found

-991,-994

API access to batch not supported by the version of PI on the Server

-1002

No batch subsystem present on Server.

Arguments

unit (passed)

Unit name

alias (passed)

Alias name

point (returned)

Point number for unit alias combination

tagname (returned)

Tagname of returned point

len (passed)

Size of passed tagname buffer

Usage Notes

There are 3 keywords, PHASE, STEP, and CYCLETIME, that, if used in a unit definition will also appear as an alias. For example, CYCLETIME defines a PI Point to which the Batch Monitor writes batch duration time after batch completion. This PI Point may be accessed by specifying the unit and CYCLETIME as the alias name.

Example

char unit(81) = "reactor1"; 

char alias[81] = "temp"; 

char tag[81]; 

int32 len = sizeof(tag); 

int32 result; 

int32 point; 

result = piba_findaliaspoint    ( unit, alias,  

&point, tag, len ); 

Enabling Operational Intelligence