Memory to opc tag


I’m trying to base the value of my OPC tag depending on what my memory tag is set for. I’ve read the manual and have not had much luck in figuring this out. Below is what I expect it to look like but is not working. When I606 my memory tag is a 1 I want R606 my OPC tag to be a 4.

if“I606”) == 1:
system.tag.write(“R606”, 4)

What am I missing for this write script to work?

Thanks. returns a QualifiedValue, which you then need to get the value from.

if"I606").value == 1:
	system.tag.write("R606", 4)

Thanks Kevin