In my applications I use arrays only for alarms. Also, when I have to manage booleans, I prefer to read one or two contiguous words and then declare booleans as internal tags referring to their respective offset in those words. I assume that reading arrays of booleans would be almost the same thing.
In opposition to the previous release (one big file), alarms are now polled at a rate of 5 seconds. All other tags are polled at 2 seconds in order to assure reactiveness to the user.
I have realize now that declaring different polling rates in different source files, while requesting less bandwidth, induces the app to open different Modbus connections to the same PLC. Now I have three active connections: a Modbus/TCP @ 5 s, another one @ 2 s and a Modbus/TCP (CDAB) @ 2 s. I would expected a single connection with different istantaneous load depending on the different polling rates.
Could this be the reason of the increased reactiveness?
If so, considering that my PLCs can support many TCP connections, it could be a workaround to speed up my applications. I’m thinking to a scenario where I declare similar polling speeds in different source files (e.g. 1,9 s, 2 s, 2,1 s, and so on) only to obtain multiple connections. I haven’t done this test yet.
The question might seem trivial… but I don’t know if the app manages connections in a multithread way.