When we use Modbus in OpenPLC_v3 and like to use more and 1 Client to connect to Server to read the state of a variable. We need to understand that OpenPLC is SoftPLC. In other words its running on SBC (general-purpose computer). This means the computer could do wide range of task compare to real-time system that only do specific task.
Lets take this example from OpenPLC IDE, we make a pulse and use set/reset latch block to set output coil (LED_State)
To be able to get stable read from Client we need to understand the Polling Period in ms.
You may have read that 100-250ms is a good value for Modbus. That is not working for a simple example above.
It could be that your setup need 500ms or more to get stable read for output variable.
What you see in OpenPLC monitor doesn't mean other device will do the same thing. There is a latency to connect to other device and make request and get respond. Human could blink a eye 100ms, a game fps need 30ms so 500ms maybe feel slow but on other hand you get a stable read from SoftPLC.
If you need a lower latency its properly better to use MCU as Modbus Server and OpenPLC as SoftPLC.
This testing have been done on Raspberry Pi running Docker. You may ask would it not be better to run OpenPLC directly on Raspberry Pi without Docker to get lower Polling Period. That is what I thought too and it show 100-250ms Polling Period is not stable. In other words stable reading with Modbus TCP couldn't be performed with less Polling Period and 500ms.
Is this normal for OpenPLC running on Raspberry Pi ??
To test you need to connect other Device as Client to communicate with OpenPLC (Server)
The Client I have been using is Siemens LOGO and connect to OpenPLC and using snap7 do not have any problem.
I tested other Modbus Client and it looks to be more stable. So maybe its Siemens LOGO problem....maybe not (not sure)