我正试图通过以下steps连接到Matrikon OPC模拟服务器的远程实例。为了确认所有设置都正确,我正在尝试首先连接到本地实例。我正在运行Win10和Python3.9 32位以及32位PyWin32-228版本。因此,我们的目标是让下面的线路正常工作
opc = OpenOPC.open_client('localhost')
我能够使用这些语句成功地连接并释放OPC服务器中的数据
opc = OpenOPC.client()
opc.connect('Matrikon.OPC.Simulation')
然而,由于目标是连接到远程服务器,我需要使用
opc = OpenOPC.open_client('localhost')
因此网关服务
我认为问题在于OpenOPCService的实施。我已完成以下步骤:
gbda_aut.dll
Service installed
OpenOPC.py
文件复制到lib\site\u packages目录运行命令行时:net start zzzOpenOpcService
返回以下内容:
C:\OpenOPC\src>net start zzzOpenOpcService
The OpenOPC Gateway Service service is starting.
The OpenOPC Gateway Service service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.
C:\OpenOPC\src>NET HELPMSG 3534
The service did not report an error.
在调试模式下运行服务时,遇到以下错误:
C:\OpenOPC\src>python OpenOPCService.py debug
Debugging service zzzOpenOPCService - press Ctrl+C to stop.
Error 0xC0000003 - The instance's SvcRun() method failed
<Error getting traceback - traceback.print_exception() failed
(null): (null)
调试OpenOPCService.py程序时,程序崩溃,出现以下错误:
Exception has occurred: SystemExit
1
File "C:\OpenOPC\src\OpenOPCService.py", line 154, in <module>
win32serviceutil.usage()
非常感谢您的帮助或建议
目前没有回答
相关问题 更多 >
编程相关推荐