KEMBAR78
Event | PDF | Computer File | Databases
0% found this document useful (0 votes)
42 views9 pages

Event

The document describes how to configure event logging and saving event logs to an external database in AVEVA Edge. It discusses enabling the event logger, selecting which types of events to log, logging changes to specific tags, and changing project settings to save event logs to a SQL database instead of text files. Saving to a database improves performance by automatically indexing events by time.

Uploaded by

abdoahmad426.rr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views9 pages

Event

The document describes how to configure event logging and saving event logs to an external database in AVEVA Edge. It discusses enabling the event logger, selecting which types of events to log, logging changes to specific tags, and changing project settings to save event logs to a SQL database instead of text files. Saving to a database improves performance by automatically indexing events by time.

Uploaded by

abdoahmad426.rr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Events Page 1 of 9

AVEVA
logo AVEVA Edge 2023
Alarms, Events, and Trends >

Events
This section describes AVEVA Edge's logging and event-retrieval features. An event can be any tag
change, generating reports or recipes, opening and closing screens, logging onto and logging off the
security system, and so forth. AVEVA Edge saves all of these events in a log file, which can then be
retrieved by the Alarm/Event Control object.

l Enable the event logger


Event logging is disabled by default, to conserve run-time resources. To enable the saving of
events to the history file, use the Event Logger in the Project Explorer.
l Saving your alarm history / event log to an external database
By default, your project's alarm history and event log are saved to proprietary-format text files in
your project's Alarms folder. However, you can change your project settings to save them to an
external SQL database instead.
l Format of the event history
This topic describes the location and format of the event history that is saved during project run
time, if the event logger is enabled.

Parent topic: Alarms, Events, and Trends

Copyright © 2015-2024 AVEVA Group Limited or its subsidiaries. All rights reserved. | Contact Us

AVEVA
logo AVEVA Edge 2023
Alarms, Events, and Trends > Events >

Enable the event logger


Event logging is disabled by default, to conserve run-time resources. To enable the saving of events to
the history file, use the Event Logger in the Project Explorer.

1. Go to the Global tab of the Project Explorer, and then double-click Event Logger.

The Event Settings dialog box is displayed.

file:///C:/Users/abdoa/AppData/Local/Temp/~hh5EBD.htm 2/5/2024
Events Page 2 of 9

2. Select Enable event logger.


3. To have the option to disable event logging during run time, enter a tag name or expression in the
Disable box. While the value of the tag/expression is TRUE (i.e., non-zero), event logging will be
disabled.
4. Under Settings, select the types of events that you want to log to the history file.
Option Description
Security Events generated by your project's security system, including:
System
l Log On / Log Off users
l User created/removed by calling the CreateUser or RemoveUser
functions
l User blocked/unblocked by calling the BlockUser or UnblockUser
functions
l User blocked by the security system after several attempts to enter an
invalid password
l Password expired
l Password modified
l Invalid Log On attempt
Display Open Screen and Close Screen events.
Recipe Recipes loaded, saved, initialized, or deleted.
Report Reports saved to disk or sent to printer.
Custom Events generated by calling the SendEvent function.
Messages
System Various runtime warnings and errors, including:

file:///C:/Users/abdoa/AppData/Local/Temp/~hh5EBD.htm 2/5/2024
Events Page 3 of 9

Warning l Errors that occur when sending alarms by email


l Tag was blocked/unblocked
l Division by zero
l Connection/Disconnection of the remote security system

5. To log changes in specific project tags, select Tags, and then in the table, specify the tags.
Column Description
Tag The name of the project tag that you want to log to the history file.
Name
Dead A value to filter changes against, so that only changes greater than this value are
Band logged.

For example, if you specify a Dead Band value of 5 for a tag value of 50 and the tag
value changes to 52, then the system will not register this variation in the event log,
because the change is less than 5. However, if the tag value change is equal to or
greater than 5, then the system will log the new value to the history file.
Message A string (message) related to this tag change. You can specify tags in messages using
the {tagname} syntax.
The Tags option is useful for logging events that are not important enough to be alarm conditions
(for example, Motor On, Motor Off, and so on).
6. Click OK.

By default, the event log is saved as a series of text files in your project's Alarm folder (i.e., \<project
name>\Alarm). You can configure your project settings to save it to an external database instead.

Also, if you choose to log changes in specific project tags, that will include changes in tag quality. It is
not an issue in most cases, but if your project has an unreliable connection to a device, your event log
might become filled with irrelevant changes in tag quality as the connection is repeatedly lost and then
reestablished. To disable the logging of changes in tag quality, use a text editor to open your project file
(i.e., \<project name>\<project name>.app) and then set the following property:

[Options]
EnableEventOnQualityChange=0

Parent topic: Events


Related concepts
Format of the event history
Related tasks
Saving your alarm history / event log to an external database

Copyright © 2015-2024 AVEVA Group Limited or its subsidiaries. All rights reserved. | Contact Us

AVEVA
logo AVEVA Edge 2023
Project Overview > Configuring additional project settings > Options tab >
Alarms, Events, and Trends > Alarm worksheet >
Alarms, Events, and Trends > Events >

file:///C:/Users/abdoa/AppData/Local/Temp/~hh5EBD.htm 2/5/2024
Events Page 4 of 9

Saving your alarm history / event log to an


external database
By default, your project's alarm history and event log are saved to proprietary-format text files in your
project's Alarms folder. However, you can change your project settings to save them to an external SQL
database instead.

Note: If your project was created with an earlier version of this software and then upgraded to the latest
version, you should consider starting over with new database tables.

In the latest version of this software, new database tables are automatically indexed by event time in
order to improve run-time performance. Existing database tables cannot be indexed in this way, so if you
can afford to discard that data, you should update your database configuration to create new tables.

If you do this, you must also manually edit your project file (<project name>.APP) to correct the
following setting:

[Alarm]
AddEventTimeColumn=1

This setting exists in order to maintain backward compatibility, and it defaults to 0 for projects that were
upgraded.

1. On the Project tab of the ribbon, in the Settings group, click Options. The Project Settings dialog
is displayed.
Figure 1. Project Settings: Options

file:///C:/Users/abdoa/AppData/Local/Temp/~hh5EBD.htm 2/5/2024
Events Page 5 of 9

2. In the Alarm History and Events area, in the History Life Time box, type the number of days of
history that you want to save. As the history exceeds the specified number of days, it will be
automatically deleted in a first-in, first-out manner. If no number is specified — that is, if it is left
blank or set to 0 — then history will never be deleted. There is no limit to how much history you
can save, but the more you save, the more disk space it will take.
3. From the History Format list, select Database.
4. To configure a single, default database to be used for both the alarm history and the event log (as
well as all other runtime tasks), in the Default Database area, click Configure. The Default
Database Configuration dialog is displayed. Use the dialog to configure the database connection.
For more information, see Configuring a default database for all task history.
5. To configure a separate database for either your event log or your alarm history, click Event
Database or Alarm Database, respectively. In either case, a Database Configuration dialog is
displayed. Use the dialog to configure the database connection. For more information, see
Database Configuration.
6. Click OK.

file:///C:/Users/abdoa/AppData/Local/Temp/~hh5EBD.htm 2/5/2024
Events Page 6 of 9

Parent topic: Options tab


Parent topic: Alarm worksheet
Parent topic: Events
Related concepts
Format of the alarm history
Format of the event history
Related tasks
Enable the event logger
Related information
Alarm Worksheet Header
Alarm Worksheet Body

Copyright © 2015-2024 AVEVA Group Limited or its subsidiaries. All rights reserved. | Contact Us

AVEVA
logo AVEVA Edge 2023
Alarms, Events, and Trends > Events >

Format of the event history


This topic describes the location and format of the event history that is saved during project run time, if
the event logger is enabled.

By default, a project's alarm and event history is saved in Proprietary format. You can configure your
project settings to save the alarm and event history in Database format. For more information, see
Saving your alarm history / event log to an external database.

When your project is configured to save the history in Proprietary format (i.e., when History Format is
Proprietary), the event history is saved as sequentially numbered .evt files in your project folder. A
new .evt file is created for each calendar day, and that file is named according to the following syntax:

EVYYMMDD.EVT

For example, the event history for 17 August 2018 is saved in your project folder at: <project
name>\Alarm\EV180817.EVT

All of the event history for a given day is saved in the same file, regardless of whether the project is
stopped and then restarted during that day. (In other words, restarting the project does not create an
additional file for that day.) Each event is appended to the file as a new line, and each line comprises
tab-separated values that describe the event. You can open the file with a text editor or spreadsheet
program.

Tip: To change the location where your project saves its alarm and event history files, use the
SetAppAlarmPath function.

When your project is configured to save the history in Database format (i.e., when History Format is
Database), the event history is saved in a table in the external database. All of the event history for the
entire project is saved in a single table named EVENTHISTORY by default, although you can change
that name in your project settings. Each event is inserted into the table as a new row.

file:///C:/Users/abdoa/AppData/Local/Temp/~hh5EBD.htm 2/5/2024
Events Page 7 of 9

The fields/columns of the event history are described below:

Proprietary Database Description


Field Column Name Data Type
Number
P1 — Integer (int) Internal version number of the event history
format.

This information is saved only when History


Format is Proprietary. You can use this information
to differentiate between .evt files that were created
by previous and current versions of this software.
P2 Ev_Type Integer (int) Type of event:

l 1 = Security System
l 2 = Display
l 3 = Recipe
l 4 = Report
l 5 = Custom Message
l 6 = System Warning
l 7 = Tag
P3 Ev_Time Timestamp Timestamp that indicates when the event occurred.
(datetime)
When History Format is Proprietary, the event time
is saved in the local time zone (i.e., in the time
zone that is selected in the computer's settings) and
in the following format:

MM/DD/YYYY HH:MM:SS.mmm

When History Format is Database, the event time


is saved in Coordinated Universal Time (UTC) by
default and in the database's native datetime
format. If the database does not support
milliseconds in its datetime format, the
milliseconds portion is saved in Ev_Time_ms.
— Ev_Time_ms Integer (int) The milliseconds portion of Ev_Time.

This information is saved only when History


Format is Database and the database does not
support milliseconds in its datetime format.
P4 Ev_Info String (varchar) Name of the project tag that is associated with the
event.
P5 Ev_Value Real (varchar) Value of the project tag when the event occurred.
P6 Ev_Source String (varchar) Reserved.

file:///C:/Users/abdoa/AppData/Local/Temp/~hh5EBD.htm 2/5/2024
Events Page 8 of 9

P7 Ev_User String (varchar) User who was logged on to the station when and
where the event occurred.
P8 Ev_User_Full String (varchar) Full name of the user who was logged on to the
station when and where the event occurred.
P9 Ev_Message String (varchar) Event message.
P10 Ev_Station String (varchar) Name of the station where the event occurred.
P11 Ev_Comment String (varchar) Comment entered by the user when the event
occurred. User comments are optional.
P12 Ev_Prev_Value Real (varchar) Value of the project tag before the event occurred.
— Ev_Deleted Boolean (int) A numeric flag that indicates whether the user
deleted the event message:

l 0 = FALSE; event message was not deleted.


l 1 = TRUE; event message was deleted.

This information is saved only when History


Format is Database, and it causes a new update
time to be saved in Last_Update.
P13 Bias Integer (int) Difference (in minutes) between the local time
zone and UTC, when the event is logged and the
event time is saved.

When History Format is Proprietary, this


information is always saved because the event time
is always saved in the local time zone.

When History Format is Database, this information


is saved only if the Local Time + Time Difference
option (in your project settings) is also selected.
P14 … P23 Ev_Custom1 … String (varchar) Up to 10 user-defined custom fields.
Ev_Custom10
— Last_Update Timestamp Timestamp that indicates when the database entry
(datetime) was created or last updated.

This information is saved only when History


Format is Database. The update time is saved in
Coordinated Universal Time (UTC) and in the
database's native datetime format. If the database
does not support milliseconds in its datetime
format, the milliseconds portion is saved in
Last_Update_ms.

This information is used to synchronize databases


when the project is configured to use the
Secondary Database in addition to the Primary

file:///C:/Users/abdoa/AppData/Local/Temp/~hh5EBD.htm 2/5/2024
Events Page 9 of 9

Database.
— Last_Update_ms Integer (int) The milliseconds portion of Last_Update.

This information is saved only when History


Format is Database and the database does not
support milliseconds in its datetime format.
Tip:

To customize the column names in the database table, manually edit your project file (<project
name>.APP) as follows:

[EventLogger]
<default column name>=<custom column name>

For example:

[EventLogger]
Ev_Info=TagName
Ev_Message=Message

Parent topic: Events


Related tasks
Enable the event logger
Saving your alarm history / event log to an external database

Copyright © 2015-2024 AVEVA Group Limited or its subsidiaries. All rights reserved. | Contact Us

file:///C:/Users/abdoa/AppData/Local/Temp/~hh5EBD.htm 2/5/2024

You might also like