Modbus multi reading based on DB table of IP addresses

Hi all,
do you have any knowledge, how to read from modbus TCP devices, based on DB table?? I have an example, which I have accumulated it by scripts from the web. Some things I have changed, but I think that is not correct, because sometimes devices cannot be loaded. If I have checked it by QMOD Master with corresponding settings, no packets are lost. May be my scripts are delayed, or not correct. Can you, please, help me to simplify it, or do something new ?
My actual flow is attached.
flows_modbus.json (69.7 KB)