Common Interfaces and Communication Protocols of Siemens PLC

Today, I will share with you some common interfaces and communication protocols of Siemens PLC.

The first major question: The difference between RS232 and RS485 interfaces

1. Physical structure of interfaces

1. RS232 interface:

One of the computer communication interfaces, the RS-232 interface typically appears in the form of 9 pins (DB-9) or 25 pins (DB-25). Generally, personal computers have two sets of RS-232 interfaces, commonly referred to as COM1 and COM2.

Common Interfaces and Communication Protocols of Siemens PLC

2. RS485

RS485 does not have a specific physical shape and is an interface adopted based on the actual engineering situation.

Common Interfaces and Communication Protocols of Siemens PLC

2. Electronic characteristics of interfaces

1. RS232: The signal level of the transmission level signal interface is relatively high (signal “1” is “-3V to -15V”, signal “0” is “3 to 15V”), which can easily damage the interface circuit chips. Additionally, because it is not compatible with TTL levels (0~”<0.8v”, 1~”>2.0V”), level conversion circuits are required to connect with TTL circuits. Moreover, it has poor anti-interference capability.

2. RS485: The differential signal logic “1” is represented by the voltage difference between the two wires as + (2—6) V; logic “0” is represented by the voltage difference as – (2—6) V. The signal level of the interface is lower than that of RS-232, making it less likely to damage the interface circuit chips, and this level is compatible with TTL levels, facilitating connections with TTL circuits.

3. Communication distance

1. RS232: The transmission distance of RS232 is limited, with a maximum standard transmission distance of 15 meters, and it can only communicate point-to-point, with a maximum transmission rate of 20kB/s.

2. RS485: The maximum wireless transmission distance of RS485 is 1200 meters. The maximum transmission rate is 10Mbps, and the maximum communication distance can be achieved at a transmission rate of 100Kb/S. Using impedance-matched, low-loss dedicated cables can achieve up to 1800 meters! Beyond 1200 meters, repeaters can be added (up to 8), bringing the transmission distance close to 10Km.

Common Interfaces and Communication Protocols of Siemens PLC

4. Support for multipoint communication

RS232: The RS232 interface allows only one transceiver to be connected on the bus, and does not support multi-station transceiver capability, so it can only communicate point-to-point and does not support multipoint communication.

RS485: The RS485 interface allows up to 128 transceivers to be connected on the bus. This means it has multi-station communication capability, allowing users to easily establish a device network using a single RS485 interface.

5. Differences in communication lines

RS232: Can use three-core twisted pair, three-core shielded wire, etc.

RS485: Can use two-core twisted pair, two-core shielded wire, etc. In low-speed, short-distance, and non-interference situations, ordinary twisted pairs can be used; conversely, in high-speed, long-distance transmission, dedicated RS485 cables (STP-120Ω (for RS485 & CAN) one pair of 18AWG) with impedance matching (usually 120Ω) must be used, and in environments with severe interference, armored twisted shielded cables (ASTP-120Ω (for RS485 & CAN) one pair of 18AWG) should be used.

Supplement: Since the transmission distance of RS232 is only 15 meters, what is its use? In fact, its application is very broad and can connect various devices, such as monitoring, upgrading, or debugging other devices, etc. Its function is quite similar to USB, and with the increasing popularity of USB ports, more devices that convert USB to RS-232 or other interfaces will emerge. Through the USB interface, more RS-232 devices can be connected, not only achieving higher transmission speeds, realizing true plug-and-play, but also solving the drawback that USB interfaces cannot transmit over long distances (USB communication distance is within 5 meters).

The second major question: Several common communication protocols

Before starting this question, we should understand a previous confusion I had.

The difference between RS485 and MODBUS:

RS485 is a physical interface, simply put, it is hardware. MODBUS is an internationally standardized communication protocol used for data exchange between devices from different manufacturers (generally for industrial purposes); the so-called protocol can also be understood as the “language” mentioned above, simply put, it is software. Generally, two devices transmit data through the MODBUS protocol: initially using RS232 as the hardware interface (i.e., the serial communication port on a regular computer); there are also RS422 and commonly used RS485 interfaces, which are used more frequently in general industrial sites due to their long transmission distance. The MODBUS protocol is divided into three modes: MODBUS RTU, MODBUS ASCII, and the later developed MODBUS TCP. The first two (MODBUS RTU, MODBUS ASCII) use serial communication (RS232, RS422, RS485) for their physical hardware interface. MODBUS TCP, on the other hand, is designed to keep up with the current global development trend, allowing everything to be connected via Ethernet or the Internet for data transmission. Thus, the MODBUS TCP mode was created, with the hardware interface being the Ethernet port, which is the network port commonly used on our computers.

Then we can understand the various communication protocols supported by S7-200 PLC through an image.

Common Interfaces and Communication Protocols of Siemens PLC

1. PPI communication: This is a communication protocol developed by Siemens specifically for the S7-200 series PLC. It is built into the S7-200 CPU. The PPI protocol is physically based on the RS-485 port and can achieve PPI communication through shielded twisted pairs. The PPI protocol is a master-slave protocol. The master device sends requests to the slave device, and the slave device responds; the slave cannot actively send information. The master communicates with the slave using shared connections managed by the PPI protocol. The PPI protocol does not limit the number of masters communicating with any slave, but in a network, the number of masters cannot exceed 32. The most basic use of the PPI protocol is to allow Siemens Step7-Micro/Win programming software to upload and download programs and communicate with Siemens Human-Machine Interface and PC.

2. MPI communication: MPI (multipoint interface) is the interface for SIMATIC S7 multipoint communication, suitable for communication between a small number of stations, often used for close-range communication between host computers and a small number of PLCs. By connecting the MPI programming port of the S7-300 or S7-400 CPU with the PPI communication port of the S7-200 CPU through Profibus cables and connectors, and also connecting with the programming port (MPI/DP port) of the host computer’s network card via Profibus or MPI cables, communication can be achieved. Of course, the network can also exclude the PC and only include PLCs. The communication rate of MPI is 19.2k to 12Mbit/s, but the maximum rate for the MPI network directly connected to the S7-200 CPU communication port is usually 187.5kbit/s (limited by the maximum communication rate of the S7-200 CPU). Up to 32 stations can be included in the MPI network, and the longest communication distance for a network segment is 50 meters (when the communication baud rate is 187.5kbit/s); longer communication distances can be extended through RS-485 repeaters. MPI allows master-master and master-slave communication, and each S7-200 CPU communication port can connect up to 4 devices.

MPI protocol cannot communicate with an S7-200 CPU acting as a PPI master; that is, when communicating between S7-300 or S7-400 and S7-200, the S7-200 CPU must not act as a PPI master. Micro/Win also cannot access an S7-200 CPU acting as a PPI master through the MPI protocol. The S7-200 CPU can only act as an MPI slave, meaning S7-200 CPUs cannot communicate with each other through the MPI network but can only communicate with each other through the PPI method.

Common Interfaces and Communication Protocols of Siemens PLC

3. Modbus was invented by Modicon (now a brand of Schneider Electric) in 1979 and is the first true bus protocol used in industrial sites worldwide. To better popularize and promote Modbus in distributed applications based on Ethernet, Schneider Electric has transferred ownership of the Modbus protocol to the IDA (Interface for Distributed Automation) organization and established the Modbus-IDA organization, laying the foundation for the future development of Modbus. In China, Modbus has become the national standard GB/T19582-2008. According to incomplete statistics, by 2007, the number of Modbus node installations had exceeded 10 million.

Modbus protocol is a universal language used on electronic controllers. Through this protocol, controllers can communicate with each other and with other devices via networks (such as Ethernet). It has become a universal industrial standard. With it, control devices produced by different manufacturers can be connected into an industrial network for centralized monitoring. This protocol defines a message structure that a controller can recognize, regardless of the network used for communication. It describes the process of a controller requesting access to other devices, how to respond to requests from other devices, and how to detect and log errors. It establishes a common format for message domain patterns and content. Modbus is a master/slave communication mode with a single master station. Only one master can exist on a Modbus network, while there can be multiple slaves.

Modbus has the following characteristics:

1. Standard and open, users can freely and safely use the Modbus protocol without paying licensing fees or infringing on intellectual property rights. Currently, over 400 manufacturers support Modbus, with over 600 products supporting it.

2. Modbus can support multiple electrical interfaces, such as RS-232, RS-485, and can also transmit over various media such as twisted pairs, fiber optics, and wireless.

3. Modbus frame format is simple, compact, and easy to understand. It is user-friendly and easy for manufacturers to develop.

S7-200 Modbus communication:

S7-200 only supports the Modbus RTU protocol and does not support the Modbus ASCII protocol;

4. ProfiBus communication

As one of the many fieldbus family members, ProfiBus is the most widely used fieldbus standard in the European industrial sector and is currently one of the internationally recognized fieldbus standards. ProfiBus belongs to the unit level, field level SIMATIC network, suitable for transmitting medium to small amounts of data. Its openness allows many manufacturers to develop their products that comply with the ProfiBus protocol, which can connect on the same ProfiBus network.

ProfiBus is an electrical network, and the physical transmission media can be shielded twisted pairs, fiber optics, or wireless transmission. It officially became the international standard for fieldbus in 1989. PROFIBUS is an international, open, device-independent fieldbus standard, with transmission speeds selectable in the range of 9.6kbaud to 12Mbaud, and when the bus system starts, all devices connected to the bus should be set to the same speed. PROFIBUS is widely used in manufacturing automation, process industry automation, and other fields such as building, transportation, and power automation. PROFIBUS is also a fieldbus technology used for workshop-level monitoring and data communication and control at the field device layer. It enables decentralized digital control and field communication networks from the field device layer to workshop-level monitoring, providing feasible solutions for achieving comprehensive factory automation and intelligent field devices.

Common Interfaces and Communication Protocols of Siemens PLC

5. USS communication

USS (Universal Serial Interface) is a communication protocol developed by Siemens specifically for drive devices, which has undergone continuous development and improvement over the years. Initially, USS was used for parameterization of drive devices, focusing more on parameter settings. It has been widely used in the connection between drive devices and operation panels, debugging software (such as DriveES/STARTER).

Recently, due to its simple protocol and low hardware requirements, USS has increasingly been used for communication with controllers (such as PLCs), achieving general-level communication control. (Note: USS provides a low-cost, relatively simple communication control method, but due to its design, USS cannot be used in situations requiring high communication rates and data transmission volumes. In these high-demand communication scenarios, real-time communication methods like PROFIBUS-DP should be chosen. When designing systems, this limitation of USS must be considered.

For example, if USS communication control is used for dozens of frequency converters in applications with high speed synchronization requirements (such as paper production lines), the results can be imagined.

Common Interfaces and Communication Protocols of Siemens PLC

All Siemens frequency converters come with an RS485 communication port. The PLC acts as the master, allowing up to 31 frequency converters as slaves in the communication link. Based on the address of each frequency converter or using a broadcast method, the required frequency converter can be accessed. Only the master can issue communication request messages, and the address character in the message specifies which slave to transmit data to. The slave can only send data to the master after receiving the master’s request message, and slaves cannot exchange data directly. Before using the USS protocol, the Siemens instruction library must be installed. The USS protocol instructions are found in the library folder of the STEP7—MICRO/WIN32 instruction tree, which provides 14 subprograms, 3 interrupt programs, and 8 instructions to support the USS protocol. When an instruction is called, one or more subprograms will be automatically added.

Common Interfaces and Communication Protocols of Siemens PLC

The basic characteristics of the USS protocol are as follows:

Supports multipoint communication (therefore can be applied on networks like RS 485)

Uses a single master “master-slave” access mechanism

A maximum of 32 nodes can exist on a network (up to 31 slaves)

Simple and reliable message format, allowing flexible and efficient data transmission

Easy to implement and cost-effective

The working mechanism of USS is that communication is always initiated by the master. The USS master continuously polls each slave, and the slaves decide whether and how to respond based on the received instructions. Slaves will never actively send data. Slaves should respond under the following conditions:

1. The received master message has no errors

2. And this slave is addressed in the received master message

(Content source from the internet, copyright belongs to the original author)
Disclaimer: If there are copyright issues, please contact for deletion!Neither individuals nor organizations bear any legal responsibility.
  1. Common Interfaces and Communication Protocols of Siemens PLC

Leave a Comment