HTGetValueAtZone() Function
- Last UpdatedFeb 22, 2017
- 2 minute read
The HTGetValueAtZone() function returns a value of the requested type for the data located between the right and left scooter positions for a trend's specified pen.
Category
Historical
Syntax
RealResult=HTGetValueAtZone(Hist_Tag,UpdateCount,
Scoot1Loc,Scoot2Loc,PenNum,ValType_Text);
Arguments
Hist_Tag
HistTrend tag assigned the name of the trend.
UpdateCount
Integer representing the trend's .UpdateCount dotfield. It is used only as a trigger to evaluate the function.
Scoot1Loc
Real representing the trend's .ScooterPosLeft dotfield. It is used only as a trigger to evaluate the function.
Scoot2Loc
Real representing the trend's .ScooterPosRight dotfield. It is used only as a trigger to evaluate the function.
PenNum
Integer tag or value representing the pen number (1-8) of the trend.
ValType_Text
String indicating the type of value to return.
PenAverageValue = Average for zone between the scooters.
PenMaxValue = Maximum value for the zone between the scooters.
PenMinValue = Minimum value for the zone between the scooters.
PenMaxEU = Maximum engineering unit value for the zone between scooters.
PenMinEU = Minimum engineering unit value for the zone between the scooters.
PenStdDev = Standard Deviation for the zone between the scooters.
Remarks
A real value is returned representing the calculated value of the given type. Specifying constant values for the Scoot1Loc and Scoot2Loc arguments has no effect and are only used to trigger the evaluation of the function. The function uses the trend tag's .ScooterPosLeft and .ScooterPosRight dotfield values directly, regardless of the values you specify for the Scoot1Loc and Scoot2Loc arguments.
Example
The following statement calculates the average value for data between the right and left scooters of the Trend1 trend for pen 1. The value is stored in the AvgValue memory real tag:
AvgValue=HTGetValueAtZone("Trend1", Trend1.UpdateCount,Trend1.ScooterPosLeft, Trend1.ScooterPosRight,1,"PenAverageValue");