DeltaV Reporter > Worksheet function reference for DeltaV Reporter

Event Count function (DvEventCount)

This worksheet function can be used to retrieve a total count of filtered events from the Event Chronicle database for one or more shifts within a time period. The Event Count function counts Event Chronicle events from the active and all current event history data sets. To prevent duplication of events, it does not count events in the active data set that have been copied to a current data set, but have not yet been deleted from the active data set.

The Event Count function must be entered as an array formula in a range that has the appropriate number of rows and columns. You can use the Configure Event Count Function dialog in DeltaV Reporter to set up a call to this function.

Important

In order to execute this function, you must be granted read access to the Event Chronicle SQL database (EJournal) on the Event Chronicle server. Additionally, if the Event Chronicle is in a different DeltaV system than the client PC (or the client PC is not in a DeltaV system at all), you must have been granted the DeltaV security key associated with the HISTORICAL_REMOTE_ACCESS function in DeltaV on the Event Chronicle server.

Syntax

DvEventCount(chronicle_node, filters, time_mode, period_start, period_end)

Example Array Formula

=DvEventCount("localhost","Event Type,*T*;Category,USER;Area,AREA_1|AREA_2;Unit,UNIT?1A","GMT","10/11/08 10:00:00 PM","10/12/08 6:00:00 AM")

Note

The wildcard characters in this array formula allow it to retrieve EVENT and STATUS events (that is, event types containing the letter "T") and events relating to areas with seven-character names that begin with "UNIT" and end with "1A".

Function Arguments

chronicle_node
The node name of the Event Chronicle server. The chronicle_node argument can be text, or a name or reference that refers to an Event Chronicle server.
filters
A string that defines the filters to be used to restrict the count of events within the time periods. Each filter definition comprises the column name and one or more filter patterns relating to that specific column.

The list of filter patterns is separated from the column name by a comma. Filter patterns within the list are separated from each other by a vertical bar (|). A string used to define a filter pattern can use the following wildcard characters: an asterisk (*) matches zero or more characters and a question mark (?) matches exactly one character.

The following columns and filters are supported:
  • Column name: Event Type
    • Filters: ALARM, CHANGE, DOWNLOAD, EVENT, and STATUS
  • Column name: Category
    • Filters: DEVICE, PROCESS, SYSTEM, and USER
  • Column name: Area
    • Filters: Returns events relating to any area, the name of which matches the specified filter patterns
  • Column name: Node
    • Filters: Returns events relating to any controller, the name of which matches the specified filter patterns
  • Column name: Unit
    • Filters: Returns events relating to any unit, the name of which matches the specified filter patterns
  • Column name: Module
    • Filters: Returns events relating to any defined module, the name of which matches the specified filter patterns
  • Column name: Module Description
    • Filters: Returns events relating to any module description that matches the specified filter patterns
  • Column name: Parameter
    • Filters: Returns events relating to any parameter, the name of which matches the specified filter patterns
  • Column name: State
    • Filters: Returns events relating to any state that matches the specified filter patterns
  • Column name: Level
    • Filters: Returns events relating to any level that matches the specified filter patterns
  • Column name: Desc1
    • Filters: Returns events relating to any entry in the Desc1 field of the Event Chronicle that matches the specified filter patterns
  • Column name: Desc2
    • Filters: Returns events relating to any entry in the Desc2 field of the Event Chronicle that matches the specified filter patterns
time_mode
Indicates how the period_start and period_end arguments should be interpreted. The Event Chronicle database records all times in GMT; the time_mode argument specifies what conversion, if any, should be applied to the supplied time stamp in order to convert to GMT.
  • Local – the time stamp is treated as being in the time zone of the client PC. Conversion to GMT takes into consideration whether the time stamp falls within daylight saving time.
  • GMT – no conversion is necessary.
  • GMT ±hh:mm – the time is adjusted by the specified hh:mm; daylight saving time has no effect.
period_start
One or more time stamps for the start of the period(s) you want to trace. You can specify multiple time stamps to gather data for more than one time period (the period_end argument must contain the same number of time stamps as period_start).
period_end
One or more time stamps for the end of the period(s) you want to trace. You can specify multiple time stamps to gather data for more than one time period (the period_start argument must contain the same number of time stamps as period_end).

You can specify the period_start or period_end argument as a cell or range reference. Each cell must contain a valid date and time in standard Excel format, not exceeding millisecond precision—for example, "10/12/2008 21:06:40.676". If you specify the period_start and period_end arguments as range references, each range must refer to the same number of cells.

Alternatively, either argument could refer to a range of cells, while the other refers to a list of multiple, absolute time stamps. To specify multiple, absolute time stamps in a cell, separate each date and time with a semi-colon (;)—for example, { "08/22/2008 09:15:00"; "08/22/2008 09:32:25"}.

If multiple time periods are specified, events from the separate time periods are merged and sorted into the order appropriate for the first time period.

Note

If period_start is a later time than period_end, events are retrieved in reverse chronological order from the (later) start time toward the (earlier) end time. If multiple time periods are specified, the first period_start time stamp is compared with the first period_end time stamp to determine chronology.