Use of Mapped Properties Defined in Functions

It is possible to have objects with properties that do not actually correspond to the data points of the corresponding object model. In this case, the property definition is made using the Desigo CC functions.

Once a function is created and associated with an object model, it is possible to map the properties of this function with the properties of the object model. This mapping can be: simple, functional, extended, or mixed.

Regardless of the properties mapping, scripts can be used to refer to these properties. Consequently, you can use these properties in script functions by using @ notation:

 

Examples of Use

 

How to read a property (IsActive) defined in a function (Chiller Digital) and mapped on a property of an object model (Chiller)

read(chiller, "@IsActive");

 

How to subscribe to two properties (IsActive and NetOilPressure) defined in a function (Chiller Digital) and mapped on a property of an object model (Chiller)

subscribeValues(chiller, ["@IsActive", "@NetOilPressure"], callback)

...

function callback(chiller, values) {

    var netOilPressure = values["NetOilPressure"].Value;

    var isActive = values["IsActive"].Value;

    ...

}

 

Note that in case of subscription it possible to access to the mapped properties without specifying the notation @.