Dymola: OPC server grayed out - opc

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.

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.

Related

Is it possible to compile Linux runnable fmus from Dymola on Windows machine?

I am trying to export a FMU from windows machine using Dymola, to be used on both Linux and Windows OS. I guess such fmu will have linux64 and linux32 binaries along with win32 and win64 ones. However, I am not sure how to trigger Dymola to generate binaries for Linux runnable fmu (if it possible to do that).
The Dymola (2020X) installation is using Visual Studio 2019 compiler with both 'Desktop development with C++' and 'Linux development with C++' options. My assumption was that 'Linux development with C++' would make Dymola to compile .so files, however I see only dlls included in the fmu.
Unfortunately you cannot create Windows and Linux binaries for FMU:s in one operation. Great suggestion, though.
Are you using a network or nodelocked license? Maybe a dual boot/virtual machine could help.

Standalone application generated by matlab deploytool/compilation with OPC fails in host system

My matlab application communicates with dymola software (for dynamic modeling/simulation/calculation) by giving inputs and fetching outputs. Everything working fine in Matlab command window. The standalone application developed in the matlab (using Application compiler) works fine in the same system as the one it was developed in.
Once I install the application (with matlab runtime) into an host system without the full matlab installation, The OPC code fails.
* Code developed/compiled in : Windows 10 Pro,
* deployed to/Host system : Windows 10 Pro,
* Matlab version 2017b
* OPC toolbox version 4.0.4
* Matlab runtime 9.3
The OPC code snippet is as follows:
%% File: SetupOPCDA_MatlabDymolaConnection()
try
%opcregister('install')
hostInfo = opcserverinfo('localhost');
disp(hostInfo.ServerID);
da = opcda('localhost','Dymosim.OPCServer.1');
% Connect to Dymola OPC server
connect(da);
grp = addgroup(da);
ns = getnamespace(da);
catch Err % line 33
The below given outputs are from running the generated exe file from command line in the host system.
Its failing with error:
OPC Foundation Core Components not installed. Run OPCREGISTER to install the OPC Foundation Core Components.
On uncommenting the line opcregister('install')
I'm getting the following error (Please note I'm running the exe from commandline):
Setting OPC connection...Warning: OPC Core Components are already installed. Reinstalling may require a repair of the Core Components.
Continuing this operation will modify any OPC Foundation files already installed.
MATLAB may shut down, and a system reboot may occur.
Type 'Yes' (exactly as shown) to install the OPC Foundation files
Confirmation string: Yes
'Yes' is not recognized as an internal or external command,
operable program or batch file.
Operation cancelled by user.
On giving the line as: opcregister('install','-silent')
Error:
Warning: OPC Core Components are already installed. Reinstalling may require a repair of the Core Components.
TWarning: Installation was not successful. Exit code was 1619.
OPC Foundation Core Components not installed. Run OPCREGISTER to install the OPC Foundation Core Components.
To compare, This is the output I get in my system, the one in which the code was developed and compiled:
OPC working fine, Gives server names as outputs
'Matrikon.OPC.Simulation.1' 'Dymosim.OPCServer.1'
It works fine in the developer system, but it fails in host system.
I was able to solve the problem by installing the OPC core components manually.
Installing them before running the Matlab exe, solved the problem.
P.S. You need to create an account before downloading the OPC core components.

SQL Server 2008 R2 Express: Management Tools Missing from Feature Selection

I am trying to install SQL Server 2008 R2 Express with the SQL Server Management Studio.
However, the Management Tools feature does not seem to be selectable. The screen-shot below shows which Features are available for me to select:
I have made sure that the SQL Server 2008 R2 Management Objects was installed!
I have tried both answered methods at Can't install SQL Server 2008 R2 management tool (complete) and they both do not seem to work for me, I still do not see Management Tools. Upgrading the Edition under the Maintenance section and Uninstalling/Re-installing the SQL Server had no additional effects. The files I am trying to work with to get this to work are:
SQLEXPR_x64_ENU.exe - This is Service Pack 3
SQLManagementStudio_x64_ENU.exe - The file name fooled me, since there is no management studio feature selection!
The question is, why does Microsoft makes it so difficult?
I am using a Windows 7, 64-bit machine. Any help would be greatly appreciated.
You should separately download Microsoft® SQL Server® 2008 Management Studio Express from Microsoft at
http://www.microsoft.com/en-us/download/details.aspx?id=7593
SQLEXPRADV_x64_ENU.exe contains everything and is the best choice for new installs.

Is Windows SDK for Windows Server 2008 a dependency for Visual C++ and C#?

When I installed Microsoft Visual C++ and C# 2008 Express, I got "Microsoft Windows SDK for Windows Server 2008" added in.
I want to know if I can remove it and still have all the functionality of Visual C++/C#.
Strange, I remember it was shipped with Vista RTM headers (The Microsoft Windows Software Development Kit Update for Windows Vista version). Looks like Microsoft updated the SDK bundled with Express.
Anyway, the SDK is responsible for a lot of features in Visual Studio. For example, Visual Studio invokes sgen.exe to generate XML serializer assemblies, and call rc.exe to compile a resource script. Chances are you can't get away without it if you are not writing hello-world apps.

Connecting oracle from c++ .. MSVCR90.dll is missing from your computer

I am trying to connect to oracle database from c++ using OCCI, I am following these instructions from Mark Williams, But when I run my program it gives error as MSVCR90.dll is missing from your computer. I suppose its problem related to vc compiler maybe its trying to use vc10 and oracle dll searches for vc9 dll? The oracle version I am trying to connect to is 10g.
Is it possible to configure VS2010 to use VC9 instead of VC10?
I am using Visual Studio 2010 under Windows 7.
Indeed, the client application requires a different version of the MSVC runtime from what is installed on your computer. Msvcr90.dll is the Common Runtime library for Microsoft Visual C++ 2008. You will need to install this. (Note that for this version, it is no longer considered a shared system directory, so it installs as a Windows side-by-side assembly.)
You can install it by downloading the installers here or here: