Example of PmPrototype and PmInstance

Example is placed in the folder: /Pm/Examples/Others/Prototype.

This is an example application that uses in the runtime the PmInstance objects. The PmPrototype (template) containing the PmPanel, PmData, PmTrend subobjects is copied into the instances. The example is designed not to exceed the limit of 30 variables and 10 graphic panels (see PmRtFree - Free runtime license).

In the PmFolder object named BoilerRoom there is one PmPrototype object, three PmInstance objects and one PmAlarmEvent object. The PmPrototype object contains PmPanel, PmData, PmTrend, PmAlarmEvent and PmTimer objects. This object represents the prototype (template) for the technology of a single boiler.
Configuration of the PmInstance objects:

The objects named Boiler_Instance1, Boiler_Instance2 .. are connected to the PmPrototype object named Boiler_Prototype on the Instance page of the Template configurator. In the PROMOTIC object parameters configurator the parameter name (boil) is defined together with the corresponding value (1,3,3). The parameter name is identical with the parameter in the PROMOTIC object parameters configurator of the PmPrototype object and the value is crucial for identification in the folowing configuration of data, trends and alarms for the corresponding boiler.

Configuration of the PmPrototype object:

The object named Boiler_Prototype has a parameter named boil set to 0 in the PROMOTIC object parameters configurator.

Configuration of the PmTrend object:

The object has an expression composed by Macro expression $const - obsolete and Macro expression $.par on the Trend page in the Group ID identifier and User defined name of the group configurators.

Configuration of the PmAlarmEvent object:

The object has an expression composed by Macro expression $const - obsolete and Macro expression $.par on the Main page in the Group identifier and Displayed group title configurators. The configurators Parent enabled and Parent are connected to parent PmAlarmEvent.

Configuration of the PmData object:

The object has two data items TemperCurrent and TemperRequired created on the Data page. One of them is connected via ExtAlarmAnalog to the PmAlarmEvent object with the template alarm0. There are configurators in the setup window of this data extension Data extension identifier and Alarm source composed into macro expression by Macro expression $const - obsolete and Macro expression $.par. Both data items are connected to the PmTrend object by ExtTrend.

The PmTimer object named Emul is used for TemperCurrent data item value emulation with regard to the value of the TemperRequired data item of the PmData object.
Configuration of the PmPanel object:

The object named Panel has an expresion compiled by $const and $.par in the Panel title and sParams default value configurators on the Panel page.

There is a PmiRoot graphic item in the panel with parameter named boil with initial value of 0.

The panel contains both simple and compleg graphic items. The PmiText items are connected by Data binding PP - Binding to PROMOTIC object property data binding to the data of the PmData object. The PmiSliderPane item is connected by the Data binding PP - Binding to PROMOTIC object property data binding to the TemperRequired variable of the PmData object. The trend viewer has static trend item configured without the connection to the server. The connection to the trend server is configured dynamicaly in the onStart event by the Connect method. In the third parameter of this method the GetPar method is used in order to detect the value of the boil panel parameter. Based on this, the viewer is connected to corresponding trend group.

Configuration of the MainPanel object PmPanel:

The panel is configured as overview screen containing identical compound graphic items representing the boiler. The items differ only by the value of the parent item parameter. The embedded graphic items use this parameter in order to connect to the corresponding data items.

The example is created in order to be functional also as a Web application. That is why the Macro expression $.par expression is used in the Web component identifier configurator on the Web server page of objects enabled for Web, to ensure unambigous component identification.
PROMOTIC 8.3.20 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