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.
TrnInfo(Tag, Type [, ClusterName] )
The name of the trend tag enclosed in quotation marks "" (can be prefixed by the name of the cluster that is ClusterName.Tag).
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.
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 "".
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.
! Get the file name of trend tag LT131
sFileName = TrnInfo("LT131", 3, "ClusterXYZ");