Promotic
Login logon

Preconfiguration "Data in linear chart and in histogram"

Panel displaying data in linear graph and in histogram.

This preconfiguration can be activated when creating a new object (e.g. by "New object ..." in the context menu of the object or by pressing the Insert key after selecting the object).
 
This preconfiguration is included in the "/ Panels (PmaPanel) / Trends and graphs" group.
 
This preconfiguration can be created in the PmaFolder, PmaRoot, PmaPanel, PmaWorkspace or PmaPrototype object.

The preconfiguration is created including the panel (object of the PmaPanel type) is functional also as Web panel. In order to make the preconfiguration functional also on the Web, it is necessary to enable the object of the PmaPanel type for the Web (on the "Web server" tab).

The preconfiguration creates panel containing two graphs. One shows data progression (trend) a the second represents frequency of appearance of values in defined value intervals (histogram). Both Pmg objects are created in the PmgCanvas object. The outer objects render scales and rasters. The inner objects (Dynamic) render the data progression based on values in its variables val1 and values

The button in the panel calls GetData panel method for obtaining requested 1-dimensional data array. (This method uses emulated data for demonstration purposes.) This data array is passed to corresponding graphis into DrawGraph methods for processing and rendering.

The "DrawGraph" method of the Trend graph transforms the data into string, where the individual values are separated by semicolon. The string is then inserted into the val1 variable of the internal Dynamic object. The scale range and appearance are defined by variables minY and maxY and also by variables at the beginning of the script of the "DrawScaleY" method.

The "DrawGraph" method of the Histogram graph processes the date in order to compute the frequency of appearance of values in the range defined in the valuesX variable. The resulting values are separated by semicolon and inserted into the values variable of the internal object Dynamic. The highest number of appearance is rounded and and written into the max variable. This number is then used to adapt the range of the scale. The appearance of the scale is defined by variables at the beginning of the "DrawScale" method script.
These configurators can be set before the preconfiguration is created:
The name of created objectName of the object created in the Pma object tree.
The maximum name length is 30 characters.
This is a system name, so it must contain only alphanumeric and must not contain any diacritics (i.e. national dependent characters), empty string, spaces and first character must not be a number.
Default: "Histogram"
Panel titleUser-defined name of the panel that is displayed for example in:
- in the window title bar (if is opened outside the workspace)
- in the panel list obtained for example by the FindViewers method

This configurator sets the initial value of the property PmaPanel.Title and PmgRoot.ViewerTitle.
Macro expression can be used for entering ($.text ..) (it is evaluated while the window is opening).
After the preconfiguration is created, the "PmaPanel > Panel > Panel title" configurator will be set to this value.
Linear graph (trend)
ColorColors in the HTML format (Working with colors description)
Range from minimumStart of the range
Range to maximumEnd of the range
Histogram
Bar value rangesValue ranges of bars separated by semicolon
ColorColors in the HTML format (Working with colors description)
Enable as Web componentSpecifies whether this object has to be registered as a web server component
After the preconfiguration is created, the "PmaPanel > Web server > Enable as Web component" configurator will be set to this value.
Web component identifierSpecifies unique identifier of this Web component.
The full URL address to this component is then for example:
"http://ComputerName:Port/Identifier"
Macro expression can be used for entering (it is evaluated after the application is launched).
After the preconfiguration is created, the "PmaPanel > Web server > Web component identifier" configurator will be set to this value.

History:
Pm8.03.16: Created
PROMOTIC 9.0.35 SCADA system documentation MICROSYS, spol. s r.o.

Send page remark Contact responsible person
© MICROSYS, spol. s r.o.Update cookies preferences