Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

TrnInfo

  • Last UpdatedJul 18, 2023
  • 2 minute read

Gets the configured values of a trend tag.

This function is a blocking function. It blocks the calling Cicode task until the operation is complete.

Syntax

TrnInfo(Tag, Type [, sClusterName] )

Tag:

The name of the trend tag enclosed in quotation marks "" (can be prefixed by the name of the cluster that is ClusterName.Tag).

nType:

The type of information required:

1 - Trend Type

2 - Sample Period (to obtain the Display Period, use the TrnGetPeriod function)

3 - Trend File Name (without file extension)

4 - Area

5 - Privilege

6 - Current Event Number. Valid only for event type trends

7 - Engineering Units

8 - The storage method used for the tag. A returned value of 2 represents two byte storage (scaled), 8 represents eight byte storage (floating point).

9 - The file period of the tag in seconds. If the file period is set to monthly or yearly, a file period cannot be calculated as months and years vary in length. Therefore, a file period of 0 will be returned for trends with such file periods.

sClusterName:

The name of the cluster in which the trend tag resides. This is optional if you have one cluster or are resolving the trend via the current cluster context. The argument is enclosed in quotation marks "".

Return Value

The value (as a string), otherwise an empty string is returned, and an error code is set. You can call the IsError() function to get the actual error code.

Example

! Get the file name of trend tag LT131

sFileName = TrnInfo("LT131", 3, "ClusterXYZ");

See Also

Trend Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in