Hi, I have 3 problems,
I have a system that read continuously (every 100ms) some flags from a PLC (3 DInt and a small DInt array of 5 values)
When flags are ready, I send data to the PLC
First problem, When I try to send an array of 100 or 600 values it fails, so I need to send my array in small chunk (I write small array of 20, starting at index 0, 20, 40, ...)
Second problem, when I send small chunk, it works the first time, but it fails with "Send Que Full" on the second one even if I wait 2 minutes or 10 minutes
To solve this, I added a Thread.Sleep(50) before each Write.
Third, when I close, I call Dispose(), and sometimes, I receive a "Send Que Full" error on Dispose, do I need to wait before calling Dispose()
Additional info:
I created a Threadsafe Read/Write architecture to prevent multiple call at once (had issue with that), but not where every write have a Sleep(50) which is not really usefull for performance.
I also call CloseConnection() before calling Dispose()