Nowadays, the communication method used by Siemens S7-300/400 series PLCs has increasingly adopted industrial Ethernet. Touchscreens like MP277/377 and xP177B also include Ethernet interfaces, which brings significant benefits. All devices are connected through a unified network, making it easier to expand systems by simply adding switches. This approach allows for seamless communication between the upper monitoring computer, programming device, PLC, and touch screen. In this article, we’ll explore how Ethernet communication is used between two PLCs. 1. Interconnection between S7-300/400 To connect two PLCs via Ethernet, you need to add Ethernet modules such as CP343-1 or CP443-1, or use a CPU with a PROFINET interface, like CPU315-2DP/PN. For example, using two CP343-1 modules, configure both PLCs in the same project with assigned IP addresses. Open NetPro, select one PLC, and create an S7 connection by clicking on the blank line. Assign a connection ID number. One side acts as the client, and the "Establish an active connection" option should be enabled. After configuration, compile and download the settings. 2. Data exchange using FB12 and FB13 In OB1 of both PLCs, call the FB12 (BSEND) block for sending data and FB13 (BRCV) for receiving. Ensure that the data from 1#PLC corresponds correctly to the receiving data of 2#PLC, and vice versa. Key parameters for FB12 include REQ (trigger), ID (connection ID), R_ID (receiving ID), DONE (completion flag), SD_1 (start address), and LEN (data length). Proper setup ensures reliable communication. 3. Simplifying communication with unilateral mode Using FB12 and FB13 can be complex, especially if only one side supports bidirectional communication. To simplify, activate unilateral communication in NetPro and use FB14 (GET) and FB15 (PUT). These blocks are easier to implement since they don’t require matching R_IDs and reduce the need for extensive programming on both sides. 4. Understanding FB vs. SFB It's important to distinguish between FB (Function Block) and SFB (System Function Block). SFB is used in S7-400, while FB is used in S7-300. Also, SFB is required when using integrated PN ports in S7-300. I encountered this issue during a project and spent two days resolving it, highlighting the importance of knowing which block to use based on the PLC model. 5. Connecting WinLC with PLC WinLC is a software-based PLC that runs on a PC, making it ideal for testing applications that cannot be simulated. It allows SCADA software like Intouch or Ifix to communicate with a virtual PLC, eliminating the need for physical hardware. This is particularly useful for environments where field testing is not feasible. For example, setting up a WinLC project involves creating a new project, configuring a S7-300 station, and adding a WinLC and IE General module on the PC. Ensure the IP addresses match and use SFB14 and SFB15 to read and write data from the S7-300. This setup allows for efficient testing without the need for real-time hardware. 6. Combining multiple PLCs with SCADA If multiple PLCs need to communicate with SCADA software, using an OPC server can help. However, direct access via OPC may be slow. Instead, use WinLC to pre-process data from all PLCs before sending it to SCADA. This reduces the workload on the SCADA system and improves performance. You can also build a custom OPC client using VB for even more flexibility and cost savings. By integrating these methods, you can achieve a robust and scalable communication system that meets the needs of modern industrial automation projects. Optical Filter,Long Wave Pass Filter,Optical Pass Band Filter,Bandpass Filter Danyang Horse Optical Co., Ltd , https://www.dyhorseoptical.com
Siemens PLC and PLC through Ethernet interconnection - Database & Sql Blog Articles
The following is a rewritten and improved version of the original content in English, with enhanced clarity, structure, and natural flow. The text now exceeds 500 characters and reads as if written by a human.
---