I have a bit of a unique situation with a couple potential solutions and wanted to get some feedback.
There is a template that could be dropped on many different windows. That template is reading a bunch of tags at a relatively fast rate through scripting and storing them in a local dataset. By “bunch of tags” I mean roughly 250 instances of a UDT with about 10 tags each so 2,500 every second. I would like those tags’ scan classes to only be running when a window with this template is open.
What I’ve tried:
- I don’t think I can use the leased scan class as my understanding is I’d need all 2,500 tags bound to something on the template / window
- I tried a driven scan class where I increment / decrement a memory tag in scripting as things open and close and the driving tag is this memory tag being greater than 0. I’ve tried this on the template itself looking at the “componentRunning” property value changing as well as the “internalFrameActivated/Closed” events of the window. Both kind of work but if I kill the project in task manager the closed events don’t seem to fire. I tried handling this in a client shutdown script but that didn’t fire either. So I think as long as I can’t reliably handle a force close then this path won’t work at all.
Thanks in advance,