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 | 889 次浏览: | 🔊 Click to read aloud ❚❚ | 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.


  • Schneider LC1F500P7 Contactor 500A
  • Mitsubishi GT2512-STBA GT2512-STBD HMI
  • Omron NJ1019000 Machine Automation Controller
  • Siemens 6SN1112-1AC01-0AA1 Power Module
  • Eaton AE16KNS0AB Bimetallic Overload Relay
  • ABB 3bse036456r1 Ai825 Analog Input 4 Ch
  • Fuji Electric 7MBR50SB120-50 IGBT Module
  • Schneider XPSMC32ZP Safety Relay
  • Siemens 3VL4740-2AA36-0AA0 Circuit Breaker
  • ABB PharpSFan03000 Mpsiii Fan System Monitor
  • Honeywell DPCB21010002 IRTP131 PCB
  • Siemens 6ES7214-1HG40-0XB0 CPU 1214C
  • Siemens 6ES7350-1AH03-0AE0 FM 350-1
  • PILZ PNOZ mm0.1p 772001 Safety Relay
  • E2V EVX12DS130AGC 12DS130 Module
  • Siemens 3RT5066-6AB36 Contactor
  • HIRSCHMANN RS20-0800T1T1SDAEHC09.1.00 Switch
  • Q4XTILAF500-Q8 Laser Range Sensor
  • OMRON CVM1-BC103 Base Unit 145752
  • CAREL RITC400001 Card
  • Eaton LZMN3-AE400 Molded Case Circuit Breaker
  • Fanuc A20B-3300-0031 Control Circuit Board
  • Siemens 6ES7450-1AP01-0AE0 S7-400 FM 450-1
  • Fanuc A90L-0001-0317/F Spindle Fan Motor
  • Schneider TM262L10MESE8T Logic Controller
  • 8.4-inch NL8060BC21-06 Industrial Display
  • B&R X20CP0411 Compact CPU Control Unit
  • Schneider TSX P572634 M Modicon Premium CPU
  • Omron NX1P2-1140DT-BA Machine Controller
  • Siemens Ams-M35-K202 C8451-A20-A53-7
  • Omron FH-2050 Automation Controller
  • Omron CJ1W-NCF71 Position Control Unit
  • PILZ 777750 Safety Relay
  • BES58-P0CA0P-CD0H3PB0 Encoder 85409
  • Siemens 3VL5763-1DC36-0AA0 Molded Case Breaker
  • FANUC A16B-3200-0010 CPU Card
  • HINE DESIGN R94-1164 PLC Control Box 144760
  • Siemens PCU 50.5-C 6FC5210-0DF52-2AA0
  • PILZ PNOZ M0P Safety Relay 773110
  • Fanuc A20B-2101-0820 Control Circuit Board
  • Siemens 3SK1121-1AB40 Safety Relay
  • Pilz 772120 Safety Relay Expansion Module
  • Mitsubishi AX71 Input Module 16 Point
  • Siemens 6ES7350-1AH03-0AE0 S7-300 Extension
  • Fanuc A16B-3200-0010 CPU Card
  • Omron CJ1W-SCW22 Serial Communication Unit
  • Siemens 6SN1118-0DM21-0AA0 Control Module
  • Renishaw PHC10-3PLUS Controller Module
  • ABB AX521 1SAP250100R0001 Module
  • Omron NA5-9W001B-V1 PLC Module HMI
  • Infineon FF1000R17IE4 IGBT Power Module
  • Omron CJ1W-DA08C Analog Output Module
  • Omron CJ1G CPU45H CJ1H CPU66H CJ1G CPU43H CJ1W PA202
  • Omron CJ1W-DA041 Analog Output Module
  • Inductotherm 170-8031 PLC Control Module
  • Fuji Electric FPB56HR-A10 Programmable Logic Controller
  • Siemens 6SN1145-1BA01-0BA1 Infeed Regenerative Module
  • PILZ 777949 PSWZ X1P Safety Relay
  • Schneider 140NOM25200 DIO Head-end Adaptor
  • Siemens PXC5.E003 Controller BPZ
  • Schneider BMXEHC0800 Fast Counting Module 10kHz
  • Schneider BMXART0814 Isolated Thermocouple Inputs
  • Schneider BMXNOE0100 Ethernet Module 10 100 RJ45
  • LMX06-NS05 Sensor Industrial Proximity Switch
  • Siemens 6SN1145-1BB00-0FA1 Power Supply 156kW
  • Pro-face GP2500-LG41-24V HMI Graphic Panel
  • Keyence CV-3001 Vision System CV3OO1
  • Siemens 6GK5204-2BB10-2AA3 Ethernet Module
  • Pro-face PFXSP5500TPD 10.4in HMI LCD Display
  • Eu Automation 140DRA84000 Modicon Quantum Module
  • Siemens 6FC5210-0DF31-2AA0 Sinumerik PCU 50.3-C
  • Siemens 6SL3040-1NC00-0AA0 Sinumerik NX10.3 Extension
  • Gould AS-884A-111 Modicon 884 Controller
  • Allen Bradley 1336E-BRF30-AA-EN-HA2-L5 Impact Drive
  • Siemens 6FC5110-0BB02-0AA1 Sinumerik 840D CPU Card
  • Pilz 773500 PNOZmulti Expansion Module
  • Siemens 6ES7350-1AH03-0AE0 S7-300 Counter Module
  • Siemens 6FC5110-0DB01-0AA1 Sinumerik 840D Card
  • HPM 1D703-0040 Command 9000 VGA Console Board
  • OMRON CJ1W-PTS52 Temperature Unit
  • Sacs Technique PCD4.M12 Module
  • OMRON CJ1M-CPU11-ETN Ethernet CPU
  • OMRON CJ1M-CPU23 PLC CPU Unit
  • OMRON NX-SID800 Safety Input Unit
  • GE Fanuc Series 90-30 PLC
  • OMRON CJ1W-NCF71 Position Control
  • OMRON CJ1W-AD081-V1 Analog Input
  • OMRON FZ-S2M Vision Camera
  • OMRON R88D-UEP20V Servo Driver
  • OMRON F500-C10-ETN Vision Controller
  • OMRON CS1W-DA041 Analog Output Module
  • PRO-FACE GP577R-TC41-24VP HMI Panel
  • TRUTZSCHLER RAK 1 492-58.430.000 PLC Module
  • OMRON NX-OD5256 Output Module
  • Siemens 6AG1214-1AG40-4XB0 PLC
  • OMRON CJ1W-AD081-V1 Analog Unit
  • OMRON C500-CPU11-E PLC CPU
  • OMRON NX-ECC201 EtherCAT Coupler
  • OMRON F300-A20S Camera Interface
  • Mitsubishi 80173-109-01 PLC Module
  • Fanuc A16B-2200-0141 PCB Board
  • Lenze EPL10200 PLC Module
  • OMRON CJ1M-CPU13 PLC CPU Unit
  • Yaskawa SGMPH-04AAA61D-OY Motor
  • OMRON NX-SOD400 Safety Output
  • Control Techniques V1800 Flux Vector Drive
  • Yaskawa SGDH-04AE-OY Servo Drive
  • OMRON NT-DRT21 DeviceNet Interface
  • OMRON C500-RM001-V1 Remote I/O Master
  • OMRON C500-AD006 Analog Input Module
  • OMRON 3G3MV-A4055 Inverter Drive
  • OMRON F150-C15E-3 Vision Mate Controller
  • OMRON CS1G-CPU44H PLC CPU
  • GE Fanuc DS6800CCIE1E1D CPU Module
  • Omron CP1L-M30DR-A PLC CP1W-CIF01 CPU Unit
  • Heraeus 585923 2M130 M8 Electrode Assembly Sensor
  • Omron C40P-EDT1-D C Series PLC Controller
  • Yaskawa SGMGH-09DCA6F-OY Servo Motor SGDH Driver
  • Datalogic SG-BWS-T4-MT Safety Control Unit Category 4
  • Pro-face PFXLM4301TADDC HMI Controller LT-4301M
  • Mitsubishi FX1N-60MR-DS PLC Main Unit 60 I/O
  • Omron NJ501-1320 Sysmac Database Connection CPU
  • Omron CJ1W-ETN21 Ethernet Unit CJ Series Module
  • Siemens 6ES7517-3AP00-0AB0 CPU 1517-3 PN/DP
  • Pasaban MTC-3052 Fast I/O PLC Module
  • Mitsubishi FX3U-128MR/ES-A PLC
  • OMRON CS1W-CLK21 Controller Link Unit
  • Yokogawa ADV151-E63 Digital Input Module