Professional Documents
Culture Documents
CitectSCADA 5.5 - Configuring and Processing Alarms
CitectSCADA 5.5 - Configuring and Processing Alarms
DISCLAIMER
Citect Pty. Limited makes no representations or warranties with respect to this manual and, to the
maximum extent permitted by law, expressly limits its liability for breach of any warranty that may be
implied to the replacement of this manual with another. Further, Citect Pty. Limited reserves the
right to revise this publication at any time without incurring an obligation to notify any person of the
revision.
COPYRIGHT
Copyright 2003 Citect Pty Limited. All rights reserved.
TRADEMARKS
Citect Pty Limited has made every effort to supply trademark information about company names,
products and services mentioned in this manual. Trademarks shown below were derived from
various sources.
CitectSCADA, CitectHMI/SCADA, CitectFacilities and CitectSCADA Batch are regisitered
trademarks of Citect Pty. Limited.
IBM, IBM PC and IBM PC AT are registered trademerks of Internatrional Business Machine
Corporation.
MS-DOS, Windows, Windows 98, Windows 2000, Windows XP and Excel are trademarks of
Microsoft Corporation.
dBase is a trademark of Borland Inc.
General Notice:
Some product names used in this manual are used for identification purposes only and may be
trademarks of their respective companies.
Defining Alarms
Protection of valuable plant equipment is a central feature of your CitectHMI/SCADA system. The
CitectHMI/SCADA alarm facility constantly monitors equipment data and alerts operators of any
equipment fault or alarm condition.
CitectHMI/SCADA supports two types of alarms:
Hardware alarms. CitectHMI/SCADA continually runs diagnostic routines to check all
peripheral equipment, such as I/O Devices. All faults are reported automatically to the
operator. This facility is fully integrated within CitectHMI/SCADA - no configuration is
necessary.
Configured alarms. Unlike hardware alarms, you must configure the alarms that report fault
conditions in your plant (for example, when a tank level is too high or when a motor overheats).
Configured Alarms
You can use five types of configured alarms:
Digital alarms
Multi-Digital alarms
Time Stamped alarms
Analog alarms
Advanced alarms
You can process each alarm individually, or assign each of your alarms to separate categories,
where they can be prioritised. You can then display, acknowledge, reset, and log all alarms in a
particular category.
You can also customise the order in which alarms will be displayed on the alarm summary page
using the SummarySort and SummarySortMode parameters. (This order will override the alarm
category priority order.)
To help operators with alarms, you can create graphics pages that contain information about the
alarms (such as the action an operator must perform to correct the situation). You can display these
pages automatically when the alarm occurs, or only when an operator uses the Alarm Help
keyboard command.
Alarm properties can also be used anywhere a normal variable tag can be used. For example the
status of an alarm could be used to change the colour of a symbol on a graphics page.
BIT_12
Var Tag B
BIT_1
Var Tag C
In this example, variables are specified for all three tags. If state CBA is specified to activate an
alarm, when all three variables change to ON (1) the alarm will activate.
Var Tag A
RFP3_TOL
Var Tag B
BIT_1
Var Tag C
MCOL_304
Alarm Categories
Each alarm in your system can be assigned to a category, and each category can be processed as
a group. For each category, you can set alarm display details (font and page type), logging details
(printer or data file), and the action to be taken when an alarm in the category is triggered (e.g.
activating an audible alarm).
Each category can have an associated priority. The alarm priorities can be used to order alarm
displays, providing useful filtering for the operator.
You can also customise the order in which alarms will be displayed on the alarm summary page
using the SummarySort and SummarySortMode parameters. (This order will override the alarm
category priority order.)
You can configure up to 16376 alarm categories. If you do not specify a category for an alarm, the
alarm has the same attributes as Alarm Category 0. If you do not define an Alarm Category 0,
CitectHMI/SCADA uses a default for the category.
A special case of this command occurs when the Alarm ON Action is self-referring, with a form
such as TAG1 = TAG1 + 1 . This command will not work properly since CitectHMI/SCADA
does not reread the tags before processing the Alarm On action (for performance reasons).
This particular command will therefore initially set the value of TAG1 to 1 rather than
incrementing it.
To correctly run a command of this type in the Alarm ON Action, use TaskNew() to run your
own Cicode function to perform the tag command:
Alarm ON
Action
TaskNew("MyFunc","Data",5);
NOTES: 1) If an alarm value is longer than the field it is to be displayed in, it will be truncated or
replaced with the #OVR ("overflow of format width") error. See the
[General]FormatCheck parameter for details.
2) When the alarm is logged to a device (i.e. printed or written to a file or database),
the format specified for the logging device overrides the display format.
Summary Format (120 Chars.)
The summary display format for all alarms in this category. The Summary Display format
specifies how the alarm summary displays on the alarms summary page (on the screen only).
The display format is defined exactly as the Alarms Display Format (see above). However,
you can also use additional data fields.
This property is optional. If you do not specify a Summary Display format, the format defaults
to:
Format
See Alarm Summary Fields for the formatting details for each field type.
You can change the default Summary Display Format for all alarms by setting the [Alarm]
DefSumFmt parameter.
NOTE:
When the alarm is logged to a summary device (i.e. printed or written to a file or
database), the format specified for the logging device overrides the display format.
10
Digital Alarms
11
RFP3_TOL
Var Tag A
When the state of the variable RFP3_TOL changes to ON (1), the alarm is triggered.
Alternatively, you can define the alarm to trigger when the state of the variable changes to
OFF (0), by preceding the digital address with the logical operator NOT, for example:
NOT RFP3_TOL
Var Tag A
In this case, the alarm is triggered when the state of the variable MCOL304 changes to OFF
(0).
You can also configure digital alarms to activate based on the state of two digital variables, for
example:
Var Tag A
RFP3_TOL
NOT MCOL304
Var Tag B
In this case, the alarm is triggered when the state of both variables changes to the active state
- when the state of the variable RFP3_TOL changes to ON (1), and when the state of the
variable MCOL304 changes to OFF (0).
NOTE:
If you leave the Var Tag B property blank, only Var Tag A triggers the alarm.
12
Delay (hh:mm:ss)
The alarm delay period.
A Digital Alarm becomes active when the state of the triggering condition remains true for the
duration of the delay period. The active alarm has an ON time of when the state became true.
This property is optional. If you do not specify a delay period, the alarm is active as soon as it
is triggered by the digital tag(s).
NOTE:
The following fields are implemented with extended forms (press F2).
The area and privilege fields defined here must be designed to work in conjunction. A
privilege defined on a button (say) will ignore the alarm defined area.
13
Multi-Digital Alarms
14
RFP3_TOL
Var Tag B
BIT_1
Var Tag C
MCOL_304
15
Realarm (1 Char.)
Indicates what happens when there is a transition from one alarm state to another. A value of
1 in this field causes a new time to be recorded when the states change. With a value of 0,
only the time of the first alarm state is recorded in the Alarm Summary.
A special case of this command occurs when the Alarm ON Function is self-referring, with a
form such as TAG1 = TAG1 + 1 . This command will not work properly since
CitectHMI/SCADA does not reread the tags before processing the Alarm On function (for
performance reasons). This particular command will therefore initially set the value of TAG1 to
1 rather than incrementing it.
To correctly run a command of this type in the Alarm ON Function, use TaskNew() to run your
own Cicode function to perform the tag command:
ON Function
TaskNew("MyFunc","Data",5);
16
17
18
MEANING
RANGE
1st
Hours
00 - 24
2nd
Minutes
00 - 60
3rd
Seconds
00 - 60
4th
100th /
Sec
00 100
(most significant
byte)
(least significant
byte)
19
This field can also be used to handshake with the PLC code - CitectHMI/SCADA informs the
PLC that it has read the timer register and it is now OK for the PLC to overwrite the last value.
For example, with the following code saved in a Cicode file:
INT
FUNCTION
AlarmTimerReset(INT iTimer, STRING sTimerTrigger)
TagWrite(sTimerTrigger, 0);
//Reset the trigger
RETURN iTimer;
//Return the timer value to the alarm system
END
AlmTrigger1
Timer(AlmTimer1, "AlmTrigger1")
Timer
Where AlmTimer1 is the PLC register that stores the alarm time, and AlmTrigger1 is the alarm
trigger bit.
When AlmTrigger1 is set to one(1), the alarm is triggered, and the Cicode function will be
called. On calling the function, CitectHMI/SCADA reads the AlmTimer1 register. The function
resets the trigger bit (handshaking), and the value of AlmTimer1 will be returned to the alarm
system.
Category (16 Chars.)
The alarm category number or label.
This property is optional. If you do not specify a category, the alarm defaults to Category 0.
Help (64 Chars.)
The name of the graphics page that displays when the AlarmHelp() function is called. This
property is optional. If you do not specify a help page, no action occurs when the AlarmHelp()
function is called.
You must define a command that calls the AlarmHelp() function.
Comment (48 Chars.)
Any useful comment.
NOTE:
The following fields are implemented with extended forms (press F2).
20
Analog Alarms
21
22
NOTES: 1) When a tag value increases from High to High High within the High Delay Period,
the delay timer is reset. The High High Alarm is only activated if the value remains in
the High High range for the delay period.
2) When the value increases from High to High High after the High Delay period has
expired, a High Alarm is activated and then the delay period for the High High Alarm
begins.
3) If the tag value exceeds the High High value and then falls below it before the High
High Delay period expires, at the time it falls, the High Alarm is triggered immediately.
It has an ON time of when the tag value exceeded the High High value.
These points also apply to tag values travelling between Low and Low Low ranges.
Low (10 Chars.)
The value used as the triggering condition for a Low Alarm. A Low Alarm becomes active
when the value of the Variable Tag drops below this value and remains there for the duration
of the Low Delay period. The active alarm has an ON time of when the tag fell below the Low
value.
Low Delay (hh:mm:ss)
The delay period for Low Alarms. The alarm will only activate if its triggering condition is met
for the duration of this period.
This property is optional. If you do not set a value, the Low Alarm is activated as soon as the
tag drops below the Low value.
NOTE:
23
24
The following fields are implemented with extended forms (press F2).
25
Advanced Alarms
26
The following fields are implemented with extended forms (press F2).
27
28
{Tag,8} {Name,32}
In this case, data displays in two fields - Tag, with 8 characters, and Name, with 32 characters. The
width specifier is optional - if you do not use it, the width of the field is determined by the number of
characters between the braces.
Format
Name of Alarm:{Name
In this case, Name is followed by four spaces - the data {Name} displays with 8 characters.
NOTE:
The screen resolution of your CitectHMI/SCADA computer determines the total number
of characters (and therefore the number of fields) that can be displayed on the alarms
page.
Name of Alarm:
Any spaces that you use in a text string are also included in the display.
The justification specifier is optional - if it is omitted, the field is left justified. If you use a justification
specifier, you must also use the width specifier.
To display field text in columns, use the tab character (^t) - for example:
Format
{Tag,8}^t{Name,32}^t{Desc,8}
This format aligns the tag, name and description fields of the alarm when using a proportional font to
display the alarms.
29
When LineSpeed1 is a variable tag, this expression will produce the following output on the alarm
display or alarm log:
Line Broken Alarm at Line Speed 1234
The following alarm entry uses an expression instead of a tag:
Alarm
Desc
When Tank1 and Tank2 are variable tags, and Offset is a Cicode function, this expression produces
the following output:
High Level at Total Capacity 4985 litres
NOTE:
The result is formatted according to the formatting specified for the first variable tag in
the expression. Standard variable formatting specifiers can be used to define the
format for the numeric variable, over-riding the default format specified in Variable
Tags.
30
Description
{Tag,n}
{Name,n}
{Native_Name,n}
{Desc,n}
{Native_Desc,n}
Alarm Tag
Alarm Name
Alarm Name in the native language
Alarm Description
Alarm Description in the native
language
Alarm Category
Help Page
Area
Privilege
The type of alarm or condition:
DISABLED
ACKNOWLEDGED
UNACKNOWLEDGED
The time at which the alarm changed
state (hh:mm:ss). (Set the
[Alarm]SetTimeOnAck parameter to
use this field for the time the alarm is
acknowledged.)
The date on which the alarm changed
state (dd:mm:yyyy). Note you can
change the format used via the
parameter [ALARM]ExtendedDate.
The date on which the alarm changed
state in extended format.
{Category,n}
{Help,n}
{Area,n}
{Priv,n}
{Type,n}
{Time,n}
{Date,n}
{DateExt,n}
You can use the following fields for Digital Alarms only:
Field Name
Description
{State,n}
31
You can use any of the following fields for Time Stamped Alarms only:
Field Name
Description
{Millisec,n}
You can use any of the following fields for Analog Alarms only:
Field Name
Description
{High,n}
{HighHigh,n}
{Low,n}
{LowLow,n}
{Rate,n}
{Deviation,n}
{Deadband,n}
{Format,n}
{Value,n}
{State,n}
You can use any of the following fields for Hardware Alarms (Category 255) only:
Field Name
Description
{ErrDesc,n}
{ErrPage,n}
32
You can use any of the following fields for Alarm Log Devices only:
Field Name
{LogState,n}
Description
The last state that the alarm passed
through. (This is useful when logging
alarms to a device.)
You can use any of the following fields for Multi-Digital Alarms only:
Field Name
{State_desc, n}
Description
The configured description (e.g.
healthy or stopped) of a particular
state. This description is entered when
configuring the Multi-Digital Alarm
Properties
33
{FullName,n}
{UserDesc,n}
{OnDate,n}
{OnDateExt,n}
{OffDate,n}
{OffDateExt,n}
{OnTime,n}
{OffTime,n}
{DeltaTime,n}
{OnMilli,n}
{OffMilli,n}
{AckTime,n}
{AckDate,n}
Description
The name of the user (User Name)
who was logged on and performed
some action on the alarm (e.g.
acknowledging the alarm or
disabling the alarm, etc). Note that
when the alarm is first activated, the
user name is set to "system"
(because the operator did not trip the
alarm).
The full name of the user (Full
Name) who was logged on and
performed some action on the alarm
(e.g. acknowledging the alarm or
disabling the alarm, etc). Note that
when the alarm is first activated, the
full name is set to "system" (because
the operator did not trip the alarm).
The text related to the user event
The date when alarm was activated
The date (in extended format) when
the alarm was activated
(dd/mm/yyyy)
The date when the alarm returned to
its normal state
The date (in extended format) when
the alarm returned to its normal state
(dd/mm/yyyy)
The time when the alarm was
activated
The time when the alarm returned to
its normal state
The time difference between
OnDate/OnTime and
OffDate/OffTime, in seconds
Adds milliseconds to the time the
alarm was activated.
Adds milliseconds to the time the
alarm returned to its normal state.
The time when the alarm was
acknowledged
The date when the alarm was
acknowledged
34
{AckDateExt,n}
{SumState,n}
{SumDesc,n}
{Native_SumDesc,n}
{AlmComment,n}
{Comment,n}
{Native_Comment,n}
You can also include in your Alarm Summary any Alarm Display field other than State.
However, you cannot include any of the above Alarm Summary fields in an Alarm
Display or Alarm Log Device, as this may produce unreliable results.
35
Description
Return Type
.On*
Alarm active
Digital
.Ack
Alarm acknowledged
Digital
.Disabled
Digital
.Time
Long
.Tag
Alarm tag
.Name
Alarm name
.Category
Alarm category
Integer
.Priority
Alarm priority
Integer
* The .On property for Analog alarms is true if any alarms associated with the alarm tag are active.
NOTE:
Once an alarm is disabled, it cannot be re-enabled unless you use the function
AlarmEnable() or AlarmEnableRec()
For digital alarms and advanced alarms, the following properties can also be used:
Property
.Desc
.Delay
Description
Alarm description
Alarm delay
Return Type
String (80 bytes)
Long
36
Description
Alarm tag value
Setpoint
High High
High
Low Low
Low
Deadband
Rate
Deviation
High High delay
High delay
Low delay
Low Low delay
Deviation delay
Return Type
Real
Real
Real
Real
Real
Real
Real
Real
Real
Long
Long
Long
Long
Long
For the digital properties below, only one can be true at any point in time for each alarm. They are
arranged in order of priority, from lowest to highest.
.DVL
Deviation alarm triggered (Low)
Digital
.DVH
Deviation alarm triggered (High)
Digital
.R
Rate of Change alarm triggered
Digital
.L
Low alarm triggered
Digital
.H
High alarm triggered
Digital
.LL
Low Low alarm triggered
Digital
.HH
High High alarm triggered
Digital
NOTE:
DVL and DVH are only evaluated if Deviation > 0. R is only evaluated if Rate > 0.
Some of the alarm properties return configuration data. For the case in which the user has not
defined this information, the following defaults will be provided:
Property
.Setpoint
.HighHigh
.High
.LowLow
.Low
.Rate
.Deviation
.Deadband
.Category
.Priority
Default
0
3.4e+38
3.4e+38
-3.4e+38
-3.4e+38
0
0
0
0
0
37
Property
.Ack
.Deadband
.Deviation
.Disabled
.HighHigh
.High
.LowLow
.Low
.HHDelay
.HDelay
.LDelay
.LLDelay
.DevDelay
NOTE:
Description
Alarm acknowledged (once acknowledged,
cannot be "unacknowledged")
Alarm Deadband
Deviation from setpoint
Alarm disabled
High High
High
Low Low
Low
High High delay
High delay
Low delay
Low Low delay
Deviation delay
Input Type
Digital
Real
Real
Digital
Real
Real
Real
Real
Long
Long
Long
Long
Long
Analog alarm thresholds can also be changed using the AlarmSetThreshold() function.
Conditions of Use
i) The alarm tag must be unique
ii) The alarms databases in all included projects on the Alarms Server and the CitectHMI/SCADA
Display Client computer must be identical.
For example:
Name
Number
Address
Protocol
Port Name
Alarm_Device
12
ALARM
ALARM
The Alarm I/O Device will only work on a computer that is defined as an Alarms Server and an I/O
Server. After you have configured the Alarm I/O Device, use the Computer Setup Wizard to setup
the Alarms Server, defining it as an I/O Server - even if it has no physical devices attached to it.
38
If you have many alarms on the alarm page or alarm summary page, you can use the
Page Up and Page Down commands to scroll through the list.
1. In the Citect Explorer, double-click the Create New Page icon in the Graphics|Pages folder.
- or 1. In the Graphics Builder, select New from the File menu, and press the Page button.
2. Select the alarm template you want to use. Use the Alarm template to create a page to display
configurable alarms, the Summary template for summary alarms, the Disabled template for
disabled alarms, and the Hardware template for hardware alarms.
3. Select Save from the File menu.
4. Specify a name in the page title field. The new page name should match the template name.
For example, call the new hardware alarm page Hardware.
5. Press OK to save the new page. You can then close the page.
NOTE:
You can also create your own (non-standard) alarm pages. The easiest way to do this
is by copying and modifying the standard alarm templates.
39
If you are using the standard CitectHMI/SCADA page templates, you do not usually
need to create a command to display the page - they are already built in.
To display a customised alarm page (with a non-standard name), you should use the
PageDisplay() function to display the page, followed by the AlarmSetInfo() function as
required.
40
If any animation is associated with an I/O Device that fails at startup or goes off-line
while CitectHMI/SCADA is running, the associated animation is greyed on the relevant
graphics pages (because the values are invalid). You can disable this feature with the
[Page]ComBreak parameter.
See:
Handling Communication Errors
41
Fonts Properties
Fonts have the following properties:
Font Name (16 Chars.)
The name of the font. Unlike background text (that can use any standard Windows font), you
must define a CitectHMI/SCADA font for animated text (numbers, strings, alarms, etc.).
Font Type (16 Chars.)
Any text font supported by Windows. Click on the drop box and select a font type.
You can also specify bold, italic, and underlined text. To specify any of these options, append
the appropriate specifier to the Font Type, for example:
Courier,B
Font Type
Specifies bold characters.
Helv,I
Font Type
Specifies italic characters.
TmsRmn,U
Font Type
Specifies underlined text.
You can also specify multiple options, for example:
Courier,B,I,U
Font Type
Specifies bold, italic, and underlined characters.
NOTE:
If you want to use a font that is not displayed in the drop box, you must install the font
on your computer before you can use it in your CitectHMI/SCADA system. You can
view, install, and remove Windows fonts using the Windows Control Panel (Fonts
Option). Refer to your Windows documentation for information on installing fonts. (If
you are using CitectHMI/SCADA on a network, all computers must have the font
installed.)
Pixel Size
pA
42
To specify a point size, enter a negative number in the Pixel Size field, for example:
-10
Font Size
Specifies a ten-point font size.
Note that you can only specify a point size as a whole number (integer).
If you have not installed the Font Type (or Pixel Size) on your system, a default font and/or
size is used that most closely resembles the font and/or size you have specified.
NOTE:
If you use a point size, the size remains constant across all screen resolutions. On low
resolution screens, the font displays larger than on high resolution screens. This may
cause misalignment of animation. Only use a point size to display text on computer
screens of the same resolution.
43