Welcome to the Industrial Automation website!

NameDescriptionContent
HONG  KANG
E-mail  
Password  
  
Forgot password?
  Register
当前位置:

Based on the S7-300/400 Ethernet module CP343-1 &CP443-1 Modbus TCP used in STEP7 Door (V6.0)

来源: | 作者:佚名 | 发布时间 :2023-11-21 | 775 次浏览: | 🔊 Click to read aloud ❚❚ | Share:

1 Overview of Modbus TCP communication

MODBUS TCP is a simple, vendor-neutral derivative of the MODBUS family of communication protocols for managing and controlling automation devices, and it obviously covers the purpose of MODBUS messages in the "Intranet" and "Internet" environments that use TCP/IP. The most common use of the protocol is for services such as PLCS and gateways connecting to other simple domain buses or I/O modules.

MODBUS TCP enables MODBUS_RTU to run on Ethernet. MODBUS TCP uses TCP/IP and Ethernet to transmit MODBUS packets between sites. MODBUS TCP combines Ethernet physical networking with the networking standard TCP/IP and data representation with MODBUS as the application protocol standard. MODBUS TCP communication packets are encapsulated in Ethernet TCP/IP packets. Unlike the traditional serial port mode, MODBUS TCP inserts a standard MODBUS message into the TCP message without the data checksum address.

1.1 Ethernet reference model for communication

The Modbus TCP transmission process uses Layer 5 of the TCP/IP Ethernet reference model:

Layer 1: The physical layer provides the physical interface of the device and is compatible with the commercially available media/network adapter.

The second layer: the data link layer, formats the signal to the source/destination hardware address data frame.

Layer 3: The network layer implements packets with 32-bit IP addresses.

The fourth layer: the transport layer, to achieve reliable connection, transmission, error checking, retransmission, port service, transmission scheduling.

Layer 5: Application layer, Modbus protocol packets.

1.2 Modbus TCP Data frame

Modbus data is transmitted over TCP/IP Ethernet and supports Ethernet II and 802.3 frame formats. The Modbus TCP data frame consists of three parts: packet header, function code and data. The Modbus Application Protocol (MBAP) packet header is divided into four domains. Total 7 bytes.

1.3 Port Number for Modbus TCP

(1) When PLC is used as Modbus server, Port 502 communication port is used according to default protocol, and any communication port is set in the Modus client program.

(2) When PLC is used as Modbus client, it is not necessary to set the local port number; If you want to specify a client port number, you are advised to start with 2000 to avoid conflicts with other communication protocols.

2 Overview of Modbus TCP communication on the S7-300/400 Ethernet module

This document applies to SIMATIC S7-300, S7-400 CPU with Ethernet module CP343-1 or CP443-1 software products. The instructions allow communication between S7-300, S7-400 systems with Ethernet modules CP343-1 or CP443-1 and devices that support the Modbus TCP protocol.

Data transmission is carried out according to the client-server principle. SIMATIC S7 can be used as a client or server during transfer.

2.1 Software and Hardware

When Modbus TCP commands are used in STEP7 software, the Modbus TCP CP instruction library needs to be installed before SIMATIC S7-300, S7-400 CPU with Ethernet module CP343-1 or CP443-1 can communicate with the communication partners that support Modbus TCP. As shown in Figure 2-1:

2.2 Modbus TCP CP V6.0 Software Option Package

When the software package is installed and integrated into Step7, you can find the block library, routines, and English manual in the corresponding directory of the Step7 installation file, as shown in the following figure. In the actual debugging process of the project, since the functions of the example program are relatively perfect, you can directly use the example program and modify the corresponding parameters according to the actual situation of the project. Can save a lot of parameter setting time.

3 Configure the Ethernet module as the Modbus TCP Server to communicate with the communication partner

The following uses the S7-300 single-site system and Modscan32 software as an example to describe how to configure the S7-300 single-site system as the Modbus TCP Server through the Ethernet module CP343-1 to communicate with Modscan32 as a Client.

3.1 Configuring Hardware

Create a new project (project name: MB_TCP_CP_V60) in STEP7.

3.2 Adding a TCP Connection

On the Hardware Configuration page, click "Configure Network" under Options to enter the network configuration page.

Next, select CPU, and in the table below, right-click and select "Insert New Connection" to add the TCP connection.

The communication partner is Unspecified and the connection type is TCP connection.

Select the local connection resource number (default ID=1) and PLC as the server. Note that "Active connection establishment" is not checked.

Click the "Addresses" page and set the local port number to 502.

3.3 Routine Description

Open the routine and copy all program Blocks (do not copy System data) from site SIMATIC 300 (Server) to the blocks of site SIMATIC 300 (1) of new project MB_TCP_CP_V60.

(1) Open OB1 and view the command "MODBUSCP"

The Modbus TCP command is invoked in the OB1 organizational block of the project,

The following are some pin descriptions (for other pin information, please see the instruction library manual) :

  • GE IM0094C Industrial Control Board
  • GE IC200PNS002-AB VersaMax PROFINET Scanner
  • GE F650BFBF1G0HI Feeder Protection Relay
  • GE TPR5616NRHC Protection Relay
  • GE D6P3KH Digital Protection Relay
  • GE F650BABF2G0HIS Feeder Protection Relay
  • GE F650BADF2G1HIR Feeder Protection Relay
  • GE F650BABF2G1HI6 Digital Bay Controller
  • GE Multilin 745-W2-P1-G1-H-I-A-R-E Transformer Protection Relay
  • GE 100BASE-T Industrial Ethernet Interface
  • GE Multilin 350-E-P1-S1-H-S-E-C-N-2E-D-H Feeder Protection System
  • GE F650MXCF1G1HI6 Bay Controller
  • GE MM300-GEHD2CAB Motor Management Relay
  • GE MMS35-621-1-00 Motor Management System
  • GE 100BASE-T Ethernet Communication Module
  • GE F650MFCF1G1HI6 Feeder Protection Relay
  • GE CK13BA300 Control Module
  • GE W2-P1-G1-H Industrial Control Unit
  • GE PIB315B Power Interface Board
  • GE 343L695VAGIRHC Multi-Function Relay
  • GE Multilin B90N05HKHF8NH6 Bus Differential Protection
  • GE ZX3SC0204N-930 Intelligent Control Module
  • GE PIB504 Process Interface Board
  • GE D20MX Remote Terminal Unit
  • GE T60UJ3HKHF8NH6 Transformer Protection Relay
  • GE ZG3SA02041-58S600X Motor Protection Relay
  • GE ZG3SA02041-58S Motor Protection Relay
  • ABB DSDX 452 L Remote Input Output Module
  • ABB RDCU-02C Drive Control Unit
  • ABB COMMANDER 350 Process Controller
  • ABB Tmax XT4S 250 Molded Case Circuit Breaker
  • DEIF MALLING 8027.90 Industrial Control Unit
  • DEIF DCP2-2410 Power Supply Module
  • DEIF FAS-2N Synchronizer
  • DEIF MALLING 827.54 Processor Module
  • DEIF DU-2/MKIII Display Unit
  • DEIF DRW-2 Reverse Power Relay
  • DEIF 827.4 Power Management Module
  • DEIF 1044220060F Mains Measurement Module
  • DEIF 1044220190G Remote Display Module
  • DEIF 1044220140C AGC 200 Display Module
  • DEIF BRW-1-NB Remote Display Unit
  • DEIF MALLING 827.52 Industrial Control Unit for Automation Systems
  • DEIF BRW-2 Industrial Relay Module for Control Systems
  • DEIF 1044220080D Power System Control Module Industrial Automation
  • DEIF 1044220100F Controller Module for Generator Control Systems
  • DEIF DU-300 Voltage Monitoring Relay Industrial Protection Unit
  • DEIF 1044220060F I/O Extension Module
  • DEIF 1044220150C Interface Module
  • DEIF GCU 100 Engine Control Unit
  • DEIF XDI144-DUAL Marine Indicator
  • DEIF 827.41 Multi-line 2 Processor Module
  • DEIF AGC 146 Automatic Genset Controller
  • DEIF 1044220080E MDR-2 Display Module
  • DEIF MDR-2 Multifunctional Digital Relay
  • DEIF 1044220070E PPU-3 Display Module
  • DEIF PPU-3 Paralleling and Protection Unit
  • Siemens 6SL3210-1SE21-8UA0 PM340 Power Module SINAMICS Drive System
  • Yaskawa JANCD-XCP01C-1 Servo Control Board with JANCD-XIF04-1 Network Interface
  • BRISTOL 396879-01-2 C Wave Micro PLC CPU with Ethernet Industrial Controller
  • OMRON SGDH-10DE-OY Servo Drive High Precision Industrial Motion Control Amplifier
  • OMRON FQM1-MMA22 PLC High Performance Motion Controller Module
  • Schneider PowerLogic P5F30 Protection Relay
  • ABB DSPC53 57310256BA/2 Processor PCB
  • ABB Jokab 2TLJ020070R1700 Eden Safety Sensor
  • Lenze HMI EL 105C 3351-1 2 Control Panel
  • Pilz PSEN op4-s-30-060/1 Safety Light Curtain Specs
  • Vacon NXI01055A2T0CSSA1A3AK00C6 AC Drive
  • Square D PowerLogic CM4250 Circuit Monitor
  • Siemens CPU314C-2PTP Simatic S7-300 PLC
  • Eaton E84BAN Communication Interface Module
  • Prosoft MVI56 PDP-MV1 Profibus Master Module
  • Kongsberg MEI 8100276 Multi I/O Interface Module Marine Control System
  • Kongsberg MD 22 TN Display Module Marine Control Display Unit
  • Kongsberg MSI 8100222 Multi Signal Interface Module Marine Control System
  • Kongsberg RDO-16 8100155 Digital Output Module Marine Control System
  • Kongsberg RAO-8 8100153 Analog Output Module Marine Control System
  • Kongsberg C2 8100182 Controller Module
  • Kongsberg dPSC 8100183 Digital Process Controller
  • Kongsberg SPBUS-HUB 600309 Process Bus Hub
  • Kongsberg Simrad BP413R 37960580 A PCB Card
  • Kongsberg RAi-10tc 8100161 Remote Analog Input
  • Kongsberg NL-290 KM-F Navigation Light Panel
  • Kongsberg RAI-16xe Remote Analog Input Module
  • Kongsberg dPSC 8100183 Dynamic Positioning Control Panel
  • Kongsberg NK-210 NU02 Control Panel
  • Kongsberg RAIC400 Remote Analog I/O Controller
  • Kongsberg Simrad SJS-01/02 Sonar Sensor Marine Detection System
  • Kongsberg RAo-8 Analog Output Module Marine Automation Control Module
  • Kongsberg MP 530 Operator Panel Unit Marine Control Interface System
  • Kongsberg PSO-P 8100334 Power Supply Unit Marine Automation Power Module
  • Kongsberg dPSC 8100183 Dynamic Positioning Controller Marine Control System
  • Kongsberg MP 8200 Processor Module
  • Kongsberg MP 8300 Multi Processor Board
  • Kongsberg MCU8625 Marine Control Unit
  • Kongsberg MP 5810 Multi Processor Board
  • Kongsberg DSU 001 Dual Slot Unit
  • Kongsberg RCU 510 Remote Control Unit
  • Kongsberg BS610 Battery Supply Unit
  • Kongsberg M410-10 Alarm Monitoring Panel
  • Kongsberg HMS 100 Hull Monitoring System
  • Honeywell TCF901 Gas Detector
  • Honeywell 9938R Relay Output Module Industrial Control Switching Module
  • Honeywell XL1000C1000 Building Automation Controller HVAC Control System
  • Honeywell S0762970 I/O Interface Module Industrial Automation Signal Module
  • Honeywell RM7850 Burner Control Module Industrial Flame Safeguard Controller
  • Honeywell IPC1100 Industrial Panel Computer Automation Control HMI System
  • Honeywell TDID72 Digital Input Module
  • Honeywell TCNT01 Control Processor Interface
  • Honeywell C300 Controller Process Automation
  • Honeywell 51304337-250 Redundancy Cable Assembly
  • Honeywell PAL 2053 Programmable Array Logic Board
  • Honeywell IOC2053 Input Output Card
  • Honeywell PAIH03 Analog Input Module
  • Honeywell IPC 621 Industrial Computer
  • Honeywell 05701-A-0301 Process Control Card
  • Honeywell 10302/2/1 Power Supply Module
  • Honeywell SPXCDALMTX4 Gas Detector Module Industrial Safety Monitoring Device
  • Honeywell PHAI01 Analog Input Module Industrial Automation Input Module
  • Honeywell 63AP3070 Pressure Transmitter Industrial Measurement Module
  • Honeywell P522AC Analog Controller Module Industrial Control System Component
  • Honeywell K2LCN-4 ControlNet Interface Module Industrial Communication Module
  • Honeywell M6184D1035 Proportioning Actuator
  • Honeywell PCF901 Pulse Control Interface Module
  • Honeywell 05701-A-0302 Gas Detection Control Card
  • Honeywell S0762970 Gas Chromatograph Replacement Part
  • Honeywell 80363975-150 Experion PKS Cable Assembly
  • Honeywell T901-P Terminal Block Assembly