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 | 601 次浏览: | Share:

id: indicates the ID of the configured connection in Configure Network. The connection ID is the unique identification of the connection between the CPU and the connection partner through the CP. Enter the number for the connection configuration here. This parameter ranges from 1 to 64.

db_param: parameter data block that contains modbus data parameters for the modbus block instance. The CPU determines the value range of this parameter. DB number 0 is reserved for the system and cannot be used. Enter the DB number "DBxy" in plain text format. If multiple connections are to be implemented, the parameter data block can contain the parameters required for all connections in order.

REG_KEY_DB: Registration key used for authorization.

MONITOR: Monitoring time MONITOR is used to monitor incoming data from connection partners. The time format T# is used to specify the monitoring time. It is recommended that the monitoring time be about 1.5s.

In "S7 as server" mode, the input of the second part of the frame is monitored by MONITOR time. If the monitoring time is exceeded, an error is reported. This time is calculated from the receipt of the MODBUS/TCP specific packet header and ends when the request is fully received.

Init: initializes the Modbus block when there is a rising edge in the parameter. Initialization can only be performed if no jobs are currently running. This condition must be ensured in the program by ENQ_ENR = FALSE and BUSY = FALSE.

(2) Parameter data block DB2

Parameter data block DB2 (name MODBUS_PARAM_CP). This parameter DB block is used to set the modbus data area.

Notice To modify Data in the DB block, switch the DB block to Data view and modify the DB block in the Actual value column.

In this example, you need to change DB2 ID2_ID to 16#1 according to the connection Settings in Figure 3-7. To facilitate the mapping of subsequent communication test addresses, change the start and end addresses of the modbus register to 16#0 and 16#1F3 respectively.

3.4 Communication Test

Download the project to the CPU, open the Modsan32 application, the following to the hold register as an example to introduce the communication test process.

First, select connect under the Connection menu for ModScan32 and set the IP address and port number for ModScan32 to access the PLC as the server side.

Finally, set the start address and length of Modbus to be accessed in Modscan32 software (in this test, Modscan32 uses data type 3 and the start address of the access hold register is 10 words of 40001), establish a communication connection with PLC, and carry out data reading.

You can view the communication status in the network configuration window.

Some considerations for using the function block "MODBUSCP" :

1) The S7-300CPU supports communication with multiple Modbus clients through the function block "MODBUSCP" of the Ethernet module CP343-1. The number supported depends on the number of TCP connections supported by the CP343-1. The function block "MODBUSCP" must be invoked once for each client connection. Parameters such as background data block, ID, and port number must be unique.

2) The S7-300CPU can be used as the Server and Client of Modbus TCP through the Ethernet module CP343-1.

3) The S7-300CPU supports multiple protocols through the Ethernet module CP343-1, which can run PROFINET, TCP/IP, S7 and other protocols in addition to Modbus TCP.

4 Configure the Ethernet module as the Modbus TCP Client to establish communication with the communication partner

The following uses the S7-300 single-site system and ModSim32 software as an example to describe how to configure the S7-300 single-site system as the Modbus TCP Client through the Ethernet module CP343-1 to communicate with Modsim32 as the Server.


  • FOXBORO RH924UQ controller module
  • FOXBORO E69F-TI2-S dual line temperature transmitter
  • FOXBORO 0399144 SY-0301059F SY-1025115C/SY-1025120E Combination Control Board
  • FOXBORO SY-60399001R SY-60301001RB SY-60702001RA/SY-61025006RA/SY-61025004RA/SY-61025001RA High performance industrial control module
  • FOXBORO 0399143 SY-0301060R SY-1025115C/SY-1025120E Sensor
  • FOXBORO 873EC-JIPFGZ Industrial Control Module
  • FOXBORO FBM230 P0926GU Communication Module
  • FOXBORO P0916PH P0916JS Input/Output Module
  • FOXBORO P0916PH P0916AL I/O module
  • FOXBORO 870ITEC-AYFNZ-7 Intelligent Electrochemical Transmitter
  • FOXBORO FBM207 P0914TD Voltage Monitor
  • FOXBORO FBM201D Discrete Input Module
  • FOXBORO P0923ZJ switch I/O interface module
  • FOXBORO P0923NG Intelligent Differential Pressure Transmitter
  • FOXBORO P0916KN power module
  • FOXBORO P0916KM I/A series module
  • FOXBORO P0916WE Terminal Cable
  • FOXBORO P0916VB power supply module
  • GE Hydran M2-X Transformer Condition Monitoring Device
  • FOXBORO P0916VL control module
  • FOXBORO P0916VC High Performance Terminal Cable
  • FOXBORO P0916WG system module
  • FOXBORO P0972ZQ interface channel isolation 8-input module
  • FOXBORO P0973BU high-frequency fiber optic jumper
  • FOXBORO P0926MX Splasher Confluencer
  • FOXBORO P0961S connector module
  • FOXBORO P0903NU system module
  • FOXBORO CM902WM control module
  • FOXBORO P0972VA ATS Processor Module
  • FOXBORO P0916Js digital input terminal module
  • FOXBORO PO961BC/CP40B control module
  • FOXBORO PO916JS Input/Output Module
  • FOXBORO PO911SM Compact Monitoring Module
  • FOXBORO P0972PP-NCNI Network Interface Module
  • FOXBORO P0971XU Control System Module
  • FOXBORO P0971DP Controller
  • FOXBORO P0970VB control module
  • FOXBORO P0970BP (internal) cable assembly
  • FOXBORO P0961EF-CP30B High Performance Digital Output Module
  • FOXBORO P0961CA fiber optic LAN module
  • FOXBORO P0926TM Modular I/O PLC Module
  • FOXBORO P0916BX series control system input/output module
  • FOXBORO P0916AG Compression Period Component
  • FOXBORO P0916AC I/A series module
  • FOXBORO P0912CB I/O Terminal Module
  • FOXBORO P0911VJ high-precision control module
  • FOXBORO P0911QC-C 8-channel isolated output module
  • FOXBORO P0911QB-C High Performance Industrial Module
  • FOXBORO P0903ZP Embedded System Debugging Module
  • FOXBORO P0903ZN control module
  • FOXBORO P0903ZL High Frequency Industrial Module
  • FOXBORO P0903ZE I/A series fieldbus isolation module
  • FOXBORO P0903NW Industrial Control Module
  • FOXBORO P0903NQ control module
  • FOXBORO P0903AA Industrial Control Module
  • FOXBORO FBM205 cable
  • FOXOBORO P0960HA I/A series gateway processor
  • FOXBORO P0926TP high-performance control module
  • FOXBORO P0926KL control module
  • FOXBORO P0926KK PLC system functional module
  • FOXBORO P0924AW wireless pressure transmitter
  • FOXBORO P0916NK differential pressure transmission cable
  • FOXBORO P0916JQ PLC module
  • FOXBORO P0916JP I/A series control module
  • FOXBORO P0916GG Digital Input Module
  • FOXBORO P0916DV I/A series digital input module
  • FOXBORO P0916DC Terminal Cable
  • FOXBORO P0916DB I/A series PLC module
  • FOXBORO P0914ZM recognition module
  • FOXBORO P0902YU control module
  • FOXBORO P0901XT Process Control Unit
  • FOXBORO P0800DV fieldbus extension cable
  • FOXBORO P0800DG Standard Communication Protocol Module
  • FOXBORO P0800DB Universal I/O Module
  • FOXBORO P0800DA Industrial Control Module
  • FOXBORO P0800CE control module
  • FOXBORO P0700TT Embedded System
  • FOXBORO P0500WX Control System Module
  • FOXBORO P0500RY Terminal Cable Assembly
  • FOXBORO P0500RU control module
  • FOXBORO P0500RG Terminal Cable
  • FOXBORO P0400ZG Node Bus NBI Interface Module
  • FOXBORO P0400GH fieldbus power module
  • FOXBORO FBM207B Voltage Monitoring/Contact Induction Input Module
  • FOXBORO FBM205 Input/Output Interface Module
  • FOXBORO FBM18 Industrial Controller Module
  • FOXBORO FBM12 Input/Output Module
  • FOXBORO FBM10 Modular Control System
  • FOXBORO FBM07 Analog/Digital Interface Module
  • FOXBORO FBM05 redundant analog input module
  • FOXBORO FBM02 thermocouple/MV input module
  • FOXBORO FBI10E fieldbus isolator
  • FOXBORO DNBT P0971WV Dual Node Bus Module
  • FOXBORO CP30 Control Processor
  • FOXBORO CM902WX Communication Processor
  • FOXBORO AD202MW Analog Output Module
  • FOXBORO 14A-FR Configuration and Process Integration Module
  • FOXOBORO 130K-N4-LLPF Controller
  • FUJI FVR004G5B-2 Variable Frequency Drive
  • FUJI FVR008E7S-2 High Efficiency Industrial Inverter
  • FUJI FVR008E7S-2UX AC driver module
  • FUJI RPXD2150-1T Voltage Regulator
  • FUJI NP1PU-048E Programmable Logic Control Module
  • FUJI NP1S-22 power module
  • FUJI NP1AYH4I-MR PLC module/rack
  • FUJI NP1BS-06/08 Programmable Controller
  • FUJI NP1X3206-A Digital Input Module
  • FUJI NP1Y16R-08 Digital Output Module
  • FUJI NP1Y32T09P1 high-speed output module
  • FUJI NP1BS-08 Base Plate​
  • FUJI A50L-2001-0232 power module
  • FUJI A50L-001-0266 # N Programmable Logic Control Module
  • GE GALIL DMC9940 Advanced Motion Controller
  • GE DMC-9940 Industrial Motion Control Card
  • GE IS200AEADH4A 109W3660P001 Input Terminal Board
  • GE IC660HHM501 Portable Genius I/O Diagnostic Display
  • GE VMIVME 4140-000 Analog Output Board
  • GE VMIVME 2540-300 Intelligent Counter
  • GE F650NFLF2G5HIP6E repeater
  • GE QPJ-SBR-201 Circuit Breaker Module
  • GE IC200CHS022E Compact I/O Carrier Module
  • GE IC695PSD140A Input Power Module
  • GE IC695CHS016-CA Backboard
  • GE IC800SS1228R02-CE Motor Controller
  • GE IS215WEMAH1A Input/Output Communication Terminal Board
  • GE CK12BE300 24-28V AC/DC Contactor
  • GE CK11CE300 contactor
  • GE DS3800NB1F1B1A Control Module