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

  • 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
  • APPLIED MATERIALS 0020-24099 - insulator
  • APPLIED MATERIALS 0190-09764 - ZERO FIRING VARIABLE TIME BASE SCR POWER
  • APPLIED MATERIALS 0190-29887 - VERITY FL2006 FLASH LAMP 1007454 32453
  • APPLIED MATERIALS 0010-09348 - ASSY UNIVERSAL THROTTLE VALVE
  • APPLIED MATERIALS 0190-61486 - PRE-ALIGNER
  • APPLIED MATERIALS 0100-20000 - PCB ASSY 64 CHANNEL MUX 34246
  • Applied Materials 0090-07393 - RF Filter unit
  • AMAT 0040-89462 - FLANGE 6 PORT 300MM TITAN CONTOUR
  • APPLIED MATERIALS 0021-01421 - CHAMBER UPPER A-COAT M-DPS 32824
  • Applied Materials 0242-37433 - EMPAK 200mm Cassette Handler Retrofit Kit
  • APPLIED MATERIALS 0190-49999 - LINEAR ACTUATOR ASSY 32429
  • APPLIED MATERIALS 0020-63694 - COVER 300MM TITAN CONTOUR
  • APPLIED MATERIALS 0150-11135 - P3 MULTIZONE CTRL UNIT REV 002 11362100 1917
  • APPLIED MATERIALS 0240-01698 - KIT BAFFLE CLEAN PORT ULTIMA HDP-CVD
  • APPLIED MATERIALS 0040-03799 - MOUNTING PLATE CR SWILL
  • Applied Materials 0190-23562 - Newport 40000 Servo Positioning Controller
  • APPLIED MATERIALS 0090-08798 - ASSY EPM OVERSAMPLE INPUT CONTROLLER 28223
  • APPLIED MATERIALS 0040-32052 - WELDMENT BELLOW CATHODE DPSGECO 19601
  • APPLIED MATERIALS 0190-35712 - ASSY P-CHUCK 200MM CIP 99 0010-38437 35695
  • APPLIED MATERIALS 0021-39748 - BLOCKER PERF SILANE NITRIDE550 14762
  • APPLIED MATERIALS 3870-02323 - NOR-CAL VALVE PNEU INLINE 1" NW25 VIT-SEAL 12790
  • APPLIED MATERIALS 01-81911-00 - 8100 N ION TC CONTROLLER
  • APPLIED MATERIALS 0010-19137 - DEGAS LIFT & MOTOR ASSY 38924
  • APPLIED MATERIALS 0010-09978 - LAMP MODULE ASSY
  • APPLIED MATERIALS 0190-02362 - PCB ASSY MAINFRAME INTLK 1 RELAYS 32352
  • AMAT 0010-07017 - PCB ASSEMBLY LOWER PNEUMATIC BD
  • APPLIED MATERIALS 0010-75226 - ASSY THROTTLE VALVE 200MM ETCH DOWN STREAM 38918
  • APPLIED MATERIALS 0010-70345 - 0042-01927 Component
  • APPLIED MATERIALS 0010-07586 - ASSY HUB RADIANCE CHAMBER 33456
  • Applied Materials 0020-33882 - R2 Standard Cathode Insulating Washer
  • AMAT - - Pneumatic Door Assembly Desica Cleaner
  • APPLIED MATERIALS 3250-00041 - CNTNR DEIONIZER TANK SST HI TEMP W/RESIN
  • APPLIED MATERIALS 0190-E1370 - TWIN DETECTOR ASSY 38070
  • APPLIED MATERIALS 0040-13306 - INSERT LOADLOCK SLITVLV CORROSION RESISTANCE 15053
  • AMAT 0090-00334 - ASSEMBLY THROTTLE ASSY VALVE U-PLUG DIR DR DX 0040-32323
  • APPLIED MATERIALS 0100-02922 - DUAL GAS DETECTOR PCB CARD 0090-05327
  • APPLIED MATERIALS 0190-86001 - SICONI-PRODUCER INTERLOCK MODULE REV 2
  • APPLIED MATERIALS 0050-86832 - LINE VAC EXH WITH LKG CHECK PORT CH-B FAC
  • APPLIED MATERIALS 0270-02314 - FIXTURE BLADE CALIBRATION 300MM REV003
  • APPLIED MATERIALS 0040-20257 - ASSY LIFT HOOP 8" WIDE BODY CHAMBER
  • Applied Materials 0190-29890 - POWER SUPPLY BI-POLAR ISOLATED OUTPUT
  • AMAT 0040-89462 - FLANGE 6 PORT 300MM TITAN CONTOUR
  • APPLIED MATERIALS 0190-49999 - LINEAR ACTUATOR ASSY 32429
  • Applied Materials 0090-07393 - RF Filter unit
  • AMAT - - System Electronics Interface Board assy
  • APPLIED MATERIALS 0020-21225 - WEIGHT RING 300MM TITAN PROFILER
  • Applied Materials 0010-10436 - AC Distribution Assy
  • APPLIED MATERIALS 0120-90582 - SOLENOID DRIVE VACUUM CONTROL DRIVE PCB
  • Applied Materials 0190-18128 - Magentron Head Eto Mircowave Ultima
  • Applied Materials 0020-13067 - 300mm Lower Shield SIP TA Centura
  • Applied Materials 0010-29958 - Mainframe with Tenta cPCI Interlock Back Plane
  • APPLIED MATERIALS 0020-05681 - SUPPORT RIGHT 26 SLOT CASSETTE ENP
  • Applied Materials 0010-13321 - P5000 8Robot Assembly
  • AMAT 0190-23897 - SPECIFICATION EXMP SYNCNET STAND ALON
  • MKS 1350-01121 - 627A-13267 CAP-MAN 20-TORR VCO BARATRON
  • Applied Materials 0190-24484 - Assy REF Reader LF80 Serial w/o Aux RS232 5781
  • AMAT 0021-99235 - DISK SHUTTER ENCOREII TAN CENTER PIN ENDURA 2 300MM PVD
  • APPLIED MATERIALS 0190-24854 - MKS REV1.8 G4 PLUS 4-PORT UPA 300MM REFL
  • APPLIED MATERIALS 0040-21178 - BELL JAR
  • Applied Materials 0200-10555 - Quartz Baseplate with Baffle 0200-00715
  • AMAT 0010-35456 - CATHODE ESC DUAL HEATED ZONE ASSY 1AEF 0010-35507
  • APPLIED MATERIALS 0242-45447 - GASLINE HEATER CONTROL UNIT VAS104350-0237
  • APPLIED MATERIALS 0041-56144 - HEATER PEDESTAL ASSEMBLY ENP FCVD EDGE
  • Applied Materials 0010-00557 - HEAT EXCHANGER 0010-00506
  • AMAT 0150-10663 - CABLE 50 FT REMOTE RF RG393 COAXIAL
  • APPLIED MATERIALS 0041-26804 - SHUTTER DOOR DRIVE ASSY 0040-76764 32032
  • APPLIED MATERIALS 0190-33452 - CONTROLLER ASSY EXMP SYNQNET T008-0007 34803
  • APPLIED MATERIALS 0190-63631 - MKS MASS FLOW VERIFIER REV 003 MFVA-33168
  • AMAT 0040-82292 - GIMBAL SUPPORT 300 MM PROFILER
  • Applied Materials 0040-33998 - MXP+ Etch Liner Wall
  • Applied Materials 0090-76211 - CENTURA IOX WITH DUAL SERIP
  • APPLIED MATERIALS 0190-E1370 - TWIN DETECTOR ASSY 38070
  • UniOP eTOP40C-0050 - Color Touch Screen HMI
  • UniOP ETOP03-0046 - Operator Interface Panel
  • UniOp eTOP30 - Graphic Display HMI
  • UniOP ETOP307-U301 - Industrial Touch Terminal
  • UniOP eTOP507 - Operator Panel HMI
  • UniOP eTOP05-0045 - HMI Touch Screen Panel
  • UniOP eTOP05-0045 - HMI Touch Screen Panel
  • GRUNDIG NEA02 AES 0 PLC Card
  • Siemens 6ES7215-1AG40-0XB0 CPU 1215C
  • Power-One LKP 5744-9ER Converter
  • Merlin Gerin STR 58U Masterpact Trip Unit
  • Siemens G26004-A2105-P100-2 PCB
  • Siemens 6ES7 405-0RA02-0AA0 Power Supply
  • PILZ 312070 PSSu H PLC1 FS SN SD
  • Siemens 3RV2031-4WA10 Motor Switch
  • GE Fanuc IC693CBK001 PLC Module
  • Siemens 6FX2007-1AD03 MINI-BHG
  • Mitsubishi MELSEC A2ASCPU PLC System
  • PC PMC25.2-002 PLC Module
  • B&R X20CP1382 Programmable Controller
  • Siemens C98043-A7002-L4 PC Board
  • Fanuc A16B-3300-0057 PCB Board
  • Schneider LV430403 Circuit Breaker TM160D
  • ABB CI810B 3BSE020520R1 PLC Interface
  • Omron R88D-HT10 Servo Drive
  • Omron CS1G-CPU43H CPU Unit
  • Mitsubishi QD70D4 Positioning Module
  • Siemens 6FC5110-0BB04-0AA1 Sinumerik 840C CPU
  • Siemens 3RT5045-1AC20 SIRIUS Contactor 75kW
  • Siemens 3VA2340-5HL32-0AA0 Circuit Breaker 400A
  • ABB HBS01-CJC I/O MTUS SD Series Module