问题
I am using Dymola [Ran as Administrator]
I have installed OPC Core Components: D:\Program Files\MATLAB\R2020a\toolbox\opc\opc\private\win64\OPCCoreComponents\OPC Core Components Redistributable (x64).exe
I have installed Matrikon OPC Server Simulation.
I have put in environment variables:
In Dymola I am using this:
This is the simple code I am running in Dymola:
OPC server is grayed out still.
Simulation is working.
回答1:
You have to use an older version of Visual Studio.
Here are the limitations of the OPC functionality according to Dymola User Manual Volume 2 in Dymola 2019 FD01:
- You must run Dymola with administrator rights to be able to run the OPC server.
- Currently only the solvers Lsodar, Dassl, Euler, Rkfix2, Rkfix3 and Rkfix4 are supported.
- Only Visual Studio 2008, 2010, and 2012 compilers are supported.
- Dymosim with OPC server is always built as a 32-bit application.
- OPC Server cannot be combined with Export model as DLL.
来源:https://stackoverflow.com/questions/64795174/dymola-opc-server-grayed-out