Modern systems of Automatic Process Control (APCS) are quite complex. Conventionally, the hierarchy of PCS can be divided into two levels: the lower and upper levels. The lower level of the PCS contains a field of equipment (sensors and executive mechanisms), as well as programmable logical controllers (PLC). The upper level consists of a system of operational visualization and monitoring of the process — SCADA system. PLC is the responsible part of the APCS, which performs function of the data acquisition from the field of equipment, calculation and making the regulatory, blocking and other actions on the regulating parts of the field of equipment.

Modern systems of Automatic Process Control (APCS) are quite complex. Conventionally, the hierarchy of PCS can be divided into two levels: the lower and upper levels. The lower level of the PCS contains a field of equipment (sensors and executive mechanisms), as well as programmable logical controllers (PLC). The upper level consists of a system of operational visualization and monitoring of the process — SCADA system. PLC is the responsible part of the APCS, which performs function of the data acquisition from the field of equipment, calculation and making the regulatory, blocking and other actions on the regulating parts of the field of equipment.

+

<!--T:3-->

OpenSCADA is an open implementation of the SCADA system, which is based on the modular architecture that allows you to build the end-user solutions for different requirements. The purpose of OpenSCADA are the systems of the upper level, but the high degree of modularity and scalability allows you also to solve wide range of tasks of adjacent areas.

OpenSCADA is an open implementation of the SCADA system, which is based on the modular architecture that allows you to build the end-user solutions for different requirements. The purpose of OpenSCADA are the systems of the upper level, but the high degree of modularity and scalability allows you also to solve wide range of tasks of adjacent areas.

−

== Programmable logical controllers ==

+

== Programmable logical controllers == <!--T:4-->

PLC market is saturated with wide range of products with different architecture and design. Architecturally PLC can be divided into three groups:

PLC market is saturated with wide range of products with different architecture and design. Architecturally PLC can be divided into three groups:

Hard-programmable PLC are typically based on a single-crystal microcomputer or chips of programmable logic. Program of such controllers is flashed one-time, sometime providing the software parameterization, or formed with a specialized environment endowed with functions of binary firmware compilation of the runtime with the user program, such as [http://www.isagraf.ru ISaGRAF] and [http://www.labview.ru LabView]. As an example of such PLC can be the modules of distributed PCI of [http://www.advantech.com Advantech] company.

Hard-programmable PLC are typically based on a single-crystal microcomputer or chips of programmable logic. Program of such controllers is flashed one-time, sometime providing the software parameterization, or formed with a specialized environment endowed with functions of binary firmware compilation of the runtime with the user program, such as [http://www.isagraf.ru ISaGRAF] and [http://www.labview.ru LabView]. As an example of such PLC can be the modules of distributed PCI of [http://www.advantech.com Advantech] company.

+

<!--T:6-->

Highly intellectual commercial PLC are typically based on more powerful hardware architecture and are close to full-featured PC-computer. The main difference from standard PC-compatible PLC is the closed software, and often the hardware architecture. The program software of such controllers is usually based on real-time operating system, which is planning several user threads with separation of their priorities. User programming of these PLC is made working in the corporate software which forms, as a result, the binary code of the PLC thread. As an example of such device it can be the PLC of S7 series of [http://www.automation.siemens.com/simatic/controller/html_76/produkte/simatic-s7-400.htm Siemens] company.

Highly intellectual commercial PLC are typically based on more powerful hardware architecture and are close to full-featured PC-computer. The main difference from standard PC-compatible PLC is the closed software, and often the hardware architecture. The program software of such controllers is usually based on real-time operating system, which is planning several user threads with separation of their priorities. User programming of these PLC is made working in the corporate software which forms, as a result, the binary code of the PLC thread. As an example of such device it can be the PLC of S7 series of [http://www.automation.siemens.com/simatic/controller/html_76/produkte/simatic-s7-400.htm Siemens] company.

+

<!--T:7-->

PC-compatible PLC with the free access is not the group of the PLC directly compatible with PC, but the PLC which don't have the integrated run-time and which are often delivered without an operating system. Architecture of the such PLC may be different, ranging from cost-effective solutions with the x86 architecture and ending decisions ARM and MIPS. Run-time of the such PLC is usually formed from the software of the same with the hard-programmable PLC class, the result of which is an executable binary file into one of the most common, scalable, or specialized operating system (DOS, QNX, Linux, WinCE, VxWorks). Frequently the specialized solutions for the problem can be met. As an example of this class it can be the PLC of [http://ru.wikipedia.org/wiki/PC/104 PC/104] form factor.

PC-compatible PLC with the free access is not the group of the PLC directly compatible with PC, but the PLC which don't have the integrated run-time and which are often delivered without an operating system. Architecture of the such PLC may be different, ranging from cost-effective solutions with the x86 architecture and ending decisions ARM and MIPS. Run-time of the such PLC is usually formed from the software of the same with the hard-programmable PLC class, the result of which is an executable binary file into one of the most common, scalable, or specialized operating system (DOS, QNX, Linux, WinCE, VxWorks). Frequently the specialized solutions for the problem can be met. As an example of this class it can be the PLC of [http://ru.wikipedia.org/wiki/PC/104 PC/104] form factor.

+

<!--T:8-->

Variants of the constructive implementation of the PLC can be divided into mono-block and modular. Mono-block PLC provides the fixed configuration of the CPI, specialized for the limited range of tasks. Modular design provides an easy extension of configuration of CPI for the appropriate task. There are also the hybrid design which is the mono-block, able to expand its CPI by external CPI blocks connected to one of the standard interfaces such as RS-485.

Variants of the constructive implementation of the PLC can be divided into mono-block and modular. Mono-block PLC provides the fixed configuration of the CPI, specialized for the limited range of tasks. Modular design provides an easy extension of configuration of CPI for the appropriate task. There are also the hybrid design which is the mono-block, able to expand its CPI by external CPI blocks connected to one of the standard interfaces such as RS-485.

−

== OpenSCADA as run-time of PLC ==

+

== OpenSCADA as run-time of PLC == <!--T:9-->

Architecture of OpenSCADA allows you to create the final solutions under various requirements and resources through the modular extension. This feature is useful in the light of resources allowed by PLC. Moreover, given the constant development of hardware, as well as continuous improvement of integration and efficiency of modern microprocessor solutions, OpenSCADA can consistently extend the functionality of the PLC, while maintaining the continuity with the old solutions. For example, on the basis of OpenSCADA can be built the solutions with minimal requirements on the level: CPU 100 MHz, memory and flash ROM of 32 MB.

Architecture of OpenSCADA allows you to create the final solutions under various requirements and resources through the modular extension. This feature is useful in the light of resources allowed by PLC. Moreover, given the constant development of hardware, as well as continuous improvement of integration and efficiency of modern microprocessor solutions, OpenSCADA can consistently extend the functionality of the PLC, while maintaining the continuity with the old solutions. For example, on the basis of OpenSCADA can be built the solutions with minimal requirements on the level: CPU 100 MHz, memory and flash ROM of 32 MB.

+

<!--T:10-->

As noted above, the resources of modern PLCs can fluctuate in quite a large range, and the PLC of fixed type, built on single-chip microcomputer, further and further forced out into the narrowly specialized fields with the advanced PC-architectures. This trend makes increasingly interesting the possibility of creating the unified open platform for the implementation of the PLC run-time based on the unified PC-platforms.

As noted above, the resources of modern PLCs can fluctuate in quite a large range, and the PLC of fixed type, built on single-chip microcomputer, further and further forced out into the narrowly specialized fields with the advanced PC-architectures. This trend makes increasingly interesting the possibility of creating the unified open platform for the implementation of the PLC run-time based on the unified PC-platforms.

+

<!--T:11-->

OpenSCADA allows the realization of the idea of creating an open platform for the implementation of the run-time of PLC. Currently you can make the PLC's run-time nothing inferior to the commercial intellectual controllers, and in many respects superior to them, due to the possibility of integration of functions specific to the SCADA systems into the run-time of the PLC, enhancing the functionality and user characteristics of the PLC and leading him to unified with SCADA code base, as well as optimizing the cost of the final solution.

OpenSCADA allows the realization of the idea of creating an open platform for the implementation of the run-time of PLC. Currently you can make the PLC's run-time nothing inferior to the commercial intellectual controllers, and in many respects superior to them, due to the possibility of integration of functions specific to the SCADA systems into the run-time of the PLC, enhancing the functionality and user characteristics of the PLC and leading him to unified with SCADA code base, as well as optimizing the cost of the final solution.

+

<!--T:12-->

List functions which are solved by OpenSCADA within the run-time of PLC:

List functions which are solved by OpenSCADA within the run-time of PLC:

* data acquisition of various range of devices in the synchronous, asynchronous or block mode;

* data acquisition of various range of devices in the synchronous, asynchronous or block mode;

Line 60:

Line 70:

* providing the Web-interfaces of operational and supervisory control.

* providing the Web-interfaces of operational and supervisory control.

Architecture x86 recently was positioned as embedded and it's real solutions into this industry rarely have resources (< i386) which is not enough for full-featured OS and advanced environment execution. For this reason and by reason of big the architecture unification the individual assemblies of Linux kernel and main programs of the OS environment performed rarely enough, and that typical mostly for the architecture ARM. More interest and practical for x86, for wide the hardware circle, it is assembling firmwares with compressing a root file-system (RFS). But still possible individual assembling by aid of the build systems as "BuildRoot" or "PTXDist", bottom. And also here possible direct installing Linux distributions.

Architecture x86 recently was positioned as embedded and it's real solutions into this industry rarely have resources (< i386) which is not enough for full-featured OS and advanced environment execution. For this reason and by reason of big the architecture unification the individual assemblies of Linux kernel and main programs of the OS environment performed rarely enough, and that typical mostly for the architecture ARM. More interest and practical for x86, for wide the hardware circle, it is assembling firmwares with compressing a root file-system (RFS). But still possible individual assembling by aid of the build systems as "BuildRoot" or "PTXDist", bottom. And also here possible direct installing Linux distributions.

The following requirements were pulled out to the implementation of the PLC firmware of the section:

The following requirements were pulled out to the implementation of the PLC firmware of the section:

* Compactness. In connection with the direct dependence of prices on industrial flash drives with their volume, as well as the reality of the needless for frequent updates, the image of the firmware need to be packed, reaching the level of compactness up to the 8-50MB at a runtime PLC in the full-featured OS.

* Compactness. In connection with the direct dependence of prices on industrial flash drives with their volume, as well as the reality of the needless for frequent updates, the image of the firmware need to be packed, reaching the level of compactness up to the 8-50MB at a runtime PLC in the full-featured OS.

Line 74:

Line 84:

** Touch-panels with the PLC function.

** Touch-panels with the PLC function.

+

<!--T:15-->

Given the above requirements, for the creation of the firmware it was chosen the tool for creating the distributions [http://www.altlinux.org/Mkimage mkimage] of ALTLinux. '''mkimage''' is the tool for building Sisyphus-based system on basis of template. As an initial set of templates it was taken the set of templates of formation of ALTLinux distributions at git://git.altlinux.org/people/boyarsh/packages/mkimage-profiles-desktop by the command:

Given the above requirements, for the creation of the firmware it was chosen the tool for creating the distributions [http://www.altlinux.org/Mkimage mkimage] of ALTLinux. '''mkimage''' is the tool for building Sisyphus-based system on basis of template. As an initial set of templates it was taken the set of templates of formation of ALTLinux distributions at git://git.altlinux.org/people/boyarsh/packages/mkimage-profiles-desktop by the command:

<pre style="white-space: pre-wrap;">

<pre style="white-space: pre-wrap;">

Line 79:

Line 90:

</pre>

</pre>

+

<!--T:16-->

As the basis it was taken the "rescue" template, as the most compact and close to the target PLC.

As the basis it was taken the "rescue" template, as the most compact and close to the target PLC.

+

<!--T:17-->

Firstly building performed basing on the package base of the distributive [http://www.altlinux.ru/products/5th-platform ALTLinux 5.1], there is present the realtime kernel from [http://www.xenomai.org XENOMAI]. For obtaining some specific packages you need to connect the repository of packages "ALTLinux 5.1" from the OpenSCADA project:

Firstly building performed basing on the package base of the distributive [http://www.altlinux.ru/products/5th-platform ALTLinux 5.1], there is present the realtime kernel from [http://www.xenomai.org XENOMAI]. For obtaining some specific packages you need to connect the repository of packages "ALTLinux 5.1" from the OpenSCADA project:

<pre style="white-space: pre-wrap;">

<pre style="white-space: pre-wrap;">

$ rpm ftp://ftp.oscada.org/ALTLinux/5.1 openscada main</pre>

$ rpm ftp://ftp.oscada.org/ALTLinux/5.1 openscada main</pre>

−

==== Assembling ====

+

==== Assembling ==== <!--T:18-->

Firstly it was created the configuration of PLC without local display in mind of the availability of this type of equipment and lack of equipment for the Touch-panels.

Firstly it was created the configuration of PLC without local display in mind of the availability of this type of equipment and lack of equipment for the Touch-panels.

+

<!--T:19-->

New PLC template was named "plc", it was tested on the boards of PC/104 form factor [[Special:MyLanguage/Using/Kontron_MOPSlcdLX|MOPSlcdLX]] of Kontron company, [[Special:MyLanguage/Using/Diamond_Systems|ATH400-128]] of Diamond Systems company and modular PLC [[Special:MyLanguage/Using/ICPDAS_LP8x81|LP-8781]] of the ICP DAS company. The archive of the resulting '''mkimage''' tree with the "plc" template can be downloaded here ftp://ftp.oscada.org/OpenSCADA/PLC (templates and materials of individual controllers are placed in their own directories).

New PLC template was named "plc", it was tested on the boards of PC/104 form factor [[Special:MyLanguage/Using/Kontron_MOPSlcdLX|MOPSlcdLX]] of Kontron company, [[Special:MyLanguage/Using/Diamond_Systems|ATH400-128]] of Diamond Systems company and modular PLC [[Special:MyLanguage/Using/ICPDAS_LP8x81|LP-8781]] of the ICP DAS company. The archive of the resulting '''mkimage''' tree with the "plc" template can be downloaded here ftp://ftp.oscada.org/OpenSCADA/PLC (templates and materials of individual controllers are placed in their own directories).

+

<!--T:20-->

The key points of the configuration of new template was the writing of the new init-script (rc.sysinit), the script of the after installation configuration of the firmware's image and the list of packages in the image of firmware. The first script is designed as the package "startup-plc". The second script was embedded in the template "plc" on the way: profiles/pls/image-scripts.d/01system. The list of packages was embedded in the template "plc" on the path: profiles/pkg/lists/plс.in.

The key points of the configuration of new template was the writing of the new init-script (rc.sysinit), the script of the after installation configuration of the firmware's image and the list of packages in the image of firmware. The first script is designed as the package "startup-plc". The second script was embedded in the template "plc" on the way: profiles/pls/image-scripts.d/01system. The list of packages was embedded in the template "plc" on the path: profiles/pkg/lists/plс.in.

+

<!--T:21-->

The procedure of creating the firmware from the image is the following:

The procedure of creating the firmware from the image is the following:

<pre style="white-space: pre-wrap;">

<pre style="white-space: pre-wrap;">

Line 102:

Line 118:

</pre>

</pre>

+

<!--T:22-->

The result is an output directory in the "profiles/out/" have look:

The result is an output directory in the "profiles/out/" have look:

<pre style="white-space: pre-wrap;">

<pre style="white-space: pre-wrap;">

Line 112:

Line 129:

</pre>

</pre>

−

==== Installation ====

+

==== Installation ==== <!--T:23-->

It is possible to download the firmware to: USB-flash, IDE-flash and HDD. However, in the case of the USB-flash there is the problem with waiting for initialization of USB-subsystem and you'll have "to run" some dialogues.

It is possible to download the firmware to: USB-flash, IDE-flash and HDD. However, in the case of the USB-flash there is the problem with waiting for initialization of USB-subsystem and you'll have "to run" some dialogues.

+

<!--T:24-->

The file system can be FAT or EXT2/3. In the case of EXT3 the root is mounted as EXT2, because of problems in the initializer. In the case of EXT2/3 you'll need to use not the '''syslinux''' boot, but '''extlinux''', the configuration of which is almost the same one.

The file system can be FAT or EXT2/3. In the case of EXT3 the root is mounted as EXT2, because of problems in the initializer. In the case of EXT2/3 you'll need to use not the '''syslinux''' boot, but '''extlinux''', the configuration of which is almost the same one.

+

<!--T:25-->

Next, lets mount the medium and place the files from the output directory on it as follows.

Next, lets mount the medium and place the files from the output directory on it as follows.

+

<!--T:26-->

In the case with FAT and '''syslinux''':

In the case with FAT and '''syslinux''':

<pre style="white-space: pre-wrap;">

<pre style="white-space: pre-wrap;">

Line 130:

Line 150:

</pre>

</pre>

+

<!--T:27-->

In the case with EXT2/3 and '''extlinux''':

In the case with EXT2/3 and '''extlinux''':

<pre style="white-space: pre-wrap;">

<pre style="white-space: pre-wrap;">

Line 141:

Line 162:

</pre>

</pre>

+

<!--T:28-->

To ensure the reliable operation of the operating data stored in the file "work" with the file system EXT3. The file-system of this file is checked for integrity at the initialization. This file is created as follows:

To ensure the reliable operation of the operating data stored in the file "work" with the file system EXT3. The file-system of this file is checked for integrity at the initialization. This file is created as follows:

<pre style="white-space: pre-wrap;">

<pre style="white-space: pre-wrap;">

Line 149:

Line 171:

</pre>

</pre>

+

<!--T:29-->

In the case of the file system EXT2/3 on the target disk the "work" file can not be created. In this case, the working data will be placed in the directory "root" of the target disk.

In the case of the file system EXT2/3 on the target disk the "work" file can not be created. In this case, the working data will be placed in the directory "root" of the target disk.

[[File:at.png]] This is an unreliable solution because the root file system of the target disk is not static and its check is not possible, because of earlier mounting in the "ro" and the potential unreliability of the check of the file system, mounted at "ro", as well as because of the inability to remount as EXT3.

[[File:at.png]] This is an unreliable solution because the root file system of the target disk is not static and its check is not possible, because of earlier mounting in the "ro" and the potential unreliability of the check of the file system, mounted at "ro", as well as because of the inability to remount as EXT3.

+

<!--T:30-->

The next step is the configuration and initialization of the loader. To configure the loader it is necessary to edit the file "syslinux/syslinux.cfg" or "extlinux/extlinux.conf" as follows:

The next step is the configuration and initialization of the loader. To configure the loader it is necessary to edit the file "syslinux/syslinux.cfg" or "extlinux/extlinux.conf" as follows:

<pre style="white-space: pre-wrap;">

<pre style="white-space: pre-wrap;">

Line 159:

Line 183:

implicit 1

implicit 1

+

<!--T:31-->

label plс

label plс

kernel alt0/vmlinuz

kernel alt0/vmlinuz

Line 167:

Line 192:

</pre>

</pre>

+

<!--T:32-->

In the case of selection the identification of the bootable partition by the identifier you can get the ID of our partition with the command: '''blkid'''.

In the case of selection the identification of the bootable partition by the identifier you can get the ID of our partition with the command: '''blkid'''.

+

<!--T:33-->

In the case of the label it is a bit harder and this is done for different file systems in different ways.

In the case of the label it is a bit harder and this is done for different file systems in different ways.

+

<!--T:34-->

For the file-systems EXT2/3 it is done by the utility '''e2label'''. For example: '''e2label /dev/sdb1 PLC'''

For the file-systems EXT2/3 it is done by the utility '''e2label'''. For example: '''e2label /dev/sdb1 PLC'''

+

<!--T:35-->

For the FAT file system it does by the set of utilities that come with '''mtools''' or with '''parted''', easier. With '''mtools''' you can do it as follows:

For the FAT file system it does by the set of utilities that come with '''mtools''' or with '''parted''', easier. With '''mtools''' you can do it as follows:

<pre style="white-space: pre-wrap;">

<pre style="white-space: pre-wrap;">

Line 181:

Line 210:

</pre>

</pre>

+

<!--T:36-->

Now we can initialize the loader:

Now we can initialize the loader:

<pre style="white-space: pre-wrap;">

<pre style="white-space: pre-wrap;">

Line 189:

Line 219:

</pre>

</pre>

+

<!--T:37-->

That is all with the boot and initialization of firmware. If the resulting disk is not loaded:

That is all with the boot and initialization of firmware. If the resulting disk is not loaded:

* Bootable flag is missing at the bootable partition.

* Bootable flag is missing at the bootable partition.

Line 195:

Line 226:

* Boot can also be not working on the old systems that do not know how to boot from USB-HDD. For them it will be necessary to adapt the geometry of the disk being arranged to USB-ZIP or something like that.

* Boot can also be not working on the old systems that do not know how to boot from USB-HDD. For them it will be necessary to adapt the geometry of the disk being arranged to USB-ZIP or something like that.

−

==== Result ====

+

==== Result ==== <!--T:38-->

The result is the firmware with the size from 30Mb to 100Mb, satisfying all announced requirements and it provides:

The result is the firmware with the size from 30Mb to 100Mb, satisfying all announced requirements and it provides:

* Loading for 27 seconds from the controller's switch on and including the initialization of BIOS.

* Loading for 27 seconds from the controller's switch on and including the initialization of BIOS.

Line 207:

Line 238:

** control interface of OpenSCADA (10005).

** control interface of OpenSCADA (10005).

−

==== OpenSCADA ====

+

==== OpenSCADA ==== <!--T:39-->

As the PLC runtime OpenSCADA is used. For this case we'll take the building with separate packages for each module and indicate to install the virtual package openscada-plc, which contains all the dependencies on all the OpenSCADA packages, typical used for this configuration. The package of gd2 graphics library has been rebuilt without the support of xpm graphic file format and library was called libgd2-noxpm. All this was done in order to avoid the heavy dependencies on the libraries of GUI XOrg.

As the PLC runtime OpenSCADA is used. For this case we'll take the building with separate packages for each module and indicate to install the virtual package openscada-plc, which contains all the dependencies on all the OpenSCADA packages, typical used for this configuration. The package of gd2 graphics library has been rebuilt without the support of xpm graphic file format and library was called libgd2-noxpm. All this was done in order to avoid the heavy dependencies on the libraries of GUI XOrg.

+

<!--T:40-->

The result is the runtime of the PLC with support:

The result is the runtime of the PLC with support:

* DB:

* DB:

Line 235:

Line 267:

** [[Special:MyLanguage/Modules/WebCfgD|Configurator of OpenSCADA based on the Web-technologies]].

** [[Special:MyLanguage/Modules/WebCfgD|Configurator of OpenSCADA based on the Web-technologies]].

+

<!--T:41-->

The configuration of OpenSCADA runs in demon mode in locale "en_US.UTF-8" (also available "uk_UA.UTF-8" and "ru_RU.UTF-8") using the local database SQLite, providing the following default network services:

The configuration of OpenSCADA runs in demon mode in locale "en_US.UTF-8" (also available "uk_UA.UTF-8" and "ru_RU.UTF-8") using the local database SQLite, providing the following default network services:

* configuration and execution environment through the Web (ports: 10002 and 10004);

* configuration and execution environment through the Web (ports: 10002 and 10004);

* control interface of OpenSCADA (port: 10005).

* control interface of OpenSCADA (port: 10005).

−

==== The implementation details ====

+

==== The implementation details ==== <!--T:42-->

In this section let examine the details of the OS tree of the firmware, the initialization script rc.sysinit.plc and the script of preparation of the OS tree of the firmware.

In this section let examine the details of the OS tree of the firmware, the initialization script rc.sysinit.plc and the script of preparation of the OS tree of the firmware.

+

<!--T:43-->

To build the PLC firmware it was used the following list of packages:

To build the PLC firmware it was used the following list of packages:

</translate>

</translate>

Line 324:

Line 358:

<translate>

<translate>

+

<!--T:44-->

List of the modules of the loader's system kernel with the purpose to reducing the initialization image size was decreased to the following ones:

List of the modules of the loader's system kernel with the purpose to reducing the initialization image size was decreased to the following ones:

</translate>

</translate>

Line 363:

Line 398:

<translate>

<translate>

+

<!--T:45-->

To the script of the tree preparation there were added the following functions:

To the script of the tree preparation there were added the following functions:

* changing the name of the distribution kit;

* changing the name of the distribution kit;

Line 377:

Line 413:

* the directory with the kernel (/ boot) is deleted in connection with its moving to the root of the boot partition.

* the directory with the kernel (/ boot) is deleted in connection with its moving to the root of the boot partition.

+

<!--T:46-->

Initialization script (rc.sysinit.plc) was provided with the following functions:

Initialization script (rc.sysinit.plc) was provided with the following functions:

* remounting the root partition to the RW mode;

* remounting the root partition to the RW mode;

Line 382:

Line 419:

* reflection of the modifiable directories of the PLC tree (/etc, /var, /root, /home, /mnt and /lib) to the file system with the user's working data (/image/root) through the file system "aufs" or "unionfs".

* reflection of the modifiable directories of the PLC tree (/etc, /var, /root, /home, /mnt and /lib) to the file system with the user's working data (/image/root) through the file system "aufs" or "unionfs".

+

<!--T:47-->

As the result of these actions the mount table of the resulting PLC tree looks like:

As the result of these actions the mount table of the resulting PLC tree looks like:

</translate>

</translate>

Line 405:

Line 443:

<translate>

<translate>

−

==== Setting of the GUI ====

+

==== Setting of the GUI ==== <!--T:48-->

One option of the firmware is built with a graphical interface, which, however, necessary to configure for automatic startup with the visualization area of OpenSCADA. In addition, it should be noted that the firmware with a graphical interface does not contain all the drivers and you may have to rebuild it under the right equipment.

One option of the firmware is built with a graphical interface, which, however, necessary to configure for automatic startup with the visualization area of OpenSCADA. In addition, it should be noted that the firmware with a graphical interface does not contain all the drivers and you may have to rebuild it under the right equipment.

+

<!--T:49-->

After downloading and logging to the console it is necessary to configure the XServer, automatic graphical login, start of the graphical environment and automatic startup of OpenSCADA from the IceWM environment:

After downloading and logging to the console it is necessary to configure the XServer, automatic graphical login, start of the graphical environment and automatic startup of OpenSCADA from the IceWM environment:

# Configuration of an automatic graphical login by creating the file /etc/sysconfig/autologin with the contents:

# Configuration of an automatic graphical login by creating the file /etc/sysconfig/autologin with the contents:

$ echo "AUTOLOGIN=yes" > /etc/sysconfig/autologin

$ echo "AUTOLOGIN=yes" > /etc/sysconfig/autologin

Line 425:

Line 467:

$ echo "EXEC=/usr/bin/startx" >> /etc/sysconfig/autologin

$ echo "EXEC=/usr/bin/startx" >> /etc/sysconfig/autologin

+

<!--T:53-->

# Enabling, startup of the graphics at boot

# Enabling, startup of the graphics at boot

$ chkconfig dm on

$ chkconfig dm on

+

<!--T:54-->

# Starting the graphics subsystem

# Starting the graphics subsystem

$ service dm start

$ service dm start

+

<!--T:55-->

# !! Further actions are made in the terminal from the graphical interface

# !! Further actions are made in the terminal from the graphical interface

+

<!--T:56-->

# Creating the configuration file of automatic OpenSCADA startup from the IceWM

# Creating the configuration file of automatic OpenSCADA startup from the IceWM

$ mkdir ~/.icewm

$ mkdir ~/.icewm

Line 440:

Line 486:

</pre>

</pre>

−

==== {{Anch|ALTLinuxT6|ALTLinux T6 packages base}} ====

+

==== {{Anch|ALTLinuxT6|ALTLinux T6 packages base}} ==== <!--T:57-->

Next stage of the firmwares creation was moving to the package base of distributive [http://www.altlinux.ru/products/6th-platform ALTLinux T6]. On the whole firmwares creation concept saved, with bits changes, but there were added some improvements and expansions:

Next stage of the firmwares creation was moving to the package base of distributive [http://www.altlinux.ru/products/6th-platform ALTLinux T6]. On the whole firmwares creation concept saved, with bits changes, but there were added some improvements and expansions:

* Used the new function of "propagator" (the system of pre-initiation of hardware, searching and starting to the firmwares on FS) for searching/creation a partition of EXT2/3/4 with the label "alt-live-storage" for the "root" partition forming and it's modification possibility. The function provides a feature of installing packages direct from the distribution repository, and updating packages packed to the firmware, exclude the kernel and some system's services.

* Used the new function of "propagator" (the system of pre-initiation of hardware, searching and starting to the firmwares on FS) for searching/creation a partition of EXT2/3/4 with the label "alt-live-storage" for the "root" partition forming and it's modification possibility. The function provides a feature of installing packages direct from the distribution repository, and updating packages packed to the firmware, exclude the kernel and some system's services.

Line 446:

Line 492:

* For the possibility to creation of new firmwares to "LP-8x81" from ICP DAS was done moving the real-time kernel "rt-up" from the repository "ALTLinux 5.1" to "ALTLinux T6". The kernel "rt-up" was successfully adapted and get the working firmware based on the packages base "T6" for "LP-8x81".

* For the possibility to creation of new firmwares to "LP-8x81" from ICP DAS was done moving the real-time kernel "rt-up" from the repository "ALTLinux 5.1" to "ALTLinux T6". The kernel "rt-up" was successfully adapted and get the working firmware based on the packages base "T6" for "LP-8x81".

+

<!--T:58-->

During the possibility of a free additional installation of needs packages direct from the repository gone needs to the separated built of the firmware with GUI. That is you can easy install the desired window manager (WM) or desktop environment include needed drivers, than create a separated firmware with a limited list of the drivers.

During the possibility of a free additional installation of needs packages direct from the repository gone needs to the separated built of the firmware with GUI. That is you can easy install the desired window manager (WM) or desktop environment include needed drivers, than create a separated firmware with a limited list of the drivers.

+

<!--T:59-->

The script "startup-plc" was turned spare into the new firmwares besides the "root" FS remounting to writing does early on the initial stage. The script "profiles/plс/image-scripts.d/01system" renamed to "profiles/plс/image-scripts.d/init1-PLC", but it changed and expanded. The packages list of the firmware was left into "profiles/pkg/lists/plс.in" and some changed.

The script "startup-plc" was turned spare into the new firmwares besides the "root" FS remounting to writing does early on the initial stage. The script "profiles/plс/image-scripts.d/01system" renamed to "profiles/plс/image-scripts.d/init1-PLC", but it changed and expanded. The packages list of the firmware was left into "profiles/pkg/lists/plс.in" and some changed.

+

<!--T:60-->

For get the some specific packages you have to connect the repository "ALTLinux T6" from the OpenSCADA project:

For get the some specific packages you have to connect the repository "ALTLinux T6" from the OpenSCADA project:

<pre style="white-space: pre-wrap;">

<pre style="white-space: pre-wrap;">

rpm ftp://ftp.oscada.org/ALTLinux/t6 openscada main </pre>

rpm ftp://ftp.oscada.org/ALTLinux/t6 openscada main </pre>

+

<!--T:61-->

The firmware creation procedure mostly remained unchanged:

The firmware creation procedure mostly remained unchanged:

<pre style="white-space: pre-wrap;">

<pre style="white-space: pre-wrap;">

Line 465:

Line 515:

</pre>

</pre>

+

<!--T:62-->

The output folder's content with the image and the firmware installing process to file system FAT and EXT2/3/4 different only by renaming the FS archive's file from "plc" to "live". Installing the ISO-image to USB-flash, HDD, SSD performs by the command '''dd''':

The output folder's content with the image and the firmware installing process to file system FAT and EXT2/3/4 different only by renaming the FS archive's file from "plc" to "live". Installing the ISO-image to USB-flash, HDD, SSD performs by the command '''dd''':

Instead the file "work" you should create partition EXT3 with the label "alt-live-storage", if it is not the ISO-image. The new partition creation you can do with the help of '''fdisk''', if the FAT partition was not created to all allowed the storage space, or with help of '''parted''' where the FAT partition you allowed to change. To the details about a partition creation the reader will send to the documentation on '''fdisk''' or '''parted'''.

Instead the file "work" you should create partition EXT3 with the label "alt-live-storage", if it is not the ISO-image. The new partition creation you can do with the help of '''fdisk''', if the FAT partition was not created to all allowed the storage space, or with help of '''parted''' where the FAT partition you allowed to change. To the details about a partition creation the reader will send to the documentation on '''fdisk''' or '''parted'''.

+

<!--T:64-->

Configuration of files "syslinux/syslinux.cfg" and "extlinux/extlinux.conf" were not changed, besides the FS file archive's name changed from "plc" to "live".

Configuration of files "syslinux/syslinux.cfg" and "extlinux/extlinux.conf" were not changed, besides the FS file archive's name changed from "plc" to "live".

+

<!--T:65-->

At the result we get the firmware with size from 60Мб, which provides:

At the result we get the firmware with size from 60Мб, which provides:

* Loading for 25 seconds from the controller's switch on and including the initialization of BIOS.

* Loading for 25 seconds from the controller's switch on and including the initialization of BIOS.

Line 484:

Line 538:

** control interface of OpenSCADA (10005).

** control interface of OpenSCADA (10005).

+

<!--T:66-->

For the PLC firmware assembling used next packages list:

For the PLC firmware assembling used next packages list:

</translate>

</translate>

Line 564:

Line 619:

<translate>

<translate>

+

<!--T:67-->

The Linux kernel modules list of the initial stage was some changed and include:

The Linux kernel modules list of the initial stage was some changed and include:

</translate>

</translate>

Line 606:

Line 662:

<translate>

<translate>

+

<!--T:68-->

Script of the tree preparation "profiles/plс/image-scripts.d/init1-PLC" performs the functions:

Script of the tree preparation "profiles/plс/image-scripts.d/init1-PLC" performs the functions:

* changing the name of the distribution kit;

* changing the name of the distribution kit;

Line 618:

Line 675:

* the directory with the kernel (/ boot) is deleted in connection with its moving to the root of the boot partition.

* the directory with the kernel (/ boot) is deleted in connection with its moving to the root of the boot partition.

−

==== Real-time kernel ====

+

==== Real-time kernel ==== <!--T:69-->

For a series of tasks are important, often also critical, criteria of the environment is the real-time handing level, then it is possibility of working the tasks according to the real-time priorities and provision of a reaction to events by that priorities.

For a series of tasks are important, often also critical, criteria of the environment is the real-time handing level, then it is possibility of working the tasks according to the real-time priorities and provision of a reaction to events by that priorities.

+

<!--T:70-->

The Linux kernel of itself provides POSIX real-time scheduling policies "SCHED_FIFO" and "SCHED_RR" with the priorities range (0...100). But the important criteria is "Timer frequency and the reaction to it" [https://www.osadl.org/Realtime-Linux.projects-realtime-linux.0.html up to version of Linux kernel 2.6.24 was too low], for criteria of the real-time systems. In modern kernels of Linux (> 2.6.24) provided support for timers of the high-precision resolution (HPET), what decreased the reaction time to a timer up to 100 microseconds, but that time stability is not guaranteed. To ensure stability of reaction to a timer on level 60 microseconds, and also series of the other criteria of real-time, at the moment you need to assemble a kernel with one real-time extension.

The Linux kernel of itself provides POSIX real-time scheduling policies "SCHED_FIFO" and "SCHED_RR" with the priorities range (0...100). But the important criteria is "Timer frequency and the reaction to it" [https://www.osadl.org/Realtime-Linux.projects-realtime-linux.0.html up to version of Linux kernel 2.6.24 was too low], for criteria of the real-time systems. In modern kernels of Linux (> 2.6.24) provided support for timers of the high-precision resolution (HPET), what decreased the reaction time to a timer up to 100 microseconds, but that time stability is not guaranteed. To ensure stability of reaction to a timer on level 60 microseconds, and also series of the other criteria of real-time, at the moment you need to assemble a kernel with one real-time extension.

+

<!--T:71-->

On the [http://www.altlinux.ru ALTLinux] distributions observed the kernel 2.6.29-rt-up, which assembled with the real-time extension of real-time is [http://www.xenomai.org XENOMAI]. Into other distributions, for example [http://www.opensuse.org OpenSuSE], observed also the solutions with it extension.

On the [http://www.altlinux.ru ALTLinux] distributions observed the kernel 2.6.29-rt-up, which assembled with the real-time extension of real-time is [http://www.xenomai.org XENOMAI]. Into other distributions, for example [http://www.opensuse.org OpenSuSE], observed also the solutions with it extension.

+

<!--T:72-->

For now higher criteria of the real-time ensured of the extension [https://rt.wiki.kernel.org The Real Time Preempt Patch], on enabling here full it's features by (CONFIG_PREEMPT_RT), The patch assembling to Linux kernels process and it's work result will trace into this section.

For now higher criteria of the real-time ensured of the extension [https://rt.wiki.kernel.org The Real Time Preempt Patch], on enabling here full it's features by (CONFIG_PREEMPT_RT), The patch assembling to Linux kernels process and it's work result will trace into this section.

The kernel originally presents into the distribution ALTLinux 5.1, and it is also moved to the local repository of the project OpenSCADA for ALTLinux T6. The kernel assembled with the extension [http://www.xenomai.org XENOMAI] and [http://aufs.sourceforge.net AUFS], allowing it using into the firmwares and packed root FS, that was done for the PLC [[Special:MyLanguage/Using/ICPDAS_LP8x81|LP-8x81]].

The kernel originally presents into the distribution ALTLinux 5.1, and it is also moved to the local repository of the project OpenSCADA for ALTLinux T6. The kernel assembled with the extension [http://www.xenomai.org XENOMAI] and [http://aufs.sourceforge.net AUFS], allowing it using into the firmwares and packed root FS, that was done for the PLC [[Special:MyLanguage/Using/ICPDAS_LP8x81|LP-8x81]].

+

<!--T:76-->

Results of the kernel testings:

Results of the kernel testings:

* ''LP-8781 (XENOMAI)''

* ''LP-8781 (XENOMAI)''

Line 660:

Line 723:

** ''loading 100%'': Avg: 57 us; Max: 78 us

** ''loading 100%'': Avg: 57 us; Max: 78 us

+

<!--T:77-->

As you can see from the testing results the patch XENOMAI does not ensure proper level of the real-time on using the standard mechanisms of the POSIX real-time scheduling, at the same time as the kernel version 3 even without the specific real-time extensions ensures the clearly better result.

As you can see from the testing results the patch XENOMAI does not ensure proper level of the real-time on using the standard mechanisms of the POSIX real-time scheduling, at the same time as the kernel version 3 even without the specific real-time extensions ensures the clearly better result.

+

<!--T:78-->

Necessity for assembling same that kernel with the patch/parameter CONFIG_PREEMPT_RT is actual by presence a number of binary modules from ICP_DAS, for "LP8x81". Also here is actual a question of building the kernel 2.6.33 at the same reasons but for "LP-8x81 Atom". The preliminary assemblies of the kernels 2.6.29 and 2.6.33 reveals series of problems which will described here. Solving also a variant to build a modern kernel with CONFIG_PREEMPT_RT and next to request for building these binary modules from "ICP DAS".

Necessity for assembling same that kernel with the patch/parameter CONFIG_PREEMPT_RT is actual by presence a number of binary modules from ICP_DAS, for "LP8x81". Also here is actual a question of building the kernel 2.6.33 at the same reasons but for "LP-8x81 Atom". The preliminary assemblies of the kernels 2.6.29 and 2.6.33 reveals series of problems which will described here. Solving also a variant to build a modern kernel with CONFIG_PREEMPT_RT and next to request for building these binary modules from "ICP DAS".

+

<!--T:79-->

Assembling and testing process:

Assembling and testing process:

# Patches CONFIG_PREEMPT_RT and AUFS of days of 2.6.29 are conflict on the function "debug_mutex_set_owner()", into CONFIG_PREEMPT_RT it removed — replaced to "mutex_set_owner()".

# Patches CONFIG_PREEMPT_RT and AUFS of days of 2.6.29 are conflict on the function "debug_mutex_set_owner()", into CONFIG_PREEMPT_RT it removed — replaced to "mutex_set_owner()".

Line 683:

Line 749:

:* 06.09.2017: Not full fixing into the serial driver of ICP-DAS, caused to malfunction on using more then two serial ports, seems already full fixed into last versions, which observed on LX-8x31.

:* 06.09.2017: Not full fixing into the serial driver of ICP-DAS, caused to malfunction on using more then two serial ports, seems already full fixed into last versions, which observed on LX-8x31.

+

<!--T:80-->

[[File:at.png]] Result kernel, which renamed to "kernel-image-rt1-up-2.6.29.alt1", you can use for PLC with HPET or a high precision timer, and also into "LP-8x81" and "LP-8x81 Atom" (only single kernel)!

[[File:at.png]] Result kernel, which renamed to "kernel-image-rt1-up-2.6.29.alt1", you can use for PLC with HPET or a high precision timer, and also into "LP-8x81" and "LP-8x81 Atom" (only single kernel)!

−

===== kernel-image-rt-up-2.6.33 =====

+

===== kernel-image-rt-up-2.6.33 ===== <!--T:81-->

Kernel version 2.6.33 assembling with the patch CONFIG_PREEMPT_RT needs for PLC LP-8x81 of firm "ICP DAS" and LP-8x81 Atom (main and original kernel) by reason of presence for it the binary drivers of "ICP DAS".

Kernel version 2.6.33 assembling with the patch CONFIG_PREEMPT_RT needs for PLC LP-8x81 of firm "ICP DAS" and LP-8x81 Atom (main and original kernel) by reason of presence for it the binary drivers of "ICP DAS".

+

<!--T:82-->

Testings results of the kernel:

Testings results of the kernel:

* ''AMD Turion Neo X2 L625''

* ''AMD Turion Neo X2 L625''

Line 699:

Line 767:

** ''loading 100%'': Avg: 12 us; Max: 32 us

** ''loading 100%'': Avg: 12 us; Max: 32 us

+

<!--T:83-->

Assembling and testing process:

Assembling and testing process:

# Assembling of the kernel from sources of "ICP DAS" (2.6.33.7) and configuration it inherited from kernel 2.6.29 (the source code has suspiciously more of *.rej files, and also "staging/comedi" impossible to build) — it started and mostly works; modules "ipic" and "slot" loaded; module "8250_linpac" crashes into function "platform_device_add"; series of programs hangs into FS operations, with the message: "task openscada:2153 blocked for more than 120 seconds".

# Assembling of the kernel from sources of "ICP DAS" (2.6.33.7) and configuration it inherited from kernel 2.6.29 (the source code has suspiciously more of *.rej files, and also "staging/comedi" impossible to build) — it started and mostly works; modules "ipic" and "slot" loaded; module "8250_linpac" crashes into function "platform_device_add"; series of programs hangs into FS operations, with the message: "task openscada:2153 blocked for more than 120 seconds".

Line 707:

Line 776:

# Assembling the original kernel with patches CONFIG_PREEMPT and AUFS for SMP — same problem as without SMP but it is not immediately and about five thread.

# Assembling the original kernel with patches CONFIG_PREEMPT and AUFS for SMP — same problem as without SMP but it is not immediately and about five thread.

+

<!--T:84-->

[[File:at.png]] For now the kernel 2.6.33 links with CONFIG_PREEMPT_RT and AUFS is non-working. Then if you need to work on "LP-8x81 Atom" then we recommend to use the original Linux-environment, building and installing the OpenSCADA here.

[[File:at.png]] For now the kernel 2.6.33 links with CONFIG_PREEMPT_RT and AUFS is non-working. Then if you need to work on "LP-8x81 Atom" then we recommend to use the original Linux-environment, building and installing the OpenSCADA here.

Widespread in embedded solutions the [[WikiPedia:ARM_architecture|ARM]] architecture obtained due to its relatively high productivity coupled with low power consumption and cost. In order to perform planed task to provide the hardware multiplatform OpenSCADA was adapted for the building and operation on the equipment of the ARM-architecture. Thus, the following projects were made [[Special:MyLanguage/Using/Nokia_Linux|Building the OpenSCADA project for the mobile devices of the Nokia company (N800, N900, N950)]] and [[Special:MyLanguage/Using/ICPDAS_LP5xxx|Building OpenSCADA and firmware for the ARM-based controllers from ICP DAS (LP-5141)]]. The purpose of this section is to systematize the procedures and track the problems of creating the OpenSCADA buildings and software environment firmwares as a whole for a variety of embedded ARM-architecture hardware.

Widespread in embedded solutions the [[WikiPedia:ARM_architecture|ARM]] architecture obtained due to its relatively high productivity coupled with low power consumption and cost. In order to perform planed task to provide the hardware multiplatform OpenSCADA was adapted for the building and operation on the equipment of the ARM-architecture. Thus, the following projects were made [[Special:MyLanguage/Using/Nokia_Linux|Building the OpenSCADA project for the mobile devices of the Nokia company (N800, N900, N950)]] and [[Special:MyLanguage/Using/ICPDAS_LP5xxx|Building OpenSCADA and firmware for the ARM-based controllers from ICP DAS (LP-5141)]]. The purpose of this section is to systematize the procedures and track the problems of creating the OpenSCADA buildings and software environment firmwares as a whole for a variety of embedded ARM-architecture hardware.

+

<!--T:87-->

Specific of the ARM architecture is the lack of a necessarily hardware-dependent software system of the basic initialization and configuration of equipment, which is characteristic for the x86 architecture — BIOS, and the structure of hardware configuration typically includes: CPU, integrated operational and flash memory, as well as a number of built-in equipment on a standard system-level buses. The flash and RAM are placed in general address segment. Initialization of the such system with the software environment is made by downloading executable code directly on the built-in flash-memory.

Specific of the ARM architecture is the lack of a necessarily hardware-dependent software system of the basic initialization and configuration of equipment, which is characteristic for the x86 architecture — BIOS, and the structure of hardware configuration typically includes: CPU, integrated operational and flash memory, as well as a number of built-in equipment on a standard system-level buses. The flash and RAM are placed in general address segment. Initialization of the such system with the software environment is made by downloading executable code directly on the built-in flash-memory.

+

<!--T:88-->

To working of computing functions of OpenSCADA and other related libraries and software the performance of floating point calculations is very important. Specific of the ARM architecture processors is the ease of its core and availability of optional extensions such as math coprocessor. As a consequence, the performance on floating point operations is highly dependent on the specific processor, and on the emulation type of the floating point coprocessor if it is absent at all. There are two formats of floating point in the ARM-architecture processors: FPA and VFP. FPA format is obsoleted and met as a hardware implementation in the ARM cores up to the [[WikiPedia:StrongARM|StrongARM]] family (ARMv4). [[WikiPedia:XScale|XScale]] ARM core families (ARMv5TE) did not have a math coprocessor at all. And the ARM core, starting with the [[WikiPedia:ARM11|ARM11]] family (ARMv6) are equipped with VFP format math coprocessor. At the same time the ARM processors with the ARMv5 architecture are still widespread, and thus the question of performance of mathematical calculations for them comes down to the performance of the FPA or VFP format emulation. In the case of the Linux environment the emulation of FPA is usually done by the Linux kernel by the CPU exceptions handling when calling FPA commands. Software emulation in the math library is usually found with the VFP format which requires the rebuilding of all programs. The FPA emulation by means of exceptions is much worse than the performance of software VFP emulation. You can compare the performance of floating-point calculations on different architectures, processors and ways of emulation in the part [[#PerfSystems|Systems performance]].

To working of computing functions of OpenSCADA and other related libraries and software the performance of floating point calculations is very important. Specific of the ARM architecture processors is the ease of its core and availability of optional extensions such as math coprocessor. As a consequence, the performance on floating point operations is highly dependent on the specific processor, and on the emulation type of the floating point coprocessor if it is absent at all. There are two formats of floating point in the ARM-architecture processors: FPA and VFP. FPA format is obsoleted and met as a hardware implementation in the ARM cores up to the [[WikiPedia:StrongARM|StrongARM]] family (ARMv4). [[WikiPedia:XScale|XScale]] ARM core families (ARMv5TE) did not have a math coprocessor at all. And the ARM core, starting with the [[WikiPedia:ARM11|ARM11]] family (ARMv6) are equipped with VFP format math coprocessor. At the same time the ARM processors with the ARMv5 architecture are still widespread, and thus the question of performance of mathematical calculations for them comes down to the performance of the FPA or VFP format emulation. In the case of the Linux environment the emulation of FPA is usually done by the Linux kernel by the CPU exceptions handling when calling FPA commands. Software emulation in the math library is usually found with the VFP format which requires the rebuilding of all programs. The FPA emulation by means of exceptions is much worse than the performance of software VFP emulation. You can compare the performance of floating-point calculations on different architectures, processors and ways of emulation in the part [[#PerfSystems|Systems performance]].

+

<!--T:89-->

The typical software environment based on the Linux operating system for ARM based hardware is: Loader [[WikiPedia:Das_U-Boot|UBoot]], Linux kernel and root file system (RFS). UBoot loader is loaded into the zero sector of flash memory, and its settings are stored in the first one. From the second sector the kernel code is loaded, and immediately after it — the RFS. RFS is usually used as basis the [[WikiPedia:JFFS2|JFFS2]] or [[WikiPedia:UBIFS|UbiFS]] file system, which are optimized to work on block devices — flash memory with a limited resource of records. Examples of partitioning a block device (flash memory) for LP-5141 and TionPro270 are presented below:

The typical software environment based on the Linux operating system for ARM based hardware is: Loader [[WikiPedia:Das_U-Boot|UBoot]], Linux kernel and root file system (RFS). UBoot loader is loaded into the zero sector of flash memory, and its settings are stored in the first one. From the second sector the kernel code is loaded, and immediately after it — the RFS. RFS is usually used as basis the [[WikiPedia:JFFS2|JFFS2]] or [[WikiPedia:UBIFS|UbiFS]] file system, which are optimized to work on block devices — flash memory with a limited resource of records. Examples of partitioning a block device (flash memory) for LP-5141 and TionPro270 are presented below:

<pre style="white-space: pre-wrap;">

<pre style="white-space: pre-wrap;">

Line 736:

Line 809:

</pre>

</pre>

+

<!--T:90-->

The root file-system contains a typical UNIX-tree with work programs, libraries and other files. The basis of any program or library are the system libraries [[WikiPedia:Glibc|GLibC]] or [[WikiPedia:UClibc|UClibC]]. OpenSCADA is adapted for building and operating with "GLibC" version >= 2.3. "UClibC", created as a lightweight version of "GLibC" for embedded systems, contains a number of limitations and has not yet been implemented or has errors in the implementation of a number of functions.

The root file-system contains a typical UNIX-tree with work programs, libraries and other files. The basis of any program or library are the system libraries [[WikiPedia:Glibc|GLibC]] or [[WikiPedia:UClibc|UClibC]]. OpenSCADA is adapted for building and operating with "GLibC" version >= 2.3. "UClibC", created as a lightweight version of "GLibC" for embedded systems, contains a number of limitations and has not yet been implemented or has errors in the implementation of a number of functions.

+

<!--T:91-->

RFS and software environments based on Linux can be supplied with the ARM-equipment and contain closed binary libraries, Linux kernel modules, etc. In this case, an independent building and replacement of the original software environment is impractical task because it leads to the loss of original functionality. However, it often happens of delivery of the ARM equipment without the source (original) software environment, or with an environment that does not contain closed code and which can be replaced. An example of the first case is the controller [[Special:MyLanguage/Using/ICPDAS_LP5xxx|LP-5141]] and similar of the "ICP DAS" company, which contain the binary building of the specialized equipment API library (libi8k) and Linux kernel modules for its initialization. An example of the second case is the single board computer [[Special:MyLanguage/Using/ZEO_Tion-Pro270|Tion-Pro270]], for which the software environment and the OpenSCADA build were created from scratch.

RFS and software environments based on Linux can be supplied with the ARM-equipment and contain closed binary libraries, Linux kernel modules, etc. In this case, an independent building and replacement of the original software environment is impractical task because it leads to the loss of original functionality. However, it often happens of delivery of the ARM equipment without the source (original) software environment, or with an environment that does not contain closed code and which can be replaced. An example of the first case is the controller [[Special:MyLanguage/Using/ICPDAS_LP5xxx|LP-5141]] and similar of the "ICP DAS" company, which contain the binary building of the specialized equipment API library (libi8k) and Linux kernel modules for its initialization. An example of the second case is the single board computer [[Special:MyLanguage/Using/ZEO_Tion-Pro270|Tion-Pro270]], for which the software environment and the OpenSCADA build were created from scratch.

−

== OpenWrt distributive ==

+

== OpenWrt distributive == <!--T:92-->

[[File:At.png]] Waiting to form

[[File:At.png]] Waiting to form

−

== Building tools for the Linux kernel and work environments of different target architectures ==

+

== Building tools for the Linux kernel and work environments of different target architectures == <!--T:93-->

Linux RFS can be formed on the basis of ready packages of the existing binary distribution, source package of the current distribution, as well as to build from the original sources through the ToolChain in one of the building systems.

Linux RFS can be formed on the basis of ready packages of the existing binary distribution, source package of the current distribution, as well as to build from the original sources through the ToolChain in one of the building systems.

+

<!--T:94-->

Building of the programs or of an entire RFS for architectures different than x86 and x86_64, is usually made using the Cross Compilation tools (ToolChain) for building, linking and debugging for the target ARM architecture. To automate this process a number of tools to build the ready RFS created.

Building of the programs or of an entire RFS for architectures different than x86 and x86_64, is usually made using the Cross Compilation tools (ToolChain) for building, linking and debugging for the target ARM architecture. To automate this process a number of tools to build the ready RFS created.

−

=== [http://buildroot.uclibc.org BuildRoot] ===

+

=== [http://buildroot.uclibc.org BuildRoot] === <!--T:95-->

This building system is a part of the project for creation an alternative library of functions of "C" language [[WikiPedia:UClibc|UClibC]], so basically aims to build environments with "UClibC", and with appropriate restrictions. BuildRoot is well in the work on the host systems of different versions, and allows to build the software environments based on Linux without too much troubles.

This building system is a part of the project for creation an alternative library of functions of "C" language [[WikiPedia:UClibc|UClibC]], so basically aims to build environments with "UClibC", and with appropriate restrictions. BuildRoot is well in the work on the host systems of different versions, and allows to build the software environments based on Linux without too much troubles.

+

<!--T:96-->

It is possible to get the BuildRoot archive of the correct version by the link http://buildroot.uclibc.org/downloads. Further it should be unpacked to the home directory of the simple user and the configuration, setup and building should be done:

It is possible to get the BuildRoot archive of the correct version by the link http://buildroot.uclibc.org/downloads. Further it should be unpacked to the home directory of the simple user and the configuration, setup and building should be done:

<pre style="white-space: pre-wrap;">

<pre style="white-space: pre-wrap;">

Line 763:

Line 840:

</pre>

</pre>

+

<!--T:97-->

The building process can cause following problems:

The building process can cause following problems:

* Inability to download the programs archive.

* Inability to download the programs archive.

Line 769:

Line 847:

:(+) There is no single solution to this problem you must to understand the reason of the building of individual programs. Building error may be linked, for example, with the lack of choice of the individual parameter during the configuration or problem building of the software in this environment. Patches and fixes of the building can be placed directly in the directory of the program description "./package/{package name}/"

:(+) There is no single solution to this problem you must to understand the reason of the building of individual programs. Building error may be linked, for example, with the lack of choice of the individual parameter during the configuration or problem building of the software in this environment. Patches and fixes of the building can be placed directly in the directory of the program description "./package/{package name}/"

−

=== [http://www.ptxdist.org PTXDist] ===

+

=== [http://www.ptxdist.org PTXDist] === <!--T:98-->

Universal tool for building kernels, ToolChains and software environments based on Linux from the "Pengutronix" company. PTXDist is a powerful and flexible tool, but it's older versions have problems in the modern host systems, which complicates the task of building the software environments for relatively old but still prevalent hardware platforms. For example, now (2012) can be found new hardware with the ARM XScale, ARM9 (ARMv5) processors of the year 2003. However, newer versions of PTXDist support the old platforms, what can be learned from the support table by the link: http://www.pengutronix.de/oselas/toolchain/index_en.html.

Universal tool for building kernels, ToolChains and software environments based on Linux from the "Pengutronix" company. PTXDist is a powerful and flexible tool, but it's older versions have problems in the modern host systems, which complicates the task of building the software environments for relatively old but still prevalent hardware platforms. For example, now (2012) can be found new hardware with the ARM XScale, ARM9 (ARMv5) processors of the year 2003. However, newer versions of PTXDist support the old platforms, what can be learned from the support table by the link: http://www.pengutronix.de/oselas/toolchain/index_en.html.

+

<!--T:99-->

To build the software environment (RFS) using PTXDist it is necessary:

To build the software environment (RFS) using PTXDist it is necessary:

* to get the builder's tool archive (along with the next versions projects, http://www.pengutronix.de/software/ptxdist/download), compile and install it;

* to get the builder's tool archive (along with the next versions projects, http://www.pengutronix.de/software/ptxdist/download), compile and install it;

Line 777:

Line 856:

* to clone-create and build the RFS project.

* to clone-create and build the RFS project.

+

<!--T:100-->

Now detailed, in commands:

Now detailed, in commands:

<pre style="white-space: pre-wrap;">

<pre style="white-space: pre-wrap;">

Line 791:

Line 871:

$ export PATH=$PATH:/home/roman/proj/ptxdist/bin

$ export PATH=$PATH:/home/roman/proj/ptxdist/bin

+

<!--T:101-->

# Unpacking, configuration and building the Toolchain

# Unpacking, configuration and building the Toolchain

$ cd ~/proj; tar xvjf OSELAS.Toolchain-2011.11.0.tar.bz2

$ cd ~/proj; tar xvjf OSELAS.Toolchain-2011.11.0.tar.bz2

Line 801:

Line 882:

$ ptxdist go

$ ptxdist go

+

<!--T:102-->

# Cloning-creation of the RFS project

# Cloning-creation of the RFS project

# Presetting of the general configuration of ptxdist, for example, the path to a directory of projects (is not required by defaults)

# Presetting of the general configuration of ptxdist, for example, the path to a directory of projects (is not required by defaults)

Line 822:

Line 904:

</pre>

</pre>

−

== Performance measurement ==

+

== Performance measurement == <!--T:103-->

=== {{Anch|PerfSystems|Processing systems}} ===

=== {{Anch|PerfSystems|Processing systems}} ===

{| class="wikitable"

{| class="wikitable"

Line 910:

Line 992:

|}

|}

<translate>

<translate>

+

<!--T:104-->

: * — Includes double call of gettimeofday() function.

: * — Includes double call of gettimeofday() function.

: ** — Enter to procedure on the language JavaLikeCalc means also enter to the critical section and request to read of the RW lock then the time mostly show performance of the operation. The time was excluded from related values into columns with JavaLikeCalc.

: ** — Enter to procedure on the language JavaLikeCalc means also enter to the critical section and request to read of the RW lock then the time mostly show performance of the operation. The time was excluded from related values into columns with JavaLikeCalc.

+

<!--T:105-->

[[File:at.png]] The difference in computation time for direct call of the mathematical operation and from the JavaLikeCalc virtual machine is connected with the influence of CPU core frequency (the frequency at which it operates) and who made the part of the command before the transfer of it to math co-processor and with the memory speed. Performance of the math co-processor is usually not directly connected with performance and frequency of the processor core or memory speed.

[[File:at.png]] The difference in computation time for direct call of the mathematical operation and from the JavaLikeCalc virtual machine is connected with the influence of CPU core frequency (the frequency at which it operates) and who made the part of the command before the transfer of it to math co-processor and with the memory speed. Performance of the math co-processor is usually not directly connected with performance and frequency of the processor core or memory speed.

+

<!--T:106-->

The measure methodology into the table above provides next:

The measure methodology into the table above provides next:

:1. Time estimation for operation generic lock of the critical section, "'''sin(Pi)'''" and "'''pow(Pi,2)'''", into second, third and forth columns. sin() and pow() operations selected to represent of estimation the co-processor performance and for overall real-numbers manipulations. Value into square brackets characterizes overhead charges on calculations into the virtual machine of OpenSCADA and performance for integer-numbers calculations about the exemplary operations. I.e. the main value characterizes performance of the processor into the float-point operations (mathematical co-processor or emulation), and into square brackets is the into the integer-operations (central processor), as subtraction of the real-numbers operations. The measure method:

:1. Time estimation for operation generic lock of the critical section, "'''sin(Pi)'''" and "'''pow(Pi,2)'''", into second, third and forth columns. sin() and pow() operations selected to represent of estimation the co-processor performance and for overall real-numbers manipulations. Value into square brackets characterizes overhead charges on calculations into the virtual machine of OpenSCADA and performance for integer-numbers calculations about the exemplary operations. I.e. the main value characterizes performance of the processor into the float-point operations (mathematical co-processor or emulation), and into square brackets is the into the integer-operations (central processor), as subtraction of the real-numbers operations. The measure method:

Line 937:

Line 1,022:

::f) return to the terminal emulator and read addition value, like to the list item "d.".

::f) return to the terminal emulator and read addition value, like to the list item "d.".

+

<!--T:107-->

The results you would send to [[mailto:oscada@oscada.org|electronic mail address]] for appending to the table!

The results you would send to [[mailto:oscada@oscada.org|electronic mail address]] for appending to the table!

This project is dedicated for the generic conception of OpenSCADA embedding to different hardware and creation of: runtime environments of PLC, PLC firmware and hardware configurations of specialized PLC's. Considered embedding to systems based on architectures x86 and ARM. Links:

Modern systems of Automatic Process Control (APCS) are quite complex. Conventionally, the hierarchy of PCS can be divided into two levels: the lower and upper levels. The lower level of the PCS contains a field of equipment (sensors and executive mechanisms), as well as programmable logical controllers (PLC). The upper level consists of a system of operational visualization and monitoring of the process — SCADA system. PLC is the responsible part of the APCS, which performs function of the data acquisition from the field of equipment, calculation and making the regulatory, blocking and other actions on the regulating parts of the field of equipment.

OpenSCADA is an open implementation of the SCADA system, which is based on the modular architecture that allows you to build the end-user solutions for different requirements. The purpose of OpenSCADA are the systems of the upper level, but the high degree of modularity and scalability allows you also to solve wide range of tasks of adjacent areas.

1 Programmable logical controllers

PLC market is saturated with wide range of products with different architecture and design. Architecturally PLC can be divided into three groups:

hard-programmable PLC and modular computer-process interfaces (CPI);

highly intellectual commercial PLC;

PC-compatible PLC with the free access.

Hard-programmable PLC are typically based on a single-crystal microcomputer or chips of programmable logic. Program of such controllers is flashed one-time, sometime providing the software parameterization, or formed with a specialized environment endowed with functions of binary firmware compilation of the runtime with the user program, such as ISaGRAF and LabView. As an example of such PLC can be the modules of distributed PCI of Advantech company.

Highly intellectual commercial PLC are typically based on more powerful hardware architecture and are close to full-featured PC-computer. The main difference from standard PC-compatible PLC is the closed software, and often the hardware architecture. The program software of such controllers is usually based on real-time operating system, which is planning several user threads with separation of their priorities. User programming of these PLC is made working in the corporate software which forms, as a result, the binary code of the PLC thread. As an example of such device it can be the PLC of S7 series of Siemens company.

PC-compatible PLC with the free access is not the group of the PLC directly compatible with PC, but the PLC which don't have the integrated run-time and which are often delivered without an operating system. Architecture of the such PLC may be different, ranging from cost-effective solutions with the x86 architecture and ending decisions ARM and MIPS. Run-time of the such PLC is usually formed from the software of the same with the hard-programmable PLC class, the result of which is an executable binary file into one of the most common, scalable, or specialized operating system (DOS, QNX, Linux, WinCE, VxWorks). Frequently the specialized solutions for the problem can be met. As an example of this class it can be the PLC of PC/104 form factor.

Variants of the constructive implementation of the PLC can be divided into mono-block and modular. Mono-block PLC provides the fixed configuration of the CPI, specialized for the limited range of tasks. Modular design provides an easy extension of configuration of CPI for the appropriate task. There are also the hybrid design which is the mono-block, able to expand its CPI by external CPI blocks connected to one of the standard interfaces such as RS-485.

2 OpenSCADA as run-time of PLC

Architecture of OpenSCADA allows you to create the final solutions under various requirements and resources through the modular extension. This feature is useful in the light of resources allowed by PLC. Moreover, given the constant development of hardware, as well as continuous improvement of integration and efficiency of modern microprocessor solutions, OpenSCADA can consistently extend the functionality of the PLC, while maintaining the continuity with the old solutions. For example, on the basis of OpenSCADA can be built the solutions with minimal requirements on the level: CPU 100 MHz, memory and flash ROM of 32 MB.

As noted above, the resources of modern PLCs can fluctuate in quite a large range, and the PLC of fixed type, built on single-chip microcomputer, further and further forced out into the narrowly specialized fields with the advanced PC-architectures. This trend makes increasingly interesting the possibility of creating the unified open platform for the implementation of the PLC run-time based on the unified PC-platforms.

OpenSCADA allows the realization of the idea of creating an open platform for the implementation of the run-time of PLC. Currently you can make the PLC's run-time nothing inferior to the commercial intellectual controllers, and in many respects superior to them, due to the possibility of integration of functions specific to the SCADA systems into the run-time of the PLC, enhancing the functionality and user characteristics of the PLC and leading him to unified with SCADA code base, as well as optimizing the cost of the final solution.

List functions which are solved by OpenSCADA within the run-time of PLC:

data acquisition of various range of devices in the synchronous, asynchronous or block mode;

user data processing and making the control actions procedures on the Java-like high level language and formal language of block schemes (Soft-logic);

archiving data, beginning from the temporary buffers in memory and ending with full-featured archives on the file system or database of varying rate and depth;

integration into the APCS infrastructure through the implementation of standard protocols of interaction (ModBus, SNMP, OPC UA ...);

integration with the DBMS for the data export, storage of the configuration or archives;

free configuration and administration of the PLC network through an operational interface of the administration station and through the Web-interface;

the possibility of implementation the operator's panels with the control interface for integrated Touch-panel;

providing the Web-interfaces of operational and supervisory control.

3 Architecture x86, firmware and PLC program environment creation

Architecture x86 recently was positioned as embedded and it's real solutions into this industry rarely have resources (< i386) which is not enough for full-featured OS and advanced environment execution. For this reason and by reason of big the architecture unification the individual assemblies of Linux kernel and main programs of the OS environment performed rarely enough, and that typical mostly for the architecture ARM. More interest and practical for x86, for wide the hardware circle, it is assembling firmwares with compressing a root file-system (RFS). But still possible individual assembling by aid of the build systems as "BuildRoot" or "PTXDist", bottom. And also here possible direct installing Linux distributions.

3.1ALTLinux distributive, instruments for assembling the firmware environments with the compressed RFS

The following requirements were pulled out to the implementation of the PLC firmware of the section:

Compactness. In connection with the direct dependence of prices on industrial flash drives with their volume, as well as the reality of the needless for frequent updates, the image of the firmware need to be packed, reaching the level of compactness up to the 8-50MB at a runtime PLC in the full-featured OS.

Uniform source repository. Since the firmware is not something unchangeable, not expandable and finally fixed, then it must be based on the real, developing-supporting repository of OS packages. This will allow for a long time to form updates and expansions, not maintaining the mediated repository special.

Debugged and simple building procedure. Given the fact that configuration of the firmware can be for some time be stabilized and in addition in the operating system's components and in OpenSCADA too it will be detected and eliminated the bugs, the procedure of building of the firmware should not be burdensome, but on the contrary — easily adaptable.

Clear implementation of the writing mode in the OS tree. Although the firmware means the creation of packaged not modified image of firmware, but the characteristics of the PLC runtime involves the modifying of the databases and archives. In addition, the possibility of correction of the initial configuration is an important requirement.

Reliability and stability to the sudden shutdowns. The specificity of exploitation of PLC is usually the inability to properly shutdown, as well as the practical reality of the situation instantly and unpredictable power outage. PLC in these situations must keep working, i.e. to contain the journaling file system and ensure that its verification and automatic correction of errors.

Conditional division of the PLC configuration to two types:

PLC without the local display, possibly with a simple text display.

Touch-panels with the PLC function.

Given the above requirements, for the creation of the firmware it was chosen the tool for creating the distributions mkimage of ALTLinux. mkimage is the tool for building Sisyphus-based system on basis of template. As an initial set of templates it was taken the set of templates of formation of ALTLinux distributions at git://git.altlinux.org/people/boyarsh/packages/mkimage-profiles-desktop by the command:

As the basis it was taken the "rescue" template, as the most compact and close to the target PLC.

Firstly building performed basing on the package base of the distributive ALTLinux 5.1, there is present the realtime kernel from XENOMAI. For obtaining some specific packages you need to connect the repository of packages "ALTLinux 5.1" from the OpenSCADA project:

$ rpm ftp://ftp.oscada.org/ALTLinux/5.1 openscada main

3.1.1 Assembling

Firstly it was created the configuration of PLC without local display in mind of the availability of this type of equipment and lack of equipment for the Touch-panels.

New PLC template was named "plc", it was tested on the boards of PC/104 form factor MOPSlcdLX of Kontron company, ATH400-128 of Diamond Systems company and modular PLC LP-8781 of the ICP DAS company. The archive of the resulting mkimage tree with the "plc" template can be downloaded here ftp://ftp.oscada.org/OpenSCADA/PLC (templates and materials of individual controllers are placed in their own directories).

The key points of the configuration of new template was the writing of the new init-script (rc.sysinit), the script of the after installation configuration of the firmware's image and the list of packages in the image of firmware. The first script is designed as the package "startup-plc". The second script was embedded in the template "plc" on the way: profiles/pls/image-scripts.d/01system. The list of packages was embedded in the template "plc" on the path: profiles/pkg/lists/plс.in.

The procedure of creating the firmware from the image is the following:

# Creation the configuration script configure
$ ./autoconf
# Configuring of the builder to generate the disks' images
$ ./configure --with-imagetype=flash
# Building of the image
$ make plc.cd

3.1.2 Installation

It is possible to download the firmware to: USB-flash, IDE-flash and HDD. However, in the case of the USB-flash there is the problem with waiting for initialization of USB-subsystem and you'll have "to run" some dialogues.

The file system can be FAT or EXT2/3. In the case of EXT3 the root is mounted as EXT2, because of problems in the initializer. In the case of EXT2/3 you'll need to use not the syslinux boot, but extlinux, the configuration of which is almost the same one.

Next, lets mount the medium and place the files from the output directory on it as follows.

To ensure the reliable operation of the operating data stored in the file "work" with the file system EXT3. The file-system of this file is checked for integrity at the initialization. This file is created as follows:

In the case of the file system EXT2/3 on the target disk the "work" file can not be created. In this case, the working data will be placed in the directory "root" of the target disk.
This is an unreliable solution because the root file system of the target disk is not static and its check is not possible, because of earlier mounting in the "ro" and the potential unreliability of the check of the file system, mounted at "ro", as well as because of the inability to remount as EXT3.

The next step is the configuration and initialization of the loader. To configure the loader it is necessary to edit the file "syslinux/syslinux.cfg" or "extlinux/extlinux.conf" as follows:

default plс
prompt 1
timeout 200
implicit 1
label plс
kernel alt0/vmlinuz
# To use in the case of identification of the bootable partition by the label
append initrd=alt0/full.cz live lowmem fastboot stagename=plс showopts automatic=method:disk,label:PLC
# To use in case of identification of the bootable partition by the identifier
# append initrd=alt0/full.cz live lowmem fastboot stagename=plc showopts automatic=method:disk,uuid:4824-271E

In the case of selection the identification of the bootable partition by the identifier you can get the ID of our partition with the command: blkid.

In the case of the label it is a bit harder and this is done for different file systems in different ways.

For the file-systems EXT2/3 it is done by the utility e2label. For example: e2label /dev/sdb1 PLC

For the FAT file system it does by the set of utilities that come with mtools or with parted, easier. With mtools you can do it as follows:

# For "syslinux"
$ syslinux /dev/sdb1 #previously the partition must be unmounted
# For "extlinux" (path points to mount point of the partition of the target disk /media/PLC)
$ extlinux --install /media/PLC/extlinux

That is all with the boot and initialization of firmware. If the resulting disk is not loaded:

Bootable flag is missing at the bootable partition.

Incorrect or damaged "MBR". To check and restore it is possible by usage of "ms-sys" utility.

Sections of the media are created or recreated with the help of parted. This utility align in strange way the partitions that do not allow them to boot on USB-flash. It is necessary to repartition the media with fdisk.

Boot can also be not working on the old systems that do not know how to boot from USB-HDD. For them it will be necessary to adapt the geometry of the disk being arranged to USB-ZIP or something like that.

3.1.3 Result

The result is the firmware with the size from 30Mb to 100Mb, satisfying all announced requirements and it provides:

Loading for 27 seconds from the controller's switch on and including the initialization of BIOS.

Checking and restoration of the working file system in the "work" file.

Storing the user data and changes of the firmware in the "work" file.

Automatic network configuration with DHCP (or 192.168.0.1).

Access to the controller via SSH and user-friendly interface of working, including mc. The passwords by default (root:123456; admin:123456).

3.1.4 OpenSCADA

As the PLC runtime OpenSCADA is used. For this case we'll take the building with separate packages for each module and indicate to install the virtual package openscada-plc, which contains all the dependencies on all the OpenSCADA packages, typical used for this configuration. The package of gd2 graphics library has been rebuilt without the support of xpm graphic file format and library was called libgd2-noxpm. All this was done in order to avoid the heavy dependencies on the libraries of GUI XOrg.

The configuration of OpenSCADA runs in demon mode in locale "en_US.UTF-8" (also available "uk_UA.UTF-8" and "ru_RU.UTF-8") using the local database SQLite, providing the following default network services:

configuration and execution environment through the Web (ports: 10002 and 10004);

control interface of OpenSCADA (port: 10005).

3.1.5 The implementation details

In this section let examine the details of the OS tree of the firmware, the initialization script rc.sysinit.plc and the script of preparation of the OS tree of the firmware.

To the script of the tree preparation there were added the following functions:

changing the name of the distribution kit;

replacing the init-script to "inittab.plc";

creating the user-admin "admin" and the passwords setting by default to "123456" for users "root" and "admin";

initialization of the /etc/fstab;

setting locale to "en_US.UTF-8";

network configuration;

clock setting on the whole and the time-zone setting to "/usr/share/zoneinfo/Europe/Kiev", for changing what you need replace the file "/etc/localtime" to need zone;

enabling of the necessary services;

removing of the documentations, help pages and information, icons, RPM-database and apt cache;

removing of the not needed locales and the translations; left for presence only the locales: en_US, uk_UA and ru_RU;

selection of only used kernel modules and deletion all the others is added; it is disabled by default and can be enabled to preparation the final firmware for specific equipment;

the directory with the kernel (/ boot) is deleted in connection with its moving to the root of the boot partition.

Initialization script (rc.sysinit.plc) was provided with the following functions:

remounting the root partition to the RW mode;

checking and connection of the file system (/image/root) of the working user data (the file "work");

reflection of the modifiable directories of the PLC tree (/etc, /var, /root, /home, /mnt and /lib) to the file system with the user's working data (/image/root) through the file system "aufs" or "unionfs".

As the result of these actions the mount table of the resulting PLC tree looks like:

3.1.6 Setting of the GUI

One option of the firmware is built with a graphical interface, which, however, necessary to configure for automatic startup with the visualization area of OpenSCADA. In addition, it should be noted that the firmware with a graphical interface does not contain all the drivers and you may have to rebuild it under the right equipment.

After downloading and logging to the console it is necessary to configure the XServer, automatic graphical login, start of the graphical environment and automatic startup of OpenSCADA from the IceWM environment:

3.1.7ALTLinux T6 packages base

Next stage of the firmwares creation was moving to the package base of distributive ALTLinux T6. On the whole firmwares creation concept saved, with bits changes, but there were added some improvements and expansions:

Used the new function of "propagator" (the system of pre-initiation of hardware, searching and starting to the firmwares on FS) for searching/creation a partition of EXT2/3/4 with the label "alt-live-storage" for the "root" partition forming and it's modification possibility. The function provides a feature of installing packages direct from the distribution repository, and updating packages packed to the firmware, exclude the kernel and some system's services.

Added the possibility of creation the firmware as a combined ISO-image, which you can (besides it writing to CD/DVD) direct, at aid of the utility dd, write to USB-flash, HDD, SSD and get a work environment with the partition "alt-live-storage", the "root" reflection, on the storage's free place.

For the possibility to creation of new firmwares to "LP-8x81" from ICP DAS was done moving the real-time kernel "rt-up" from the repository "ALTLinux 5.1" to "ALTLinux T6". The kernel "rt-up" was successfully adapted and get the working firmware based on the packages base "T6" for "LP-8x81".

During the possibility of a free additional installation of needs packages direct from the repository gone needs to the separated built of the firmware with GUI. That is you can easy install the desired window manager (WM) or desktop environment include needed drivers, than create a separated firmware with a limited list of the drivers.

The script "startup-plc" was turned spare into the new firmwares besides the "root" FS remounting to writing does early on the initial stage. The script "profiles/plс/image-scripts.d/01system" renamed to "profiles/plс/image-scripts.d/init1-PLC", but it changed and expanded. The packages list of the firmware was left into "profiles/pkg/lists/plс.in" and some changed.

For get the some specific packages you have to connect the repository "ALTLinux T6" from the OpenSCADA project:

rpm ftp://ftp.oscada.org/ALTLinux/t6 openscada main

The firmware creation procedure mostly remained unchanged:

# Creation of the configuration script "configure"
$ ./autoconf
# The builder configuration for the disk's images generation. The key "--with-imagetype" you can set to "iso", or pass
# for creation the combined ISO-image
$ ./configure --with-distro=kdesktop --with-branding=altlinux-kdesktop --with-version=6.0 --with-language=en_US --with-imagetype=flash
# The image assembling
$ make plc.cd

The output folder's content with the image and the firmware installing process to file system FAT and EXT2/3/4 different only by renaming the FS archive's file from "plc" to "live". Installing the ISO-image to USB-flash, HDD, SSD performs by the command dd:

Instead the file "work" you should create partition EXT3 with the label "alt-live-storage", if it is not the ISO-image. The new partition creation you can do with the help of fdisk, if the FAT partition was not created to all allowed the storage space, or with help of parted where the FAT partition you allowed to change. To the details about a partition creation the reader will send to the documentation on fdisk or parted.

Configuration of files "syslinux/syslinux.cfg" and "extlinux/extlinux.conf" were not changed, besides the FS file archive's name changed from "plc" to "live".

At the result we get the firmware with size from 60Мб, which provides:

Loading for 25 seconds from the controller's switch on and including the initialization of BIOS.

Checking and restoration of the journal of the working file system "root" into "alt-live-storage".

Storing the user data and changes of the firmware, also new and updated packages, in the partition "alt-live-storage".

Automatic network configuration with DHCP (or 192.168.0.1), for the first interface.

Access to the controller via SSH and user-friendly interface of working, including mc. The passwords by default omit and the user "root" allowed for connection to it via SSH.

Script of the tree preparation "profiles/plс/image-scripts.d/init1-PLC" performs the functions:

changing the name of the distribution kit;

enabling login from the user "root" via SSH, without a password;

setting locale to "en_US.UTF-8";

network configuration for use DHCP or set to "192.168.0.1" for the first interface;

clock setting on the whole and the time-zone setting to "/usr/share/zoneinfo/Europe/Kiev", for changing what you need replace the file "/etc/localtime" to need zone;

enabling of the necessary services;

removing of the documentations, help pages and information, icons;

removing of the not needed locales and the translations; left for presence only the locales: en_US, uk_UA and ru_RU;

selection of only used kernel modules and deletion all the others is added; it is disabled by default and can be enabled to preparation the final firmware for specific equipment; it was unified for the modules list setting by groups of the kernel subsystem’s and specified for hardware;

the directory with the kernel (/ boot) is deleted in connection with its moving to the root of the boot partition.

3.1.8 Real-time kernel

For a series of tasks are important, often also critical, criteria of the environment is the real-time handing level, then it is possibility of working the tasks according to the real-time priorities and provision of a reaction to events by that priorities.

The Linux kernel of itself provides POSIX real-time scheduling policies "SCHED_FIFO" and "SCHED_RR" with the priorities range (0...100). But the important criteria is "Timer frequency and the reaction to it" up to version of Linux kernel 2.6.24 was too low, for criteria of the real-time systems. In modern kernels of Linux (> 2.6.24) provided support for timers of the high-precision resolution (HPET), what decreased the reaction time to a timer up to 100 microseconds, but that time stability is not guaranteed. To ensure stability of reaction to a timer on level 60 microseconds, and also series of the other criteria of real-time, at the moment you need to assemble a kernel with one real-time extension.

On the ALTLinux distributions observed the kernel 2.6.29-rt-up, which assembled with the real-time extension of real-time is XENOMAI. Into other distributions, for example OpenSuSE, observed also the solutions with it extension.

For now higher criteria of the real-time ensured of the extension The Real Time Preempt Patch, on enabling here full it's features by (CONFIG_PREEMPT_RT), The patch assembling to Linux kernels process and it's work result will trace into this section.

-i 200 — pulling interval of the testing thread: 200 us, as closer to the average value 50 us;

-l 100000 — testing iterations number.

Pair of measurements for Linux kernels of the wide purpose:

ALTLinux T6 distribution standard kernel (3.0.79-std-def, LP-8781):

loading 0%: Avg: 37 us; Max: 152 us

loading 100%: Avg: 37 us; Max: 191 us

ALTLinux T6 distribution kernel (3.4.45-un-def, LP-8781):

loading 0%: Avg: 53 us; Max: 217 us

loading 100%: Avg: 40 us; Max: 183 us

3.1.8.1 kernel-image-rt-up-2.6.29

The kernel originally presents into the distribution ALTLinux 5.1, and it is also moved to the local repository of the project OpenSCADA for ALTLinux T6. The kernel assembled with the extension XENOMAI and AUFS, allowing it using into the firmwares and packed root FS, that was done for the PLC LP-8x81.

Results of the kernel testings:

LP-8781 (XENOMAI)

loading 0%: Avg: 26 us; Max: 136 us (there observed jumps up to 1 ms, like to instability the source clock "tsc", at that the "acpi_pm" worse here)

As you can see from the testing results the patch XENOMAI does not ensure proper level of the real-time on using the standard mechanisms of the POSIX real-time scheduling, at the same time as the kernel version 3 even without the specific real-time extensions ensures the clearly better result.

Necessity for assembling same that kernel with the patch/parameter CONFIG_PREEMPT_RT is actual by presence a number of binary modules from ICP_DAS, for "LP8x81". Also here is actual a question of building the kernel 2.6.33 at the same reasons but for "LP-8x81 Atom". The preliminary assemblies of the kernels 2.6.29 and 2.6.33 reveals series of problems which will described here. Solving also a variant to build a modern kernel with CONFIG_PREEMPT_RT and next to request for building these binary modules from "ICP DAS".

Assembling and testing process:

Patches CONFIG_PREEMPT_RT and AUFS of days of 2.6.29 are conflict on the function "debug_mutex_set_owner()", into CONFIG_PREEMPT_RT it removed — replaced to "mutex_set_owner()".

On the assembling here detected series of problems for "# typedef void irqreturn_t;" — replaced to "#include <linux/irqreturn.h>".

The first start with CONFIG_PREEMPT_RT, but without AUFS, was successful — the results above.

The starting with AUFS was reveal a problem into memory allocation by AUFS into "aufs_mmap()" — the working code of AUFS was taken from the preliminary assembling "rt-up-2.6.29.alt2".

It starting with AUFS was reveal a problem of hanging on the FS root into AUFS, like to possibility of cycling/blocking a RT-task — setup CONFIG_PREEMPT_NONE, on LP-8781 and "AMD Turion" any problem does not observed (possible the problem due the HPET missing on PLX8).

At the first look the kernel works fine, but jumps to continuous growing the measured value of the delay time observed.

There finished adapting of the kernel to a binary compatibility for the modules "slot" and "icp" from ICP_DAS. The module "8250_linpac" crashes at it's loading, and "icpdas_8250" has more unresolved symbols — the modules need to reassemble or to try the interfaces > COM2 initiate through setserial — the modules was reassembled by the help of Golden Wang (technical support of ICPDAS).

network with the driver "via_rhine" halted, after 4 days of successful working — the halt expected, assembled the driver "rhinefet", testing continued.

on the driver "rhinefet" the system on loading had work three weeks. But here observed the interrupt 11, on what hangs mostly all standard hardware (USB, Ethernet and may be something), had disabled and the network continued to work into "Pool" mode, which is slower. Possible that interruption disabling occurs also with "via_rhine", and it can not work in the mode "Pool", why packages into the network do not go. The problem reason linked to halt and generation the unhandled interruptions from one of hardware on the interruption 11.

The problem fixed by preventing the interruption disabling at help the Linux kernel parameter "noirqdebug".

The adapting successful finished and the firmwares based on the kernel ready to the production implementation!

01.03.2015: Instead function EnableWDT() used EnableSysWDT(), by limit to 30 seconds and cyclic reloading if the system was not loaded in 30 seconds (up to three reloadings).

17.03.2015: With assist of the ICP_DAS support service there was fixed a problem into the serial interfaces driver for more to COM2 which causes to Linux kernel "freeze" (like to interruptions block) after closing one port and activity on some other.

29.07.2015: Detected one more problem looks like by the symptoms to the interruption 11 disabling, but: the interruption 11 is not disabled and all other devices on it works. It reproduced only on configurations with using that both network interfaces, at that possible "braking" for one of its. The problem resolved only by reloading "the braked" network interface, by the command: ifdown eth0; ifup eth0. To detect it and the reloading performs we recommend on the OpenSCADA level append the traffic control and same reloading of the interface on the traffic lack.

21.11.2016: Driver "rhinefet" has been adapted to prevent the interrupts lock and the interrupt vector disable but SHARE mode using. For now it works but 19.12.2016 also there was observer the two adapters network slowing after about two week working. Then the hardware is broken for two adapters work and for the PLC you can use only one for stable work!

06.09.2017: Not full fixing into the serial driver of ICP-DAS, caused to malfunction on using more then two serial ports, seems already full fixed into last versions, which observed on LX-8x31.

Result kernel, which renamed to "kernel-image-rt1-up-2.6.29.alt1", you can use for PLC with HPET or a high precision timer, and also into "LP-8x81" and "LP-8x81 Atom" (only single kernel)!

3.1.8.2 kernel-image-rt-up-2.6.33

Kernel version 2.6.33 assembling with the patch CONFIG_PREEMPT_RT needs for PLC LP-8x81 of firm "ICP DAS" and LP-8x81 Atom (main and original kernel) by reason of presence for it the binary drivers of "ICP DAS".

Testings results of the kernel:

AMD Turion Neo X2 L625

loading 0%: Avg: 65 us; Max: 86 us

loading 100%: Avg: 57 us; Max: 72 us

LP-8781

loading 0%: Avg: 37 us; Max: 88 us

loading 100%: Avg: 34 us; Max: 108 us

LP-8781-Atom (original assembling of the kernel 2.6.33.7-rt29-ICPDAS)

loading 0%: Avg: 17 us; Max: 50 us

loading 100%: Avg: 12 us; Max: 32 us

Assembling and testing process:

Assembling of the kernel from sources of "ICP DAS" (2.6.33.7) and configuration it inherited from kernel 2.6.29 (the source code has suspiciously more of *.rej files, and also "staging/comedi" impossible to build) — it started and mostly works; modules "ipic" and "slot" loaded; module "8250_linpac" crashes into function "platform_device_add"; series of programs hangs into FS operations, with the message: "task openscada:2153 blocked for more than 120 seconds".

AUFS replacing to the version from 2.6.29-rt1 — crashes into rtmutex on starting; replacing to official version from git looks same result, at the begin used patch "aufs+sqfs4lzma-2.6.33.patch" from DLink.

Assembling the original kernel with patches CONFIG_PREEMPT and AUFS — a problem again into AUFS, but now it at the finish can not look "/sbin/mingetty".

Assembling the original kernel 2.6.33.9 with patches CONFIG_PREEMPT and AUFS — same problems.

Assembling from sources of "ICP DAS" (2.6.33.7) for SMP — the module DAQ.JavaLikeCalc of OpenSCADA crashes at an unknown reason.

Assembling the original kernel with patches CONFIG_PREEMPT and AUFS for SMP — same problem as without SMP but it is not immediately and about five thread.

For now the kernel 2.6.33 links with CONFIG_PREEMPT_RT and AUFS is non-working. Then if you need to work on "LP-8x81 Atom" then we recommend to use the original Linux-environment, building and installing the OpenSCADA here.

3.2Debian distributive, instruments for assembling the firmware environments with the compressed RFS

Specific of the ARM architecture is the lack of a necessarily hardware-dependent software system of the basic initialization and configuration of equipment, which is characteristic for the x86 architecture — BIOS, and the structure of hardware configuration typically includes: CPU, integrated operational and flash memory, as well as a number of built-in equipment on a standard system-level buses. The flash and RAM are placed in general address segment. Initialization of the such system with the software environment is made by downloading executable code directly on the built-in flash-memory.

To working of computing functions of OpenSCADA and other related libraries and software the performance of floating point calculations is very important. Specific of the ARM architecture processors is the ease of its core and availability of optional extensions such as math coprocessor. As a consequence, the performance on floating point operations is highly dependent on the specific processor, and on the emulation type of the floating point coprocessor if it is absent at all. There are two formats of floating point in the ARM-architecture processors: FPA and VFP. FPA format is obsoleted and met as a hardware implementation in the ARM cores up to the StrongARM family (ARMv4). XScale ARM core families (ARMv5TE) did not have a math coprocessor at all. And the ARM core, starting with the ARM11 family (ARMv6) are equipped with VFP format math coprocessor. At the same time the ARM processors with the ARMv5 architecture are still widespread, and thus the question of performance of mathematical calculations for them comes down to the performance of the FPA or VFP format emulation. In the case of the Linux environment the emulation of FPA is usually done by the Linux kernel by the CPU exceptions handling when calling FPA commands. Software emulation in the math library is usually found with the VFP format which requires the rebuilding of all programs. The FPA emulation by means of exceptions is much worse than the performance of software VFP emulation. You can compare the performance of floating-point calculations on different architectures, processors and ways of emulation in the part Systems performance.

The typical software environment based on the Linux operating system for ARM based hardware is: Loader UBoot, Linux kernel and root file system (RFS). UBoot loader is loaded into the zero sector of flash memory, and its settings are stored in the first one. From the second sector the kernel code is loaded, and immediately after it — the RFS. RFS is usually used as basis the JFFS2 or UbiFS file system, which are optimized to work on block devices — flash memory with a limited resource of records. Examples of partitioning a block device (flash memory) for LP-5141 and TionPro270 are presented below:

The root file-system contains a typical UNIX-tree with work programs, libraries and other files. The basis of any program or library are the system libraries GLibC or UClibC. OpenSCADA is adapted for building and operating with "GLibC" version >= 2.3. "UClibC", created as a lightweight version of "GLibC" for embedded systems, contains a number of limitations and has not yet been implemented or has errors in the implementation of a number of functions.

RFS and software environments based on Linux can be supplied with the ARM-equipment and contain closed binary libraries, Linux kernel modules, etc. In this case, an independent building and replacement of the original software environment is impractical task because it leads to the loss of original functionality. However, it often happens of delivery of the ARM equipment without the source (original) software environment, or with an environment that does not contain closed code and which can be replaced. An example of the first case is the controller LP-5141 and similar of the "ICP DAS" company, which contain the binary building of the specialized equipment API library (libi8k) and Linux kernel modules for its initialization. An example of the second case is the single board computer Tion-Pro270, for which the software environment and the OpenSCADA build were created from scratch.

5 OpenWrt distributive

Waiting to form

6 Building tools for the Linux kernel and work environments of different target architectures

Linux RFS can be formed on the basis of ready packages of the existing binary distribution, source package of the current distribution, as well as to build from the original sources through the ToolChain in one of the building systems.

Building of the programs or of an entire RFS for architectures different than x86 and x86_64, is usually made using the Cross Compilation tools (ToolChain) for building, linking and debugging for the target ARM architecture. To automate this process a number of tools to build the ready RFS created.

This building system is a part of the project for creation an alternative library of functions of "C" language UClibC, so basically aims to build environments with "UClibC", and with appropriate restrictions. BuildRoot is well in the work on the host systems of different versions, and allows to build the software environments based on Linux without too much troubles.

It is possible to get the BuildRoot archive of the correct version by the link http://buildroot.uclibc.org/downloads. Further it should be unpacked to the home directory of the simple user and the configuration, setup and building should be done:

# Initial configuration relative to the previous one, for example after changing the BuildRoot version
$ make oldconfig
# Configuration from the character graphics menu
$ make menuconfig
# Starting the building
$ make
# Entire cleaning the build environment
$ make distclean

The building process can cause following problems:

Inability to download the programs archive.

(+) This package should be downloaded separately and put to the directory "./dl" or "./output/dl".

Programs' building errors.

(+) There is no single solution to this problem you must to understand the reason of the building of individual programs. Building error may be linked, for example, with the lack of choice of the individual parameter during the configuration or problem building of the software in this environment. Patches and fixes of the building can be placed directly in the directory of the program description "./package/{package name}/"

Universal tool for building kernels, ToolChains and software environments based on Linux from the "Pengutronix" company. PTXDist is a powerful and flexible tool, but it's older versions have problems in the modern host systems, which complicates the task of building the software environments for relatively old but still prevalent hardware platforms. For example, now (2012) can be found new hardware with the ARM XScale, ARM9 (ARMv5) processors of the year 2003. However, newer versions of PTXDist support the old platforms, what can be learned from the support table by the link: http://www.pengutronix.de/oselas/toolchain/index_en.html.

To build the software environment (RFS) using PTXDist it is necessary:

# Installation and building of the builder must be done from the simple user in his home directory.
# The source archives are loaded to the ~/Downloads
$ mkdir ~/proj/ptxdist; cd ~/proj/ptxdist
$ tar xvjf ~/Downloads/ptxdist-2011.11.0.tar.bz2
$ tar xvzf ~/Downloads/ptxdist-2011.01.0-projects.tgz
# Transfer the contents of the projects' archive to the working version's directory, if the versions are different.
$ cp -r ptxdist-2011.01.0/* ptxdist-2011.11.0/; rm -rf ptxdist-2011.01.0
# Building and installation of the toolkit
$ cd ptxdist-2011.11.0; ./configure --prefix=/home/roman/proj/ptxdist; make install
# Setting the environment variable "PATH" to call the toolkit file "ptxdist"
$ export PATH=$PATH:/home/roman/proj/ptxdist/bin
# Unpacking, configuration and building the Toolchain
$ cd ~/proj; tar xvjf OSELAS.Toolchain-2011.11.0.tar.bz2
# Select the desired configuration of toolchain
$ cd OSELAS.Toolchain-2011.11.0
$ ptxdist select ptxconfigs/arm-xscale-linux-gnueabi_gcc-4.6.2_glibc-2.14.1_binutils-2.21.1a_kernel-2.6.39-sanitized.ptxconfig
# Start of building the ToolChain.
# The building result will be placed in the directory /opt/OSELAS.Toolchain-2011.11.0, you need to give full access from the root to the directory /opt.
$ sudo chmod a+rwX /opt
$ ptxdist go
# Cloning-creation of the RFS project
# Presetting of the general configuration of ptxdist, for example, the path to a directory of projects (is not required by defaults)
$ ptxdist setup
# Checking for availability and visibility of the projects to clone
$ ptxdist projects
# Cloning the one of the available projects
$ cd ~/proj; ptxdist clone OSELAS.BSP-Pengutronix-Generic New_RootFS
# Choice to a platform configuration and the previously built ToolChain for this project
$ cd ~/proj/New_RootFS
$ ptxdist platform configs/arm-qemu-2011.01.0/platformconfig
$ ptxdist toolchain /opt/OSELAS.Toolchain-2011.11.0/arm-xscale-linux-gnueabi/gcc-4.5.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.30.5-sanitized/bin
# Other settings of the architecture, programs selection and formation of the result are configured into the pseudographics configurator
$ ptxdist menuconfig
# Building of the RFS and the formation of images
$ ptxdist go
$ ptxdist images
# Additional programs configuration of the building should be placed in directory "rules" as two files: pkg.in and pkg.make.
# For a new program to be appeared in the menu of pseudographics configurator, it must be added
# to the file ~/proj/ptxdist/lib/ptxdist-2011.11.0/rules/Kconfig

** — Enter to procedure on the language JavaLikeCalc means also enter to the critical section and request to read of the RW lock then the time mostly show performance of the operation. The time was excluded from related values into columns with JavaLikeCalc.

The difference in computation time for direct call of the mathematical operation and from the JavaLikeCalc virtual machine is connected with the influence of CPU core frequency (the frequency at which it operates) and who made the part of the command before the transfer of it to math co-processor and with the memory speed. Performance of the math co-processor is usually not directly connected with performance and frequency of the processor core or memory speed.

The measure methodology into the table above provides next:

1. Time estimation for operation generic lock of the critical section, "sin(Pi)" and "pow(Pi,2)", into second, third and forth columns. sin() and pow() operations selected to represent of estimation the co-processor performance and for overall real-numbers manipulations. Value into square brackets characterizes overhead charges on calculations into the virtual machine of OpenSCADA and performance for integer-numbers calculations about the exemplary operations. I.e. the main value characterizes performance of the processor into the float-point operations (mathematical co-processor or emulation), and into square brackets is the into the integer-operations (central processor), as subtraction of the real-numbers operations. The measure method:

a) ensure the central processor frequency stability, in way of setting the policy of its management to PERFORMANCE;

b) start OpenSCADA without load, the project by default or with an empty configuration, and within configurator UI.QTCfg, UI.WebCfg or UI.WebCfgD;

d) go to tab "Execute", set "Enable", enter the argument's value for "X" to 3.14159 and "Power" to 2 (for "pow()"), set number of executions to 1000 (to the representativeness rise you can increase the number, by degrees, to overall the operation execution time not more 10 seconds);

e) press "Execute" and get the execution time;

f) perform the execution into several tries, pressing "Execute", and achieve to minimal value;

g) fix the minimal value, which divide to 1000 (number of the executions) and get the main time value of the single execution into microseconds;

j) into the tab "Program" enter the commands text zero, "y=sin(3.14159)", and next "y=pow(3.14159, 2)";

k) go to tab "Execute" and do the same things into the list items "d."-"g.";

l) the execution result consider for column two and as auxiliary, into the square brackets, for column three and four after them extraction from the column two.

2. Complex performance estimation, into fifth column, performs by execution the technological process (TP) model AGLKS on target architecture. The test can be executed only on computing systems with relatively high performance (or with more to one core), which capable for the model execute, and equipped by a graphical information output device (display), the visualization server execution case we will not consider. The main value of the processor loading characterizes only the dynamical model of TP execution, but addition value appends of forming and execution the graphical interface. The measure method:

a) ensure the central processor frequency stability, by way set the policy of the management to PERFORMANCE;