OpenOPC
OpenOPC copied to clipboard
error on listing servers
I followed OpenOPC Library Tutorial:
import OpenOPC
opc = OpenOPC.open_client('<server-ip>')
opc.servers()
but when I try listing servers I get:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\Pyro\core.py", line 381, in __call__
return self.__send(self.__name, args, kwargs)
File "C:\Python27\lib\site-packages\Pyro\core.py", line 455, in _invokePYRO
self.adapter.bindToURI(self.URI)
File "C:\Python27\lib\site-packages\Pyro\protocol.py", line 330, in bindToURI
raise ProtocolError('connection failed')
Pyro.errors.ProtocolError: connection failed
suggestions?
Did you replace the argument '
yes of course
Fine, did you try connecting first with an OPC client? May I ask for the OPC server you are trying to connect to? OPC DA? What about the brand? MatrikonOPC?
I tried connecting first from the server itself (using localhost) and it worked , but not from another pc.
the OPC server is the Matrikon.OPC.Simulation.1 integrated in MatrikonOPC Explorer.
I also tried using instead the OpenOPC Command-line Client with opc -h <server-ip> -q
and I get: Error getting server list from <server-ip>' - servers: Unspecified error.
even this worked from the server itself.
I'm working in a LAN with windows firewall turned off on both client and server machines
@Miky94 I faced the same issue but when i turned off the firewall on windows ,I am able to connect to OPC server.
I hope it will help: https://github.com/papercodeIN/OpenOPC-PyModbus-Snap7-MQTT/tree/main/OPC/OPC-DA