Entry type: FAQ, Entry ID: 34010717, Entry date: 08/24/2015
(1)
Rate

Which ports are released for Modbus/TCP communication and how many Modbus clients can communicate with a SIMATIC S7 CPU as Modbus server?

  • Entry
  • Associated product(s)
Ports released for Modbus/TCP communication and maximum number of Modbus clients that can communicate with a SIMATIC S7 CPU as Modbus server.

The following ports are used by the Modbus/TCP protocol.

  • By default, the protocol uses Port 502 as local port in the Modbus server.
  • You can set the local port as you wish in the Modbus client. Usually, port numbers starting at 2000 are used.

If the communication partners offer the option of setting the port numbers for the server, then it is also possible to communicate using the Modbus/TCP protocol via a port other than Port 502.

If you use the SIMATIC as Modbus server, then there are restrictions for a number of CPUs regarding the released port numbers.
The following port numbers are released for the local port.
 

CPUArticle numberFirmware versionReleased portsMultiport
IM 151-8(F) PN/DP CPU6ES7151-8AB00-0AB0
6ES7151-8FB00-0AB0
Up to V2.62000 to 5000No
IM 151-8(F) PN/DP CPU6ES7151-8AB00-0AB0
6ES7151-8FB00-0AB0
V2.7 and higherAllNo
IM 151-8(F) PN/DP CPU6ES7151-8AB01-0AB0
6ES7151-8FB01-0AB0
V3.2 and higherAllYes
IM 154-8 PN/DP CPU6ES7154-8AB00-0AB0Up to V2.52000 to 5000No
6ES7154-8AB01-0AB0V3.2 and higherAllYes
IM 154-8F PN/DP CPU6ES7154-8FB01-0AB0V3.2 and higherAllYes
IM 154-8FX PN/DP CPU6ES7154-8FX00-0AB0V3.2 and higherAllYes
CPU 314C-2 PN/DP6ES7314-6EH04-0AB0V3.3 and higherAllYes
CPU 315(F)-2PN/DP6ES7315-2EG10-0AB0
6ES7315-2EH13-0AB0
6ES7315-2FH10-0AB0
6ES7315-2FH13-0AB0
Up to V2.3.42000 to 5000No
CPU 315(F)-2PN/DP6ES7315-2EH14-0AB0
6ES7315-2FJ14-0AB0
V3.1 and higherAllYes
CPU 315T-3 PN/DP6ES7315-7TJ10-0AB0V3.2 and higherAllYes
CPU 317(F)-2PN/DP6ES7317-2EK13-0AB0
6ES7317-2FK13-0AB0
Up to V2.32000 to 5000No
CPU 317(F)-2PN/DP6ES7317-2EK14-0AB0
6ES7317-2FK14-0AB0
V3.1 and higherAllYes
CPU 317T-3 PN/DP6ES7317-7TK10-0AB0V3.2 and higherAllYes
CPU 317TF-3 PN/DP6ES7317-7UL10-0AB0V3.2 and higherAllYes
CPU 319(F)-3PN/DP6ES7318-2EL00-0AB0
6ES7318-2FL00-0AB0
Up to V2.62000 to 5000No
CPU 319(F)-3PN/DP6ES7318-2EL00-0AB0
6ES7318-2FL00-0AB0
V2.7 and higherAllNo
CPU 319(F)-3PN/DP6ES7318-2EL01-0AB0
6ES7318-2FL01-0AB0
V3.2 and higherAllYes
CPU 412-2 PN6ES7412-2EK06-0AB0V6.0 and higherAllYes
CPU 414-3PN/DP6ES7414-3EM05-0AB0V5.0 and higherAllNo
CPU 414(F)-3PN/DP6ES7414-3EM06-0AB0
6ES7414-3FM06-0AB0
V6.0 and higherAllYes
CPU 416(F)-3PN/DP6ES7416-3ER05-0AB0
6ES7416-3FR05-0AB0
V5.0 and higherAllNo
CPU 416(F)-3PN/DP6ES7416-3ES06-0AB0
6ES7416-3FS06-0AB0
V6.0 and higherAllYes
CPU 412-5H PN/DP6ES7412-5HK06-0AB0V6.0 and higherAllYes
CPU 414-5H PN/DP6ES7414-5HM06-0AB0V6.0 and higherAllYes
CPU 416-5H PN/DP6ES7416-5HS06-0AB0V6.0 and higherAllYes
CPU 417-5H PN/DP6ES7417-5HT06-0AB0V6.0 and higherAllYes
CPU 1211C6ES7211-1AD30-0XB0V1.02 and higherAll except:
20, 21, 25, 80, 102, 123, 5001, 34962, 34963 and 32964
No
6ES7211-1AE31-0XB0V3.0 and higher
6ES7211-1AE40-0XB0V4.0 and higher
6ES7211-1BD30-0XB0V1.02 and higher
6ES7211-1BE31-0XB0V3.0 and higher
6ES7211-1BE40-0XB0V4.0 and higher
6ES7211-1HD30-0XB0V1.02 and higher
6ES7211-1HE31-0XB0V3.0 and higher
6ES7211-1HE40-0XB0V4.0 and higher
CPU 1212C6ES7212-1AD30-0XB0V1.02 and higherAll except:
20, 21, 25, 80, 102, 123, 5001, 34962, 34963 and 32964
No
6ES7212-1AE31-0XB0V3.0 and higher
6ES7212-1AE40-0XB0V4.0 and higher
6ES7212-1BD30-0XB0V1.02 and higher
6ES7212-1BE31-0XB0V3.0 and higher
6ES7212-1BE40-0XB0V4.0 and higher
6ES7212-1HD30-0XB0V1.02 and higher
6ES7212-1HE31-0XB0V3.0 and higher
6ES7212-1HE40-0XB0V4.0 and higher
CPU 1214C6ES7214-1AE30-0XB0V1.02 and higherAll except:
20, 21, 25, 80, 102, 123, 5001, 34962, 34963 and 32964
No
6ES7214-1AG31-0XB0V3.0 and higher
6ES7214-1AG40-0XB0V4.0 and higher
6ES7214-1BE30-0XB0V1.02 and higher
6ES7214-1BG31-0XB0V3.0 and higher
6ES7214-1BG40-0XB0V4.0 and higher
6ES7214-1HE30-0XB0V1.02 and higher
6ES7214-1HG31-0XB0V3.0 and higher
6ES7214-1HG40-0XB0V4.0 and higher
CPU 1215C6ES7215-1AG31-0XB0V3.0 and higherAll except:
20, 21, 25, 80, 102, 123, 5001, 34962, 34963 and 32964
No
6ES7215-1AG40-0XB0V4.0 and higher
6ES7215-1BG31-0XB0V3.0 and higher
6ES7215-1BG40-0XB0V4.0 and higher
6ES7215-1HG31-0XB0V3.0 and higher
6ES7215-1HG40-0XB0V4.0 and higher
CPU 1217C6ES7217-1AG40-0XB0V4.0 and higherAll except:
20, 21, 25, 80, 102, 123, 5001, 34962, 34963 and 32964
No
CPU 1511-1 PN6ES7511-1AK00-0AB0
6ES7511-1AK01-0AB0
V1.1 and higherAll except:
20, 21, 25, 80, 102, 123, 135, 161, 162, 443, 5001, 34962, 34963 and 32964
Yes
CPU 1513-1 PN6ES7511-1FK00-0AB0
6ES7511-1FK01-0AB0
V1.7 and higherAll except:
20, 21, 25, 80, 102, 123, 135, 161, 162, 443, 5001, 34962, 34963 and 32964
Yes
CPU 1513-1 PN6ES7513-1AL00-0AB0
6ES7513-1AL01-0AB0
V1.1 and higherAll except:
20, 21, 25, 80, 102, 123, 135, 161, 162, 443, 5001, 34962, 34963 and 32964
Yes
CPU 1513F-1 PN6ES7513-1FL00-0AB0
6ES7513-1FL01-0AB0
V1.7 and higherAll except:
20, 21, 25, 80, 102, 123, 135, 161, 162, 443, 5001, 34962, 34963 and 32964
Yes
CPU 1515-2 PN

6ES7515-2AM00-0AB0
6ES7515-2AM01-0AB0

V1.5 and higherAll except:
20, 21, 25, 80, 102, 123, 135, 161, 162, 443, 5001, 34962, 34963 and 32964
Yes
CPU 1515F-2 PN6ES7515-2FM00-0AB0
6ES7515-2FM01-0AB0
V1.6 and higherAll except:
20, 21, 25, 80, 102, 123, 135, 161, 162, 443, 5001, 34962, 34963 and 32964
Yes
CPU 1516-3 PN/DP6ES7516-3AN00-0AB0
6ES7516-3AN01-0AB0
V1.1 and higherAll except:
20, 21, 25, 80, 102, 123, 135, 161, 162, 443, 5001, 34962, 34963 and 32964
Yes
CPU 1516F-3 PN/DP6ES7516-3FN00-0AB0
6ES7516-3FN01-0AB0
V1.5 and higherAll except:
20, 21, 25, 80, 102, 123, 135, 161, 162, 443, 5001, 34962, 34963 and 32964
Yes
CPU 1517(F)-3 PN/DP6ES7517-3AP00-0AB0
6ES7517-3FP00-0AB0
V1.6 and higherAll except:
20, 21, 25, 80, 102, 123, 135, 161, 162, 443, 5001, 34962, 34963 and 32964
Yes
CPU 1518(F)-4 PN/DP6ES7518-4AP00-0AB0
6ES7518-4FP00-0AB0
V1.5 and higherAll except:
20, 21, 25, 80, 102, 123, 135, 161, 162, 443, 5001, 34962, 34963 and 32964
Yes
CPU 1510SP-1 PN6ES7510-1DJ00-0AB0
6ES7510-1DJ01-0AB0
V1.6 and higherAll except:
20, 21, 25, 80, 102, 123, 135, 161, 162, 443, 5001, 34962, 34963 and 32964
Yes
CPU 1510SP F-1 PN6ES7510-1SJ00-0AB0
6ES7510-1SJ01-0AB0
V1.7 and higherAll except:
20, 21, 25, 80, 102, 123, 135, 161, 162, 443, 5001, 34962, 34963 and 32964
Yes
CPU 1512SP-1 PN6ES7512-1DK00-0AB0
6ES7512-1DK01-0AB0
V1.6 and higherAll except:
20, 21, 25, 80, 102, 123, 135, 161, 162, 443, 5001, 34962, 34963 and 32964
Yes
CPU 1512SP F-1 PN6ES7512-1SK00-0AB0
6ES7512-1SK01-0AB0
V1.7 and higherAll except:
20, 21, 25, 80, 102, 123, 135, 161, 162, 443, 5001, 34962, 34963 and 32964
Yes
Table 01

If you use the SIMATIC CPU as Modbus client, then there are no restrictions regarding the released port numbers. You can set any remote port of the CPU.

Number of possible communication connections using Modbus/TCP protocol
The maximum number of Modbus clients that can be connected to one S7-300 or S7-400 CPU with integrated PROFINET interface is limited by the CPU-specific quantity frameworks.
The maximum number of Modbus clients that can be connected to one S7-1500 CPU is determined by the number of Modbus TCP server FB instances running in parallel on the CPU and the maximum number of free connection resources.
If the CPU with integrated PROFINET interface does not support multiple ports, each local port of the CPU can only be used once, which means that when a communication connection has been established for one local port of the CPU, then you cannot set up another connection through that port.
If a non-multiport CPU is used as Modbus server, then there are two options for establishing communication connections to multiple Modbus clients.

  • You parameterize different port numbers for the Modbus server in the Modbus client.

 


Fig. 01
 
  • All Modbus clients access the Modbus server through Port 502.
    In this case, it is necessary to have constant job-controlled establishment and termination of connections. The Modbus server can communicate with only 1 Modbus client through Port 502 at any one time. The connection to the first Modbus client must be terminated and Port 502 released before another Modbus client can access the Modbus server. As soon as Port 502 is released, another Modbus client can access the Modbus server via that port.
     

Case 01


Fig. 02
 

Case 02


Fig. 03

 


Fig. 04

 


Fig. 05

Further Information
More information about multiport-compatibility is available in the technical data of the CPU.
If the CPU supports multiple passive connections per port for open IE communication, it is multiport-compatible.
 

Manual Entry ID
SIMATIC S7-300 CPU 31xC and CPU 31x: Technical Data

12996906

SIMATIC Distributed IO ET 200S Interface Module IM151-8 PN/DP CPU

47409312

Automation System SIMATIC S7-400 CPU Specifications

53385241

SIMATIC S7-1200 Automation System

36932465

Table 02

Security Notes 
Siemens provides products and solutions with industrial security functions that support the secure operation of plants, solutions, machines, equipment and/or networks. They are important components in a holistic industrial security concept. With this in mind, Siemens’ products and solutions undergo continuous development. Siemens recommends strongly that you regularly check for product updates.
For the secure operation of Siemens products and solutions, it is necessary to take suitable preventive action (e.g. cell protection concept) and integrate each component into a holistic, state-of-the-art industrial security concept. Third-party products that may be in use should also be considered. For more information about industrial security, visit 
http://www.siemens.com/industrialsecurity.

To stay informed about product updates as they occur, sign up for a product-specific newsletter.
For more information, visit 
http://support.industry.siemens.com