Preconfiguration "PmExpr - mathematical expression"

Creation and evaluation of mathematical JavaScript expression using the PmExpr object.
This preconfiguration can be activated when creating a new object (e.g. by "New object" in the local object menu or by pressing the Insert key after selecting the object) and is included in the group: " / Panels (PmPanel) / Others examples".

This preconfiguration can be used with the objects: PmFolder or PmRoot.

- Preconfiguration creates an object of type PmFolder containing PmPanel and PmData objects.
- The preconfiguration is created including the panel (PmPanel object) functionality as a Web panel.
This preconfiguration can be used to test and evaluate user created mathematical expression (PmExpr) in JavaScript language syntax. There are predefined variables that can be used in the expression.
In this preconfiguartion, there are static predefined variables in the ListVariables method of the created PmFolder object. The ResultExpr method of this object then returns the evaluated expression that was previously passed to it in its parameter.
The testing panel PanelMain demonstrates the possible entries of mathematical expression in three examples. On the right side there is the evaluated value. On the bottom there are the real values of the variables that can be used in the expression. The items used as expression entries or for displaying the results can be edited locally and their modification is immediately resulting in change of the resulting evaluated value.
From panel PanelMain it is possible to open PanelExpr panel by a button. It can be used as simple mathematical expression editor where it is possible to use the buttons from left to right in order to create desired expression. It is also possible to edit it also locally on spot.
These configurators can be set before the preconfiguration is created:
The name of created objectName of the object created in the application object tree. This is a system name and must not contain diacritics, empty string, spaces and the first character must not be a number.

Default: "PmExpr"

Enable as Web componentIt indicates if this object has to be registered as a Web server component

After this preconfiguration is created, the configurator is se to: PmPanel > Web server > Enable as Web component.

PmWeb objectPath in the objects tree to the PmWeb, PmWebFolder or PmWebLang object where the registration is carried out.

Macro expression can be used for input (it is evaluated while the application is launching).

After this preconfiguration is created, the configurator is se to: PmPanel > Web server > PmWeb object.

PROMOTIC 8.3.23 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