OpenSCADAWiki: Home Page En/Doc/ Siemens ...

Home | Index | Changes | Comments | Users | Registration | Login  Password:  
 

Module "Siemens" of subsystem "Data acquisition"

Module: Siemens
Name: Siemens DAQ
Type: DAQ
Source: daq_Siemens.so
Version: 2.0
Author: Roman Savochenko, Maxim Lysenko (2009)
Description: Provides a data source PLC Siemens by means of Hilscher CIF cards, by using the MPI protocol, and LibnoDave library, or self, for the rest.
License: GPL

Contents

Introduction

The primary aim of creating the module is to provide support for industrial controllers of firm Siemens of series S7(S7-200,300,400). Historically, access to the controllers of the firm in the ProfiBus network is made only through its own communication processor (CP5412, CP5613, etc.) and the protocol S7. These communications processors and API to the protocol S7 are rather expensive, in addition to the drivers for the communication processors and S7 API are closed and are only available for the platform Intel + MS Windows (I met the information on opportunities to buy for Linux).


As an alternative to communication processors of the company Siemens, which allows you to fully work with the controllers of Siemens, is the range of communication products of firm Hilscher(http://hilscher.com), through the communications processors CIF of series PB(Profibus) and the library LibnoDave (http://libnodave.sourceforge.net).


Feature of the Hilscher products is completely open specification of the protocol of exchange with the communication processor, the unified driver for all cards CIF, the availability of drivers for many common operating systems(OS) and openness of the driver for OS Linux(GPL).


The basis of the module is the driver of version 2.621 of Hilsher, kindly provided by Hilsher in the face of Devid Tsaava for the 2.6 series kernels of OS Linux. Everything needed files to building are included in the module and it is don't needed to satisfy any special dependencies. The driver version 2.621 for the CIF cards is available for download cif2621.tgz.


The range of boards of CIF family of firm Hilsher and unified driver supports the widest range of equipment. To lay support all these features in this module without having all the equipment on hands, it is not possible. Therefore, the support of the equipment will be added on demand and availability of the equipment. As of version 2.0.0 module provides support for data sources on the network via ProfiBus or MPI by means of MPI protocol at the network speed of 9600Bod to 12MBod. In particular, supported and it is carried out check on the controllers of the Siemens company of family S7 (S7-200,300,400).


Library LibnoDave is an implementation of the MPI, S7, ISO-TSAP and others protocols by means of revers-engineering, that are used in interaction with the controllers of Siemens. The library supports many MPI and USB adapters, as well as ProfiNet. Communication processors firm Siemens, on platforms other than MS Windows, the library doesn't support. At this stage, module support the protocol ISO-TSAP (ProfiNet) through the library LibnoDave. Library LibnoDave fully incorporated in this module and does not require a special permit of any dependencies during building and in the performance.


 (2 Kb) Into the library LibnoDave presents hard-catches errors, which at all reproduced on a high loading, that causes to the process memory corruption and crashes into unexpected points. By this reason from version 2 of the module a process was started to rewrite need functions, and for now the ISO-TCP code rewrote and ready to use.


Also, the module implements the functions of the horizontal redundancy, working in conjunction with the remote station of the same level. In addition to the synchronization of the archives of values and archives of attributes of parameters the module implements synchronization of computational templates, in order to shockless catch of the algorithms.

1. Communication controllers CIF

CIF family card driver supports the ability to install up to 4 CIF boards. In order to control the availability of cards in the system and their possible configurations, the module provides a form of control and configuration of the CIF-cards(Fig. 1).


Configuration tab of CIF-boards. (78 Êá)
Fig.1. Configuration tab of CIF-boards.

Using this form you can verify the existence of communication processors and their configuration, and configure the network settings of PB ProfiBus in the form of addresses of communication processor and speeds of bus ProfiBus. In the other tab of the module(Fig.2) you can verify the presence of various stations in the network ProfiBus.


Monitoring tab of Profibus network.\n (67 Êá)
Fig.2. Monitoring tab of ProfiBus network.

2. Object of controller of the data source

To add a data source it is created and configured an object of controller in the system OpenSCADA. Example of the configuration tab of the object controller of this type is shown in Figure 3.


Configuration tab of the controller. (115 Êá)
Fig.3. Configuration tab of the controller.

Using this tab you can set:

3. Object of parameter of the data source

Given the high intellectuality of data sources in the face of industrial controllers of Siemens S7-200,300,400, the objects of parameter are executed on the basis of templates. This approach allows us to go beyond a rigid list of types of parameters, which limits the possibilities of the controllers, and provide users with the ability to build the necessary types of parameters independently or use the library of already been developed types of parameters (templates).


Accordingly, the module provides only one type of parameters — "Logical". Additional configuration fields of the parameters of the module (Figure 4) is the fields of selected template of the parameter.


Configuration tab of the parameter. (73 Êá)
Fig.4. Configuration tab of the object of parameter.

To configure a template of parameter it is made the appropriate tab. The contents of this tab is defined by the configuration of the template that is the corresponding link fields and fields of setting the constants are formed.


Types of links depend on the type of parameter in the template (boolean, integer, real and string) and the definition of link value(for the group of links). Definition of the group link in the template is written in the format: "{Name of the link}|{Offset in the database}|{Size of the value}", where:

Name of the link — Name of the group link. All links with the same name are grouped and shown as a link to the database or database with the specified offset.
Offset in the database — Name of the offset in the data block (DB). If only database in the configuration of the template is specified the offset will be specified for the parameter, but if in the configuration of the template the offset will be specified too, the both offsets are summarized together. This approach allows to access a variety of structures in single data block. DB number and offset you can set into decimal (3245) and hexadecimal forms (0xCAD).
Size of the value — Optional field that specifies a custom size of the value in the controller. The following sizes of types of values are provided:
Integer: — 1 byte(signed), 2 byte(signed by default) and 4 byte(signed).
Real: — 4 byte(float by default), 8 byte(double).
Boolean: — always one byte (with a bit through the point - DB1.10.1).
String: — 10 byte(by default) and 1-200 can be set.

An illustrative example of the overall process of the configuration of parameter form the template and to the values is shown in Figures from 5 to 8.


Example of the template with grouping. (97 Êá)
Fig.5. Example of the template with grouping.

Configuration tab of the template of parameter (69 Êá)
Fig.6. Configuration tab of the template of parameter

Configuration tab of template of the parameter with an indication of the parameters separately. (75 Êá)
Fig.7. Configuration tab of template of the parameter with an indication of the parameters separately.

The values of the parameter. (78 Êá)
Fig.8. Values of the parameter.

 (2 Kb) Module supports only the data blocks(DB) of the controllers addressing.


The module provides a special treatment of a number of attributes of the template:

4. Asynchronous recording mode

Standard recording mode for SCADA-systems interacting with the PLC, is the synchronous, because it allows to control the correctness of the conclusion of the record operation. However, in cases of recording multiple parameters at once and often, this approach is not justified in view of sending a multitude of small requests to the controller that overrides the PLC and has a large time interval. The solution is asynchronous recording of an adjacent values by means of the single block. This is supported by this module and it allows you to record all parameters immediately by the adjacent blocks of 240 byte. Read and write in this mode is performed by adjacent blocks with periodicity of survey of the controller.

5. Comments

After a targeted search was found a few solutions of the problem of communication with industrial controllers of firm Siemens through various communication interfaces:

Links

Firm's Hilscher driver for boards family CIF: cif2621.tgz
The patch for build driver for kernel Linux 2.6.29: lastkernels.patch
Report for the crash, LibnoDave specific: crash_20160127_0911.crash.gz


Referring pages: HomePageEn/Doc
HomePageEn/Doc/DAQ
HomePageEn/Doc/OpenSCADA060
HomePageEn/Function
HomePageUk/Doc/DAQ


 
There are 9 files on this page.[Display files/form]
Comments [Hide comments/form]