System.opc.write Not Working...for only booleans

Ignition Gateway: 7.9.13

I am attempting to do something which I believed to be simple, a direct OPC write to a boolean value in an AB PLC. When that failed, I created a Int tag and a String tag in the PLC to test if it might be a permissions issue. However, those were both successful, as seen below. Here is my code as well:

system.opc.writeValue("Ignition OPC-UA Server","ns=1;s=[Plt-SI-TxtRob01]JLRBool",1)
system.opc.writeValue("Ignition OPC-UA Server","ns=1;s=[Plt-SI-TxtRob01]JLRInt",10)
system.opc.writeValue("Ignition OPC-UA Server","ns=1;s=[Plt-SI-TxtRob01]JLRString","Test")

Thoughts?

Does using True or False instead of 1 or 0 work?

Copying and pasting variations of what I’ve tried:

‘True’
“True”
‘true’
“True”

Dang, it’s case sensitive and quotations cannot be used. true returned a “no value” error but True worked.

Thank you Kevin!

That's a python language restriction.

1 Like