SetState - method of object PmAlarmEventItem

The state change of an alarm/event item by setting the new required state. The state change is internally done by automatic calling the methods Activate, Inactivate and Acknowledge so that the alarm/event 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/event item must pass through several other states before it is moved to the required state.

The alarm item in the state "inactive acknowledged (green)" can be moved to the state "active unacknowledged (red)" directly by calling the Activate method.

The alarm item 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 history.

SetState(nState As Long)
oAlEvItem.SetState nState
nState(Long) New required state of an alarm/event item

This method can be used first of all in the case when the alarms are implemented outside PROMOTIC (e.g. in PLC) and Promotic is using them for the visualization. By the onUserItemAction event it is possible to catch even the acknowledgement of these alarms with the result that the acknowledgement in PROMOTIC is suppressed and istead of this the information about the acknowledgement is sent to the system reponsible for the alarms (PLC).

It is irrelevant for events (relevant only for alarms).

The method is synchronous, i.e. it is processed immediately by the alarm subsystem. Nevertheless writing the history to disk is asynchronous, which means that this method passes the request for writing to the history to the alarm subsystem, it is placed into the queue of requests and it is processed later by the alarm subsystem.

oAlEv.Item("Temperature").SetState 3
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice