Skip to end of metadata
Go to start of metadata

This function is used in Python Scripting.

Description

When called from a Vision Client, returns a list of 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.
  • getServerName() - returns the server name as a string. 
Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

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

Syntax - 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 OPCBrowseElement objects.

  • Scope

Vision Client

Code Examples
Code 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()
  • No labels