system.opc.readValues
This function is used in Python Scripting.
Descriptionβ
This function is equivalent to the system.opc.readValue function, except that it can operate in bulk. You can specify a list of multiple addresses to read from, and you will receive a list of the same length, where each entry is the qualified value object for the corresponding address.
Client Permission Restrictionsβ
This scripting function has no Client Permission restrictions.
Syntaxβ
system.opc.readValues(opcServer, itemPaths)
Parametersβ
| Type | Parameter | Description |
|---|---|---|
| String | opcServer | The name of the OPC server connection in which the items reside. |
| List[String] | itemPaths | A list of strings, each representing an item path, or address to read from. |
Returnsβ
List[QualifiedValue] - A sequence of QualifedValue objects, one for each address specified, in order. Each object contains a value, quality, and timestamp returned from the OPC server for the corresponding address.
Scopeβ
Gateway, Vision Client, Perspective Session
Code Examplesβ
Code Snippet
# This example will read values from a Tag provider called "testSimTags".
# Declare list values for itemPaths parameter
itemPaths = ['[testSimTags]_Meta:Random/RandomInteger1', '[testSimTags]_Meta:Random/RandomInteger1']
# Call the system function
system.opc.readValues('Ignition OPC UA Server', itemPaths)