Npeaktimestamps function – Rockwell Automation 9307 FactoryTalk EnergyMetrix User Manual

Page 129

Advertising
background image

5

Visualize Energy Usage

129

NPeakTimestamps Function

The NPeakTimestamps function returns the time and date that the N largest instances of
the selected value was logged between the report start and end dates, and during the
periods defined by the SeasonType, DayType, TimeOfUseType (or StartHour and
EndHour) arguments. The NPeakTimestamps function is generally used for rate-of-
change values such as demand real and reactive power (kW, kVAR). It returns an array of
N DateTime values.

Usage

Quantity = NPeakTimestamps(ValueType.enumValue)

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

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

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

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

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

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

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

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

Comments

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

Example

The following script returns the time stamp of the real demand power peak that occurred
during the Summer season, on working days, during the hours of 10:00 a.m. to 4:00 p.m.:

dim dtPeaks(3) [as DateTime]

dtPeaks = NPeakTimestamps(ValueType.RealPowerDemand,
SeasonType.Summer, DayType.WorkingDay, 10, 16, 3)

Advertising