Configuration of MODBUS TCP/IP Server

Adding a MODBUS TCP/IP Server to device tree

../_images/93b728a7ef81f1e00a317f345f9b0b3a

A MODBUS TCP/IP Server instance can be added to any specific ETHERNET interface / IP address. Each interface supports max. one instance of Modbus TCP/IP Server. Other protocols can be added in parallel.

  1. Right click on ETH interface and click Add object.

    The window Add object below: ETH appears.

  2. Select Modbus TCP/IP Server and click Add object.

    The node Modbus_TCP_IP_Server is added.

Setting the parameters of Modbus_TCP_IP_Server

../_images/62fe7397ef81f3280a317f343958e5b0

Byte Order

Format/Endianess for the transmission of WORD values (register) within the request/response telegram (default: Big Endian).

Port

TCP Port on which the Server listens.

Startup Behaviour

This parameter specifies how the Server behaves when configuration data is loaded (e.g. on download). It’s default value is Active. This means the Server is immediately addressable after configuration has been performed. In case the Server should be activated later on during runtime by means of Function Block ModTcpServOnOff this parameter value has to be set to No activity. Parameter Behaviour in state inactive then specifies the Server’s behaviour during the inactive phase.

Behaviour in state inactive

This parameter specifies how the Server behaves in inactive state. This state may be set at the very beginning (parameter Startup Behaviour = No activity) and/or requested during runtime calling Function Block ModTcpServOnOff. It’s default value is No activity. This means the Server is not addressable at all (no listening socket on TCP/IP) when it is inactive. Using this setting, any requests by MODBUS TCP Clients lead to the result Failed to connect to Server or Timeout. All other parameter values make the Server respond with an exception code to any requests by MODBUS TCP Clients.

The presentation of the icon next to the MODBUS TCP Server in the device tree depends on the state of the Server:

../_images/6187b125ef81eed40a317f340d23c66b

Note

:strong:Attention:

Exception code 9 is actually not defined by MODBUS specification. This may cause problems using a different MODBUS TCP Client than AC500 V3.

Disable

Parameter Default Value Meaning
Disable write to %MB from 0 0 … 65535 Disable write access starting at %MBx
Disable write to %MB to 0 0 … 65535 Disable write access up to %MBx
Disable read from %MB from 0 0 … 65535 Disable read access starting at %MBx
Disable read from %MBx to 0 0 … 65535 Disable read access up at %MBx

It is possible to disable read and/or write access to individual segments. Reading/writing is disabled beginning at the set start address and is valid up to the set end address (inclusive).