WriteVars - method of the PmaCommMsg object

The method returns object of the PmVar type that represents one variable defined on the "Data-sent" tab.
Object WriteVars(Variant id)
id(Variant) Specifies the variable. The value je:
- Name (String, case sensitive text, for example "d1") or
- Index (Long, zero-based index)
The PmVar object contains information about the variable (value, name, index, etc.).
If the variable does not exist, then error value (null for JavaScript or Nothing for VBScript) is returned..
See also:
- PmaData.Item (method)
JavaScriptVBScriptSelect and copy to clipboard

oMsg.WriteVars("xy").Value = 5;
// or
oMsg.WriteVars(0).Value = 5;
Values of variables of the PmaData object will be copied into variables on the "Data-sent" tab.
JavaScriptVBScriptSelect and copy to clipboard

var iRow;
var oData = pMe.Pm("/Data");
var oMsg = pMe.Pm("/Comm/mr1");

for (iRow = 0; iRow <= oData.Count; iRow++)
oMsg.WriteVars(iRow).Value = oData.Item(iRow).Value;
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

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