Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Data binding of the object PmVar

Description:
The window serves for the definition of the data binding of the variable to another value (variable, object, expression, etc.). Data binding then allows such binding when for example reading from the variable causes reading the value to which the variable is bound.

This configuration window can be opened from the "Value" configurator in the "Variable" configuration window.

 
This data binding is obsolete. It can be replaced by data extensions or by script, see example.
Configuration items:
Data binding typeSpecifies the value type to which the data binding is linked up:
PP Property of Pma object or its subobject - The variable is bound to an arbitrary property of the Pma object or its subobject. The path to the Pma object (or to subobject) and the name of its property is entered. The path has the same syntax as in the PmaObject.Pm method, it can be relative or absolute and can contain implementation subobject link marked by the # character. The Property name can even be the compound expression, for example "Item(0).Value" for the PmaData object. If the property is not stated, then the data binding is defined directly to the object (this can be performed only for the variable of the Object type).
AP Value of application variable - The variable is bound to the variable value defined on the "PmaRoot > Variables" tab.
SP Property of object in Pm variable - The variable is bound to an arbitrary property of the Pm object.
OP Property of object - The variable is bound to any property of the object defined by expression.
Data binding usedSpecifies when the data binding is used:
Ini On property start - Binding will be performed on the initialization of the variable (the initial value of the variable will be set).
<> On both property reading and writing - Execution of the combined binding On reading and On writing.
<< On property reading - Binding will be performed on reading the variable. The value will be read from the variable (property) by the specified binding.
>> On property writing - Binding will be performed on writing into the variable. The value that will be written into the variable, will also be written into the variable (property) by the specified binding.
ObjectPath to object relevant to the binding.
PropertyConnection to the object property.
VariableConnection to variable
Example:
Script that in the PmaCommMsg object in the onEndOfTransfer event reads the received value from the communication and then saves it into the variable in the PmaData object.
JavaScriptVBScriptSelect and copy to clipboard

var val = pMe.ReadVars(0).Value;
pMe.Pm("/Boiler1/Data/#vars/Temperature").Value = 100 + 10 * val;
PROMOTIC 9.0.14 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