Promotic

Item - method of the PmaAlarmGroup object

Description:
Access to one alarm item (to the object of the PmAlarmItem type).
Syntax:
Object Item(String sId, [Date tTimeOn])
Parameters:
sId(String) The unique text identifier of the alarm item. See the "Identifier" configurator.
tTimeOn[optional] (Date) Creation time of the alarm item.
If not set (or The 0 value is set), then the alarm item is returned without checking the creation time.
If specified, then the creation time of the alarm item must correspond to the set value.
If the alarm item that corresponds to the specified text identifier and to the specified creating time does not exist, then the error value (null for JavaScript or Nothing for VBScript) is returned.
The tTimeOn parameter is useful first of all in two following cases:
1. If several instances of the alarm item with the same identifier exist (cased by states of alarm items inactive unacknowledged (blue)), then it allows to return one concrete instance of the alarm item (even other than the last). If the tTimeOn parameter is omitted, then the last, the latest old, alarm item is returned.
2. If the operation is performed over the alarm item and a delay between the beginning of the operation and its termination can arise (the confirmation window for the action or the operation transferred between two computers), then it is advisable to specify by the tTimeOn parameter that the operation has to be performed over the concrete instance of the alarm item in the time. If the instance of the alarm item does not exist in the moment when the operation starts to be performed, then the operation is cancelled (e.g. an attempt to acknowledge the same alarm item from two computers at the same time), otherwise the operation would have been performed over the newer (other than original) instance of the alarm item.
Return value:
Returns object of the PmAlarmItem type. In case of an error, it returns the value null for JavaScript or Nothing for VBScript (probably the alarm item with the Id or the creation time does not exist). Nothing value can be tested by VBScript Is operator.
See also:
- PmAlarmItem.Id (property)
Example:
JavaScriptVBScriptSelect and copy to clipboard

var oAl = pMe.Pm("/Alarm");
var oItem = oAl.Item("alarm0", 0);
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

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