Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Item - method of the PmaCommGroup object

Description:
The method enables an access to object of the PmVar type that represents one variable defined on the "Data" tab.
Syntax:
Object Item(Variant id)
Parameters:
id(Variant) Specifies the variable. The value is:
- Name (String, case sensitive text, for example "d1") or
- Index (Long, zero-based index)
Note:

The PmVar object includes information about the variable (value, name, index, etc.).

 
If the variable doesn't exist, then error value (null for JavaScript or Nothing pro VBScript) is returned. The global error of the INFO system is generated. For variable existence testing, it is better to use the ItemEx method.
 
This method enables access only to variables (with corresponding data extension) that are created directly in this object (own variables). In fact also other variables from PmaData objects are registered into this object - those that have corresponding data extension configured with path to this object. All data extensions registered in this object can be accessed by method GetVarExtensions.
See also:
Example:
The Item method returns object of the PmVar type. In this case this object has the following properties Value and Quality that can be find out, for example, as follows:
JavaScriptVBScriptSelect and copy to clipboard

var oCommGroup = pMe.Pm("/Comm/Group1");
var val, qual;
//Reading the value
val = oCommGroup.Item("d0").Value;
//or
val = oCommGroup.Item(0).Value;
qual = oCommGroup.Item(0).Quality;

//Writing the value
oCommGroup.Item(0).Value = 35;

History:
Pm8.00.00: Created
PROMOTIC 9.0.13 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice