Tag = value else Tag = opc value

What’s the expression for doing this:
If tag0 == 1:
tag1 = 1
else
tag1 = value of opc item path xxxx

I can’t figure out how to do the opc part only

You can’t directly access an OPC path in an expression. You would need an OPC tag.
Then, with tag1 as an expression tag:

if([default]path/to/tag0} = 1,
   1,
   {[default]path/to/opcTag}
  )
2 Likes