1
Support Questions / Re: Array of DataSubscriber2 at runtime
« on: August 09, 2018, 09:39:05 PM »
Thanks Archie,
Went a slightly different route. I create one driver and two DataSubscribers per PLC. Identifying who is talking is critical.
Subscribing directly through the driver and identifying the data subscribed vs identifying the driver with two DS's is similar. So I went the latter.
Not super elegant, but works. Capped at 25 PLC's configurable via the ini file.
I have 25 (x2) simple event handler sub routines pre-configured that I link new DS's to as required, they in turn call a common function to process the data passing on their ID and incoming data. Works fine.
Thanks again.
Went a slightly different route. I create one driver and two DataSubscribers per PLC. Identifying who is talking is critical.
Subscribing directly through the driver and identifying the data subscribed vs identifying the driver with two DS's is similar. So I went the latter.
Not super elegant, but works. Capped at 25 PLC's configurable via the ini file.
I have 25 (x2) simple event handler sub routines pre-configured that I link new DS's to as required, they in turn call a common function to process the data passing on their ID and incoming data. Works fine.
Thanks again.