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

  • ABB NE810 3BSE080207R1 Network switch
  • ABB NE802; NE802 Network switch 3BSE080237R1
  • GE HYDRAN 201Ti Single Channel Gas Monitoring Transmitter
  • GE Hydran M2-X Transformer Online Monitoring Equipment
  • GE Hydran M2 Transformer Monitoring System
  • Kollmorgen Seidel 65WKS-CE310/6PB - Servo Drive Control
  • Kollmorgen U9M4T - Servodisc DC Motor, With Harmonic Drive Transmission
  • KOLLMORGEN TT-2952-1010-B - INLAND BRUSH SERVO MOTOR WITH TACH
  • ONE VF-RA2474N-5/10/12/15 - Servo Drive Power Cable
  • Kollmorgen S30601-NA - Servostar 346 + EtherCat
  • Kollmorgen HDIL100P1 - Direct Drive Linear Hall Effect Assembly
  • Kollmorgen TT-4239-1010-AA - DC Servo Motor 875 RPM
  • PMI Kollmorgen 00-00907-999 - ServoDisc DC Motor 0.5" Diameter Shaft
  • INLAND KOLLMORGEN TT-2952-1010-B - MOTOR (USES RESOLVER)
  • KOLLMORGEN CTI-187-2 - BRUSHLESS MOTOR DANAHER MOTION
  • Kollmorgen 12-0857 - Lead Screw Electric Cylinder without Motor
  • Kollmorgen AKM13C-ANCNR-00 - Servo Motor
  • kollmorgen 6sm, 10m - Cable
  • KOLLMORGEN ME2-207-C-94-250 - GOLDLINE SERVOMOTOR-ENCODER COMMUTATED
  • Kollmorgen MT308A1-R1C1 - GoldLine Motor
  • Kollmorgen 73 & 54 cm Travel - Ironless Linear Motors on THK Rail
  • Kollmorgen AKM53H-ACCNR-00 - Servo Motor
  • Kollmorgen PA5000 - Power Supply
  • KOLLMORGEN D082M-12-1310 - GOLDLINE DDR DIRECT DRIVE ROTARY MOTOR 230Vrms 300 RPM
  • Kollmorgen RBEH-01210-A14 - Brushless Motor, Heidenhain D-83301
  • KOLLMORGEN Servotronix PRD-CC18551H-11 - Servo Board
  • Kollmorgen DH083M-13-1310 - Ho Direct Drive Rotary. Max Speed: 400/500 RPM
  • KOLLMORGEN BMHR-4.8XX - INLAND MOTOR
  • Kollmorgen Seidel 84421 - Motor Cable 20 Metre 6SM 27/37 AKM DBL Engines
  • Kollmorgen AKD1207-NBCC-0000 - Drive
  • HP Indigo / Kollmorgen VLM32H-ALNR-00 - Motor
  • SUPERIOR ELECTRIC / KOLLMORGEN GM05009005 - POWERSTAT 50 AMP VARIAC w/ PMI MOTOR
  • Kollmorgen CM12A1-015-033-00 - MOTOR CABLE for AKD B/P/T/M Motor AKM 1-7 Cable
  • Kollmorgen U9M2 - DC Motor
  • Kollmorgen AKM11C-ANMN2-00 - 3-Phase PM Servo Motor 110W
  • Kollmorgen 60-023168-000 - MOTOR GEARBOX ASSEMBLY SERVODISC DC NO REAR SHAFT
  • Kollmorgen AS10300 - servo drive servo star Cincinnati
  • Kollmorgen AKM23D-EFC2C-00 - Servo Motor AKD Drive
  • KOLLMORGEN E33HRFB-LNK-NS-01 - STEPPER MOTOR 2.7AMP 251W 1500RPM 170V
  • Kollmorgen AKM21G-ENM2DB00 - Servomotor
  • KOLLMORGEN SERVO STAR 620-AS - 230-480V 20A Servo Drive
  • Kollmorgen CFE0A1-002-006-00 - Encoder Cable 6.00m
  • KOLLMORGEN AKM21C-ANM2DBOO - PM SERVOMOTOR
  • Kollmorgen 03200-2G205A - ServoStar Servo Drive
  • Kollmorgen CR10251 - SERVOSTAR CD AC Servo Driver
  • Kollmorgen VF-DA0474N-03-0 - 10 Ft Feedback Cable
  • KOLLMORGEN AKM21S-ANMNR-03 - Servo Motor
  • Danaher Motion Kollmorgen S403AM-SE - Servostar 443M-S Servo Drive
  • Kollmorgen Seidel digifas 7204 - Servo Amplifier Digital
  • Kollmorgen Industrial Drive B-406-B-A1-B3 - Goldline Brushless Servomotor
  • Danaher Motion S20630-CNS - Servo Kollmorgen S200 Series
  • KOLLMORGEN B-206-A-31-B3 - GOLDLINE BRUSHLESS PM SERVO MOTOR 1400RPM
  • Kollmorgen Seidel SR6-6SMx7 - 4m Cable
  • Cincinnati Milacron Kollmorgen Vickers PSR4/5-250-7500 - Power Supply
  • Kollmorgen AKM 13C-ANCNR-00 - Gripper Handling with Neugart PLE 40 gears
  • Kollmorgen SERVOSTAR 403 A-P - 3a servo drive
  • KOLLMORGEN S6M4H - INDEXER ASSY SERVO MOTOR
  • SERVOMOTOR KOLLMORGEN SEIDEL 6SM 57M-3.000-G-09 - Servo Motor
  • Kollmorgen VP-507BEAN-03 - Valueline AKD 10 Ft Power Cable
  • KOLLMORGEN 28454 - SERVO DRIVE, SERVOSTAR 300 SERVOSTAR 310
  • KOLLMORGEN TT-4205-4017-C - INDUSTRIAL DRIVE DC MOTOR
  • Kollmorgen T150551 - Servostar 343 Control Drive
  • Kollmorgen ICD05030A1C1 - Platinum DDL Direct Drive Linear Motor w/ 30" Rail Way
  • Kollmorgen SERVOSTAR 303 S30361-SE - Servo Drive
  • Kollmorgen 00-00907-002 - ServoDisc DC Motor Varian Semiconductor 3500054
  • Kollmorgen CM12A1-025-005-00 - MOTOR CABLE for AKD B/P/T/M Motor AKM 1-7 Cable
  • KOLLMORGEN MOTION TECH IL18100A3TRC1 - BRUSHLESS LINEAR MOTOR PLATINUM DDL
  • Kollmorgen SERVOSTAR 406 M-C - Servo Drive FW: 7.36
  • Kollmorgen IC11030A1P1103 - platinum direct drive linear motor
  • W&T 10/100BaseT - Com Server Highspeed 3×RS232/RS422/RS485
  • Kollmorgen S30361-NA - drive brand
  • Kollmorgen Industrial Drives PSR3-208/50-01-003 - Power Supply
  • Kollmorgen RBE-03011-A00 - Brushless Frameless Servo Motor, OD: 5-5/64"/129mm
  • Industrial Drives SBD2-20-1101-5301C2/160-20 - Servo Amplifier Board For Parts
  • Industrial Drives SBD2-20-1101-5301C2/160-20 - Servo Amplifier Board For Parts
  • Industrial Drives SBD2-20-1101-5301C2/160-20 - Servo Amplifier Board For Parts
  • Kollmorgen IC44030A2P1 - LINEAR DRIVE MOTOR
  • KOLLMORGEN AKM22E-ANS2R-02 - servo motor + Micron X-TRUE 60
  • Kollmorgen 18442-01B - Pendant (E2)
  • Kollmorgen AKD-P00306-NBEC-0069 - Drive
  • Kollmorgen AKM53H-ACCNR-00 - Servomoteur
  • Kollmorgen AKD-P01207-NACN-0056 - Servo Drive
  • Kollmorgen SERVOSTAR 403a-c - Servo Drive
  • Kollmorgen B-204-B-39-016 - Servo Motor
  • Giddings & Lewis Dahaner Motion Kollmorgen M.1017.3140 R3 - Output Module
  • Kollmorgen KNSG300 - Emergency Light Unit
  • KOLLMORGEN 62-0050 Model T31V-EM-C0 - Servo Motor Shaft Size 3/8" Dia 1-1/4" Long
  • Kollmorgen S30601-NA-ARM9 - SERVOSTAR346 Controller w/o Fan As Is
  • Kollmorgen PMI Motors 00-00903-010 - ServoDisc DC Motor Type U9M4H 1/2" shafts
  • Kollmorgen PMI Motion U12M4 - Servo Disc DC Motor Universal Instruments 11467000
  • Kollmorgen AKM53H-accnr-00 - Servo Motor
  • DANAGER MOTION / KOLLMORGEN ACD4805-W4 - (70A ) Vehicle / Motor Controller
  • Kollmorgen s60300 - SERVOSTAR 603 3 x 230-480v 2kva
  • KOLLMORGEN B-404-C-21 - GOLDLINE BRUSHLESS P.M. SERVOMOTOR
  • Kollmorgen T-5144-A - GE Aviation 739034-01 Direct Drive DC Torque Motor
  • KOLLMORGEN M.1302.8761 - CABLE, POWER
  • Kollmorgen CE03250 - Servostar Servo Drive
  • Kollmorgen K-342 - dual axis automatic autocollimator
  • Kollmorgen TT-4500-1010-B - Inland Motor
  • Kollmorgen S20260-Srs - Synqnets200 Series Servo Drive Forparts
  • Kollmorgen PRDRHP720SND-65 - drive CR06703-R
  • KOLLMORGEN S70362-NANANA - driver
  • Kollmorgen CR06260-000000 - SERVOSTAR CD AC Servo Driver
  • KollMorgen akd-m00306-mcec-D000 - Multi-Axis Master Programmable Drive AKD PDMM
  • KOLLMORGEN S61000 - SERVOSTAR 610 3X230-480V 10A
  • Kollmorgen AKD-P00306-NBCC-0000 - AKD Servo Drive
  • KOLLMORGEN CP306250 - SERVOSTAR SP Servo Drive
  • Kollmorgen MPK411 - controller
  • Kollmorgen S64001 - SERVOSTAR 640, factory-certified
  • Kollmorgen Servotronix Prdr0087006Z-00 - Lvd Servo Drive
  • Kollmorgen AKD-P00306-NAAN-0000 - Servo Drive Controller, 1.2KVA, 240Vac, 3 Phase
  • Kollmorgen MCSS08-3232-001 - MCSS06-3224-001 ServoStar Drives (AS-IS)
  • Kollmorgen CR06250-2D063A - drive
  • YASKAWA SGDP-04APA - SERVOPACK SERVO DRIVE
  • Kollmorgen s62001 - servostar 620-as 14kva 20a ip2o 3x 230-480v
  • Kollmorgen Seidel S60100 - Servostar 601 Servo Drive
  • KOLLMORGEN CR06703-R - HP SERVOSTAR CD CONTROLLER
  • kollmorgen Prdr0052200z-05 - graco inter Servo Component
  • KOLLMORGEN S403AM-SE - drive SERVOSTAR 443M-S
  • YASKAWA SGDP-01APA - SERVOPACK SERVO DRIVE
  • Kollmorgen CE06200-1H348H - SERVOSTAR CD Servo Driver
  • Kollmorgen S71262-NANANA - S700 Servo Amplifier 208Y/120V 480Y/277V
  • Kollmorgen S70302-NANANA-NA - S700 Servo Driver
  • KOLLMORGEN S61401-560 - ATS-SERVOSTAR 614-AS Servo Drive
  • KOLLMORGEN Industrial Drives BDS4A-103J-0001/102A21P - Servo Controller
  • Kollmorgen S71202-NANANA-NA-024 - S700 Servo Driver
  • KOLLMORGEN S70302-NANANA - driver
  • Kollmorgen CR06250 - SERVOSTAR Servo Drive