How to test tag behavior without affecting running Ignition program

I have a script that writes to a SQL database and then needs to trigger a tag at the end of the script.

This is what I have at the end of my script to trigger the Boolean tag:

system.tag.write("Laguna Projects/" + selected_saw + "/Reset_Blade_Counts", 1)
                        
import time
time.sleep(1)
                        
system.tag.write("Laguna Projects/" + selected_saw + "/Reset_Blade_Counts", 0)

I am wanting a way to test that this is in fact resetting the blade counts. I read online that if I made a copy of the tag, it would not affect the original but when I wrote to the test tag, it wrote to both so I don't believe that to be true.

My question is... how can I test that this is working without affecting the current tags that are being used in the program? I don't want to actually reset their blade counts but want to make sure this is working as expected. Any suggestions?

Can you give more details about this ?
How did you copy the tag, what kind of tag is it, etc.

I hit "copy" and then "paste" and renamed the new tag. It was an int4 tag.

If this was an OPC tag or reference tag or derived tag, copying makes a new tag that is still connected to the same underlying target. So when you write to the copy, the original gets updated too.

Make a new memory tag, not a copy.

1 Like

It was an OPC tag. I'll do the memory tag instead of hitting copy and paste on the original tag. Thanks!