Skip to content

Modbus TCP

logiccloud Control Runtimes on your Edge devices can be connected to your I/Os or other devices via Modbus. To do this, a new Modbus connection must be created and parameterized in the connection settings of the respective runtime.

modbus TCP

Select Add Modbus connection and enter all the necessary information such as the name, IP and port of the device. You can also adjust the poll period and make further settings.

add modbus connection

A unit can be created after the Modbus connection. To do this, right-click on the connection and select Add Modbus unit. Here you can specify the name, the address and the byte order.

modbus unit

Beyond the name, IP, port and poll period, a Modbus TCP connection exposes the following tuning options:

  • Connect timeout: timeout (ms) when establishing the TCP connection
  • Request timeout: timeout (ms) for an individual request
  • Wait between calls: minimum wait time (ms) inserted between consecutive requests

To reduce the number of transactions, consecutive registers can be read or written in a single multi-register request:

  • Use read multiple: read several registers per request instead of one at a time
  • Read chunk size: maximum number of registers read in one multi-read request
  • Use write multiple: write several registers per request instead of one at a time
  • Write chunk size: maximum number of registers written in one multi-write request

For the serial-line equivalent (baud rate, parity, RS-485 flow control), see Modbus RTU.

You can map the process variables with Modbus registers. To do this, select the relevant registers, for example Input Registers, and create a new register mapping using the green + icon. You can then define the address, the process variable and the data type.

modbus mapping

  • Address: Register address
  • Variable name: Variable from your program
  • Data type: data type of variable