12.09.2022, 13:01
(12.09.2022, 09:03)admin Wrote: 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.
That is the path i have chosen / forced to implement, at this time until I have more time to look and see what may be causing it,
The device is permitting only single connection at a time, and correct a small delay between Open, Close , Open is more reliable.
Why this is confusing is that using a Profile, with a persistent connection, appears to work find for reading and writing hence i left wondering what's different using script.
I did not want to use a profile, as there is a sequence of steps to be taken when writing changes to the device including a read to validate successful execution of the changes, thus i feel its too easy to screw up using a profile, as there is no control over manual modification when in configurator.
Are there any debug commands for modbus, or is it required to insert Wireshark on the port mirror to observer the packet transactions between Master and slave?