Cannot write to OPC tag via scripting

I’m able to manually write to this tag (by enabling the checkbox in pic) but have to enable the comm read/write option

2021-12-01_15-57-46

However, I cannot write to it through scripting

path = '[default]G21/G21/MES/MES Control Hold'
system.tag.writeBlocking(path, True)

Does anyone know what I might be overlooking?

What version of Ignition?
writeBlocking expects a list of paths and values, not a single value.

path = '[default]G21/G21/MES/MES Control Hold'
system.tag.writeBlocking([path], [True])
  • there’s a sneaky update at some point such that you can pass single values, but it’s still recommended to use lists all the time
1 Like

version 8.1.1.

I should also point out that it isn’t throwing any errors the way I have it?

Let me try the list of prarams. I’ll probably have to try it tomorrow but will get back to you here soon. :grinning:

That change I mentioned happened in 8.1.3, so I suspect that’s the issue.

1 Like