TCP One master Five server .... problem after master stop and master re-run

17 views
Skip to first unread message

giorgio foga

unread,
Dec 5, 2016, 8:07:39 AM12/5/16
to libmodbus
Hello at all,

basically I use test_server and test_client example and modify it to TCP comunication only and read/write holding_register only .... I'm over ubuntu 14.04 lowlatency 4.0.1 for master and ubuntu 10.04 rtai for server (but is a server.c userspace file).
I have five servers write using test_server.c as example and one master in c++ QT5 (but using test_client example and C grammar. I'm not use Qtmodbus library). All phisicall connection It is on ehernet switch device. The master is a Qthread.
The connection is fine, and all works good.
The same c++ Qt5 have and other Qthread with a RS485 server that send request and write i/o and register on 3 PLC slave. All work fine.

In case of Qt5 RS485 Qthread and Qt5 program stop, I can whitout problem run again and the connection with PLC slave establish correct again.
But for Qt5 master TCP I have these preblem, after Qt5 program stop I must reboot all ubuntu 10.04 modbus server if I would I'm able to make a TCP connection again.

What is the best solution for make the reconnection of TCP Master to server automatic (no reboot of server??)???

Regards
Giorgio
Reply all
Reply to author
Forward
0 new messages