Multiple Scan Class Behavior

I currently have a dilemma that I am trying to overcome.

I have a group of gas meter tags and plunger tags that all reside on the same device. I would like to only poll the plunger tags twice a day where as the gas meter tags should update every 15 minutes. I would ALSO like my users to be able to send a demand poll to ACM (autosol) if they would like to from a screen.

I am having a really hard time trying to accomplish this behavior. I have my plunger tags set to a driven scan group that looks at an expression tag that only is true twice a day, however, if I try and issue a demand scan for the plunger tags, they do not update.

Thoughts? Suggestions? Am I doing something wrong?

How are you triggering the demand scan? Are you making the expression tag that triggers the driven group true when you want the demand scan in addition to the usual twice a day it is true?

The demand scan is triggered by just writing a one to the DEMANDNOW point for the device in ACM. I thought about making the expression tag that drives the group true when I want to perform a demand, however, i have multiple plunger UDTs that are using this scan class and I ONLY want that one device to update, not all of them. This means I would have to make a scan class for each instance of my UDT.

That makes sense. I’m not familiar with your device, so I may be missing something, but I think the issue is scan classes are only going to update at their scan rate. system.opc.readValue may accomplish what you’re looking for (will return the current value, bypassing the tag system).

Awesome, I’ll give that a try!

Here’s one method–extract the arguments for system.opc.readValue from the tag and get the value from the source via an OPC read like this:

tagPath = 'yourTagPath'
tagStubs = ['.OPCServer', '.OPCItemPath']
opcServer, opcPath = [x.value for x in system.tag.readAll([tagPath + s for s in tagStubs])]
system.opc.readValue(opcServer, opcPath).value