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.

<WRAP center round info 60%> 1Wire devices are not mapped to Modbus TCP and have to be implemented differently, eg. using OWFS. </W RAP>

Systemd service

The Modbus TCP server interface is provided by a unipitcp service. By default, the server only listening to request on the local loopback and requests from other hosts 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.

/opt/unipi-bin/unipi_tcp_server -p 502 -l

To make the change permanent, modify the service script in /lib/systemd/system/unipitcp.service and reload and restart the service by

systemctl daemon-reload


systemctl restart unipitcp