There are really no two bigger names in industrial automation than Siemens and Rockwell. Most of the work I’ve personally done over the years revolves around Rockwell Controllers or devices that work within the Rockwell Industrial Architecture. I’ve worked at Rockwell (actually Allen-Bradley), developed devices to work with Rockwell Controllers and implemented systems at Rockwell customer sites, so I’m pretty thoroughly versed in all things Rockwell including people, products and terminology.
But I, admittedly, don’t know much about Siemens. Since I’m new to Siemens and wanted to write an article about how to successfully deploy “mixed marriage architectures,” Siemens and Rockwell, I spent a lot of my time last month learning about Siemens, Siemens PLCs, and the various communications interfaces for those PLCs. What follows is the information I’ve gathered on Siemens PLC communication interfaces.
Overview
The SIMATIC portfolio ranges from small controllers for simple logic tasks to highly complex system solutions. You can get micro controllers, classic Programmable Controllers, PC Controllers, integrated HMI Controllers and Embedded controllers.
Data Table Organization
Every Programmable Controller vendor organizes its data table differently and it’s been a nightmare since day one. Every time you move from one PLC to another you have to learn the mnemonics of how the next controller structures its data table.
In the Siemens world, a data table is constructed from a set of defined types. The available types vary slightly from controller to controller while the number of data items is vastly different throughout the SIMATIC line.
Here is the list of typically supported data types for a Siemens PLC:
INPUT BIT (I) |
OUTPUT BIT (Q) |
TIMER (T) |
INPUT BYTE (IB) |
OUTPUT BYTE (QB) |
COUNTER (C) |
INPUT WORD (IW) |
OUTPUT WORD (QW) |
DATA BLOCK (DB) |
INPUT DOUBLE WORD (ID) |
OUTPUT DOUBLE WORD (QD) |
USER DEFINED TYPE (UDT) |
Elements of a data table are accessed by combining the mnemonic for the type with the offset into the data table for that type. IW502 is the 502nd Input Word in the data table while Q10 is the tenth Output Bit.
Communication Interfaces – Protocols & Communication Ports
There are a number of ways to access those internal data items of a Siemens PLC. As with everything else, some PLCs will support one mechanism while others may support two or more different mechanisms. The following sections describe the communications interfaces you may find on a Siemens Programmable Controller.
Serial Communications
Except for one or two models, serial communication is available through an add-on module for all Siemens controllers. The port connects the Controller to barcode readers, printers, operator interfaces and other SIMATIC Controllers. RS232, RS422 and EIA-485 standard (RS-485) can all be used.
Devices can be accessed using a variety of protocols including simple ASCII, Modbus RTU Master/Slave, 3964, and RK512. Modbus RTU, 3964 and RK512, are binary protocols that can be used with devices that need to exchange binary device data with a controller. These protocols can also be used for SIMATIC Controller to Controller communication.
MPI Communications
MPI is a multi-node network used for Programming and SIMATIC Controller to Controller communication. An MPI interface is integrated on CPUs of the modular SIMATIC controllers. There are no MPI interfaces on the S7-1200 and S7-1500.
MPI Communications are proprietary communications that S7 Controllers use to exchange data between each other and other Siemens products. MPI communications use S7 Basic Communication, S7 Communication and Global Data Communication.
The S7 Protocol is a proprietary protocol that facilitates the transfer of data from one Siemens controller to another. The S7 Protocol is a subset of Profibus DP and uses many of the same commands as Profibus DP. In fact, some users have tried to use S7 Controllers as nodes on a Profibus network. This configuration is not supported by Siemens and may not work properly. An adapter is recommended in those applications in which you want to connect the MPI port to a Profibus network.
There are a few off-the-shelf products from third party manufacturers that allow other kinds of devices to communicate on MPI channels.
Profibus DP
Profibus is a smart, sensor-bus technology. Profibus defines an RS485 serial physical layer with special drivers to obtain speeds as fast as 12MB. Slave devices on the system connect to a central controller, usually a SIMATIC S7 Programmable Logic Controller. Once connected, the S7 Controller sends outputs to these devices and receives inputs from them.
Profibus had two huge advantages over other sensor bus technologies. One is speed and the second is data size. 12Meg is really fast. Faster than most people need but generally automation engineers believe that when possible, it’s always best to go faster. Speed has its downside though and that’s cost. It costs more to go that fast. A special ASIC with the communications infrastructure on it (MAC – Media Access Controller) and special transceivers, cabling and connectors. All that makes Profibus devices significantly costlier.
The data size advantage over DeviceNet is significant. Profibus has a frame size of 244 bytes. That’s monstrous compared to 8 byte frames in CAN. Yes, DeviceNet has fragmentation but that eats up so much bandwidth it is hardly useable.
One of the things some people dislike about Profibus is the data representation. All Profibus devices look like a rack of I/O to the controller. That means that a device is a series of slots, each slot with a module in it and all sorts of different size modules. That’s easy for simple devices like I/O devices. You can simply decide that the first slot has a module that is a 16 bit Discrete Input device. The second is 8 bits of Discrete Output and so on. If you also have Analog inputs/outputs, you could set up the device using four slots and four modules. For other non-IO devices, that’s kind of awkward.
Profinet IO
Profinet IO is very similar to Profibus, but not Profibus on Ethernet. While Profibus uses cyclic communications to exchange data with Programmable Controllers at a maximum speed of 12Meg baud, Profinet IO uses cyclic data transfer to exchange data with SIMATIC Programmable Controllers over Ethernet. As with Profibus, a Programmable Controller and a device must both have a prior understanding of the data structure and meaning. In both systems, data is organized as slots containing modules with the total number of I/O points for a system equal to the sum of the I/O points for the individual modules.
Profinet IO uses three different communication channels to exchange data with programmable controllers and other devices. The standard TCP/IP channel is used for parameterization, configuration and acyclic read/write operations. The RT or Real Time channel is used for standard cyclic data transfer and alarms. RT communications bypass the standard TCP/IP interface to expedite the data exchange with Programmable Controllers. The third channel, Isochronous Real Time (IRT) is the very high speed channel used for Motion Control applications. IRT is implemented using a custom ASIC and is not the subject of this paper.
Profinet IO classifies devices into three types; IO-Controllers, IO-Devices and IO-Supervisors. IO-Controllers are devices that execute an automation program. IO-Controllers map IO data from Profinet IO devices into the process image of the controller. In Siemens S7 Programmable Controllers, I/O data, alarms and status data is mapped into the process image in much the same way it is done for Profibus devices. These data values are then available for use by the control program. IO-Controllers must support the following kinds of services:
- Cyclic Data Exchange - The exchange of data between IO-Controllers and IO-Devices
- Acyclic Data Exchange - The exchange of Configuration and Diagnostic data
- Alarms - Alarm data exchange from an IO-Device to an IO-Controller
- Context Management - Connection processing