OpenOPC.open_client() hangs

1.2k Views Asked by At


I'm trying to connect to an OPC Server using the python Open OPC library, it is working fine with a Matrikon OPC Simulator, however when I try to connect it to the actual server the client seems to be hanging on the OpenOPC.open_client method, I added some debug messages in this API and found that the following API in OpenOPC.py is hanging:

import Pyro.core
Pyro.core.initClient(banner=0)
server_obj = Pyro.core.getProxyForURI("PYROLOC://%s:%s/opc" % (host, port))
return server_obj.create_client() #this API is hanging

So if anyone has used OpenOPC to interface with OPC Servers, and has run into similar problem, please let me know.
cheers!

1

There are 1 best solutions below

0
On

When using OpenOPC in Linux, you can't use DCOM.

So you need to use OpenOPC Gateway Service and the "open_client" method.

This service must be installed and running in the actual OPC server for your client to access it.