Do system.opc.browseSimple and system.opc.browse have a very specific use case?

When I try to browse using these it takes forever and times out returning nothing.
This takes a good 30 to 60 seconds and locks up the UI during this.
I am trying to browse an OPC server I created. It has no concept of “device” in my server. So are these functions designed to work with internal Ignition OPC servers only?

I tried doing this:
system.opc.browseSimple(serverName, None, “Objects/Machine”, “*”)
This locks up the UI like stated before. However this:
system.opc.browseServer(serverName, “Objects/Machine”)
This returns a list of PyOPCTag objects.

The system.opc.browseSimple is supposed to return a list of OPCBrowseTag objects which seem to have more info.

Can I use system.opc.browseSimple and system.opc.browse for generic opc servers?

Yes, they were initially.

Sometimes, but the problem with these is that they are recursive browses, and tend to timeout against servers that are slow or have a large address space.

These functions (browse and browseSimple) are all but actually deprecated and hidden. browseServer was introduced to replace them. It only browses the node specified, and if you want to recurse down into any of the results that's up to you to do by calling again.

1 Like

But also note that long-running operations are not safe to call from a foreground event. Use invokeAsynchronous to run these safely.

1 Like