Tag write verify

I’m dealing with another PLC system and I need to send tag values (from HMI) and then set a bit that tells this system to use those tag values. My question, what’s the best way to know for sure that Ignition has written the values before I set this bit. Is system.opc.write the best way, or do I need to do a read on all tags to verify and be 100% sure?

I suppose you’ll have to read the values back and verify them.

Even that’s not 100% though. You have no idea if in between reading the value to verify it and writing to this other bit that something didn’t again change those values… even if that’s unlikely :slight_smile:

Thanks @Kevin.Herron

Does the order in which I perform the write(s) or define the paths if doing writeBlock matter? Meaning, if I do a writeBlock, can I simply use the last path to do the verify? What if I do a bunch of OPC writes, by using the last one would that “guarantee” anything? These would be fired from within a script, most likely on a button.

There’s only 2 levels of trust here:

  1. the tag write didn’t throw exception or return bad quality codes, it must have worked.

  2. I read every value I wrote back and verified it is what I expect it to be, it must have worked.

My confusion is I have tested for about 15 minutes and it’s working where all values are updated when I do my bit set. These tags are in the default tag group.

system.tag.writeBlocking(paths, values)

I’ve tried to simulate the best I know how for normal conditions, and it hasn’t failed once. Since there are only a handful of tags I think I will still do a read just to make sure.

Couldn’t you verify the timestamp of the last write to the tag is after some other timestamp?

Is the timestamp foolproof? Meaning, if I get a timestamp does that actually mean the write was successful, or assumed?

It’s my understanding and experience that the timestamp indicates the last time the value was updated, whether it was the same value as it held previously or not. I’m not a Tag expert though, so perhaps someone else could weigh-in.