Siemens PLC and PLC through Ethernet interconnection - Database & Sql Blog Articles

Brand AVX TPSE226M035R0125 Low impedance tantalum capacitor AVX 22
Electronic scale crystal oscillator 3.2*2.5mm 3225 16M (16.000MHZ) 12PF 10PPM 20PPM 30PPM
Single chip microcomputer STM32L151CCU6
L0504-Murata muRata common mode inductor 90Ω 150mA
SMD aluminum electrolytic capacitor

Currently, the communication methods used by Siemens S7-300/400 PLCs have increasingly shifted towards industrial Ethernet. Touchscreens like MP277/377 and xP177B now come with built-in Ethernet interfaces, which brings significant benefits. All devices are connected through a unified network, enabling easy access between the upper monitoring computer, programming device, PLC, and touch screen. Adding new devices is straightforward—just connect a switch to expand the network. This has made Ethernet communication more popular over time.

One of the key applications of Ethernet communication is interconnecting two PLCs. For example, when connecting two S7-300/400 PLCs, you need to add Ethernet modules such as CP343-1 or CP443-1, or use a PLC with a PN interface like CPU315-2DP/PN. To set up the connection, configure both PLCs within the same project, assign proper IP addresses, and open NetPro. Then, create an S7 connection on one PLC, select the other, and note the connection ID. One side acts as the client, and you should activate the "Establish an active connection" option. After configuring and downloading, you can proceed to program the communication logic.

In the OB1 block of each PLC, use FB12 (BSEND) for sending data and FB13 (BRCV) for receiving. Ensure that the data sent from 1#PLC matches what 2#PLC receives, and vice versa. When using FB12, parameters like REQ (trigger), ID (connection ID), R_ID (receiver ID), DONE (completion), SD_1 (start address), and LEN (data length) must be correctly set. If issues arise, check the configuration and ensure both sides are properly synchronized.

Using FB12 and FB13 can be complex, especially if the Ethernet modules don’t support bidirectional communication. In such cases, you can enable one-way communication in NetPro and use FB14 (GET) and FB15 (PUT) instead. These blocks simplify the process, eliminating the need to modify the existing system. Just download the updated configuration and program, and you’re ready to go.

Another important point is the difference between FB and SFB. While SFB is used for S7-400, FB is typically used for S7-300. This distinction can cause confusion, and I personally spent two days resolving it. It’s crucial to know which function block to use based on your PLC model.

WinLC, a software PLC running on a PC, offers a great alternative for testing without physical hardware. It's particularly useful when working with SCADA systems like Intouch or Ifix, where real-world testing is difficult. By copying the program to WinLC, you can test everything online, saving time and resources. Connecting WinLC to an S7-300 involves setting up a new project, configuring the hardware, and establishing an S7 connection in NetPro. Once the program is downloaded, communication between the software PLC and the actual PLC becomes possible.

When multiple PLCs are involved, integrating them with SCADA software via OPC might slow things down. To optimize performance, you can use WinLC to preprocess data from all PLCs before sending it to the SCADA system. This reduces the workload on the SCADA software and improves response times. Additionally, creating a simple OPC client using VB allows direct data reading and writing without the need for expensive SCADA packages.

Optical Mirrors

Optical Mirrors,Concave Spherical Mirrors,Elliptical Flat Mirrors,Silver Optical Mirrors

Danyang Horse Optical Co., Ltd , https://www.dyhorseoptical.com