This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Modbus TCP Writes Fail after Reads
#3
(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?
Reply


Messages In This Thread
RE: Modbus TCP Writes Fail after Reads - by merlin - 12.09.2022, 13:01

Forum Jump: