I wanted to get some expert advice on a distributed measurement and control system I've been tasked to create for a research project. Essentially, I have to gather measurements from a number of devices on a LAN, where the devices can vary in make/model and communication protocol (power meters using MODBUS, proprietary communication protocols, or BACnet) These devices have varying/intermittent response rates on the LAN, mostly due to their distance from the router. I've followed two approaches in the past with mixed results:
1) Centralized DAQ Loop
I try to go with an OO approach where the parent class is Device, and it's "Get Measurement" VI is overridden with device specific commands. A configuration file indicates the devices that need to be queried and the DAQ loop just takes care of any new devices that are added. The issue is that some devices have slower response rates than others, which slows down the thread considerably. Some devices also need to have their connection refreshed - which again, doesn't help. This was abandoned pretty early on.
2) One loop per device
Hacky solution but it's worked so far - each loop takes care of it's own device, with the timing being controlled by a software defined clock. Definitely not scalable.
Has anyone faced this in the past? I get the feeling that the Actor Framework might address this ...but just wanted to check before getting too far in.