问题描述
我正在使用Dymola [Ran作为管理员]
我已经安装了OPC核心组件:D:\Program Files\MATLAB\R2020a\toolBox\opc\opc\private\win64\OPCCoreComponents\OPC Core Components Redistributable (x64).exe
我已经安装了Matrikon OPC Server Simulation。
我输入了环境变量:
在Dymola中,我正在使用此
:这是我在Dymola中运行的简单代码:
OPC服务器仍显示为灰色。
模拟正在起作用。
解决方法
您必须使用旧版的Visual Studio。
根据Dymola 2019 FD01中的Dymola用户手册第2卷,这是OPC功能的局限性:
- 您必须以管理员权限运行Dymola,才能运行OPC服务器。
- 当前只有求解器Lsodar,Dassl,Euler,Rkfix2,Rkfix3和Rkfix4是 支持。
- 仅支持Visual Studio 2008、2010和2012编译器。
- 带有OPC服务器的Dymosim始终构建为32位应用程序。
- OPC Server不能与将导出模型作为DLL结合使用。