Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel
titleDescription

Returns When called from a Vision Client, returns a list of PyOPCTag OPCBrowseElement objects for the given server. Otherwise returns a list of OPCBrowseElements.

The OPCBrowseElement object has the following methods:

  • getDisplayName() - returns the display name of the object
  • getElementType() - returns the element type. Element types are server, device, view, folder, object, datavariable, property and method.
  • getNodeId() - returns a string representing the server node ID

The PyOPCTag object has the following methods to retrieve information:

  • getDisplayName() - returns the display name of the object
  • getElementType() - returns the element type. Element types are server, device, view, folder, object, datavariable, property and method.
getServerNodeId
  • getServerName() - returns
a string representing the server node ID
  • the server name as a string. 


Panel
titleSyntax

system.opc.browseServer(opcServer, nodeId)

  • Parameters

String opcServer - The name of the OPC server connection.

String nodeId - The node ID to browse.

  • Returns

List - A list of PyOPCTag objects.

  • Scope

Gateway


Panel
titleSyntax - Vision Client Scope

system.opc.browseServer(opcServer, nodeId)

  • Parameters

String opcServer - The name of the OPC server connection.

String nodeId - The node ID to browse.

  • Returns

List - A list of PyOPCTag objects OPCBrowseElement objects.

  • Scope

AllVision Client



Panel
titleCode Examples


Code Block
languagepy
titleCode Snippet
# Print the name of all devices on Ignition OPC-UA
opcServer="Ignition OPC-UA Server"
nodeId = "Devices"
devices = system.opc.browseServer(opcServer, nodeId)
for device in devices:
 print device.getDisplayName()