<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:46801688;
        mso-list-type:hybrid;
        mso-list-template-ids:544268828 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1
        {mso-list-id:358700411;
        mso-list-type:hybrid;
        mso-list-template-ids:457465700 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l1:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Dear TRNSYS users,<o:p></o:p></p>
<p class="MsoNormal">I am trying to call Matlab from TRNSYS using the Type155.<o:p></o:p></p>
<p class="MsoNormal">I am using TRNSYS 17.02.0004, and Matlab 2016a (64-bit), on Windows 7 64-bit machine. It seems that with TRNSYS 17 it is not possible to call a 64-bit version of Matlab, therefore I followed the following steps:<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]>Install Matlab 2012b 32-bit (a version for which the configured Type155 is available)<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]>Extracted the Type155.dll for Matlab2012b, from the folder “C:\Trnsys17\Exe\DLLs”, and copied the file in “C:\Trnsys17\Exe”<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]>Added the folder “C:\Program Files (x86)\MATLAB\R2012b\bin\win32” to Windows search path<o:p></o:p></p>
<p class="MsoNormal">I got these insights from a conversation on this topic here:
<a href="https://www.researchgate.net/post/Problem_calling_matlab_with_TRNSYS_17">
https://www.researchgate.net/post/Problem_calling_matlab_with_TRNSYS_17</a> <o:p>
</o:p></p>
<p class="MsoNormal">However, I still can’t get it to work, and I get the error: <i>
“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”<o:p></o:p></i></p>
<p class="MsoNormal">Am I missing something? Anything to do with the .lib files? Or should I try a different version of Matlab than the 2012b?<o:p></o:p></p>
<p class="MsoNormal">I also saw that if I upgrade to TRNSYS 18, the compatibility with 64-bit versions of Matlab is supported, so I might as well try that (but I am a bit scared that my existing projects in TRNSYS 17 will crash in TRNSYS 18…). The conversation
 was here:<o:p></o:p></p>
<p class="MsoNormal"><a href="http://lists.onebuilding.org/htdig.cgi/trnsys-users-onebuilding.org/2017-May/029030.html">http://lists.onebuilding.org/htdig.cgi/trnsys-users-onebuilding.org/2017-May/029030.html</a><o:p></o:p></p>
<p class="MsoNormal">Thanks, any help would be welcome.<o:p></o:p></p>
<p class="MsoNormal">Best regards,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>Thibault Péan<o:p></o:p></b></p>
<p class="MsoNormal" style="margin-bottom:6.0pt"><i><span style="color:gray">PhD Candidate<o:p></o:p></span></i></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr>
<td width="511" valign="top" style="width:383.25pt;border:none;border-top:solid windowtext 1.0pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-top:6.0pt"><span style="font-size:9.0pt">INCITE – Innovative Controls For Renewable Source Integration Into Smart Energy Systems<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt">IREC – Catalonia Institute for Energy Research<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt">UPC – Polytechnic University of Catalonia</span><span style="color:#1F497D"><o:p></o:p></span></p>
</td>
<td width="127" valign="top" style="width:95.55pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><a href="http://www.incite-itn.eu/"><span style="color:#1F497D;text-decoration:none"><img border="0" width="113" height="36" id="Picture_x0020_1" src="cid:image001.png@01D3AFCD.06B35990" alt="Descripción: C:\Users\tpean\Desktop\logo.png"></span></a><span style="color:#1F497D"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>