beautypg.com

Nlowesttimestamps function – Rockwell Automation 9307 FactoryTalk EnergyMetrix User Manual

Page 127

background image

5

Visualize Energy Usage

127

Quantity = NLowest(ValueType.enumValue, SeasonType.enumValue,
DayType.enumValue, TimeOfUseType.enumValue, N)

Quantity = NLowest(ValueType.enumValue, DayType.enumValue,
TimeOfUseType.enumValue, N)

Comments

N is an integer representing the number of minimum values to be returned.

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

Example

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

Dim dblDemandMins(3) [as Double]

dblDemandMins= NLowest(ValueType.RealPowerDemand,
SeasonType.Summer, DayType.WorkingDay, 10, 16, 3)

NLowestTimestamps Function

The NLowestTimestamps 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 NLowestTimestamps 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 = NLowestTimestamps(ValueType.enumValue)

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

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

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

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

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

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

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

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

Comments

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