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 | 341 次浏览: | 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) :

  • Honeywell TK-IAH161 - 1PC ANALOG INPUT New Shipping DHL or FedEX
  • Honeywell PX45A - "8 Points/mm (203dpi), Rewind, LTS, Disp. (Color), RTC, Ethernet,"
  • Honeywell 51309276-150 - / 51309276150 (NEW NO BOX)
  • Honeywell 82408217-001 - / 82408217001 (NEW NO BOX)
  • Honeywell BK-G100 - Elster U160 Gas Meter DN100 #3485
  • Honeywell MIDAS-M - 1PC MMC-A2U20000 Detector (DHL or FedEx) #H254CC YD
  • Honeywell 621-9938R-RP - Serial Input/Output Module 22572 Vr 3.2 94V-0
  • Honeywell U2-1018S-PF - NEW flame detector DHL Fast delivery
  • Honeywell TK-PRR021 - 51309288-475 redundancy module
  • Honeywell 50129828-003 - Temperature Transmitter
  • Honeywell 3151080 - RING SET P/N (HONEYWELL) NS COND # 11344 (4)
  • Honeywell 4DP7APXPR311 - CIRCUIT BOARD
  • Honeywell MG-818 - Symbol Generator P/N 7011675-818
  • Honeywell TC-IAH161 - NEW PLC Module One year Warranty#XR
  • Honeywell 51304800-100 - 30731808-004 Regulator Card REV B
  • Honeywell MU-FOED02 - UCN EXTENDER PN:51197564-200 REV F
  • Honeywell MC-PAIL02 - 51304907-100 Specii Input/Output Module Rev E
  • Honeywell SPS5713 - 51199930-100 NSMP
  • Honeywell XS858A - Mode S Transponder 7517401-960 Removed Working
  • Honeywell SK-5208 - Fire Panel Maintenance Service 6MonWarri UPS Express SK5208 Zy
  • Honeywell 51403422-150 - NEW HDW COMM CTRL CONTROLLER
  • Honeywell IBI-AD - Yamatake- 82407390-001/ 82408215-001 PCB Card
  • Honeywell 51401635-150 - / 51401635150 (USED TESTED CLEANED)
  • Honeywell ANT67A - TCAS Antenna 071-01548-0100 w/ March 2024 Overhauled 8130
  • Honeywell TC-IAH161 - NEW PLC Module One year Warranty
  • Honeywell 620-3632C - CPU. . (UK And EU Buyers Read)
  • Honeywell PX45A - "12 Points/mm (300dpi), Rewind, LTS, Disp. (Color), RTC, Ethernet"
  • Honeywell K4LCN-4 - 51402755-100 Processor Card Rev: F 51305099-100 B
  • Honeywell 2001-400-150-126-200-20-100001-1-0-00 - REPAIRED PNEUMATIC ACTUATOR
  • Honeywell GGSI - 51401914-100 HDW B FW A R400 51400996-100 Rev C PLC Board Module
  • Honeywell 184637 - TRANSDUCER P/N (HONEYWELL) NS CONDITION #12517
  • Honeywell WEB-600E - Network Controller Via DHL or FedEx
  • Honeywell 620-0073C - / 6200073C (USED TESTED CLEANED)
  • Honeywell 05704-A-0144 - / 05704A0144 (NEW NO BOX)
  • Honeywell RI-406 - P/N 4026206-940 (Sperry) Instrument Remote Controller
  • Honeywell AAU-32/A - ALTIMETER ENCODER P/N 99251-3252011-0101 REP TAG # 12197
  • Honeywell T-1204-1174 - 51304907-100 Spcii I/O Module
  • Honeywell TK-PRS021 - Control Processor Expedited Shipping TKPRS021 Spot Goods Zy
  • Honeywell MU-TD0D13 - 51304650-100 / MU-TDOD13 Digital Output FTA SS Relay Rev. H
  • Honeywell STD810-A1HC4AS-1-A-AD0-11S-A-00A0-00-0000 - NSMP
  • Honeywell PI000-05076 - "target, M2000 sputtering, 59.5Ti/.5CU, 4.460X11.64X13.050, "
  • Honeywell 51401286-100 - / 51401286100 (NEW NO BOX)
  • Honeywell MIDAS-M - 1PC MMC-A2U20000 Detector (DHL or FedEx)
  • Honeywell CC-PDIL01 - 1PCS PKS DI 24V IOM 51405040-175() /PL3
  • Honeywell TK-PRS021 - 51404305-375 NSNP
  • Honeywell STR93D-21C-1K0AFCAA21A0-A1,CC,F8,FC,FF,MB,TG,W2,3H-XXXX - NSMP
  • Honeywell 9437310 - Measurex - - MxOpen UAP (Unitec Applications Processor)
  • Honeywell 51305552-100 - / 51305552100 (USED TESTED CLEANED)
  • Honeywell 97350 - Target /BP Assy .25 IN TI 5N AMAT Endura Applied Materials New
  • Honeywell 51305508-200 - / 51305508200 (NEW NO BOX)
  • Honeywell U2-1018S-PF - Brand New Expedited Shipping
  • Honeywell 2MLR-AC22 - "Masterlogic-200 ,2MLR-DBSF,2MLF-AD4S Rack Modules"
  • Honeywell 2075252-D2 - Enraf PCB XPU1 + Display Mount 2558 584-1
  • Honeywell MC-PAIL02 - 51304481-150 Low Level Analog Input Module FW: K
  • Honeywell 51304493-200 - PM Modem Card Rev.K
  • Honeywell C7012F1052 - Flame Detector Expedited Shipping UPS Express GQ
  • Honeywell WA800 - Radar Antenna MI-585353 w/ May 2024 Inspected 8130
  • Honeywell W7704D-1016 - / W7704D1016 (NEW IN BOX)
  • Honeywell VE4100B3000 - Brand NEW gas solenoid valve one year warranty
  • Honeywell MIDAS-M - MMC-A2U20000 Detector #H254CC YD
  • Honeywell C-AA201 - 30734772-002 Auxiliary Alarm With Relay Board PWB
  • Honeywell 51401598-200 - Time-Sync Communication Daughter Card
  • Honeywell MCT202 - Communicator Brand New Fast Shipping via DHL
  • Honeywell WEB-600E - Network Controller Via DHL or FedEx
  • Honeywell VE4100B3000 - NEW gas solenoid valve one year warranty
  • Honeywell AZ960 - 7024900-90 Air Data Computer
  • Honeywell FC-RUSIO-3224 - Programmable Logic Controller Module
  • Honeywell SM200 - Servo Drive 4006719-921 w/ October 2023 Inspected 8130
  • Honeywell V5013C1019U - New 1PC V5013C1019/U 1 year warranty
  • Honeywell MU-PPIX02 - Pulse Input Module 51304386-100
  • Honeywell CC-TAON01 - 1PCS Module 51308371-175 Brand new
  • Honeywell U2-1018S-PF - New Flame Detector DHL
  • Honeywell TC-IAH161 - 1PC PLC Module TCIAH161 Via DHL or FedEX
  • Honeywell SPS5713 - 51199930-100 (AS PICTURED) NSMP
  • Honeywell TK-CCR014 - REDUNDANT NETINTERFACE NEW ORIGINAL FREE EXPEDITED SHIPPING/
  • Honeywell DR45AT-1000-00-011-0-000000-0 - 120/240VAC NSMP
  • Honeywell XNX-UTAI-RNNNN - Universal Transmitter New DHL
  • Honeywell 82408449-001 - Yamatake- IBCD Card PCB
  • Honeywell K2LCN-8 - Via DHL or FedEx
  • Honeywell FC-PSU-UNI2450U - V2.1 Power Supply Module
  • Honeywell CD815 - Control Display Unit 7022360-902 Removed Working
  • Honeywell MCB3-A3C1REZ-020 - 0 to 100 PPM LCD Display Multi-Gas Detector
  • Honeywell HP600 - High Power Amplifier 7516250-60050 Removed Working
  • Honeywell C7061F2001 - 1PC New replace C7012F1052 flame detector Fast Shipping
  • Honeywell 620-0025RC - 1pcs Brand New Fast Fast Shipping
  • Honeywell ED-600 - 7003403-901 Electric Display with Mods (Cracked Face)
  • Honeywell 3075388-2 - ", TRANSDUCER PN "
  • Honeywell EN-2018-5607 - Smartline HART Communication Assy
  • Honeywell EX52710100036 - / MTU EXHAUST TURBOCHARGER
  • Honeywell Q7055A-1007 - / Q7055A1007 (USED TESTED CLEANED)
  • Honeywell 51304190-200 - E Jumper Card 51304189 Rev A
  • Honeywell TK-PRR021 - 1PC New PLC Module in box 1 year warranty#XR
  • Honeywell PGM-7340 - RAE 3000 VOC Detector Shipping
  • Honeywell 05704-A-0145 - / 05704A0145 (NEW NO BOX)
  • Honeywell C7012F1052 - New UV Flame Detector Free Expedited Shipping
  • Honeywell MC-PAIL02 - 51304481-150 Low Level Analog Input Module Rev: E
  • Honeywell 80363969-150 - / 80363969150 (NEW IN BOX)
  • Honeywell 8694700 - USED MEASUREX COP PROCESSOR
  • Honeywell 900C70-0360-00 - 5VDC NSMP
  • Honeywell 51401392-100 - ",51403422-150,51304485-100 Module Rack 24VDC"
  • Honeywell CC-PDOB01 - / CCPDOB01 (NEW IN BOX)
  • Honeywell SPS5785 - NEW 1PCS 51198651-100 replace 51198947-100 HPM POWER SUPPLY
  • Honeywell 965-1210-020 - "EGPWS Computer w/ GPS MK VIII, P/N: , HONEYWELL"
  • Honeywell VE4100B3000 - NEW gas solenoid valve one year warranty
  • Honeywell PW6K1R2 - 13PCS Brand New Expedited Shipping
  • Honeywell TSQUALWDX-07821 - "Sputtering Target 59Al/1Cu 7.830x11.640x13.050"" New"
  • Honeywell 900C70-0360-00 - 900 CONTROL STATION Touch Screen
  • Honeywell 620-0036 - / 6200036 (NEW IN BOX)
  • Honeywell DR45AT-1100-00-001-0-00000E-0 - 120/240VAC UNMP
  • Honeywell LG1093AA24 - NEW ULTRAVIOLET FLAME SENSOR 261A1812P012
  • Honeywell TC-IAH161 - ANALOG INPUT TCIAH161 NEW ORIGINAL FREE EXPEDITED SHIPPING/
  • Honeywell TK-PRS021 - F/W G 24VDC 1.6A NSNP
  • Honeywell G3I-D22C - Programmable Logic Controller 12-24Vdc 5-11Ma
  • Honeywell TK-PRS021 - / TKPRS021 (NEW NO BOX)
  • Honeywell VM3A - "Thor - 30.7cm (12.1in) - 1024 x 768 Pixel - LED - Capacitive"
  • Honeywell MCL1326 - HOUSING ASSY P/N (HONEYWELL) NE COND # 11383 (4)
  • Honeywell 50126003-001 - Smartline Integrally Mounted Basic Indicator Rev A
  • Honeywell 053669-01 - "USED MEASUREX PC BOARD REV. A, 05366901"
  • Honeywell 620-0025RC - 1pcs Brand New Fast Shipping FedEx or DHL
  • Honeywell FC-RUSIO-3224 - 1pc Brand New Programmable Logic Controller Module
  • Honeywell 7000836-916 - Display Unit Attitude Reference Indicator Agusta A109E #AR
  • Honeywell STF724-E1HS4A-H1F-A-AHC-11C-B-01A0-F1-000 - ST 700 Pression Transmett
  • Honeywell PGM-7340 - ppbRAE 3000+ VOC Gas detector
  • Honeywell MCT202 - Communicator Fast Shipping
  • Honeywell QPP-0002 - Security Manager 24vdc Processor
  • Honeywell 8C-PCNT02 - New C300 Controller In Box DHL
  • Honeywell 1616-350-01A - Iridium FlightDeck Tranceiver P/N
  • Honeywell V5013C1019U - New V5013C1019/U 1 year warranty