Top  | Previous | Next

system.opc.browse

Description

Allows browsing of the OPC servers in the runtime, returning a list of tags.

 

information2 This function accepts keyword-style invocation. See also: Functions / Keyword Invocation

Syntax

system.opc.browse(opcServer, device, folderPath, opcItemPath)

Parameters

String opcServer - The name of the OPC server to browse

String device - The name of the device to browse

String folderPath - Filters on a folder path. Use * as a wildcard for any number of characters and a ? for a single character.

String opcItemPath - Filters on a OPC item path. Use * as a wildcard for any number of characters and a ? for a single character.

Returns

OPCBrowseTag[] - An array of OPCBrowseTag objects. OPCBrowseTag has the following functions: getOpcServer(), getOpcItemPath(), getType(), getDisplayName(), getDisplayPath(), getDataType().

Scope

All

Examples

Example 1: Browse every OPC server

 

tags = system.opc.browse()

for row in tags:

    print row.getOpcServer(), row.getOpcItemPath(), row.getType(), 

    print row.getDisplayName(), row.getDisplayPath(), row.getDataType()

 

Example 2: Browse Ignition OPC-UA

 

tags = system.opc.browse(opcServer="Ignition OPC-UA Server")

 

Example 3: Browse Specific Device

 

server = "Ignition OPC-UA Server"

tags = system.opc.browse(opcServer=server, device="Dairy Demo Simulator")

 

Example 4: Browse Specific Folder Path (not OPC item path)

 

server = "Ignition OPC-UA Server"

tags = system.opc.browse(opcServer=server, folderPath="*Overview/AU 1*")