Update cookies preferences
Promotic

SetState - method of the PmAlarmItem object

Description:
The state change of the alarm item by setting the new required state.
Syntax:
Empty SetState(Long nState)
Parameters:
nState(Long) New required state of the alarm item
Note:
The state change is internally done by automatic calling the methods Activate, Inactivate and Acknowledge so that the alarm item reaches the new required state.
In some cases it is possible to pass directly from the current state to the required state by calling one of the above mentioned methods. In other cases it is not possible to pass directly from one state to another state but some of the above mentioned methods has to be called internally more times and the alarm item must pass through several other states before it is moved to the required state.
The alarm in the state "inactive acknowledged [green]" can be moved to the state "active unacknowledged [red]" directly by calling the Activate method.
The alarm in the state "active acknowledged [yellow]" can be moved to the state "inactive unacknowledged [blue]" by successive calling the methods Inactivate ("inactive acknowledged [green]"), Activate ("active unacknowledged [red]") and finally Inactivate ("inactive unacknowledged [blue]").
The real sequence of gradually called methods can be found in the alarm history.

This method can be used first of all in case when the alarms are implemented outside PROMOTIC (e.g. in the PLC device) and PROMOTIC is using them for the visualization. By the onUserItemAction event it is possible to catch even the acknowledgment of these alarms with the result that the acknowledgment in the PROMOTIC system is suppressed and instead of this the information about the acknowledgment is sent to the system reponsible for the alarms (e.g. into the PLC device).
The method is synchronous, it means that it is processed immediately by the alarm subsystem. Nevertheless writing the history to disk is asynchronous, it means that this method passes the request for writing into the history of alarms subsystem, it is placed into the queue of requests and it is processed later by the alarm subsystem.
See also:
Example:
JavaScriptVBScriptSelect and copy to clipboard

var oAl = pMe.Pm("/Alarm");
var oAlItem = oAl.Item("Temperature");
oAlItem.SetState(3);
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

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