Update cookies preferences

How to implement 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 such purpose.

The procedure goes by following steps:
- Create suitable Pmg object (PmgButton, PmgCanvas or PmgRasterImage)
- 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.
Script in the onRefresh event of the Pmg object.
JavaScriptVBScriptSelect and copy to clipboard

if (pMe.Root.ClientType == 2)
if (pMe.Vars("nAlState3").Value > 0)

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
See also:
- Pm.PlaySound (method)
- PmaAlarmGroup (object)
- PmgRoot.ClientType (property)
PROMOTIC 9.0.28 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
- How to implement alarm sound signals in Web client.
© MICROSYS, spol. s r.o.