From OpenSCADAWiki
Jump to: navigation, search
This page contains changes which are not marked for translation.

Constr.png The translation moving and actualizing

Freely programmable panel controller SMH2Gi of the firm Senetics
Begin: 10 (October) 2011
Customer: "Laboratory of vacuum technologies" (http://e-beam.ru), Vasily Grigoriev
Participants: Roman Savochenko
Description: 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 building of the OpenSCADA for this controller was needed as part of the Automated control system for the vacuum process unit project.
Materials: ftp://ftp.oscada.org/OpenSCADA/PLC/Segnetics-SMH2Gi

Segnetics SMH2Gi.png

The panel controller is supplied by the equipment manufacturer with preinstalled 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 save 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 certain tasks, there created a module of data source to OpenSCADA DAQ.SMH2Gi with functions for direct SMH2Gi modules MC and MR acquisition, and also for variables exchange with process "logix", by the 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-3.7.6.2". Later, under building modules UI.WebCfgD and UI.WebVision 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 in following way:

# Unpacking the toolkit
$ cd /opt
$ tar --lzma -xvf SMH2Gi-OSELAS.Toolchain.tlz
# Initialization the build environment
$ . /opt/OSELAS.Toolchain/enter_arm-v5te-linux-gnueabi.sh
# Move to the source tree OpenSCADA, configuration and build
$ cd /opt/OSELAS.Toolchain/OpenSCADA
$ ./configure --host=arm-v5te-linux-gnueabi --prefix=/usr --sysconfdir=/etc CXXFLAGS="-O2 -D_REENTRANT" CFLAGS="-O2 -D_REENTRANT" --disable-MySQL --disable-FireBird --disable-PostgreSQL --disable-SoundCard --disable-SNMP --disable-QTStarter --disable-QTCfg --disable-Vision --enable-SMH2Gi
$ make

As a result, the archive of OpenSCADA assembling was formed, which can be loaded to the panel PC SMH2Gi and unpacked there. The resulting OpenSCADA software environment is configured to start automatically when you start the controller through init-script "/etc/init.d/openscada". OpenSCADA assembling 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.