Name: LP8x81 Start: November 2009 Version: 1.0.0 Status: GPL Members:Roman Savochenko Translator:Maxim Lysenko Description: The project is devoted to the creation of runtime of the PLC LP-8x81 of the ICP DAS company based on the OpenSCADA.
Introduction
Industrial controllers of the LP-8x81 family of ICP DAS company is the first product of the LinPAC series, which is built on the x86-compatible processor, the previous controllers of this family were based on the ARM processor. In addition to the x86 processors these controllers have significant resources of memory and disk space. All this allows to consider the controllers as the first candidate of the ICP DAS products for adaptation of the OpenSCADA as their runtime.
The reason for adapting OpenSCADA as runtime of the controllers of LP-8x81 family was the need for creation of the automatic control system (ACS) of the ball mill for the grinding of coal on the heat electropower station. The peculiarity of this process (TP) is the presence of specific requirements for the resources and functions of the controller with the small amount of parameters at the same time. Also the key factor was the limited funding. All these requirements are satisfied by the controllers of LP-8x81 family:
relatively low price;
sufficiently high performance of the PLC;
architectural and programmatic openness of PLC;
industrial version and extended temperature ranges.
The aim of this project was to create the runtime based on the OpenSCADA, as well as the firmware with Linux and OpenSCADA for the controllers of this family. There are following requirements for runtime and firmware:
support of modules of the family I-8000 in the OpenSCADA, including fast mode for fast analog input modules;
support of the functions of the spectral analysis in OpenSCADA;
inclusion into the firmware the Linux kernel with support for real-time timer of high-resolution, low latency and hard real-time expansion;
rebuilding the driver of the specific manufacturer's hardware for the required kernel;
formation of the packed firmware image for reliable work in the extreme conditions.
PLC LP-8x81
PLC (Fig. 1) is structurally made in a modular manner, where the modules are installed in the rack. Rack is combined with a processor module and can be 0, 3 or 7 slots for expansion modules. Expansion modules can be of two types, namely: modules of parallel and serial bus. Modules of the parallel bus (I-8x) are fast. Modules of serial bus (I-87x) are installed on the bus RS-485 interface and operate at the speed of 115000 bps over the DCON protocol. In addition to modules directly in the rack the controller can be expanded with additional racks with modules on the serial bus (I-87x) through the serial interface of the processor.
Fig. 1. PLC of the LP-8x81 series.
Processor of the controller has the following specifications:
CPU
AMD LX800 processor (32-bit, 500 MHz)
System memory
1 GB RAM
SRAM with dual power from the battery
512 ÊÁ (with storage for 5 years)
Flash
4 GB as IDE Master; Read: 8 MB/s; Write: 4 MB/s
EEPROM
16 KB
Data storage: 40 years; 1,000,000 cycles of erase/write.
CF card
8 ÃÁ (support up to 32 GB); Read: 29 MB/s; Write: 19, 13(233x) MB/s
64-bit Serial Number of the Device
Available
Double Watchdog timer
Available
VGA
640 x 480 ~ 1024 x 768
Ethernet ports
RJ-45 x 2, 10/100 Base-TX Ethernet Controller (Auto-alignment, auto MDI/MDI-X, LED indicator)
USB 1.1 (host)
2
COM1
Internal communication with the modules I-87K in the slots
COM2
RS-232 (RxD, TxD è GND); Not isolated
COM3
RS-485 D2+,D2-;self-tuning of the ASIC inside
COM4
RS-232/RS-485 (RxD, TxD, CTS, RTS è GND for RS-232, Data+ and Data- for RS-485); Not isolated
COM5
RS-232 (RxD, TxD, CTS, RTS, DSR, DTR, CD, RI and GND); Not isolated
Working temperature
-25 ~ +75 °C
The software based on OpenSCADA.
The original software is the Linux distribution with the graphical environment Gnome and the drivers installed for the specialized hardware. In addition, the environment includes the "C" compiler with LinPAC SDK, as well as the interpreter of Perl.
Given that the source distribution is unknown, which is used by the supplier, and as the consequence the ability to install additional software is not prescribed, then using of this environment as it is, firstly, difficult, and secondly, not comparable with the available hardware resources. Besides the original Linux 2.6.18 kernel is far from our requirements.
For these main reasons it was decided to create an entirely new program environment. The basis of this software is ALTLinux 5.1, the Linux kernel 2.6.29-rt-up and OpenSCADA 0.6.4.2. The selected kernel satisfies all requirements, and distribution ALTLinux 5.1 allows to build compact firmwares for the necessary requirements.
Choose of the new environment has put the fact that, there is no source code for the specific hardware driver of the vendor. This problem was solved in conjunction with the developers of the original software environment, which have agreed to adapt and build their own driver under the right Linux kernel. Archives of these modules are available here.
To implement the support of controllers LP-8x81 series equipment and modules of I-8000 series it was created the module DAQ.ICP_DAS for the OpenSCADA system. The module provides the OpenSCADA system with support of various equipment from ICP DAS through company's API library libi8k.a.
Firmware of software was created in accordance with the instruction here. In addition to the standard materials the package was created with the files necessary for the Controller LP-8x81 - kernel-modules-icp-rt-up-1.0.0-alt1.2.src.rpm. In addition the profile of the firmwares' building was adapted for the building for LP-8x81.
In the process of software testing, it was found that the standard network controller's driver "via-rhine" is not working correctly: there is the significant speed decreasing of the network after normal working in the period from days to weeks. The problem was solved by the building the driver "rhinefet" from VIA.
The firmware build for LP-8x81 was eventually grounded on packages base of distributive "ALTLinux T6" with saving Linux kernel 2.6.29-rt-up, and this allow:
To use new function of "propagator" (the system of preliminary hardware initialization, found and load from FS image) found/create partition EXT2/3/4 with label "alt-live-storage" for modifiable "root" partition forming. This function provide full opportunity for addition packages install direct from the distributive repository, and also updating for packed to firmware packages, exclude kernel and some system services.
To add the opportunity for create firmware as combined ISO-image, which you can (besides writing to CD/DVD) direct, with utility dd aid, write to USB-flash, HDD, SSD and get work environment with partition "alt-live-storage", reflecting "root", on free disk space.
Conclusion
As the result it has been obtained and put into operation the firmware of software which satisfies all the requirements. Currently, this software works on the three controllers LP-8781 and serves as:
rapid data acquisition from the vibration sensor on two channels at a frequency of 5 kHz;
spectral analysis of vibration sensor's signals and the formation of the level of ball mill for two channels;
acquisition and delivery of data on the 18 analog and 32 discrete channels of general purpose;
computation of two tasks with general purpose algorithms for control of the mills (period 500 ms);
computation of two tasks with high speed control algorithm (period 100 ms), for the tasks of impulse control;
service of the requests from the upper level (two redundant OpenSCADA station).