Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Overview of the Web technology in the PROMOTIC system

The Web server is an application that provides Web pages (HTML, XML, BMP, etc. files) into the Intranet/Internet and then these pages are viewed by standard browsers (Chrome, Firefox, Edge, InternetExplorer ..). The PROMOTIC application can become such Web server and the following text describes the principles of creating such application.
 
The PROMOTIC application as the Web server has advantages first of all from the following reasons:
- Clients (on other PCs) that want to browse data (from the PROMOTIC Web server), needn't install the PROMOTIC system. Clients can browse these data only by means of Web browser (for example Chrome, Firefox, Edge, InternetExplorer).
- Other application (on the same PC or another PC) makes use of offered data and is processing them. Such applications can be again PROMOTIC applications but even others that can process for example XML data.
- The data transfer is based on the standard of the HTTP protocol (or its secured variant HTTPS see HTTPS - secured HTTP protocol) and that's why the data can be transferred even over the Internet. Company firewalls transmit the HTTP protocol (standard port 80) and HTTPS protocol (standard port 443) by default and thus it isn't necessary to do big changes into these SW.
- Pages can be enabled only to some users. So called authorization of the client can be carried out by entering permissions on the "Permissions" page. (See also the PmaWeb.onNewRequest event).
 
Caution! The Web server in licensed in the PROMOTIC system, i.e. that for running in the runtime (with the runtime license) it is necessary to purchase an item for network users into the runtime license (Data or Web client - according to the type of offered Web components - see further). It is necessary to purchase as many licenses as how many clients the application is supposed to communicate with in one moment (10 minutes) at the most. See the PROMOTIC system pricelist.
- The Development key contains 10 available clients of the PmWebClient type for testing purposes.
- In the PmFree type application, there are 2 available clients of the PmWebClient type.
 
The PROMOTIC application becomes the Web server if you place the PmaWeb object into this application. Ordinarily there is only one such object in the application. This object is responsible for the fact that any Web component of the PROMOTIC system is registered into this object and then this component offers its data. Each Web PROMOTIC component (for the list of components see further) has unique text identifier (we'll mark it further as "ComponentId").
 
The runtime information regarding the status of the PROMOTIC Web server communication with its clients (the statistics of HTTP transmissions, the contents of the last transmissions, etc.) can be observed in the INFO system on the /COMM/WebServer page.
 
In the PmaWeb object it can be set so-called port. The port is important information for the data transfer via Ethernet (TCP/IP). The standard value is 80 for HTTP and 443 for HTTPS. If the PROMOTIC application becomes the Web server, then each its Web component is accessible in the intranet on the following URL address:
http://ComputerName:Port/ComponentId/default.htm

or if the port in the PmaWeb object is set to the standard value, then in simpler way:

http://ComputerName/ComponentId/default.htm

The default.htm page is mostly only the basic page of the component. The component offers even (mostly many) other pages, not only with the extension .htm but also .xml, .png, etc. respectively. On the default.htm page there is mostly a list of these next possible pages with links to them.

The PmaWeb object itself offers also its own page. Thus it is also the component but with the empty identifier. There is a list of the Web components of the application with links to them on this page. The address of this page is as follows:

http://ComputerName:Port/default.htm

You can also reach this page by the simpler address (on the standard port):

http://ComputerName
 
Possibilities of Web data offering are circulating quickly in the PROMOTIC system. Let's summarize now all, the PROMOTIC application can offer as the Web server. In the PROMOTIC application there are the following objects as the Web component:
- PmaData: (see "Web server" page) offers its values in XML form.
- PmaDataTable: (see "Web server" page) offers its values in XML form.
- PmaWorkspace: (see "Web server" page) offers all visual views of workspace in HTML page.
- PmaPanel: (see "Web server" page) offers visual views (including control and current data transfer) as dynamic HTML page.
- PmaReport: (see "Web server" page) offers the user HTML page with the possibility of very general modifications of this page before it is provided to the client.
- PmaAlarmGroup: (see "Web server" page) offers HTML pages for viewing of state and historical entries of alarms/events system.
- PmaTrendGroup: (see "Web server" page) offers HTML pages for viewing trends (table/graphics) and offers XML data for the PmgTrendViewer object..
- PmaWebFolder: enables to create hierarchic level of URL adress.
- PmaWebDir: offers the files in specific folder as static Web pages.
- PmaWebInfo: offers INFO system as HTML pages.
- PmaWebLang: offers the national language selection.

By these objects the PROMOTIC application offers the following data:

 

1. Application workspace (PmaWorkspace)

The PmaWorkspace object can be used for offering the workspace layout, so that multiple windows (frames) are available simultaneously. In some frames, the HTML pages of the PmaPanel object are displayed, while another may contain different Web components namely PmaReport, PmaWebDir, etc. The framework of the visual layout is based on the dynamic pages of the PmaPanel object.
 
The client requiring data from this Web component is of the PmWebClient type from the license point of view.

2. Panels of the application (PmaPanel)

The panels of the application can be offered into the Web server by the PmaPanel object.
 
The PmaPanel object offers its data in the form of dynamic HTML pages that (if it is enabled in the "Enable as Web component" configurator) are created automatically. These pages have some limitations in comparison with the panels that are started directly in the PROMOTIC application. For the description and limitation, see Web panels.

The PmaPanel object also offers static pages of the panel. On the request of the Web client, the object creates the current image (in the PNG file format) and sends it to the client.

 
The client requiring data from this Web component is of the PmWebClient type from the license point of view.

3. Application reports (PmaReport)

The application reports can be enabled for Web server by the PmaReport object.
 
The client requiring data from this Web component is of the PmWebClient type from the license point of view.

4. Current data in the XML format (PmaData, PmaDataTable)

The application offers current data that are located in the PmaData and the PmaDataTable object. These objects are then the Web server of the data, see the "Web server" page. The offered data are in several possible formats of the XML text. This offering allows reading and writing into the PmaData/PmaDataTable object. See also: XML data sharing.

The first usage is the communication between two or more PROMOTIC applications. The first application has the PmaData/PmaDataTable object set as the Web server and the other has the identical object set as the Web client. The Web client reads or writes data into the Web server (see PmaData.WriteToWeb method and PmaData.ReadFromWeb method).

The second usage is on viewing dynamic HTML pages. If the HTML pages whose content has to be changed, are offered, then it is necessary to refresh these pages periodically, which is slow and causes blinking. By the XML it is possible to create a dynamic HTML page that reads periodically the XML data on background and it refreshes only necessary visual parts. This approach is at present the best one for creating "animated" HTML pages. But if the designer wants to create such page, then he must have the knowledge about making the dynamic HTML pages and using the XML. This can be too ambitious and that's why simpler walkthroughs exist in the PROMOTIC system about how to create "animated" HTML pages - see further.

Of course it is possible to use the offered XML data to lots of other purposes because the work with the XML data begins to be one of the biggest standard in the computer world. Thanks to this it is possible to offer data to other operating systems such as UNIX, LINUX, etc.

The client requiring data from this Web component is of the PmDataClient type from the license point of view.

5. Creating tree structure of Web component addresses (PmaWebFolder)

The PmaWebFolder object represents the Web address, into which Web addresses of other Web components can be inserted. It is possible to create suitable tree structure of Web component addresses. For example, there can be Web components of all data on one address, components of picturse on the next address, of trends, alarms, on the next, etc.

6. Offering HTMP pages created by the application designer (PmaWebDir)

The PmaWebDir object offers HTML (but even other) files that are located in the specified folder on the disk. The client asks for the file and the Web server finds this file in this folder and sends it to the client.

This wouldn't be too useful because only static pages would be offered. Thus the PmaWebDir object has a conception that enables to change the static file on the disk by the current state before sending to the client. This is enabled by means of keywords that are written into the static HTML and then these keywords are replaced by current values before sending. Thus the keyword can be replaced for example by the number, that represents temperature, by the determination of background color, even by the part of the HTML text and thus to display different data in different time.

By this it is possible in a very simple way to create even very universal "animated" pages.

The client requiring data from this Web component is of the PmDataClient type from the license point of view.

7. INFO system

The PmaWebInfo object offers HTML pages where the data of the PROMOTIC INFO system are placed. These Web pages are generated automatically and thus the designer can find out very easily that the information about running the application can be watched remotely over the Web.

The client requiring data from this Web component is of the PmDataClient type from the license point of view.

8. Language versions of HTML pages (PmaWebLang)

The PmaWebLang object represents the language selection, i.e. offers a Web page where the language can be selected. When the language is being selected the component list is displayed, registered into the PmaWebLang object. All of these components will be displayed in selected language.

For example, if object the Web panel (PmaPanel) is registered into the PmaWebLang object, then the automatically translated HTML page in this panel and all the included texts entered using the Macro expression $.text, will be displayed in selected language.

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