Average function – Rockwell Automation 9307 FactoryTalk EnergyMetrix User Manual

Page 122

Advertising
background image

FactoryTalk EnergyMetrix Software

122

Average Function

The Average function returns the mathematical average of the selected value logged
between the report start and end dates, and during the periods defined by the SeasonType,
DayType, TimeOfUseType (or StartHour and EndHour) arguments. It returns a DateTime
value.

Usage

Quantity = Average(ValueType.enumValue)

Quantity = Average(ValueType.enumValue, SeasonType.enumValue)

Quantity = Average(ValueType.enumValue, SeasonType.enumValue,
DayType.enumValue)

Quantity = Average(ValueType.enumValue, DayType.enumValue)

Quantity = Average(ValueType.enumValue, startHour, endHour)

Quantity = Average(ValueType.enumValue, TimeOfUseType.enumValue)

Quantity = Average(ValueType.enumValue, SeasonType.enumValue,
DayType.enumValue, startHour, endHour)

Quantity = Average(ValueType.enumValue, SeasonType.enumValue,
DayType.enumValue, TimeOfUseType.enumValue)

Quantity = Average(ValueType.enumValue, DayType.enumValue,
TimeOfUseType.enumValue)

Comments

The startHour and endHour arguments are integers in the range of 1…24, where
24 = midnight.

See the list of allowable

Enumeration Values for Functions

for enumerated arguments.

Example

The following script calculates the average real demand power that occurred during the
Summer season, on working days, during the hours of 10:00 am to 4:00 pm:

Quantity = Average(ValueType.RealPowerDemand, SeasonType.Summer,
DayType.NonWorkingDay, 10, 16)

SeasonDayCount Function

Returns the number of days in the billing period that are in the
specified season

SetDateRange Function

Used to obtain reports that compare usage over two different
reporting periods

Sum Function

Calculates the arithmetic sum of a non-cumulative tag

Total Function

Calculates consumption of a consumption tag such as energy

TotalRTPCharge Function

Calculates the total charge for a consumption tag such as kWh, by
using real time pricing data

Future functions

Contact Rockwell Automation for availability of future and custom
functions

Scripting Function

Description

Advertising