Driven Tags and Gateway Tag Change Scripts

Hi Guys, I’ve got a timing question…

Say I have the following tags:

Tag A (Bool)
Tags B,C,D,…Z (Whole bunch of tags)

I set up Tag A to scan every 500ms
I set up Tags B,C,D,…Z to be driven as a one-shot from Tag A going 0 > 1

I have a Gateway Tag Change Script that triggers from Tag A going 0 > 1

The Tag Change Script uses values from tags B,C,D,…Z

Will the script use the latest values from the PLC (freshly driven values) or the cached values from the last drive? And will the behavior be 100% consistent?

There’s no guarantee on any of the timing.

If you want to be sure your tag change script uses current values it should call system.opc.readValues for all the values it needs.

If it uses a system.tag call it’s going to get the current value of the tag with no guarantee it’s executing before or after the one-shot values arrived.

1 Like

Excellent - thank you Kevin - man you guys are fast…