Scratchpad Telemetry

In situations with lots of remote sites, it is usually best to have a master site that polls the remote sites and then the HMI communicates only to the master site. Here is my telemetry framework that uses the scratchpad on the controllers for telemetry data. The slave code also includes my method for reducing time consuming I/O reads by reading the I/O once and copying the I/O data into local variables for use in the strategy. The master code polls the sites and keeps track of communication statistics to each site. The master also synchronizes the time on each remote site. I have used this system with upwards of 20 remote sites and it works great. Some of the sites also have a touchpanel that communicates Modbus to the controller to the same telemetry scratchpad registers. The subroutines correctly update everything even for writes from other devices like these Modbus touchpanels. I am including a Master strategy and one example slave strategy called Slave 1. (Not to be confused with Boba Fett’s ship) I have not actually tested these hacked up example strategies, but I created them from strategies that have been functioning in real life.

Wondering if anyone would have a PAC Control Basic version of this example?