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

  • OMRON F300-DC I/O Image Processing Unit
  • FANUC A06B-0314-B002 AC Servo Motor
  • GC-S84 Programmable Controller Logic Module
  • PASABAN MONTELEC MTC3001-DC Drive Control PLC
  • Allen Bradley 100E460EJ11 Auxiliary Contactor
  • Bosch Rexroth 1070075337-101 Card Parameters
  • HMS Anybus AB7646-F Gateway Specifications
  • Bosch 062633-303401 CNC Servo PLC Card
  • TI 500-5023 Series PLC Power Supply
  • Siemens C98043-A7002-L1-12 Circuit Board
  • Omron E5CC-RX3A5M-000 Controller
  • CN-8032-L Profinet Network Adapter Module
  • Siemens 3TK2804-0BB4 Safety Relay Details
  • Toledo TTLM-2-1M I/O Load Module
  • NORIS A1-91 PLC Rack Board Specifications
  • Mitsubishi A3ACPUR21 MELSEC PLC CPU Module
  • Beckhoff EP7041‑3002 EtherCAT Box Digital Input Module
  • REER EOS2E 1053 EOS2R 1053 Safety Light Curtain
  • Mitsubishi Q80BD-J71BR11 MELSECNET/H Interface Board
  • Omron 3G3IV-B4220-EV2 VFD 400V 22kW
  • Allen-Bradley 96844671 1785-LT3 PLC-5/12 Processor Module
  • Pasaban MTC3001-DC Drive Control PLC Module
  • Omron CJ1M-CPU11 V4.0 PLC CPU Module
  • ABB CM579-PNIO B3 Communication Module
  • B&R X20 AI 4221 Analog Module
  • Siemens 6SY7000-0AC80 PLC Module
  • GE 531X300CCHAFM5 Control Card
  • AB 810-A15C Inverse Time Relay
  • WITTENSTEIN LP120X-MF2-20 Planetary Gear
  • Mitsubishi Kakoki E-01B-4130 PLC I/O Modules
  • ABB DSQC643 Safety Control Board
  • Siemens G26004-A2105-P100-2 PCB
  • OMRON F350-C10E Image Processing Unit
  • FUJI UG430H-TS1 HMI Touch Panel
  • Westronics CB100188-01 Rev F Board
  • Siemens 7MH4900-3AA01 Weighing Module
  • Gilbert & Nash Tracker 2000 Control Cabinet
  • OMRON CJ1M-CPU22 CPU Unit
  • OMRON F3SJ-E0625P25 Light Curtain
  • Siemens 3VA2340-5HL32-0AA0 Breaker
  • Mitsubishi Melsec A61P A2NCPU PLC System
  • Aeco 158-02 DSP-02 PCB Card
  • FUJI NP1PS-32R CPU Module
  • Siemens 6SL3040-1MA01-0AA0 Control Unit CU320-2 PN
  • Fuji RYE.75D PLC Driver AC Drive
  • Electro Cam PS-6144-24-P16M09-L-MB Programmable Limit Switch
  • Siemens C98043-A7001-L2-4 CUD1 Control Board
  • Pilz 312070 PSSu H PLC1 FS SN SD Safety Module
  • Siemens Plc42q4200atsn Circuit Breaker Fuse Box
  • GE Fanuc IC695ALG708-AB Analog Output Module Rx3i
  • Siemens 6SE7036-5GK84-1JC2 IGD8 Gate Driver Board
  • Charmilles 813078 852029 PLC PCB Robocut 2 CNC EDM
  • Siemens 6SL3130-1TE24-0AA0 Smart Line Module
  • Pasaban MTC3001-DC Drive Control PLC Module
  • Modicon AS-P890-000 Remote I/O Processor Power Supply
  • Siemens PXC100-PE96.A PXC Modular Controller
  • TOYO KEIKI P:CARD5 AVH-R YH-212 Industrial Control Card
  • Omron NS5-SQ00B-V2 HMI Touch Screen 5.7 Inch
  • Sciemetric SigPOD 1202-0H00 Data Acquisition Module
  • GE Fanuc IC693CPU331W CPU Module Series 90-30
  • Square D 8903SVO11V02 Lighting Contactor 200A
  • Beckhoff C9900-P224 Power Supply Unit 24V 10A
  • HSD PE323 PLC I/O Module
  • Pillar AB6406-11A Power Control Board
  • GE Fanuc IC693CPU331W CPU Module
  • FANUC A61L-0001-0072 LCD Monitor
  • AB 20D-D-011-A-0-EYNANANE Drive
  • AB 1785-L20B PLC-5/20 Processor
  • Siemens SIREC P/PA Recorder 7ND3021
  • Siemens D2E160-AH01-17 Fan Blower
  • Eaton 101073735-001 LEG Module
  • AB 1404-M605B-ENT Powermonitor 3000
  • OMRON CJ1W-MAD42 Analog I/O
  • Omron CJ1M-CPU13 V3.0 PLC CPU Module
  • Pe323 HSD PLC Module Industrial Controller
  • Pasaban MTC3001-DC Drive Control PLC Module
  • Mitsubishi R02CPU PLC Module MELSEC iQ-R
  • B&R X20DC2395 Digital Output Module 32 Ch
  • Hoffman A30N24ALP Enclosure with PLC Addons
  • Rieter PLC with RMC 24/5V 10 RMC188-1 RMC RIO-1
  • Allen-Bradley 1790D-TN4V0 CompactBlock LDX Base Block 4 AI
  • National Instruments NI 9242 Analog Input Module 4-Channel
  • ABB AO820 3BSE008546R1 Analog Output Module
  • Moeller XVC-101-C192K-K82 PLC
  • AB 440F-C4000P MatGuard Controller
  • AB 1692-ZRCLSS Protection Module
  • Schneider S48896 PLC Module
  • FANUC A02B-0303-C205 I/O Module
  • AB 1785-LT4 PLC-5/10 Processor
  • AB 1746-NO8V SLC 500 Analog Output
  • OMRON CQM1-TC001 Temperature Unit
  • OMRON R7M-A20030-S1 Servo Motor
  • Toshiba ST1500GXH24 IEGT Module
  • Infineon PEF22822F V2.2 IC ISDN Controller
  • Allen-Bradley 440R-D22S2 Guardmaster Safety Relay GSR
  • Allen-Bradley 1771-IJ PLC Encoder Counter Module TTL
  • Texa Industrie EGO16GT1B Wall Frame Air Conditioner PLC
  • Schleicher Master CPU UCH 2 High Speed PLC
  • Siemens 6FC5371-0AA10-0AA1 NCU 710.2 CNC Controller
  • Schneider TM221C40R Modicon M221 PLC 40 I/O
  • Mitsubishi FX3U-128MR/ES PLC Controller 128 I/O
  • Pepperl Fuchs KFD0-RSH-1.4S.PS2 Relay Module 24VDC
  • Schneider XBTGT2110 HMI Touch Panel 10.4 Inch
  • APPLIED MATERIALS 0100-03267 - CH FACILITY INTERFACE PRODUCER SE PCB ASSY
  • INFICON 921-250-G1 - FFS232 Fabguard Interface AMAT Endura
  • LEYBOLD 0730-01046 - TRUBOTRONIK CONV FREQ NT341 MC/MCT 208V CONTROLLER
  • APPLIED MATERIALS 0010-57168 - SENSOR BOX ASM 300MM 35013
  • APPLIED MATERIALS 0226-31128 - ASSY VERSION 4 SIGNAL LAMP PCB
  • SBS 0090-01220 - PCB CPU BOARD FOR 128-30000
  • AMAT - - ANODE BULK COPPER PELLETS FG01PLT
  • APPLIED MATERIALS 0041-26804 - SHUTTER DOOR DRIVE ASSY 0040-76764 32032
  • APPLIED MATERIALS 0040-75150 - FILLER CHAMBER 1 APF PRODUCER SE
  • AMAT 0190-33295 - GATE COMPL
  • Applied Materials 0010-09341 - Wafer lift precision 5000 AMAT
  • APPLIED MATERIALS 0190-32096 - VARIAN CONTROLLER ASSY E15006160 E11388030
  • AMAT 0090-00590 - ELECT ASSY 750W SERVO MOTOR
  • APPLIED MATERIALS 101294-01 - 550W Power Supply
  • APPLIED MATERIALS 0150-14869 - CABLE AMAT LOT OF 16
  • Applied Materials 0200-09830 - ESC Electrostatic Chuck Pedestal Ring
  • APPLIED MATERIALS 0021-89500 - BRKT SNSR UPPER FRAME HTF 16132
  • Applied Materials 0200-10555 - Quartz Baseplate with Baffle 0200-00715
  • APPLIED MATERIALS 0240-75851 - KIT 11.3" SOURCE INSTALL
  • Applied Materials 0040-22023 - Adapter 13" W/B Source
  • Applied Materials 0010-09416 - P5000 Etch Std 3 kW 13.56 MHz Match
  • AMAT - - System Electronics Interface Board assy
  • AMAT 0090-00836 - MOTOR ASSY ROTATION 300MM
  • APPLIED MATERIALS 0140-12304 - HARNESS ASSY MF REMOTE SIGNALS PRODUCE 13041
  • Applied Materials 9090-01168ITL - ESC Chuck Power Supply PX32J