Module | Name | Version | License | Source | Languages | Platforms | Type | Author |
---|---|---|---|---|---|---|---|---|
Siemens | Siemens DAQ and Beckhoff | 4.5 | GPL2 | daq_Siemens.so | en,uk,ru,de | x86,x86_64,ARM | DAQ | Roman Savochenko Maxim Lysenko (2009) — the page initial translation |
Description | ||||||||
Provides for support of data sources of Siemens PLCs by means of Hilscher CIF cards (using the MPI protocol) and LibnoDave library (or the own implementation) for the rest. Also there is supported the data sources of the firm Beckhoff for the protocol TwinCAT ADS/AMS due it working with data blocks also.
|
The primary goal of this module was to support the Siemens S7 industrial controllers (S7-200,300,400,1200). Historically, access to the controllers of this company in the ProfiBus network is carried out only through its own communication processors (CP5412, CP5613, etc.) and its own protocol S7. The specified communication processors and APIs for the S7 protocol are quite expensive, besides, the drivers for the communication processors and the S7 API are closed, and also available only for the Intel + MS Windows platform (there was some information about the possibility of purchasing it for Linux).
As an alternative to communication processors of the company Siemens, which allows you to fully work with the Siemens controllers, is the range of communication products of the firm Hilscher, through the communications processors CIF of the series ProfiBus (PB) and the library LibnoDave.
Feature of the Hilscher products is completely open specification of the protocol of exchange with the communication processor, the unified driver for all CIF cards, 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 the version 2.621 of the firm Hilsher, kindly provided by Hilsher in the face of Devid Tsaava for the 2.6 series kernels of OS Linux. All files needed for the assembly are included in the module and it does not require special dependencies. The driver version 2.621 of the CIF cards is available to download here.
The CIF family boards of the firm Hilsher and the unified driver support the widest range of equipment. To support all these features in this module without having all this equipment in the hands is not possible. Therefore, the support of this or that equipment will be added as needed and the availability of the equipment. In version 2.0.0, the module provides for support of the data sources in ProfiBus or MPI networks, via MPI, at network speeds from 9600Bod to 12MBod. In particular, the controllers of the firm Siemens of the family S7 (S7-200,300,400) are supported and verified.
The library LibnoDave is an implementation, by means of revers-engineering, of the MPI, S7, ISO-TSAP and others protocols, those are used in interaction with the Siemens controllers. The library supports many MPI and USB adapters, as well as ProfiNet. Siemens communication processors, on platforms other than MS Windows, are not supported by the library. Through the library LibnoDave, at this stage, the module has support for the protocol ISO-TSAP (ProfiNet). Library LibnoDave fully incorporated in this module and does not require a special permit of any dependencies during building and in the performance. The LibnoDave library is fully included in this module and it does not require dependencies to be resolved both during assembly and execution.
The LibnoDave library code contains sophisticated bugs, those are mostly reproduced under heavy load and at the time of connections, which result in damage to the process memory and crashing in unexpected locations. In this regard, from version 2 of this module, the process of rewriting the required functions is started and the connection code of ISO-TCP is ready for 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 ProfiBus in the view of the PB address of the communication processor and speeds of the 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 the controller object of OpenSCADA creates and configures. An example of a configuration tab for a controller object of this type is shown in Figure 3.
Using this tab you can set:
The data acquisition module provides two types of parameter: "Logical (Prm)" and "Simple (PrmS)". Additional configuration fields of the parameters of this module are:
Given of high intelligence of the data sources, in face of the industrial controllers of Siemens S7-200,300,400,1200, the type parameter objects are executed on the basis of templates. This approach allows you not to be restricted to a rigid list of types of parameters, which also restricts the capabilities of the controllers, but to allow the user to create the required types of parameters independently, or to use libraries of earlier developed types of parameters — templates.
The additional configuration fields of the type parameters (Fig.4) is the selection field of the parameter template.
To configure the parameter template a corresponding tab is provided, the content of which is determined by the configuration of the template, that is the corresponding link fields and constant ones are created.
Siemens-DB end address writes in the form "(DB{N}|F).{off}[.[{tp}]{SzBit}]", where:
Examples of the end addresses:
The link types by default are determined by the parameter type in the template (Logical, Integer, Real, and String) and the definition of the link value (for group links). The definition of a group link in the template is written in the format "{LnkName}|{OffDB}[.{bit}][|[{tp}]{sz}]", where:
Examples of the link types:
An illustrative example of the general process of configuring a parameter from a template to values is shown in Figures from 5 to 8.
The module supports only the data blocks (DB) addressing of the controllers.
The module provides special processing of a number of attributes of the template:
Main page of configuration parameters of the simple type parameter is shown in Figure 9.
One attribute line in the parameter of the attributes list can be written as "(DB{N}|F).{off}.{tp}{SzBit}:{flg}:{id}[:{name}]".
Where:
Examples:
Line starting with the '#' character is considered as a comment and it is not processed.
In accordance with the specified attributes list, the acquisition and creation of attributes of the parameter are performed (Fig. 10).
The standard writing mode for SCADA systems, which interact with the PLC, is synchronous, because it allows you to control the correctness of the completion of the write operation. However, in the case of writing a set of parameters at once, such the approach is not efficient due to sending a lot of small queries to the controller that overloads it and takes a long range of time. Solving this problem is asynchronous writing of adjacent values by one block. This mode is supported by this module and allows you to write all parameters immediately by adjacent blocks of 240 bytes. Reading and writing in this mode are carried out by adjacent blocks with periodicity of the controller's polling.
Due to the support of the logical type parameters, it makes sense to provide a number of functions of the user API for calling them from the template of the logical parameter.
The object "Parameter" [this]
Name | Code | Example item(German) | Example item(English) |
---|---|---|---|
Data blocks | 132 | DB3.DBD4 | DB3.DBD4 |
Flags/Markers | 131 | MW4 | FW4 |
Input memory image | 129 | EB2 | IB2 |
Output memory image | 130 | AD8 | QD8 |
Timers | 29 | T2 | T2 |
Counters | 28 | Z2 | C2 |
Direct I/O | 128 | PEW4 | PIW4 |
System information of 200 family | 3 | ||
Data (V-memory) in S7-200 | 132 | VW1234 | VW1234 |
System flag area of 200 family | 5 | SMB0 | SFB0? |
Analog input words of 200 family | 6 | AEW0 | AIW0? |
Analog output words of 200 family | 7 | AAW0 | AQW0? |
IEC Timers | 31 | T2 | T2 |
IEC Counters | 30 | Z2 | C2 |
After a targeted search was found a few solutions of the problem of communication with industrial controllers of firm Siemens through various communication interfaces:
Some specific problems and their resolving about the communication with the Siemens PLCs:
Problem | Resolving |
---|---|
The connection is broken down by the PLC | The specified CPU slot of the PLC is wrong, try some other. |
The connection seems established but the data is not read from the PLC. | It looks like you are using S7-1200 which has different changes in the security policy:
|
Modules/Siemens/en - GFDL | March 2024 | OpenSCADA 0.9.7 |