Logic Machine Forum
Modbus Slave slow updaterate - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: Modbus Slave slow updaterate (/showthread.php?tid=3662)



Modbus Slave slow updaterate - Christian_EWW - 03.11.2021

Hello.

I have a problem with the implementation of a Modbus Slave, like it is described here: https://openrb.com/lm-as-modbus-tcp-slave
At the moment I have around 30 modbus registers and around 1250 virtual objcts active.
All works fine when there are not many writes to the objects but as soon as I update many objects cyclic (10s) it takes up to a few minutes that the values in the modbus registers are updated.
So I always read old values via modbus. When the cyclic updates of the virtual objects are stopped, the values readable via modbus chatching up slowly and after a while the are up to date.
It seems that there is some kind of queue which it getting longer and longer to be processed. The CPU load seems fine.
Is there a way to speed things up? It would be also fine when the register values are updated cyclic.

Thanks,
Christian


RE: Modbus Slave slow updaterate - admin - 03.11.2021

Try replacing knxclient:step() with knxclient:loop(0.1)


RE: Modbus Slave slow updaterate - Christian_EWW - 04.11.2021

Works perfect, thank you. Smile 
Getting the documentation to this internal functions would make things much easier. Angel