Module: | Siemens |
Name: | Siemens DAQ |
Type: | DAQ |
Source: | daq_Siemens.so |
Version: | 2.0.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 |
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 + 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 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.
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.
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).
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.
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.
Using this tab you can set:
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.
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:
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.
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:
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.
After a targeted search was found a few solutions of the problem of communication with industrial controllers of firm Siemens through various communication interfaces:
Firm's Hilscher driver for boards family CIF: cif2621.tgz
The patch for build driver for kernel Linux 2.6.29: lastkernels.patch