This is an old revision of the document!

Modbus TCP Server

Modbus TCP is standard interface to interact with the IOs of Unipi PLCs. Each PLC has its own mapping of I/O to a Modbus Register or Coil which can be downloaded from the Products section.


1Wire devices are not mapped to Modbus TCP and have to be implemented differently, eg. using OWFS.

The Modbus TCP server interface is provided by a unipitcp service. By default, the server only listens to request on the local loopback. Requests from other hosts than are forbidden due to security reasons. To change this, the unipitcp has to be run with the parameter “-l” (-L). If you wish, you can also change the listening port in parameter -p to a different one than the default 502.

/opt/unipi/tools/unipi_tcp_server -p 503 -l

To make the change permanent, modify the default configuration file /etc/default/unipi-modbus-tools and restart the service by

systemctl restart unipitcp