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

  • CTI-Cryogenics 8116071G001 Enhanced On-Board 8F Cryopump
  • ETEL LMD10-050-3QA-223A Linear Motor
  • Etel DSO-SER211-000 Servo Card Power Add-On
  • ETEL LMG05-050-3QA-213A Linear Motor
  • Etel DSO-SER211-000 Power Add-On Board
  • ETEL EU-LGP-0-0-0000-00 Motion Control Card
  • ETEL EA-P2M-400-15/40A-0100-00 AccurET Servo Drive
  • ETEL DSA2P1540A Digital Servo Amplifier
  • ETEL DSC2P131-111-000 Drive Board
  • ETEL DSC2P131-111D-000A Servo Drive
  • Etel SA-IL 03-208 Linear Motor Section 208mm
  • ETEL EA-P2M-300-4/7.5A-0000-01 AccurET Position Controller
  • ETEL DSO-SER211-000 Power Board
  • ETEL DSC2P131-111F-000A Servo Amplifier
  • ETEL DSA1P6242B Digital Servo Amplifier
  • ETEL DSC2P131-111B-000B Regulator
  • ETEL DSA2P1540A Digital Servo Amplifier
  • ETEL EA-P2M-048-2.5/5A-0100-01 Drive
  • ETEL SA-LE 03-208 Linear Motor
  • ETEL DSO-PWS111B-000C Power Supply Module
  • ETEL DSA2S211ZA-018A Digital Servo Amplifier
  • ETEL DSA2P1643A Digital Servo Amplifier
  • ETEL DSC2P141-111-000 Linear Servo Amplifier
  • ETEL DSO-PWR111C-000A Power Supply Module
  • ETEL DSCDP132-111E-000A Dual Position Controller
  • ETEL DSCDM332-111C-000C Overload Protection Controller
  • ETEL EA-S0M-300-40/80A-0000-00 AccurET Modular Power Supply
  • ETEL DSO-PWR112C-000B Power Supply Module
  • Etel DSCDM343-111C-000B Position Controller
  • ETEL DSO-PWR111C-000B Power Supply Module
  • ETEL LMP07-100-3TAS-229 Linear Motor Primary Part
  • ETEL DSCDP324-322G-000A Servo Amplifier
  • ETEL DSDP324-322F-000C Dual Motor Driver
  • ETEL DSCDM341-111-000 PCB Board
  • ETEL SA-IL 03-208 Linear Motor
  • ETEL DSB2S234-111E-000H Digital Servo Amplifier
  • ETEL DSB2P131-111E-000B Digital Servo Amplifier
  • ETEL DSCDP121-111B-000A Speed Controller
  • ETEL DSCDM342-111-000 Servo Amplifier
  • ETEL IWM040-0256-00A Ironcore Linear Motor Magnetic Way
  • ETEL DSO-PWS111C-000B Power Supply Module
  • Etel TMB0140-100-3RBS-S82 Direct Drive Torque Motor
  • ETEL LMG05-030-3QA-A11A Ironcore Linear Motor
  • ETEL DSMAX212-121C-000C Digital Servo Amplifier
  • ETEL DSA2P174ZA-033 Digital Servo Amplifier
  • Etel TMB0140-150-3RBS-S82-ER Direct Drive Torque Motor
  • ETEL DSCDP334-322-000 Position Controller
  • ETEL DSCDP334-322G-000A Position Controller
  • ETEL DSCDM342-111-000 Servo Amplifier
  • ETEL IWM060-0064-00 Ironcore Linear Motor Magnetic Way
  • ETEL LMG05-070-3QA-A14A Ironcore Linear Motor
  • ETEL EA-P2M-400-05/10A-0000-01 Accuret Position Controller
  • ETEL RTMB0140-070-AQN-02 Direct Drive Motor
  • ETEL DSCDM343-111C-000B Position Controller
  • ETEL LMB10-030-3QA-A00A Linear Motor
  • ETEL MWA050-0128-20B Linear Motor Magnet
  • ETEL DSA2P1642A Digital Servo Amplifier
  • ETEL DSCDP121-111D-000A Position Controller
  • Heidenhain 2330P-01A Wafer Stage Chuck with ETEL 591151-01-00-A
  • ETEL 3LM-23C LMG Linear Motor 568160-01
  • ETEL DSC2P121-111D-000A Digital Servo Amplifier
  • ETEL MWA030-0512-00B/398 Linear Motor Magnetic Way
  • ETEL DSC2P131-111B-000D Servo Drive
  • ETEL DSB2S134-111E-000H Digital Servo Amplifier
  • ETEL TMB0140-050-3UBS-S82 Torque Motor Stator
  • ETEL TMB0530-150-3VHN-E82 Torque Motor
  • ETEL DSCDP324-322F-000C AC Servo Amplifier
  • ETEL LMG05-030-3QA-A11A Ironcore Linear Motor
  • ETEL DSB2P123-111E-000H Digital Servo Amplifier
  • ETEL DSC2P131-111F-000A Digital Servo Amplifier
  • ETEL LMG10-050-3QA-A11 Ironcore Linear Motor
  • ETEL EA-P2M-400-10/20A-0000-01 Accuret Position Controller
  • ETEL DSB2S144-111E-000H Digital Servo Amplifier
  • ETEL PMWA050-016-00A Motor
  • ETEL DSCDM341-111-000 PCB Board
  • ETEL TMB0140-030-3RAS-S82-EL Direct Drive Motor
  • ETEL DSCDP330-322G-001 Motor Driver
  • ETEL TLMD05-050-0010-ANN-24A Linear Motor
  • ETEL EA-P2M-400-10/20A-0000-01 Accuret Modular Position Controller (T256144)
  • ETEL LMC11-050-3TA-220A Linear Motor Module
  • ETEL IWM060-0256-00 Ironless Linear Motor Magnetic Way (Magnet Track)
  • Rolls-Royce R02TCN-E0L3-00 Remote Controller Features
  • Etel SA-IL 03-208 Linear Motor Section
  • ETEL ILM03-060-3RA-A00 Ironless Linear Servo Motor
  • ETEL DSCDP321-121-000 Dual Position Controller Board
  • Etel DSCDP121-111F-000A Dual Axis Servo Drive
  • Etel EA-S0M-400-40/80A-0000-00 AccurET Modular Power Supply
  • Etel TMB+0291-150-RO-00000-0A0 Rotor
  • ETEL DSCDP131-111F-000A Position Controller
  • ETEL DSC2P154-421F-000A Servo Drive
  • ETEL DSO-SER211-000 Add-On Power Board for Servo Amplifier
  • ETEL 613712-05 4-Axis Control Assembly
  • ETEL P2M-300-07/15A Accuret Position Controller
  • ETEL LMP07-100-3TAS-229 Motor Ruler Primary Part
  • ETEL 569866-03 ASME-RTMA014 Motor
  • ETEL DSCDP131-111-000 Dual Position Controller
  • ETEL DSB2S134-211E-000H Digital Servo Amplifier
  • ETEL DSCDP121-111F-000A DSC Dual Controller
  • ETEL DSC2P154-421E-000A Servo Drive
  • ETEL DSCDP121-111C-000A Regulator – Stable Power Control
  • ETEL DSC2P131-111B-000D Driver Board
  • ETEL ILM03-060-3RA-A00 Linear Motor
  • ETEL EA-S0M-300-40/80A-0090-00 Power Supply Module
  • Etel DSCDP131-111-000 Position Controller
  • ETEL DSC2P121-111E-001A Digital Servo Amplifier
  • ETEL DSB2P101-121E-009H Position Controller
  • ETEL IWM040-0128-00 Ironcore Linear Motor Magnetic Way
  • ETEL AccurET EA-S0M-400-40/80A-0000-00 Modular Power Supply
  • ETEL LMC11-050-3TA-S10C Motion Controller
  • ETEL LMC11-050-3TA-250A Controller Module
  • ETEL DSB2P101-121E-009H Digital Servo Amplifier Position Controller
  • ETEL AccurET Modular 400 Position Controller
  • ETEL DSA2 Digital Servo Amplifier
  • ETEL DSC2P154-421-000 Servo Drive
  • ETEL DSO-PWS121-003 Power Supply Module
  • ETEL 0348M-070-02D-004 Linear Encoder
  • ETEL DSC2P131-111-000 Linear Servo Amplifier – 10Arms/30Arms
  • ETEL DSC2P131-121-000 Digital Servo Amplifier
  • ETEL DSB2P131-111E-000H Digital Servo Amplifier
  • ETEL DSO-PWS111-000 Power Supply Module
  • ETEL LMC11-050-3TA-S41C Linear Motor Module – High Thrust Density
  • ETEL EA-P2M-300-07/15A Drive Specs
  • ETEL DSO-RAC200A-011D Dual Position Controller Rack
  • ETEL Short-Stroke Actuator ID809786-03
  • ETEL DSCDM332-111-000 Servo Controller Specs
  • ETEL DSCDL332-131-000A Position Controller
  • ETEL LMP07-100-3TAS-229 Linear Motor
  • ETEL LMA11-120-3ZA-359C Linear Motor