Promotic
WikipediaLinkedInYoutubeTwitterFacebook

WriteVars - method of the PmaCommMsg object

Description:
The method returns object of the PmVar type that represents one variable defined on the "Data-sent" tab.
Syntax:
Object WriteVars(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 contains information about the variable (value, name, index, etc.).

If the variable does not exist, then error value (null for JavaScript or Nothing pro VBScript) is returned..

See also:
- PmaData.Item (method)
Example1:
JavaScriptVBScriptSelect and copy to clipboard

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

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

for (i = 0; i <= oData.Count; i++)
oMsg.WriteVars(i).Value = oData.Item(i).Value;
PROMOTIC 9.0.15 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