Welcome to the Industrial Automation website!

NameDescriptionContent
XING-Automation
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)

F: | Au:佚名 | DA:2023-11-21 | 1265 Br: | 🔊 点击朗读正文 ❚❚ | 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) :

  • Lauer PCS595 Business Mini Profibus DP Control Panel – Compact HMI with Fieldbus
  • LAUER PCS600 Operator Panel PG 600.105.2 – Compact HMI Terminal
  • Lauer LCA Terminal 640.1 – Advanced Operator Workstation
  • LAUER PCS807 Profibus-DP Module 24V DC 5.0VA – Fieldbus Adapter
  • SYSTEME LAUER PCS810.1 Interface Module – Communication Adapter
  • Lauer PCS090 Topline Operator Panel PG 090.204.9 – Compact HMI
  • LAUER PCS950 Rismat Label Operator Panel PG 950.100.6 – HMI Terminal
  • Lauer PCS609 Operator Interface Panel – Keypad Display Terminal
  • LAUER PCS095 Branson Label Operator Panel PG 095.508.A – HMI Terminal
  • Systems Lauer LCA 265 Text Display – Alphanumeric Operator Terminal
  • Lauer PCS-10TVD-102 Touch Panel – Smart HMI for Industrial Control
  • Lauer PCS595i Industrial Operator Panel – High-Performance HMI
  • LAUER PCS950 Operator Panel – Advanced HMI Terminal
  • Lauer PCS100FZ Control Console – Industrial Operator Station
  • Lauer LCA320.0 Industrial Controller – Compact Logic Module
  • Lauer PCS950.000.5 Control Panel PG 950.103.0 – Branson Compatible HMI
  • Lauer LCA Busline 320 Controller Module i01457 – Industrial Logic Unit
  • LAUER PCS095 Complete Controller Display – Graphic Operator Panel
  • Lauer PCS807 Profibus-DP Module PX 807.101.5BM – Fieldbus Adapter
  • Lauer PCS090 Topline Operator Panel PG 090.206.D – Compact HMI Terminal
  • Lauer PCS095 Branson Label Operator Panel PG 095.507.A – HMI Terminal
  • Lauer PCS009 Topline Micro Operating Terminal PG 009.204.1 – Mini HMI
  • LAUER AVTCE210.2 – Industrial Vision and Control Terminal
  • LAUER LCA 245 Text Display SU 245.100.1
  • LAUER PCS807 Profibus DP Module 807.101.5BM
  • Lauer PSC090 Topline Mini Operator Interface Panel – Compact HMI
  • Lauer EPC X 550 TC Embedded Industrial PC with Touch Panel
  • LAUER SYSTEME PCS-900 Operator Panel – Advanced HMI Workstation
  • Lauer PCS095.P PCS Plus Profibus DP Operator Interface – Control Panel
  • Systeme Lauer LCA 180 Text Monitor LD 180.004.1 – Industrial Text Display Terminal
  • LAUER PCS950C – High-Performance Process Control Station
  • LAUER SYSTEME LCA142 – Compact Industrial Controller and Logic Unit
  • LAUER SYSTEME PCS-810-1 – Industrial Panel PC and Control Terminal
  • ASML Right Field Detector 874-0084-002 – Light Intensity Measurement Module
  • ASML IPCB SEM-I-319 Interface Board 4022.636.58181 – VME I/O Module
  • ASML Temperature Sensor Assembly PT1000 4022.481.27732
  • ASML PCB FEI PHILIPS FIDT BD 4022.192.71178
  • ASML IR1-NIR Module 4022.639.86644 – Infrared Near-Infrared Sensor Unit
  • ASML Interface PCB 4022.192.72303
  • SVG Silicon Valley Group 99-54149-01 HMDS Refill Canister for ASML 90S DUV
  • ASML SVG 121-142F Controller Low-Spin Motor Developer
  • ASML 879-0054-002 PROTEUS 150SST Flow Switch
  • ASML 4022.654.97871 LM 4C LPSA Power Supply
  • ASML 28320 PCB Assy OCTU/UC 4022.192.9463
  • ASML 900470 System Interface Card 137285
  • ASML 130-127 PCB Artic
  • ASML 4022.471.76592 PCB-I-E-1391=9G24
  • ASML 4022.430.12256 PCB-I-E-1463=ZA09
  • ASML 879-0262-002 Shutter
  • ASML 4022.654.97872 LM 4C LPSA Power Supply
  • ASML SMC Pneumatic Valve Manifold Assy 4022.472.5315
  • Premium NP-0606 Power Supply 26V/6A for ASML 4022.476.01341
  • ASML PCB Card 4022.428.1023 PAS 5000/2500
  • ASML LISAF 3P Power Supply 4022.634.44801
  • ASML Red/635 Solid State Laser Module 635nm ELEC-I-1050
  • ASML SEM-I-1512 Controller Module 4022.639.02772
  • ASML Chuck QML/MSXLOD 879-0362-002 – Electrostatic Wafer Chuck Assembly
  • ASML SEM-I-737 Interface Module 4022.486.04121.HLN
  • ASML RH-PU-Mk3 Parker Power Unit 4022.631.24391
  • ASML Processor PCB Board PAS 5000/2500 7122.714.1800
  • ASML 4022.455.1103 Rotator Beam OR BS Assy
  • ASML Servo Test Box Frameless Monoset U20L0203
  • ASML 4022.428.1804 Processor PCB Board PAS 5000/2500
  • ASML 12456 Motion Control Board 4022.436.6467
  • ASML 37155 CCD Camera with Lens 4022.456.12463
  • ASML 4022.654.97873 LM 4C LPSA Power Supply
  • ASML 4022.635.04286 MF LS Purging Supply Assy
  • ASML 4022.636.53513 WH PA Interface Box Assy
  • ASML C2913 Cymer Lens 750A 4022.454.48131
  • ASML 4022.472.42622 IR2-FIR Solid State Laser Module
  • ASML 4022.437.20602 Green Laser Head & Controller
  • ASML 4022.651.46362 End Effector & RH Robot Gripper
  • BRONKHORST ASL-100F ASML 4022.666.71411 Mass Flow Controller
  • ASML 4022.471.88172 PAAC 450/20 PRODRIVE
  • ASML ATLAS Vacuum Regulator 4022.481.81953
  • ASML 4022.230.0438 PCB Card for PAS 5000/2500
  • ASML 4022.430.0109 Reticle Table Control PCB
  • ASML 4022.436.2451 Procesador Sello Arriba/Abajo PCB
  • ASML IIB Base 2 PCB Set 4022.436.8304 4022.436.8601
  • ASML 4022.472.62895 Power Supply Interface Module
  • ASML 4022.436.45028 PID Board
  • ASML 4022.671.23212 TCMA Thin Client Module MK2
  • ASML 0021-06148 TAB Clamp Ring Endura 5500 PVD
  • ASML 4022.192.9103 Interface PCB
  • ASML 4022.436.5298 Stepper Barcode Reader
  • ASML SVG 879-0794-001 Micrascan Axiom Assembly
  • ASML 54-125495A02 PC Compact Industrial ASMA003
  • ASML 4022.430.0098 PCB Card PAS 5000/2500
  • ASML 7122.714.1200.5 Processor PCB Board PAS 5000/2500
  • ASML 4022.428.14901 PAS 5000/2500 PCB Card
  • ASML Kay Neum F2 Valve Block PAS 2500 5000
  • ASML 4022.436.2451 Processor Stamp PCB PAS 5000 2500
  • ASML 4022.640.52821 IXL XP Module
  • ASML 859-8184-002 Viewing Power Select Panel
  • OZ OPTICS 4022.656.10963 Laser Module
  • ASML 851-0618-003 Stepper Library Brake
  • GF+ U1000 V2 ASML Ultrasonic Flowmeter 4022.669.98971
  • ASML 4022.636.73571 Zero Sensor Laser Box
  • ASML EO084D Shutter Socket PCB Card
  • PANalytical 402233010044 MPPC Power Supply Driver Unit
  • ASML 4022.631.26719 Load Port Module SEM-I-1310
  • ASML 4022.637.22711 Pneumatic Assembly
  • ASML 851-8942-001 Encoder Buffer PCB
  • ASML 859-0927-007 Lamp Power Compensation PCB Card
  • ASML 4022.639.86643 CDA IR1-NIR Solid State Laser 780nm
  • SVG ASML 28-43015-01 S90 Track CP Module
  • ASML 4022.471.75263 PCB Assembly
  • ASML 4022.637.22711 SEM-I-398 Controller Module
  • ASML 4022.651.32601 Control Module
  • ASML 4022.474.2568.1 Wafer Table Cleaning Stone
  • ASML 8764535001 Servo Test Box Frameless
  • ASML 4022.125.1083 Blade Drive PCB for PAS 5000/2500
  • ASML 4022.631.15821 VAT Mirror Assembly AI-2 193nm
  • ASML 16-006335D01 Motion Interlock PWB Assembly
  • ASML 851-0618-003 Stepper Library Brake
  • ASML 4022.454.8555 Stepper Barcode Reader
  • ASML 4022.664.25702 SEM-I-311 Controller Module Set
  • SVG Lithography ASML 859-0501-003 F Assembly
  • ASML 4022.486.71154 Control Module
  • ASML 4022.422.4644 Stamp Up Down PCB for PAS 2500/5000
  • ASML 4022.430.0524 PCB Card PAS 5000 2500
  • ASML 4022.430.0479 Shutter Encoder Line Driver PCB
  • ASML 4022.472.86252 Pneumatic Manifold Assembly
  • ASML 4022.470.5116.2 Zerosensor Laser Assembly
  • ASML 4022.437.07471 Power Control Module
  • ASML 4022.436.6467 Motion Control Board MSR AB53
  • ASML 4022.481.27732 Temperature Sensor JUMO RTD
  • ASML 4022.472.42622 850nm Laser Module IR2-FIR