EventCounter database stored procedure
- Last UpdatedJul 22, 2024
- 1 minute read
This database stored procedure provides the count of the number of events of a certain type on a certain tag that occurred in a time interval. The query client must specify start and end date and time. It has three optional parameters: TagName, Provider and Comment. The counter applies only to non-alarm events. The purpose of this view is to show frequency of each event. For example, how many times did the pump turn on? The TagName, Provider, Category and Type are used to uniquely identify an event and do the counting.
sp_EventCounter
|
Column Name |
Datatype |
Description |
|---|---|---|
|
TagName |
NChar |
Name of the object that generated the alarm, such as TIC101 |
|
Area |
NChar |
Name of the Area or Group for the alarm. |
|
Type |
NChar |
Type of event. |
|
Category |
NChar |
Alarm class or alarm category, such as Value, Process, Batch, etc. |
|
EventCount |
Integer |
Number of times the event of this Type for the TagName has occurred in the specified time range. |
|
Provider |
NChar |
Provider of event: node/InTouch, or GalaxyName. |
|
Comment |
NChar |
The event comment. |
An example query is:
EXECUTE sp_EventCounter @StartDate=’2007-01-01 23:23:23’, @EndDate=’2007-03-31 23:23:23’, @Tagname = ’$NewAlarm’