OpenSCADAWiki: Home Page En/Using/PLC ...

Home | Index | Changes | Comments | Users | Registration | Login  Password:  
Russian (1 )
Ukrainian (1 )
 (2 ) The page is not actual more and need translation update from original

OpenSCADA into programmable logic controller (PLC)

Name: PLC
Start: October 2008
Version: 1.0.0
Status: GPL
Members: Roman Savochenko
Translator: Maxim Lysenko
Description: The project is devoted to the creation of: runtime if the PLC, the PLC firmware and hardware configurations of the specialized PLC's. Considered embedded systems based on architectures x86 and ARM, and also separated hardware of embedded systems:


1. Introduction

Modern system of automatic process control (APCS) are quite complex. Conventionally, the hierarchy of PCS can be divided into two levels: the lower and upper level. The lower level of PCS contains the field equipment (sensors and actuators), as well as programmable logic controllers (PLC). The upper level consists of the system of operational visualization and monitoring of the process SCADA system. PLC is the responsible part of the APCS, which performs the function of the data acquisition from the field equipment, calculation and making the regulatory, blocking and other effects on the regulating parts of field equipment.

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

2. Industrial programmable logic controllers

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

Hard-programmable PLC are typically based on single-crystal microcomputer or chips of programmable logic. The program of such controllers is flashed one-time, enabling the software of parameterization, or formed with the 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 typically are based on more powerful hardware architecture and are close to full-fledged 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 is not the group of the PLC directly compatible with PC, but the PLC which don't have the integrated runtime and which are often delivered without an operating system. Architecture of the such PLC may be different, ranging from cost-effective solutions and ending with the x86 architecture decisions ARM and MIPS. The runtime 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 constructive execution of the PLC can be divided into monoblock and modular. Monoblock 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 monoblock, able to expand its CPI by external CPI blocks connected to one of the standard interfaces such as RS-485.

3. OpenSCADA as runtime of the PLC

System architecture of the OpenSCADA allows you to create the final decisions under various requirements and resources through the modular expansion. This feature is useful in the light of resource constraints of 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 the OpenSCADA system can be built the solutions with minimal requirements on the level: CPU 100 MHz, memory and flash ROM of 30 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 runtime based on unified PC-platforms.

OpenSCADA allows the realization of the idea of creating an open platform for the implementation of the runtime of PLC. Already you can make the PLC's runtime slightly inferior to the commercial intellectual controllers, and in many respects superior to them, due to the possibility of integration of functions specific to SCADA systems into the runtime 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.

Here are the functions which are solved by OpenSCADA within the runtime of PLC:

4. Firmware and PLC program environment creation for architecture x86

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

4.1. Tools and work environments building

Given the above requirements, for the creation of the firmware it was chosen the package's repository of the distributive of OS Linux ALTLinux and the tool for creating the distributions mkimage. mkimage is the tool for building Sisyphus-based system on the basis of the template. As an initial set of templates it was used the set of templates of formation of ALTLinux distributions at git:// by the command:

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

4.1.1. Creation

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 "plc" template can be downloaded here (templates and materials of individual controllers are placed in their own directories).

The key features 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 is embedded in the template "plc" on the way: profiles/pls/image-scripts.d/01system. The list of packages is embedded in the template "plc" on the way: profiles/pkg/lists/ .

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

The result is an output directory in the profiles/out/ of the type:

4.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 pass some dialogues.

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

Next, lets mount the medium and place the files from the output directory on it as follows.
In the case with fat and syslinux:

In the case with ext2/ext3 and extlinux:

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 file is created as follows:

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

 (2 Kb) 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:

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, since it needs to be set, and this is done for different file systems in different ways.

For the file systems ext2/ext3 it is done by the utility e2label. For example: "e2label /dev/sdb1 PLC"

For the FAT file system it is done by the set of utilities that come with mtools as follows:

Now we can initialize the loader:

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

4.1.3. Result

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

4.1.4. OpenSCADA

As the PLC runtime system the 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 dependences 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 result is the runtime of the PLC with support:

The current configuration of OpenSCADA runs in demon mode in locale uk_UA.UTF-8 using the local database SQLite, providing the following default network services:

4.1.5. Implementation details

In this section we'll 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 firmware.

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

List of the modules of the loader's system kernel with the purpose to reduce the initialization image size was reduced to the following one:

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

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

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

4.1.6. Customizing 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:

4.2. iROBO-3000a

iROBO-3000a is a fanless industrial computer with Intel Atom D425 1.8 GHz VGA, 2xGb LAN, 4xCOM, 4xUSB, 1GB RAM, 1x2.5" SATA HDD 120GB, Mini-PCIe, 4x4 DIO, CF slot, SIM Card slot, Audio, WDT on board, operating temperature range -5..+55. Performance of this computer is enough to run the functions of data acquisition, monitoring and control server, as well as the visualization station's functions. However, because of usage the non-productive Atom processor family, the implementation of mathematical models of processes will require almost all of the CPU resources. For example, during the performance of the AGLKS mathematical model, the CPU is loaded at 86%. The controller has been certified by "UKRSEPRO" that may be important for many users in the territory of Ukraine.

OpenSCADA operating environment for this computer was based on the packets base of the ALTLinux T6 distribution, as well as freshly-builded Trinity (TDE) desktop environment. Building of the environment was made using the above described conception with an updated profile of "mkimage". The "plc" objective has been added to the new profile, but its nature has changed in fact and has become a copy of the "live" target, which became possible thanks to the implementation in primary initialization stage the transparent mount of the partition with the "alt-live-storage" label as a reflection of a packed file system with random access to the modification. In general, it made possible to create the fixed core of the firmware with the basic set of software environment with the size of 300MB and with the possibility of free expansion by installing the necessary packages from the distribution.

The Trinity was selected as the desktop environment because of the presence of background artefacts problem in conjunction with XOrgServer 1.10 + QT4, as well as because of TDE low-resource with high maturity and stability.

Archive of the build profiles of the new environment is called mkimage-profiles-6-kdesktop-plc.tgz, and the latest build of the firmware ALTLinux6-OpenSCADA_0.7.2-i586-plcUI_TDE-generic.flash.tar.

5. Flash and the creation of the PLC software environment for the ARM architecture

Widespread in embedded solutions the ARM architecture obtained due to its relatively high productivity coupled with low power consumption and cost. In order to perform routine task to provide the hardware multiplatform the OpenSCADA system was adapted to the building and operation on the equipment of ARM-architecture. Thus, the following projects were made Building the OpenSCADA project for the mobile devices of the Nokia company (N800, N900, N950) (RUS) and Building the 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 he problems of creating the OpenSCADA buildings and software environment firmwares as a whole for a variety of embedded ARM-architecture hardware.

Feature of the ARM architecture is the lack of a compulsory 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 use computing functions of OpenSCADA and other related libraries and software the performance of floating point calculations is very important. Feature of the ARM architecture processor 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 obsolete and met as a hardware implementation in the ARM cores up to the StrongARM family (ARMv4). XScale ARM core families (ARMv5TE) did not have math coprocessor. 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 appendix 1.

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 uses 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 filesystem 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 environment 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 the 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 a single board computer Chion-Pro270, the software environment creating and OpenSCADA building for the ARM architecture of which will be considered below.

5.1. Building tools for the Linux kernel and working environments for 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 other 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 exists.

5.1.1. BuildRoot

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 Further, it should be unpacked to the home directory of the simple user and the configuration, setup and building should be done:

The build process can cause following problems:

(+) This package should be downloaded separately and put to the directory "./dl" or "./output/dl".
(+) There is no single solution to this problem you must to understand the reason of the building of individual programs. Building error may be connected, 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}/"

5.1.2. PTXDist

Universal tool fro the building of kernel's, ToolChain and software environments based on Linux from the "Pengutronix" company. PTXDist is a powerful and flexible tool, but its 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 2003 year. However, newer versions of PTXDist support the old platforms, what can be learned from the support table by the link:

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

Now with more details using commands:

5.2. Tion-Pro270

Single Board Computer "Tion-Pro270" is a highly integrated computational-control system, based on the Marvell PXA270 processor with XScale ARM core from the ZEO company. This card was given to the developers of the OpenSCADA project by the Alex Popkov in order to adapt the OpenSCADA for it.

All materials on building the programming environment with OpenSCADA and ready builds for Tion-Pro270 board can be obtained at:

TionPro270 (344 )

The board is supplied by the equipment manufacturer with pre-installed software environment based on Linux or Windows CE . Besides all the source materials of the software environments are available in Wiki-resource of the manufacturer.

We got the board with the minimal software environment for which it was not possible to build OpenSCADA, so the new software environment has been fully loaded to the board. Download the software environment to the flash-memory was made with the help of JTAG-adapter OLIMEX ARM-USB-OCD and OpenOCD program of version 0.5.0, building of which should be configured with the "--enable-ft2232_libftdi" parameter.

For downloading to board's the flash memory it was used the ready boot buildings UBoot-1.3.3 (file if the image u-boot-1.3.3_svn886_520mhz_tion_pro270_64m.bin) and the kernel Linux- JFFS2 RFS filesystem image was built with the help of "BuildRoot" and "PTXDist", see below.

Flashing the equipment with the help of "OpenOCD" was made from the root by the following command:

$ openocd -f interface/olimex-arm-usb-ocd.cfg -f tion270.cfg

The "tion270.cfg" script of the flash and image files of the software environment specified in the flash script "tion270.cfg", should be placed in the current directory. The flash script "tion270.cfg" includes:

5.2.1. Building of the RFS in the BuildRoot

In order to avoid multiple build problems associated with the build from the beginning, the configuration "buildroot-2009.08" was taken directly from the Git-repository of the equipment manufacturer: 2009.08.git. In order to build in the "BuildRoot" environment the configurations were created in the directory "./package/ for the "LibGD" library and OpenSCADA.

The received RFS was loaded to the flash memory of the board and started successfully. However, at start it became clear that the "uCLibs" version does not implement the function clock_nanosleep(), as well as crashes in the function timer_settime() for the type of notification SIGEV_THREAD. The the clock_nanosleep() function can be replaced by nanosleep(), but it is impossible to solve the problem of the timer_settime() function within this version of "uCLibs".

Next, the image of the current version of the "BuildRoot" on 16.01.2012 was taken, and the building of OpenSCADA with "uCLibs" version were made. The building was successful after some adaptation of the building environment. OpenSCADA started up successfully with some problems that have been eliminated.

The following list describes the problems encountered during building and operation of OpenSCADA on uCLibC of different versions:

(+) the lack of the clock_nanosleep() function's implementation it is necessary to use the version >= 0.9.32 or to change it to nanosleep().
(-) crash in the timer_settime() function for the SIGEV_THREAD notification type Actual.
(+) The OpenSSL library "libssl" contains no dependence on the "libcrypto" the direct dependency on the "libcrypto" library is added to the OpenSCADA.Transport.SSL module.
(+) The family of printf() functions incorrectly circumvent the problem of hanging characters '%' line of the message is fixed "Last: %s. Load: %3.1f% (%s from %s)".
(+) Different from the GLibC processing of the interblocks within the single thread in the RW-lock functions - the interblocking is fixed in the OpenSCADA.UI.WebVision module, and the function of sessions' check is moved to the service call procedure.

5.2.2. RFS build in the PTXDist

Learning the PTXDist for the building the environment on TionPro270 was made using the experience of the following link However, the article was written a long time ago and it was used the ptxdist-1.1.1 version for building, which actually doesn't work on the modern software environments, and also part of the libraries needed for OpenSCADA can't be built there. The result was based on version ptxdist-2011.11.0 and the building was made using this version.

Before the building of RFS the ToolChain configuration for this board was created "arm-xscale-linux-gnueabi_tion270.ptxconfig" on the basis of the existing "arm-xscale-linux-gnueabi_gcc-4.6.2_glibc-2.14.1_binutils-2.21.1a_kernel-2.6.39-sanitized.ptxconfig" with the following programs' versions:

It was created PTXDist "OSELAS.BSP-Pengutronix-Generic" project's clone in the in the directory "TionPro270_RootFS" with the configuration platform "arm-qemu-2011.01.0". To build OpenSCADA the following configuration was created and openscada.make, which were placed in the local configuration directory of the project rules/. It was adapted the configuration of the udev program, which version was very big for the original version of the kernel Linux-2.6.22, ie it was used the udev of 141 version. New configuration files of udev were also placed in the directory rules/, thus defining their usage instead of the original configuration.

The RFS was successfully built and the the jffs2 image of FS was received. The resulting RFS was successfully loaded onto the board and started. OpenSCADA started up and work correctly as well.

5.2.3. Adaptation

This board contains a number of hardware interfaces interesting for the adaptation for OpenSCADA, so this section will be focused on adapting process.

The board contains a chip converting signal levels from RS232 to RS485, which, however, is not clear to send requests from the software. Namely:

To solve this problem the OpenSCADA module Transport.Serial has been finalized for this kind of hardware flow control support.

Using this extension, validation was made and the presence of LP-5141 controller's software environment problem was confirmed.

5.3. SMH2Gi

Freely programmable panel controller "SMH2Gi" is a highly integrated computational control system with the iMx27 processor based on the ARM926EJ-S core of the Segnetics company. Adaptation and build of the OpenSCADA for this controller was needed as part of the Automated control system for the vacuum process unit project.

All materials on building the programming environment with OpenSCADA and ready builds for the panel controller can be obtained at:

SMH2Gi (259 )

Panel controller is supplied by the equipment manufacturer with pre-installed environment based on Linux , and its own runtime of the controller - "SMLogix". The role of OpenSCADA for this controller was seen as enhanced programming environment of the controller, integrated and programmed from the top level station on the basis of OpenSCADA. To preserve the possibility of visualization and control of data obtained in OpenSCADA on the integrated display, while minimizing the effort required for the adaptation, it was decided to preserve the original runtime environment "SMLogix" for the task of data visualization on the internal display, and to transmit data to/from it via a local ModBus/TCP connection. Afterwards, to optimize certine tasks, there created a module of data source to OpenSCADA DAQ.SMH2Gi (RU) with functions for direct SMH2Gi modules MC and MR acquisition, and also for variables exchange with process "logix", by shared memory.

To build the original software environment the developer used previously discussed tools PTXDist of version 1.99.12. It was not necessary to build ToolChain, guessing the profile used to build the original software environment, because full building environment is available at the manufacturer's web site, packaged up as the Linux image for the VMWare virtual machine. The ready ToolChain profile was obtained from this image "gcc-4.3.2-glibc-2.8-binutils-2.18-kernel-2.6.27-sanitized". Since it was not required to build the full RFS, it was decided to build OpenSCADA, using the ready ToolChain, separately. To build OpenSCADA the following libraries were previously built: "pcre-8.12" and "sqlite-". Later, under building modules UI.WebCfgD (RU) and UI.WebVision (RU) task have built the libraries: "png-1.2.49", "jpeg-8a", "expat-2.0.1", "freetype-2.3.11", "fontconfig-2.6.0" and "gd-2.0.35". Then OpenSCADA was built the following way:

As a result, the archive of the the OpenSCADA build was formed, which can be loaded to the the panel PC SMH2Gi and unpacked there. The resulting OpenSCADA software environment is configured to start automatically when you start the controller through an init script "/etc/init.d/openscada". OpenSCADA build was successfully launched.

With regard to the software environment of the panel controller SMH2Gi in general it is necessary to make some remarks. The controller uses the Linux 2.6.29 kernel with the hard real-time extension that allows you to hold periodical intervals up to 100 microseconds. In addition, all critical system threads run with the real time planning management policy. In this case, although the processor does not have a math coprocessor, emulation is performed optimally in the form of SoftVFP. All this makes it possible for OpenSCADA to perform highly determinate control tasks at regular intervals up to 100 microseconds and with an acceptable computational performance.

5.4. AS-9260

Board AS-9260 is controller based on chip AT91RM9260, core ARM9(ARMv7), with peripheral devices set. The board targeted for development (maketing) projects based on microcontrollers with core ARM926EJ-S production by corporation Atmel, also that can be used for master controller of the target system.

AS-9260 (194 )

To the board placed sockets USB2.0 (1 Host, 1 Device, Full-speed, 12Mb/s), DBGU, RS-232, RS-485, two 12-pins sockets for placing Ethernet 10/100 Mbps interface module, besides that have place for set two 80-pins sockets type PLD-80 for connect external modules with additional interfaces.

The boards AS-9260 peripheral with processor AT91sam9260 are minimal:

Loader and kernel you can be found here To U-boot let's set loading RootFS from USB-flash:

The flash will format to FS ext2 and to it will write RootFS Debian Lenny. Run the system and configure the internet connection nano /etc/network/interfaces:

Into /etc/inittab let's set autologin:

Set repository for updating, into /etc/apt/sources.list

After upgrade let's download OpenSCADA sources and resolve dependencies. Natively compile SCADA fails by lack of memory. Some from the situation solutions are next:

The described method is far not the best then working to improve it. Similarly SCADA is installed to board AS-9200 with processor AT91RM9200.

5.5. Raspberry Pi

"Raspberry Pi" is singleboard computer created for charity purposes. Designed to teach basic computer science in schools, positioned as a low-cost solution for novice developers. Developed by "Raspberry Pi Foundation".

Raspberry Pi (257 )

This board has been given for building and adapting OpenSCADA from Lysenko Maxim. The board has features:

Hardware platform: ARM11 [ARMv6]
Central processor: Broadcom BCM2835, 700 (turbo-mode up to 1GHz)
Memory: 256 or 512 MB, integrated to CPU
Solid memory: flash card MMC
Video subsystem: integrated video core Broadcom
Audio subsystem: integrated to CPU
Chipset: Ethernet and USB: SMSC LAN9512
Electrical power: microUSB, 5 V, from 700 mA
Interfaces: HDMI, USB, video RCA, Stereo Jack 3.5 mm, Ethernet, UART, JTAG, SPI, I2C, DSI, CSI
Weight: 45 g.
Size: 85,6 × 53,98×17 mm

For working the board used special distributive Raspbian wheezy. Building OpenSCADA doing for LTS version and work version 0.8.1 direct on the board itself. For building had to expand swap memory size to 500 Mb due more memory need for some modules of OpenSCADA building by modern compiler (GCC 4.7) and with optimization (-O2). Got packages successfully install and operate.

Graphical desktop environment into selected distributive built on LXDE 0.5.5, displayed in full resolution of the display through HDMI, or in resolution 640x480 through composite video-output. OpenSCADA successfully start and work into graphical mode, but performance insufficient for normal dynamic models of OpenSCADA execution.

 (78 )

6. Appendix 1. Performance measurement for processing systems

Hardware Operation sin(Pi) [into JavaLikeCalc], us Operation pow(Pi,2) [into JavaLikeCalc], us Model AGLKS [Vision, main mnemo], %(core) Notes
Segnetics SMH2Gi (ARM926EJ-S, 400 MHz, SoftVFP, 199 BogoMIPS) 10.18 [15.4] 3.46 [10.7] - Last update: 31.10.2013
ICP DAS LP-5141 (PXA270, 520 MHz, FPA) 100 [200]* 51 [152]* -
ZAO ZEO TionPro270 (PXA270, 520 MHz, SoftVFP, uCLibC-, -Os, 519.37 BogoMIPS) 22 [51]* 14 [41]* -
ZAO ZEO TionPro270 (PXA270, 520 MHz, SoftVFP, GLibC-2.14.1, -O2, 519.37 BogoMIPS) 5.92 [8.26] 1.74 [4.08] - Last update: 30.10.2013
Nokia N800 (TI OMAP2420, ARMv6, 400 MHz, 397 BogoMIPS) 2.6 [8.1] 2.4 [8.9] - Last update: 07.11.2013
Raspberry Pi (BCM2708, ARMv6, 700 MHz) 1.15 [4.57] 1.28 [4.60] -
Nokia N900 (TI OMAP3430, CortexA8, 1 GHz, 998.16 BogoMIPS), N950 (TI OMAP 3630, CortexA8, 1 GHz) 0.90 [2.02] 0.552 [1.81] Last update: 02.11.2013
Asus Nexus7 II (Qualcomm Snapdragon APQ8064-1AA, Cortex-A15, 4Cores, 1.5GHz) 0.36 [1.3] 0.13 [1.15] 68 [>100] (1.50GHz)
Cyrix Geode(TM) (232 MHz) 7 [44]* 11 [52]* -
VIA Nehemiah (400 MHz) 2.9 [5.8] 2.4 [5.8] -
AMD K6-2 (504 MHz, 1008 BogoMIPS, BUS 112MHz) 1.136 [4.66] 1.602 [5.63] -
AMD Geode LX800 (500 MHz, 1000 BogoMIPS) 1.2 [2.95] 1.94 [3.76] -
VIA Nehemiah (667 MHz) 2.7 [5.6]* 2.4 [6.1]* -
Intel(R) Celeron(R) CPU 847 @ 1.10GHz 0.23 (0.675) 0.25 (0.76) 50 [64]
Intel(R) Atom(TM) CPU Z520 @ 1.33GHz 0.39 (1.14) 0.53 (1.12) -
Intel Atom N270 1.6 0.32 [1.0] 0.48 [1.24] 71 [85]
AMD Turion L625 1.6 0.19 [0.52] 0.20 [0.6] 36 [47]
Intel Core2 Duo T5470 1.60GHz 0.13 [0.44] 0.15 [0.5] 28 [35]
AMD Athlon 64 3000+ 0.15 [0.43] 0.16 [0.49] 23 [31]
AMD Athlon X2 3600+ 0.15 [0.42] 0.16 [0.46] 26 [32]
AMD Phenom(tm) 9600 Quad-Core 0.17 [0.45] 0.14 [0.35] -
Intel Pentium 4 3.00GHz 0.14 [0.43] 0.16 [0.48] 27 [37]
Intel(R) Core(TM) i3-3217U CPU @ 1.80GHz 0.105 [0.277] 0.148 [0.305] 21 [26]
AMD A8-6500 APU 0.0506 [0.128] 0,0275 [0.112] 22 [24] (1.70GHz)

 (2 Kb) 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 the math co-processor. The performance of math coprocessor is usually not directly connected with the performance and frequency of the processor core.

The measure method into the table above provides next:

  1. The time estimation for operation "sin(Pi)" and "pow(Pi,2)", into second and third columns. The operations selected for represent to estimate the co-processor performance and for overall real numbers manipulations. Value into square brackets characterizes overhead level on calculations into virtual machine of OpenSCADA and performance for integer calculations about the exemplary operations. I.e. main value characterizes performance of the processor into float point operations (mathematical co-processor or emulation), and into square brackets is the into integer operations (central processor). The measure method:
    1. ensure the central processor frequency stability, by way set the policy of the management to PERFORMANCE;
    2. start OpenSCADA without load, the project by default or with empty configuration, and within configurator UI.QTCfg, UI.WebCfg or UI.WebCfgD;
    3. open the function's object "sin()", and next "pow()", by module of mathematical functions library;
    4. go to tab "Execute", set "Enable", enter the argument's value for "X" to 3.14159265 and "Power" to 2 (for "pow()"), set number of executions to 1000;
    5. press "Execute" and get the execution time;
    6. perform the execution into several tries, pressing "Execute", and achieve to minimal value;
    7. fix the minimal value, which divide to 1000 and get main time value of the single execution into microseconds;
    8. go to the module object of (internal executions OpenSCADA (DAQ.JavaLikeCalc);
    9. create here the object of functions library "test", and into new function "test", which turn on;
    10. into tab "Program" enter the commands text "y=sin(pi)", and next "y=pow(pi,2)";
    11. go to tab "Execute" and do the same things into the list items "d."-"g.";
    12. the obtained result consider as auxiliary, into square brackets.
  2. The complex performance estimation, into fourth 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, capable for the model execute, and include graphical information output device (display), the visualization server execution case we will not consider. The main value of the processor load characterizes only the dynamical model of TP execution, but addition value appends forming and execution the graphical interface. The measure method:
    1. ensure the central processor frequency stability, by way set the policy of the management to PERFORMANCE;
    2. from desktop environment menu start the model AGLKS;
    3. start the terminal emulator, e.g., "konsole", where type "top", press Shift+H (for see the process at all) and Shift+P (sort by the processor load);
    4. read the values in the column "%CPU" against to the process "openscada", select to typical value for several updates and fix it as main value;
    5. return to window OpenSCADA and start the visualization environment, and next the project "AGLKS" interface.
    6. return to the terminal emulator and read addition value, like to the list item "d.".

The results you would send to electronic mail address for append to the table!

7. Appendix 2. PLC solutions

This section contains information about the PLC models actually built or planned to be so on the basis of the developed runtime and PLC firmware.

PLC components Price (DDP), $ Notes
CPU: Kontron MOPSlcdLX 430 AMDGeodeLX800(i686)-500MHz, 0-60C, 5W, Video
CPU: Diamond ATHM800-256A 1229 VIA Mark(i686)-800MHz, 256Mb, -40-85C, 10W, Video, 16AI, 4AO, 24DIO
CPU: Diamond ATHM800-256N 842 VIA Mark(i686)-800MHz, 256Mb, -40-85C, 10W, Video
CPU: Rhodeus RDS800-LC 414 AMDGeodeLX800(i686)-500MHz, -20-70C, 5W, Video
CPU: Helios HLV800-256AV 772 Vortex86DX(i486)-800MHz, 256Mb, -40-85C, 5.4W, Video, 16AI, 4AO, 40DIO
CPU: Helios HLV800-256DV 387 Vortex86DX(i486)-800MHz, 256Mb, -40-85C, 4.5W, Video
CPU: Tri-M VSX104 380 Vortex86SX(i486sx)-300MHz, 128Mb, -40-85C, 2W
MEM: DDR-SODIM-256M 15 for Kontron MOPSlcdLX
Flash Disk: Kontron chipDISK/1000-IDE 100 1Gb, 0-70C, read=3MB/s, write=5.7MB/s
Flash Disk: M-Systems MD1171-D1024 42 1Gb, 0-70C
Flash Disk: M-Systems MD1171-D256 22 256Mb, 0-70C
Flash Disk: M-Systems MD1171-D128 18 128Mb, 0-70C
Flash Disk: Diamond systems FD-128R-XT 82 128Mb, -40-85C
Flash Disk: Diamond systems FD-1GR-XT 168 128Mb, -40-85C
Box: PB-300-K 108
Box: PB-EAP-300-K 250
Box: CT-4 156
Power unit: MMEANWELL DR-4505 30
IO: DMM-16-AT (16AI, 4AO, 16DIO) 581 -40-85C
IO: DMM-32X-AT (32AI, 4AO, 24DIO) 689 -40-85C
RS485: EMM-OPT4-XT 396 -40-85C
RS232->RS485 10
CPU: LP-8381 974 AMDGeodeLX800(i686)-500MHz, -25-75C, 14W, 4GB flash (R/W: 8/4 MB/s), 8GB CF (R/W: 29/19 MB/s), 1GB SRAM, Video, 2xEthernet, 2xUSB, 3-slots, 2xRS-232, 1xRS-485, 1xRS-232/485
CPU: LP-8781 1025 AMDGeodeLX800(i686)-500MHz, -25-75C, 16W, 4GB flash (R/W: 8/4 MB/s), 8GB CF (R/W: 29/19 MB/s), 1GB SRAM, Video, 2xEthernet, 2xUSB, 7-slots, 2xRS-232, 1xRS-485, 1xRS-232/485
CPU: LP-8781-Atom 1438 IntelAtomZ520-1.3GHz, -25-75C, 18W, 8GB flash, 1GB DDR2, Video, 2xEthernet, 4xUSB, 7-slots, 2xRS-232, 1xRS-485, 1xRS-232/485
IO_BOX: I-87K9 155 IO box for 9 modules series I-87k accessible by DCON
IO: I-8017HW (8AI DE, 16AI SI) 230 Parallel bus, acquisition up to the 30 kHz
IO: I-8042W (16DI + 16DO) 121 Parallel bus.
IO: I-87017ZW (20/10AI) 209 Serial bus. Overvoltage support up to 240V.
IO: I-87019RW (8AI) 213 Serial bus. Additional surge protection, support for thermocouples and resistance thermometers.
IO: I-87024W (4AO) 204 Serial bus. Output of current and voltage.
IO: I-87026PW (6AI, 2AO, 2DI, 2DO) 215 Serial bus. Combined module.
IO: I-87040W (32DI) 121 Serial bus. Isolated.
IO: I-87041W (32DO) 109 Serial bus. Isolated. Watchdog function for communication.
IO: I-87057W (16DO) 82 Serial bus. Watchdog function for communication.
Segnetics SMH 2Gi
CPU: SMH 2Gi-0020-31-2 335 ARM9-200MHz, LCD-display, 1xRS-485, 1xRS-232, 2xUSB, 1xEthernet, 3DO
IO: MC-0402-01-0 (8AI, 4AO, 9DI, 10DO) 176 Single MC RS-485 serial bus.
IO: MR-120-00 (12DI[opt]) 92 Multiple MR RS-485 serial bus.
IO: MR-800-00 (8DO[rel]) 103 Multiple MR RS-485 serial bus.
IO: MR-810-00 (8DI[opt,~]) 82 Multiple MR RS-485 serial bus.
IO: MR-061-00 (6DO[sim,opt]) 84 Multiple MR RS-485 serial bus.
IO: MR-602-00 (6DO[rel], 2AO[opt]) 120 Multiple MR RS-485 serial bus.
IO: MR-504-00 (5DO[rel], 4AO[opt]) 120 Multiple MR RS-485 serial bus.

8. Links

Referring pages: HomePageEn/Using/Irkutsk

There are no files on this page.[Display files/form]
There is no comment on this page. [Display comments/form]