<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=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<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-top:0cm;
margin-right:0cm;
margin-bottom:10.0pt;
margin-left:0cm;
line-height:115%;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
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:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
-->
</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="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Dear users,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">A growing number of users have contacted me about difficulties to export Trnsys types (such as the ones from the latest version of the TESS libraries) to SIMULINK.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">It turns out that the current ‘export to SIMULINK’ function has been designed for Trnsys 16 coding conventions; it does
<u>not</u> work for types using Trnsys 17 coding conventions. In other words, types containing the line<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;line-height:115%;font-family:"Courier New"">
<b><span style="color:blue">Call</span></b> SetTypeVersion(17)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">cannot be exported, only those containing
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> INFO(12)=16<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">(and earlier, such as = 15) will currently work in Matlab/SIMULINK using this approach. The mechanism relies on the function signature using arguments, like in
<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:50%"><span lang="EN-US" style="font-size:
8.0pt;line-height:50%;font-family:"Courier New"">extern "C" __declspec(dllexport)
<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:50%"><span lang="EN-US" style="font-size:
8.0pt;line-height:50%;font-family:"Courier New"">int TYPE6 ( double &time, // the simulation time<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:50%"><span lang="EN-US" style="font-size:
8.0pt;line-height:50%;font-family:"Courier New""> double xin[], // the array containing the component Inputs<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:50%"><span lang="EN-US" style="font-size:
8.0pt;line-height:50%;font-family:"Courier New""> double xout[], // the array which the component fills with its appropriate OUTPUTS<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:50%"><span lang="EN-US" style="font-size:
8.0pt;line-height:50%;font-family:"Courier New""> double &t, // the array containing the dependent variables for which the derivatives are evaluated
<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:50%"><span lang="EN-US" style="font-size:
8.0pt;line-height:50%;font-family:"Courier New""> double &dtdt, // the array containing the derivatives of T which are evaluated
<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:50%"><span lang="EN-US" style="font-size:
8.0pt;line-height:50%;font-family:"Courier New""> double par[], // the array containing the PARAMETERS of the component<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:50%"><span lang="EN-US" style="font-size:
8.0pt;line-height:50%;font-family:"Courier New""> int info[], // the information array described in Section 3.3.3 of the manual<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:50%"><span lang="EN-US" style="font-size:
8.0pt;line-height:50%;font-family:"Courier New""> int icntrl // the control array described in Section 3.3.4 of the manual<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:50%"><span lang="EN-US" style="font-size:
8.0pt;line-height:50%;font-family:"Courier New""> );<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Werner<o:p></o:p></span></p>
</div>
</body>
</html>