How to correctly install OpenOPC?

0

Trying to connect Python to an OPC simulated server using OpenOPC. I am able to connect to the server, but when I try to read an item I get Process finished with exit code -1073741819 (0xC0000005). Could this be a problem with the installation of the OpenOPC package?

I am running:
- Windows 10 Pro 64 bits
- Python 3.7 64 bits
- PyCharm
- Graybox OPC DA Auto Wrapper x64
- Pyro 4
- Pywin32
- Matrikon OPC

I have tried running PyCharm as administrator to fix any permission issues, but I still get the same error.

>>> import OpenOPC    
>>> opc = OpenOPC.client()    
>>> opc.servers()    
['AspenTech.OTS_OPCServer.30', 'Kepware.KEPServerEX.V6', 'Matrikon.OPC.Simulation.1']    
>>> opc.connect('Matrikon.OPC.Simulation')    
>>> opc.read('Random.Real8')    
Process finished with exit code -1073741819 (0xC0000005)    
python
pycharm
opc
asked on Stack Overflow Jan 22, 2019 by F. Fernandez • edited Jan 22, 2019 by Georgy

1 Answer

0

Since OPC uses COM to talk to the Matrikon server, it could be that the 64-bit version of Python is encountering an error. I have had some similar issues when attempting to do ctypes when someone tries to use a 64-bit version of python to talk to a 32-bit interface. If I were you I would try with 32-bit Python and see if that resolves the issue.

answered on Stack Overflow Jan 26, 2019 by clutton

User contributions licensed under CC BY-SA 3.0