[BUG-14837] system.opc.readvalue not working for diagnostics tags

We have a report with a script as the data source that worked fine in 7.10 but doesn’t seem to work now in 8.0

We are finding all the OPC Servers and then looking for all the devices on each one and displaying the Port, Hostname and connection state. When using the system.opc.readvalue all we get back is nulls.

We are able to see the value on the quick client on the gateway using subscribe but not not read.

image

OPCServers = system.opc.getServers()
for OPCServer in OPCServers:
		nodeId = "Devices"
		devices = system.opc.browseServer(OPCServer, nodeId)
		for device in devices:
			path = device.getDisplayName()
			connectionState = str(system.opc.readValue(OPCServer, path + "_Meta:[Diagnostics]/Connection State").getValue())
			port = str(system.opc.readValue(OPCServer, path + "_Meta:[Diagnostics]/Port").getValue())
			hostname = str(system.opc.readValue(OPCServer, path + "_Meta:[Diagnostics]/Hostname" ).getValue())

Where does the OPCServers list come from? The name of the connection to the built-in OPC UA server changed in 8.0 on a fresh install.

i’ve updated the code… missed the top line

This does seem to be a bug, I’ll make a ticket.

This issue was fixed in the 8.0.5 nightly build that was uploaded today (9/3).