Rockwell Automation 9307 FactoryTalk EnergyMetrix User Manual
Page 93
4
•
Set up Your System Architecture
93
Derived Tag Functions
You can use functions similar to those used in Rate Schedules in Derived Tag scripts.
Derived Tag functions are listed below. MeterTagId is the ID number of the selected meter
tag and can be found in the meter setup screen. Except as otherwise noted, all function
arguments are Integer values and all functions return a Double value. Derived tags are
calculated in meter tag ID order, so derived tag functions may reference other derived tags
with lower-numbered meter tag IDs.
TagTotal Function
Returns the accumulated usage of the selected MeterTagId over the specified DateRange
or time span. The TagTotal function is generally used with consumption values such as
real energy. Usage:
Result = TagTotal(MeterTagId, DateRange.enumValue)
Result = TagTotal(MeterTagId, months, days, hours, minutes)
TagAverage Function
Returns the mathematical average of the selected MeterTagId over the specified
DateRange or time span. Usage:
Result = TagAverage(MeterTagId, DateRange.enumValue)
Result = TagAverage(MeterTagId, months, days, hours, minutes)
TagPeak Function
Returns the largest instance of the selected MeterTagId over the specified DateRange or
time span. Usage:
Result = TagPeak(MeterTagId, DateRange.enumValue)
Result = TagPeak(MeterTagId, months, days, hours, minutes)
TagNPeaks Function
Returns a Double array of N elements containing the N largest instances of the selected
MeterTagId over the specified DateRange or time span. Usage:
Result = TagNPeaks(MeterTagId, N, DateRange.enumValue)
Result = TagNPeaks(MeterTagId, N, months, days, hours, minutes)
TagPeakTimestamp Function
Returns a DateTime structure containing the UTC time stamp of the largest instance of the
selected MeterTagId over the specified DateRange or time span. Usage:
Result = TagPeakTimestamp(MeterTagId, DateRange.enumValue)
Result = TagPeakTimestamp(MeterTagId, months, days, hours,
minutes)
TagNPeakTimestamps Function
Returns a DateTime array of N elements containing the UTC time stamps of the N largest
instances of the selected MeterTagId over the specified DateRange or time span. Usage:
Result = TagNPeakTimestamps(MeterTagId, DateRange.enumValue)
Result = TagNPeakTimestamps(MeterTagId, months, days, hours,
minutes)