Skip to main content
Version: 7.9


This function is used in Python Scripting.


Reads a single value directly from an OPC server connection. The address is specified as a string, for example, [MyDevice]N11/N11:0The object returned from this function has three attributes: value, quality, and timestamp. The value attribute represents the current value for the address specified.

The quality attribute is an OPC-UA status code. You can easily check a good quality vs a bad quality by calling the isGood()function on the quality object. The timestamp attribute is Date object that represents the time that the value was retrieved at.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.


system.opc.readValue(opcServer, itemPath)


StringopcServerThe name of the OPC server connection in which the item resides.
StringitemPathThe item path, or address, to read from.


QualifiedValue - An object that contains the value, quality, and timestamp returned from the OPC server for the address specified.



Code Examples

Code Snippet
server = "Ignition OPC-UA Server"
path = "[SLCSim]_Meta:N7/N7:0"
qualifiedValue = system.opc.readValue(server, path)
print "Value: " + str(qualifiedValue.getValue())
print "Quality: " + qualifiedValue.getQuality().toString()
print "Timestamp: " + qualifiedValue.getTimestamp().toString()