12.09.2022, 09:03
Seems like an issue in the Modbus device. If you say that creating new connection works fine then you can simply do reading first, then close the connection and open new one for writing when needed. But there might be another issue as some Modbus devices do not handle multiple connections well and do not correctly detect closed connections. So if you open one connection right after the first one is closed it might refuse it.