Tag update / script timing question

Let’s say I have all tags set up for a 1 sec scan class. If I use a script to write to a memory tag, does that tag’s value update immediately for use in the gateway or does it wait until it’s next scan?

Also, if that same memory tag has a script on a value change, does that script fire immediately on the change or does it wait until the next scan?

Simple question but I can’t quite find the answers anywhere.

Thanks!

1 Like

Memory tags don’t really poll, so they mostly ignore Scan Class/Tag Group rates. If you set a memory tag to a real slow poll rate, you’ll notice that tag writes occur immediately and outside of SC/TG updates.

Regarding your question on value change scripts, as the name implies, they trigger when the value changes. However, the catalyst for the change doesn’t matter, so in your memory tag example the script should trigger shortly after as the tag shows a new value, independently of what the SC/TG are doing.

Now when you start talking about tags that do automatically update when the SC/TG executes, such as OPC and Query Tags, value changes are mostly determined by polling, so you generally won’t see the results of asynchronous writes until the next scan. But, that leads away from your original questions about memory tags.