[TRNSYS-users] TRNSYS v18: Type 155 cannot load when running 'Calling MATLAB' Example

David BRADLEY d.bradley at tess-inc.com
Tue Mar 23 11:28:50 PDT 2021


María,

  The reference to the win32 directory in the error message is a typo. 
The message text didn't get updated until the v18.1 release. As a side 
note you might contact your distributor about updating to the latest 
release (v18.3) although I do not think it will help in this situation!

   The issue may be one of permissions. Make sure that you and the 
SYSTEM user (a built-in Windows account) have full admin access to the 
computer. In case that is not the problem, below is the full knowledge 
base of things to try:

- Avoid the use of the Matlab “clear all” statement. This statement has 
been found to delete all of the data that is being passed from TRNSYS to 
Matlab.
- Make sure that neither TRNSYS nor Matlab is installed in the .\Program 
Files\ directory.
- Make sure that both your user account and the SYSTEM user (a built-in 
Windows user account) have full administrative privileges.
- The Type155.dll in your ..\TrnsysXX\Exe directory must match the 
version of Matlab that you are using. DLLs for various Matlab releases 
are located in the ..\TrnsysXX\Exe\DLLs\ directory. If you find your 
version of Matlab there, extract the Type155.dll and place it in 
..\TrnsysXX\Exe, replacing the file that is already in that location. If 
you do not see your version of Matlab in the ..\TrnsysXX\Exe\DLLs\ 
directory please contact your distributor; they can provide you with an 
appropriate version of the file.
- Add the path to libeng.dll, which is normally located in 
C:\Matlab\bin\win64, to your windows search path (assuming you installed 
in C:\Matlab, otherwise adapt)
  To do this, in Control Panel, System, Advanced System Settings, 
Environment variables, edit the Path variable (we recommend that you 
edit the one in System Variables rather than User Variables). Add 
“C:\Matlab\bin\win64;” (without the quotes but with the trailing 
semicolon) at the beginning of the search path. You will notice that 
Matlab has added other subdirectories of C:\Matlab to the path but not 
that one (and you thought TRNSYS was bad…).
- If you also install the 32-bit version of Matlab you should make sure 
that the win64 directory appears before all other references to Matlab 
in the path. /NOTE: some users have found that they need to remove all 
other references to Matlab in the path/, regardless of their relative 
placement.
- Note that if you change the path while the TRNSYS Studio is running 
you will need to restart the TRNSYS Studio.
- Some users have found it necessary to run the command 
'regmatlabserver' in your Matlab command window. This registers Matlab 
as comserver.

kind regards,

  David


On 03/23/2021 10:31, María Herrando via TRNSYS-users wrote:
> Hi everyone,
>
> I'm encountering an error that I believe other users have already 
> experienced, but I think I have done everything that was previously 
> suggested and I keep having the same error...
>
> I am trying to use Type 155 ‘calling Matlab’, but I cannot even get 
> the calling Matlab example running. I am running an x64 system with 
> Windows 10, Matlab R2017b, and 64bit TRNSYS18.
>
> I encounter the following error: "Your input file uses Type 155 
> (Calling Matlab). "Type155.dll” was found but could not be loaded. 
> Please make sure that a supported version of Matlab is installed and 
> that Matlab's "bin\win32" folder is on Windows' search path.”
>
> First, I do not understand why it says win32 when all my system, 
> TRNSYS and Matlab are in 64bits version. Anyway, I have made sure the 
> EXE folder in TRNSYS18 contains the Type155.dll version corresponding 
> to my Matlab release. I have also added that file in 
> C:\TRNSYS18\UserLib\DebugDLLs, and C:\TRNSYS18\UserLib\ReleaseDLLs 
> just in case; I have also created a search path for Matlab's 
> "bin\win64" to my path environment variable “C:\MATLAB\bin\win64” and 
> “C:\MATLAB\runtime\win64”
>
> Thank you very much,
>
> Best Regards,
> María
>
> -- 
> __________________________
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at lists.onebuilding.org
> http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org

-- 
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
3 North Pinckney Street - suite 202
Madison, WI  53703 USA

P:+1.608.274.2577
d.bradley at tess-inc.com

http://www.tess-inc.com
http://www.trnsys.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20210323/7ae905b4/attachment.htm>


More information about the TRNSYS-users mailing list