How to create alarm sound signals in Web client.
In order to be able to run the alarm on a Web client depending on the alarms generated on the server, it is necessary to create a permanent link that will inform the client about the state of alarms. The
PmgButton object or image (
PmgCanvas,
PmgRasterImage) placed in permanently opened panel (usually
Toolbar) can be easily used for this purpose.
The procedure goes by following steps:
- On the "
Variables" tab of this object, create variable of the
Integer type named "
nAlState3".
- Bind this variable by the "
PP - Pma object property" data binding to corresponding
PmaAlarmGroup object. In the "
Property" configurator enter:
GetStateCount("state:3;")
(This sets the calling of the
GetStateCount method with the
state:3; parameter that will return the number of currently active (red) alarms.)
- Then create the script marked as Example in the
onRefresh event.
The
nAlState3 variable can be used also for changing the color of text, background, image, etc.
The object can also be used as button for opening the alarm viewer. See
Opening the viewer of the PmaAlarmGroup object