Share this

Two methods for achieving PPI communication between two Siemens S7-200 PLCs

2026-04-06 05:59:24 · · #1

[ Abstract ] This paper describes two methods for achieving data exchange between two Siemens CPU226 PLCs, where one can control the output of the other, and the other can control its local PLC to achieve the same output. Both methods have been experimentally verified to be feasible. The paper will focus on the method using an instruction wizard.

Keywords: Two PLCs, PPI communication, master-slave communication, two implementation methods, instruction wizard

0 Introduction

Because of their high cost-performance ratio, long service life, and strong adaptability to harsh environments, Siemens 200 series PLCs are widely used in many industrial settings. In these applications, a common situation arises where two devices use the same Siemens 200 PLC, and some data exchange is required between them. For example, some solenoid valves require multiple units to be energized simultaneously to operate, which may necessitate controlling components of the other device. Therefore, discussing data communication between two 200 series PLCs is necessary and urgently needed in industrial settings.

1 Hardware Preparation

Two Siemens CPU226 PLCs; two network connectors, as shown in Figure 1. When using them, connect pins AA and BB of the two connectors with a twisted-pair cable. Both can be connected to the input ports, and the terminating resistor should be applied (switch to the ON position); one PC/PPI communication cable. If the computer does not have a serial port, a USB to RS232C cable is required, and the driver must be successfully installed on the PC before connecting to the PLC; one PC with programming software; and other components as needed.

2 Hardware Connection

Connect the power cords of both PLCs. Connect the two network connectors as described above. In Figure 1, connect the right connector (with the socket) to PORT0 of the master station. Note that this is important because different ports result in different instructions in the program. Connect the left connector to PORT1 of the slave station (this port selection is not mandatory). Connect the PC/PPI cable to the computer and the socket of the right connector, respectively.

2.1

Power on both PLCs, open the programming software, click "Communication" on the left, double-click and refresh. You will see both PLCs displayed, with station addresses 2 and 3 respectively. Select the PLC with station address 3, which is the one with the network connector plugged into PORT0, and confirm. Therefore, the PLC with station address 3 is the master station, and the PLC with station address 2 is the slave station.

3. Communication Test Content

This allows the input IB0 of the master station to be output on the slave station QB0, and conversely, it also allows the input IB0 of the slave station to be output on the master station QB0.

4. Two implementation methods

4.1 Programming Method

4.1.1 To understand the programming syntax, one needs to be familiar with the meaning of the TBL table and the meaning of the first byte flag in the buffer. The meaning of the TBL table, the format of the data area, and the meaning of the first byte of the buffer can be found in the references below or in the manual; they will not be repeated here. Table 1 defines each byte of the buffer.

4.1.2 The STL format of the program is shown in Figure 2 below. Due to space limitations, the ladder diagram is not included here. To view the ladder diagram, enter the following STL statements into the programming window and click "View" - "Ladder Diagram".

4.1.3 To understand that the program has already implemented the predetermined function, simply connect the 24V power supply for the sensor on the PLC to the IB0 input. You will see that when any of I0.0-I0.7 is input on the slave station, the corresponding Q0.0-Q0.7 output indicator lights on the master station will light up. When input is made on the master station, the slave station will also exhibit the same phenomenon, thus enabling communication between the two PLCs.

4.2 Command-guided method

4.2.1 The instruction wizard is one of the less commonly used programming methods. It provides guidance for three types of instructions: network read/write, PID loop, and HSC high-speed counter. The instruction wizard method is perfect for implementing communication between two PLCs. Once familiar with this method, the above functions can be achieved easily and simply. The steps of this method are explained in detail below.

4.2.2

Open the programming software, click "Tools"—"Instruction Wizard" to start the wizard. In the pop-up window, select "NETR/NETW"—"Next"—"Configure 2 Network Read/Write Operations"—"Select Port 0", do not name the subroutine or use the default name—"Configure Network Read Operation", as shown in Figure 3—click "Next Operation"—"Configure Network Write Operation", as shown in Figure 4—"Next"—you can use the suggested address, as long as it does not conflict with other addresses used in the program—"Finish". The configuration is now complete. You can see a subroutine "NET_EXE" appear in the program block, and the wizard symbol appears in the symbol table. Now you can call this subroutine in the main program window, as shown in Figure 5. Download the program to the main station and test if communication is working.

Figure 3 Configuring network read operations

Figure 4 Configuring network write operations

Figure 5 shows the main program calling a subroutine.

5. Conclusion

During the experiment, it was found that after the program was downloaded, the programming software could not monitor the program's execution. This is because PORT0 has been used for PPI master-slave communication. To monitor the program's execution, the cable can be unplugged (preferably after power is off) and plugged into PORT1. This will enable monitoring.

[ Author Bio ] Guan Zhijun

Contact Information: Technical Center, Shandong Shengli Steel Pipe Co., Ltd., Zhongbu Town, Zhangdian District, Zibo City, Shandong Province

Postal Code: 255082 Mobile: 13668630996 Email: [email protected]

Read next

CATDOLL CATDOLL 115CM Shota Doll Kiki (Customer Photos)

Height: 115cm Male Weight: 19.5kg Shoulder Width: 29cm Bust/Waist/Hip: 57/53/64cm Oral Depth: 3-5cm Vaginal Depth: N/A ...

Articles 2026-02-22