Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
158
Добавлен:
11.10.2020
Размер:
2.81 Mб
Скачать

6 - The Resources

6.3Alarm Configuration

6.3.1Overview

The alarm system integrated in CoDeSys allows detecting critical process states, recording them and visualizing them for the user with the aid of a visualization element. he alarm handling can be done in CoDeSys or alternatively in the PLC. For alarm handling in the PLC please see the target settings category 'Visualization'.

For the configuration of the alarm system the entry 'Alarm configuration' is available in the 'Resources' tab.

Here you define Alarm classes and Alarm groups. An alarm class serves for the typing of an alarm, that means it assigns certain parameters to the alarm. An alarm group serves for the concrete configuration of one or several alarms (which get assigned a certain class and further parameters) for the use in the project. Thus a class is useful for structuring the available alarms. The different alarm groups are defined by the user by inserting appropriate entries below the header 'System' in the configuration tree.

For the visualization of alarms the element 'Alarm table is available in the CoDeSys visualization. Using this table the user can watch and acknowledge alarms.

If a History, i.e. recording of Alarm-Events should be written to a log-file, such a file must be defined and for each alarm group the saving behaviour must be defined.

When you open the 'Alarm configuration' in the Resources tab, the dialog 'Alarm configuration' opens with a bi-partite window, which concerning the mode of operation is similar to that of the PLC Configuration or Task configuration. In the left part the configuration tree is displayed, in the right part the appropriate configuration dialog will be opened.

Example of an Alarm configuration

Open by a mouse-click on the plus sign at the entry 'Alarm configuration' the currently available configuration tree. If you are going to create a new configuration, this tree only will show the entries 'Alarm classes' and 'System'.

CoDeSys V2.3

6-9

Alarm Configuration

6.3.2General information on alarms, Terms

The usage of an alarm system in CoDeSys obeys the following universal descriptions and definitions concerning alarms:

Alarm: Generally an alarm is regarded as a special condition (expression value).

Priority: The priority, also named "severity", of an alarm describes how important (severe) the alarm condition is. The highest priority is "0", the lowest valid priority value is "255".

Alarm state: An expression/variable configured for the alarm control can have the following states: NORM (no alarm), INTO (alarm just has come), ACK (alarm has come and has been acknowledged by the user), OUTOF (alarm state has been terminated, alarm "has gone", but not yet acknowledged!)

Sub-State: An alarm condition can have limits (Lo, Hi) and "extreme" limits (LoLo, HiHi). Example: The value of an expression ascends and first will transit the HI-limit, thus causing the coming of an HI-alarm. If the value continues ascending and exceeds also the HIHI-limit before the alarm gets acknowledged by the user, then the HI-alarm will get acknowledged automatically and just the HIHI-alarm remains in the alarm list (which is an internal list used for alarm administration). The HIstate in this case is named sub-state.

Acknowledgement of alarms: The main purpose of alarms is to inform the user on alarm situations. In doing so it often is necessary to make sure that the user has noticed this information (see possible actions assigned to an alarm in the alarm class configuration). The user must acknowledge the alarm in order to get the alarm removed from the alarm list.

Alarm Event: An alarm event must not be mixed up with an alarm condition. While an alarm condition can be valid for a longer period of time, an alarm event just describes the momentary occurrence of an change, e.g. a change from the normal state to the alarm state. In the CoDeSys alarm configuration for the three types of events and the corresponding alarm states the same names are used (INTO, ACK, OUTOF).

In CoDeSys the following features are supported:

Deactivation of the alarm generation for single alarms as well as for alarm groups

Selection of the alarms which should be displayed by defining alarm groups and priorities

Saving of all alarm events in an alarm table

Visualization element 'Alarm table' in the CoDeSys Visualization

6.3.3Alarm classes

Alarm classes are used for the general description of certain alarm criteria, such as how to handle acknowledgements (confirmation of an alarm by the user), which actions should automatically run as soon as a particular alarm state has been detected and which colors and bitmaps are to be used for a visualization of an Alarm table. Alarm classes are defined globally in the Alarm configuration and are then available as a base configuration when configuring alarm groups.

Configuration of alarm classes:

Select entry 'Alarm classes' in the alarm configuration tree. The configuration dialog 'Alarm classes' gets opened:

6-10

CoDeSys V2.3

6 - The Resources

Configuration dialog 'Alarm classes'

Press button Add in order to create a new alarm class. Thereupon in the upper window a line will be inserted, primarily only with an entry "NOACK" (no acknowledgement) in the 'Acknowledgement' column. Define a name for the alarm class in the corresponding field in the Name column (open an edit frame by a mouse-click on the field) and if necessary modify the acknowledgement type in column

Acknowledgement.

The following acknowledgements are available:

NO_ACK: No acknowledgement of the alarm by the user is required

ACK_INTO: A "come" alarm condition (status "INTO", alarm occurs) must be confirmed by the user.

ACK_OUTOF: A "gone alarm" (status "OUTOF", alarm terminated) must be confirmed by the user.

ACK_ALL: Gone and come alarm conditions must be confirmed by the user. Additionally you can enter a Comment.

Entries for further alarm classes each will be added at the end of the list. Use button Delete to remove the currently selected entry from the list.

Assigned actions for class <class name>:

Each alarm class defined in the upper window can get assigned a list of actions, which should be performed as soon as a Alarm Event occurs.

In the list of Possible actions select one and press button ">" to get it into the field Assigned actions. This field will finally contain the selection of actions assigned to the alarm class. Via button ">>" you can add all actions at a single blow. Via "<" resp.. "<<" you can remove one or all actions from the done existing selection. If an action is marked in the 'Assigned actions' list, via "..." a

CoDeSys V2.3

6-11

Alarm Configuration

corresponding dialog can be opened to define the desired e-mail settings, the printer settings, the process variable resp. the executable program and, if applicable, a message text.

The following action types (Possible actions) are supported (for a definition of a message text see below):

Action

Description

 

 

 

Settings to be done in the corresponding dialog:

 

 

 

Save:

The alarm event will be

The settings are done in the Alarm group

 

saved internally, in order to

definition in the Alarm saving dialog

 

 

be given out

e.g.in

a

log-

 

 

 

file. Please regard: In this

 

 

 

case the log-file must be

 

 

 

defined

in the

configuration

 

 

 

of the alarm group !

 

 

 

 

 

 

 

Print:

A message text is sent to a

Printer: Select one of the printers defined on

 

printer.

 

 

 

 

the local system; Outputtext: Message text

 

 

 

 

 

 

(see below) which should be printed out

 

 

 

 

 

Message:

In the

current

visualization

Message: Message text to be displayed in the

 

of the alarm a message

message window

 

 

window

will

be

opened

 

 

 

showing the defined text.

 

 

 

 

 

E-Mail:

An e-mail containing the

From: e-mail address of sender; To: e-mail

 

defined

message

will

be

address of recipient; Subject: any subject;

 

sent.

 

 

 

 

Message: Message text (see below); Server:

 

 

 

 

 

 

Name of the e-mail server

 

 

 

 

Variable:

A variable of the CoDeSys

Variable: Variable name: You can select

 

program will get the alarm

project variables via the input assistant (<F2>):

 

status resp. a message text

A boolean variable will indicate the alarm states

 

string.

 

 

 

 

NORM =0 and INTO=1, an integer variable will

 

 

 

 

 

 

indicate the alarm states NORM =0, INTO =1,

 

 

 

 

 

 

ACK =2, OUTOF =4; a string variable will get

 

 

 

 

 

 

the message text defined in field;

Message

 

 

 

 

 

 

(see below)

 

 

 

 

Execute:

An executable file will be

Executable file: name of the file to be

 

started as soon as the alarm

executed (e.g. notepad.exe, you can use the

 

event occurs.

 

 

 

"..." button to get the standard dialog for

 

 

 

 

 

 

selecting a file; Parameter:

appropriate

 

 

 

 

 

 

parameter(s) which should be attached to the

 

 

 

 

 

 

call of the exe-file

 

 

 

 

 

 

 

 

 

Definition of the message text:

For action types 'Message', 'Print', 'Email' or 'Variable' you can define a message text which should be output in case of an Alarm Event.

Line breaks at the

text definitions in 'Message', 'Email' or 'Variable' can be inserted by

<Ctrl>+<Enter>.

 

 

The following placeholders can be used when defining the alarm message:

 

 

 

MESSAGE

 

The message text which is defined for the particular alarm in the

 

 

configuration of the alarm group will be used.

 

 

 

DATE

 

Date, when the alarm status was reached (INTO).

 

 

 

TIME

 

Time of alarm entry.

 

 

 

EXPRESSION

 

Expression (defined in alarm group) which has caused the alarm.

 

 

 

6-12

CoDeSys V2.3

 

 

 

6 - The Resources

 

PRIORITY

 

Priority of the alarm (defined for alarm group.)

 

 

 

 

 

 

 

 

 

 

VALUE

 

Current value of the expression (see above).

 

 

 

 

 

 

 

TYPE

 

Alarm type (defined in alarm group)

 

 

 

 

 

 

 

CLASS

 

Alarm class (defined in alarm group)

 

 

 

 

 

 

 

TARGETVALUE

 

Target value for alarm types DEV+ and DEV- (defined in alarm

 

 

 

 

group)

 

 

 

 

 

 

 

DEADBAND

 

Tolerance of the alarm (defined in alarm group)

 

 

 

 

 

 

 

ALLDEFAULT

 

Any information on the alarm will be output, like described for the line

 

 

 

 

entries in a log file (History).

 

 

 

 

 

 

Example of defining an alarm message:

For a definition of a message box enter the following in the message window:

Further on when defining the alarm in the alarm group enter in column 'Message' the following: "Temperature critical !". The output of the final alarm message will be like follows:

Note: The message text will also be affected in case of a change of the project language if it is included in a *.vis-file or a translation file *.tlt. BUT: In this case - like texts referring to a visualization it has to be set between two "#"-characters (e.g. in the example shown above : "#Temperature critical !#" and "TIME /EXPRESSION: MESSAGE #current#: VALUE", in order to get the text entered in the translation file as ALARMTEXT_ITEMs.)

A log file for action 'Save' is to be defined in the configuration of the alarm group (see Chapter 6.3.4).

Alarm Events for actions:

For each action you define, at which alarm events it should be started.

Activate the desired events:

INTO

The alarm occurs. Status = INTO.

ACK

Acknowledgement by the user has been done. Status = ACK.

OUTOF Alarm state terminated. Status = OUTOF.

CoDeSys V2.3

6-13

Соседние файлы в папке 759-333