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

  • GE Fanuc - A16B-3200-0020 Circuit Board Industrial Automation Core Component
  • GE IS420UCSBH3A - Advanced Industrial Control Module
  • GE Fanuc - IC693APU300J PAC Systems RX3i PLC Controller
  • GE FANUC - IC693MDL654 Modular Control System
  • GE Fanuc - DS200GDPAG1AEB Industrial Control Module for Advanced Automation
  • GE Fanuc - IC694ACC310 Filler Module Advanced Process Control Solution
  • GE Fanuc - IC200MLD750 Output Module Versamax PLC
  • GE IS220PSCAH1A - Advanced Power Control Module for Turbine Systems
  • GE Fanuc - IC220STR001 Direct Motor Starter for Precision Control
  • GE Fanuc - IC698CPE020-GP Slot Rack Card High Performance Control Module
  • GE FANUC - IC693MDL240 Modular Control Module
  • GE Electric - IC693PBM200-FE Master Module Industrial Automation Control Core Component
  • GE URRHV - Power Supply Advanced Industrial Control
  • GE DS6800CCID1D1D - Industrial I/O Interface Module
  • GE MULTILIN - EPM 9650 POWER QUALITY METER PL96501A0A10000
  • GE Electric - Fanuc IC697CMM742-KL Advanced Type 2 Ethernet Interface Module
  • GE Fanuc - IS200TBAIH1C Analog Input Terminal Board
  • GE FANUC - IC600FP608K IC600LX624L Memory Module for Industrial Automation
  • GE Fanuc - 531X135PRGAAM3 Programmer Card Board
  • GE IC200PER101E - Power Supply
  • GE IS420ESWBH3A - High-Speed Industrial Ethernet IONet Switch
  • GE Electric - EPSCPE100-ABAG Standalone PACSystems RSTI-EP Controller
  • GE IS200ICBDH1ACB - Advanced Industrial Control PCB for Critical Applications
  • GE DS200FCGDH1BAA - Precision Gate Distribution & Status Card for Industrial Control Systems
  • GE Fanuc - IC660HHM501R Portable Monitor for Industrial Automation
  • GE DS200IMCPG1C - Power Supply Interface Board for Industrial Controls
  • GE FANUC - IC695ALG508 Advanced Control Module for Industrial Automation
  • GE VM-5Z1 - PLC Module Programmable Logic Controller
  • GE FANUC - IC754CKF12CTD QuickPanel Control Industrial-grade HMI for Precision Automation
  • GE UR - 9GH UR9GH CPU High-Performance Control Module for Industrial Automation
  • GE IS220PGENH1A - Generator Power Unit (I/O)
  • GE Electric - IS220PD0AH1A Industrial Control System I/O Pack Module
  • GE IC694ALG221B - High-Performance Bus Expansion Cable for Enhanced PLC Connectivity
  • GE IC693MDL752 - High-Performance Negative Logic Output Module
  • GE DS200VPBLG1AEE - High-Performance Circuit Board
  • GE Electric SR745-CASE - 745-W2-P5-G5-HI-T Excellent Value
  • GE IS200TTURH1CBB - High-Performance Programmable Logic Controller Module
  • GE A06B-0227-B100 - Servo Motor Precision
  • GE 8021-CE-LH - High-Performance AC/DC Coil Contactor
  • GE FANUC - IC693BEM340 High-Speed Ethernet Controller Module
  • GE DS200SDCIG2AGB - Advanced DC Power Supply & Instrumentation Board for Industrial Control
  • GE FANUC - IC693CHS397E CPU Base Advanced Control Module for Industrial Automation
  • GE UR7BH - Relay Module High Performance Relay for Industrial Control Applications
  • GE FANUC - A17B-3301-0106 CPU MODULE
  • GE Fanuc - HE693ADC415E Drive Module
  • GE IS200VAICH1D - Analog Input Module for Industrial Control Solutions
  • GE Fanuc - DS200SHCAG1BAA High-Performance Turbine Energy Shunt Connector Board
  • GE Fanuc - IS215VCMIH2CC | Communication Card
  • GE IC690ACC901 - Mini Converter Kit Efficient Communication Solution
  • GE Electric - DS3800HCMC Gas Turbine Daughter Board For Enhanced Control & Efficiency
  • GE Electric - FANUC IC200ALG320C Analog Output Module
  • GE Electric - (GE) IS420UCSBH3A REV D
  • GE IC693MDL646B - Advanced Input Module for Industrial Control Solutions
  • GE IC693MDL730F - Advanced Digital Input Module for Industrial Automation
  • GE IC200ALG240 - Analog Input I/O
  • GE IC660BBD020Y - | DC Source I/O Block
  • GE Electric - IC698ACC735 Shielded Single Slot Faceplate
  • GE Fanuc - IC200MDL730 Discrete Output Module
  • GE IS200VAOCH1B - VME Analog Output CD for MARK VI
  • GE IC200ALG328E - High Precision Analog Output Module
  • GE Fanuc - IC200CHS001 A Cutting-edge VersaMax PLC
  • GE UR6DH - Digital I/O Module Advanced Power System Communication
  • GE Fanuc - IC695CHS007 Universal Control Base
  • GE VMIVME-2540-200 - Intelligent Counter & Controller
  • GE Fanuc - DS200LDCCH1ARA Advanced Mark VI Circuit Board for Industrial Automation
  • GE DS3800HMPG - Cutting-Edge CPU Card for Advanced Industrial Control
  • GE IS220PAICH1B - 10 Analog Inputs & 2 Analog Outputs
  • GE DS200TCQAG1BHF - Analog Input/Output Card Precision Control for Industrial Automation
  • GE FANUC - 531X139APMASM7 Micro Application Board for Industrial Control
  • GE DS3800NPPC - Circuit Board Precision Control in Industrial Automation
  • GE IC200UEX626 - 6-Channel Analog Expansion Module for Advanced Process Control
  • GE IC693PWR331D - Advanced Power Supply for Industrial Automation
  • GE DS200TBQBG1ACB - Advanced RST Analog Termination Board
  • GE Fanuc - DS200TBCAG1AAB Advanced PLC for Industrial Automation
  • GE FANUC - DS200LRPAG1AGF Industrial Line Protection Module
  • GE IC693MDL654 - Advanced Logic Input Module for Industrial Control Systems
  • GE Industrial - Controls IC695LRE001B Transmitter Module
  • GE DS3800HUMB1B1A - Universal Memory Board
  • GE IC660BBD021W - Advanced 3-Wire Sensor Block for Industrial Control Systems
  • GE FANUC - IC694APU300 High-Speed Counter Module
  • GE IC694ACC300 - Input Simulator Module Advanced Control Solutions
  • GE FANUC - IC687BEM713C Advanced Bus Transmitter Module for Industrial Automation
  • GE IS200TGENH1A - Advanced Turbine Control Board for Gas and Steam Turbines
  • GE IC693MDL654F - Advanced Modular PLC Input Module for Industrial Automation
  • GE IS200AEPAH1BMF-P - | IS210BPPCH1AD I/O Pack Processor Board
  • GE IS230TRLYH1B - New in Box | Industrial Control Module
  • GE 489-P5-HI-A20-E - Industrial Generator Management Relay
  • GE Electric - (GE) IS200IVFBG1AAA Fiber Optic Feedback Card for Industrial Automation
  • GE Electric - IC693PWR322LT Advanced Industrial Power Supply
  • GE Fanuc - IC200ALG432 Analog Mixed Module VersaMax
  • GE Fanuc - IC693ALG392 Precision Analog Output for Industrial Control Systems
  • GE Fanuc - IC695ACC402 Evergreen Controller Advanced PLC Solution for Industrial Automation
  • GE IC693ACC300D - Input Simulator Module
  • GE 46-288512G1-F - Advanced Industrial Control Module
  • GE IC755CSS12CDB - High-Performance Control Module
  • GE DS200TCCAG1BAA - High-Performance PLC PC Board
  • GE IC3600TUAA1 - Advanced Industrial Control Module
  • GE 8810 - HI TX-01 Brand New Advanced Industrial Control Module
  • GE 750-P5-G5-D5-HI-A20-R-E - Relay
  • GE Fanuc - IC200MDL330 Network Interface Unit Advanced Networking for Industrial Automation
  • GE Fanuc - IC676PBI008 Waterproof Input Block
  • GE Circuit - Board 304A8483G51A1A
  • GE YPH108B - Measurement Board
  • GE UR6AH - Digital I/O Module Industrial Control
  • GE IC200ALG264E - High Precision Current Analog Input Module
  • GE IS200TRLYH2C - Relay Output Module with Contact Sensing Terminal Board; Manufacturer GE-FANUC
  • GE IC693ALG442B - Advanced Programmable Logic Controller Module
  • GE IC693ACC301 - Lithium Battery Replacement Module
  • GE Fanuc - DS200PTBAG1A Termination Board Advanced Control Module
  • GE IS200VCRCH1BBB - Mark VI Circuit Board
  • GE IS200UCVEH2A - High-Performance Exciter Bridge Interface BOARD for Industrial Automation
  • GE IS220PDIOS1A - Mark VI Control Module
  • GE IS210AEBIH3BEC - Advanced Input/Output Board for MKVI Control Systems
  • GE 6KLP21001X9A1 - AC Variable Frequency Drive
  • GE 531X123PCHACG1 - Advanced Power Supply Interface Card
  • GE Electric - STXKITPBS001 Profibus Interface Module for Industrial Control Systems
  • GE DS200TCRAG1AAA - Industrial Grade Relay Output Board for Enhanced Control Systems
  • GE UR9NH - CPUUR CPU Module
  • GE Electric - DS200TCQFG1ACC
  • GE Electric - Fanuc IC200ALG260H Analog Input Module Precision & Reliability in Automation Solutions
  • GE DS200SLCCG3RGH - Industrial Control Module
  • GE DS3800NMEC1G1H - Industrial Motor Control Module
  • GE Fanuc - 531X113PSFARG1 | Mark VI Circuit Board
  • GE Fanuc - IC693ALG392C Analog Output Module Precision Control in Industrial Automation
  • GE IC693ALG220G - Advanced Input Analog Module for Industrial Automation
  • GE DS200DTBCG1AAA - Industrial Control System's Reliable Core
  • GE F31X301DCCAPG1 - Control Board Advanced Industrial Automation Solution
  • GE Electric - (GE) IS200AEAAH1AAA Mark VI Printed Circuit Board