Entry type: FAQ, Entry ID: 34010717, Entry date: 12/16/2014
(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
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 through 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:
 

CPU Order number Firmware version Released ports Multiport
IM 151-8(F) PN/DP CPU 6ES7151-8AB00-0AB0
6ES7151-8FB00-0AB0
up to V2.6 2000 to 5000 No
IM 151-8(F) PN/DP CPU 6ES7151-8AB00-0AB0
6ES7151-8FB00-0AB0
from V2.7 all No
IM 151-8(F) PN/DP CPU 6ES7151-8AB01-0AB0
6ES7151-8FB01-0AB0
from V3.2 all Yes
IM 154-8 PN/DP CPU 6ES7154-8AB00-0AB0 up to V2.5 2000 to 5000 No
6ES7154-8AB01-0AB0 from V3.2 all Yes
IM 154-8F PN/DP CPU 6ES7154-8FB01-0AB0 from V3.2 all Yes
IM 154-8FX PN/DP CPU 6ES7154-8FX00-0AB0 from V3.2 all Yes
CPU 314C-2 PN/DP 6ES7314-6EH04-0AB0 from V3.3 all Yes
CPU 315(F)-2PN/DP 6ES7315-2EG10-0AB0
6ES7315-2EH13-0AB0
6ES7315-2FH10-0AB0
6ES7315-2FH13-0AB0
up to V2.3.4 2000 to 5000 No
CPU 315(F)-2PN/DP 6ES7315-2EH14-0AB0
6ES7315-2FJ14-0AB0
from V3.1 all Yes
CPU 315T-3 PN/DP 6ES7315-7TJ10-0AB0 from V3.2 all Yes
CPU 317(F)-2PN/DP 6ES7317-2EK13-0AB0
6ES7317-2FK13-0AB0
up to V2.3 2000 to 5000 No
CPU 317(F)-2PN/DP 6ES7317-2EK14-0AB0
6ES7317-2FK14-0AB0
from V3.1 all Yes
CPU 317T-3 PN/DP 6ES7317-7TK10-0AB0 from V3.2 all Yes
CPU 317TF-3 PN/DP 6ES7317-7UL10-0AB0 from V3.2 all Yes
CPU 319(F)-3PN/DP 6ES7318-2EL00-0AB0
6ES7318-2FL00-0AB0
up to V2.6 2000 to 5000 No
CPU 319(F)-3PN/DP 6ES7318-2EL00-0AB0
6ES7318-2FL00-0AB0
from V2.7 all No
CPU 319(F)-3PN/DP 6ES7318-2EL01-0AB0
6ES7318-2FL01-0AB0
from V3.2 all Yes
CPU 412-2 PN 6ES7412-2EK06-0AB0 from V6.0 all Yes
CPU 414-3PN/DP 6ES7414-3EM05-0AB0 from V5.0 all No
CPU 414(F)-3PN/DP 6ES7414-3EM06-0AB0
6ES7414-3FM06-0AB0
from V6.0 all Yes
CPU 416(F)-3PN/DP 6ES7416-3ER05-0AB0
6ES7416-3FR05-0AB0
from V5.0 all No
CPU 416(F)-3PN/DP 6ES7416-3ES06-0AB0
6ES7416-3FS06-0AB0
from V6.0 all Yes
CPU 412-5H PN/DP 6ES7412-5HK06-0AB0 from V6.0 all Yes
CPU 414-5H PN/DP 6ES7414-5HM06-0AB0 from V6.0 all Yes
CPU 416-5H PN/DP 6ES7416-5HS06-0AB0 from V6.0 all Yes
CPU 417-5H PN/DP 6ES7417-5HT06-0AB0 from V6.0 all Yes
CPU 1211C 6ES7211-1AD30-0XB0 from V1.02 all, except:
20, 21, 25, 80 102, 123, 5001, 34962, 34963 and 32964
No
6ES7211-1AE31-0XB0 from V3.0
6ES7211-1AE40-0XB0 from V4.0
6ES7211-1BD30-0XB0 from V1.02
6ES7211-1BE31-0XB0 from V3.0
6ES7211-1BE40-0XB0 from V4.0
6ES7211-1HD30-0XB0 from V1.02
6ES7211-1HE31-0XB0 from V3.0
6ES7211-1HE40-0XB0 from V4.0
CPU 1212C 6ES7212-1AD30-0XB0 from V1.02 all, except:
20, 21, 25, 80 102, 123, 5001, 34962, 34963 and 32964
No
6ES7212-1AE31-0XB0 from V3.0
6ES7212-1AE40-0XB0 from V4.0
6ES7212-1BD30-0XB0 from V1.02
6ES7212-1BE31-0XB0 from V3.0
6ES7212-1BE40-0XB0 from V4.0
6ES7212-1HD30-0XB0 from V1.02
6ES7212-1HE31-0XB0 from V3.0
6ES7212-1HE40-0XB0 from V4.0
CPU 1214C 6ES7214-1AE30-0XB0 from V1.02 all, except:
20, 21, 25, 80 102, 123, 5001, 34962, 34963 and 32964
No
6ES7214-1AG31-0XB0 from V3.0
6ES7214-1AG40-0XB0 from V4.0
6ES7214-1BE30-0XB0 from V1.02
6ES7214-1BG31-0XB0 from V3.0
6ES7214-1BG40-0XB0 from V4.0
6ES7214-1HE30-0XB0 from V1.02
6ES7214-1HG31-0XB0 from V3.0
6ES7214-1HG40-0XB0 from V4.0
CPU 1215C 6ES7215-1AG31-0XB0 from V3.0 all, except:
20, 21, 25, 80 102, 123, 5001, 34962, 34963 and 32964
No
6ES7215-1AG40-0XB0 from V4.0
6ES7215-1BG31-0XB0 from V3.0
6ES7215-1BG40-0XB0 from V4.0
6ES7215-1HG31-0XB0 from V3.0
6ES7215-1HG40-0XB0 from V4.0
CPU 1217C 6ES7217-1AG40-0XB0 from V4.0 all, except:
20, 21, 25, 80 102, 123, 5001, 34962, 34963 and 32964
No
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. 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 a 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.


Bild 01
  • All Modbus clients access the Modbus server through Port 502.
    In this case, it is necessary to have constant job-controlled establishment and clear-down 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 cleared down 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


Bild 02

Case 02


Bild 03


Bild 04


Bild 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