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 | 1289 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) :

  • Sumitomo AF-500 Cold Head
  • Sumitomo 71C Fusion Splicer
  • Sumitomo RDK-408S Cryocooler Cold Head
  • Sumitomo L3 Coldhead
  • Sumitomo F2CS-A25-119 Gearhead
  • Sumitomo US60125-GA AC Servo Driver SS6000
  • Sumitomo Type 39 Fusion Splicer
  • Sumitomo ANFJ-K30-SV-9 Planetary Gearbox
  • Sumitomo Heavy Industries JA761557BC RSC86-I Control Board
  • Sumitomo SA765604AX SA765603BC SXEX Servo Control Board
  • Sumitomo SumiDrill WDX2250D3S150 Drill
  • Sumitomo Type-66M12 Mass Fusion Splicer
  • Sumitomo Heavy Industries JA761557AC RSC86-I Control Board
  • Sumitomo JA761015CC RSC86 Circuit Board
  • Sumitomo T-72M12 Mass Fusion Splicer
  • Sumitomo TYPE-72C-KIT Core Aligning Fusion Splicer
  • Sumitomo CI-10/600-ADSD1-2 Power Supply
  • Sumitomo HF5202-3A7 Electronic Module
  • Sumitomo JA761015EC RSC86 Servo Control Board
  • Sumitomo TYPE-39 DCM Micro Core Fusion Splicer
  • Sumitomo JA761070HC AP-M Circuit Board
  • Sumitomo TYPE-400S T-400S Fusion Splicer Kit
  • Sumitomo TYPE-201E-VS Quantum Fusion Splicer
  • Sumitomo MC78IO Drive Power Module
  • Sumitomo 3-Phase Motor Gearbox 4kW 241RPM
  • CASE KRC10510 Hydraulic Swing Motor Sumitomo
  • Sumitomo HF4302-011 HF-430 Inverter Drive 11kW
  • Sumitomo SA765654BC SXIO-B Control Board
  • Sumitomo SDPH-018CHB PWM Amplifier Module
  • Sumitomo JA761070JC AP-M Circuit Board
  • Sumitomo HV960LC Local Control Board
  • Sumitomo T-71C+ Fusion Splicer Camera Y Focus Error
  • Sumitomo CH-210 Cold Head Cryo Cooler
  • Sumitomo Type-71C+ DCM Fusion Splicer
  • Sumitomo Type-65M12 Ribbon Fiber Fusion Splicer
  • Sumitomo T-502S Elite Fusion Splicer
  • Sumitomo T-72C+ Fusion Splicer
  • Sumitomo JA767632AC Circuit Board
  • Sumitomo Type-72C+ Core Alignment Fusion Splicer
  • Sumitomo CP5003 101AGG01 Sequencer I/F Board
  • Sumitomo T-37SE Fibre Fusion Splicer
  • Sumitomo Type-71C-KIT-PLUS Fusion Splicer
  • Sumitomo Type-72C HD Fusion Splicer
  • Sumitomo Type-72C+ Fusion Splicer FC-6+
  • Sumitomo Type-65M12 Ribbon Fusion Splicer
  • Sumitomo Type-72C+ Fusion Splicer
  • Sumitomo Type-39 DCM Fusion Splicer
  • Sumitomo Z1C Core Alignment Fusion Splicer
  • Sumitomo Type-71C DCM Fusion Splicer
  • Sumitomo T-72M12 Ribbon Fusion Splicer
  • ABB SACO 64D4 Digital Annunciator Unit 64-Channel Alarm System
  • EMERSON FloBoss S600+ P154 PRV Board 7381540 Prover Module
  • EMERSON FloBoss S600+ P155 PSU Board 7161550 Power Supply
  • EMERSON FloBoss S600+ P153 Front Panel 7181530 Display Keypad
  • EMERSON FloBoss S600+ P148 Dual Pulse Mezzanine 7181483 Module
  • EMERSON FloBoss S600+ P144 I/O Board 7281440 Analog Digital Module
  • EMERSON FloBoss S600+ P152 CPU Board 7381520 Main Processor
  • EMERSON FloBoss S600+ Base Unit 8176003 Flow Computer Chassis
  • Lauer PCS100FZ XX1.1031.SHX PLC HMI Operator Panel
  • Lauer Weber PCS095.S PG 195.203.3 Operator Panel HMI
  • Lauer Pcs Light PG 080.308.E Operator Panel HMI Console
  • Lauer Pcs Light PG 080.308.E Operator Panel HMI
  • Lauer PCS590p Pg 59X.000.0 PROFIBUS-DP HMI Panel
  • Lauer PCS095.1 095.408.A Operator Panel HMI
  • Lauer PCS009.m 109.203.1 Operator Panel PCS009
  • Lauer Pcs Light PG 080.308.F PLC HMI Operator Panel
  • Lauer Pcs 095.s 195.203.3 Operator Panel – Industrial HMI
  • Lauer LCA 200 (200-V02093) Starline Mini Operator Terminal – Compact HMI
  • Lauer PCS 110FZ Operating Screen – Compact Industrial Display
  • Lauer LCA200 022/581 Operator Terminal – Industrial HMI Panel
  • Lauer AST-150A Front Cover with Touch – Replacement Bezel for Industrial Panels
  • Lauer PCS8010 035/28B Operator Panel – Industrial HMI
  • Lauer PCS260FZ Membrane Keyboard Replacement
  • Lauer PCS plus MPI PCS090.m Operator Console
  • Lauer PCS 806 EEPROM Memory Module
  • Lauer VPC S95e 410 Control Panel System Controller
  • Lauer PG095.507.A Operator Panel PCS095 HMI
  • Lauer PCS8010 035/28B Operator Panel HMI Console
  • Lauer Pcs 810 Interface Module – 01676-B8 Communication Unit
  • Lauer PCS950 Keyboard – Replacement Keypad for Operator Panels
  • Lauer LCA200-V00880 Operator Terminal – Industrial HMI Panel
  • Lauer Pz 095 Operator Panel – PG095.507.A Branson Label HMI
  • Lauer PCS095 Operator Panel – PG095.408.A Industrial HMI
  • Lauer PCS095 Display Control Unit – PG095.508.B Industrial HMI
  • Lauer PCS009.S Membrane Keyboard – Replacement Keypad for Operator Panels
  • Lauer LHT-T100t-Ne Control Panel – V16-10-10 Industrial HMI
  • Rohwedder PQ1206 Control Panel – PCS095 PG 095.508.A HMI
  • Lauer 19557-D4 Text Display – Industrial Alphanumeric Terminal
  • Lauer PCS950 Control Panel PG950.103.0
  • Lauer VPC Monitor 112TE Industrial Display
  • Lauer PCS 609 Topline Micro Operator Panel
  • Lauer PCS110FZ PG1001 Operator Panel Control Console
  • KBA BAB50312 Operating Terminal – RGF 518297 Press Control Panel
  • Lauer 4x40 Alphanumeric Display – Industrial Text Terminal
  • Lauer PCS830-3 Operator Panel – Industrial HMI Terminal
  • Lauer PCS900 (900.202.6 / 060695) Operator Panel – Metronic Series Industrial HMI
  • Lauer PG095.507.A Operator Panel – Compact Industrial HMI
  • Lauer LCA 265 Text Display – Alphanumeric Control Unit
  • Lauer VPC S95e 410 V101.C Control Unit – VPC System Controller
  • Lauer PCS 200 Control Console – PG 200.011.4 Operator Panel
  • Lauer PCS 8010 Operator Panel – Industrial HMI Terminal
  • Lauer 047/00 Power Supply Module – Industrial DC Unit
  • Lauer PCS600FZ Operator Panel PCS Systems Control Console
  • Lauer LCA 265 Text Display Control Unit
  • Lauer WOP-iT X550tm 06539 Operator Panel HMI
  • Lauer AST-150A Cover with Touch 4PIN 251X322mm
  • Lauer 035/18F Systeme Lauer Operator Panel Display
  • Lauer LCA200 022/581 Text Display Console
  • Lauer PCS8110 035/38A Operator Panel HMI Console
  • Lauer 035/18F LS Systems Operator Panel HMI Display
  • Lauer MT212 USB Control Panel 24V DC 1A 15VA
  • Lauer PCS 810 System Communication Module – Industrial Network Interface
  • Lauer Pz 095 Operator Panel – PG 095.508.A Industrial HMI
  • Lauer 06134 Embedded Industrial PC – Compact Fanless Computer
  • Lauer EPC640TC Front Cover – Replacement Bezel for Industrial Panel
  • Lauer PCS 600 Euroterminal Control Panel – 00480-B3 Compact HMI
  • Lauer LCA 180 Text Monitor – Compact Alphanumeric Display for Industrial Control
  • Lauer VK212B.5.0.1.0.LAU VPC Control Panel – Industrial HMI
  • Lauer PCs090 Topline Control Panel – PG090.205.B Operator Interface
  • Lauer PCs 811 Interbus S Module – PG 811.000.3 Fieldbus Interface
  • BACHMANN IPC1410 Membrane Keypad – Replacement Switch Keyboard
  • Lauer LCA 640.1 Operator Terminal – Compact Text/Graphic Display
  • Lauer PCS 8010 Operator Panel – Versatile Industrial Terminal
  • Lauer AIO 110 C6FBXP openAutomation – All-in-One Industrial Controller
  • Lauer PCS009.S Membrane Keyboard – Replacement Keypad for Operator Panels
  • Lauer 035/18F LS Systems Power Supply – Industrial DC Module
  • Lauer PCS095.5 PCS095.417.A Operator Panel
  • Lauer WOP IT X 550KTC Mobile Panel – Wireless Operator Terminal