I would like to see Leased Scan classes that will only fire when the Driven Tag condition is met, and the tag is leased. I was having communication issue with leased scan classes walking on each other when switching pages, this would turn every tag from my OPC server red, and this was unacceptable. I have come up with a way to use driven scan classes to keep any tags from going red, but I am still scanning tags that are unnecessary. Right now I have a timer script in the gateway that runs every 50 milliseconds and adds 50 to the value of a memory tag, and once it gets to 3000 it resets itself. I then have 5 different expression tags that are tied to the value of this “timer” tag and they go high for 150 milliseconds each when the “timer” tag is at certain values. I made sure these ranges would not overlap with each other. I then tied 5 scan classes to 1 shot on those expression tags. I was able to adjust exactly when the scan classes would hit in relation to each other this way. They scan somewhat like this:
1-2-5-1-2-1-3-1-2-1-4-2-1-3-1-2-5-1-2-1-3-1-2-4-1-2-1-3 and repeat every 3 seconds.
Scan class one is Critical priority
Scan class two is High priority
Scan class three is medium priority
scan class four is low priority
scan class five is lowest priority
This is working fine for now, but I what I really want to do is to be able to trigger leased scan classes this way. There might be a way with scripting or further expression based tags, but right now I am stumped.