Promotic

DbAlarm - event of the AtouchX object

Description:
The event is triggered by an alarm, i.e. when the database variable is actively written by another station to the PC.
The event notifies an alarm (i.e. active writing of the database variable by another station to the PC). It presents to the user the WID of the variable causing the alarm, the user defined Param parameter and directly the new current value of the database variable (after writing).
 
If is the database variable matrix, then the event creates the DATA variable as a two-dimensional matrix. The elements of the matrix are of the type corresponding to the type of the database variable or of the Variant type containing the type corresponding to the type of the database variable.
Parameters:
WID(Long) The WID of the database variable that triggered the alarm (into which it was written).
If the alarm was set by the DbAlarm method, then the value of WID corresponds to the value entered there (pure WID or WID including the station number).
If the alarm was specified by the DbMultiSetAlarm method, then the value of WID is including the station number.
Param(Long) The value entered in the DbAlarm method or DbMultiSetAlarm.
DATA(Variant) Current content of the database variable.
Example:
JavaScriptVBScriptSelect and copy to clipboard

switch (Param)
{
case 60:
if (WID == 1024)
{
var nVal = DATA;
}
break;
case 40:
var nValAll = DATA;
break;
}
PROMOTIC 9.0.21 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.