<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Marcello,<br>
In earlier versions of TRNSYS (prior to v17), the TRNSYS kernel
passed a part of the global PAR() array to each component. Even if
the component changed a parameter value in that array it didn't
matter because the kernel never read them back. You are correct that
Type70 accesses the entire global PAR() array directly and modifies
it, which is quite dangerous if its not done right. There is a
"setParameterValue(i,Value)" access function in Trnsys17 but the way
it is written, it is designed only to be able to change the
parameters of the current UNIT (not parameters of other units the
way that Type70 does. You'll notice that in the most recent
releases, Type70 doesn't use the official Trnsys17 coding standard
for this very reason. I would recommend that you make a copy of
Type70 and start working from it when you write your new component.
BE CAREFUL THOUGH!!! It is going to be directly overwriting values
stored in global arrays of the kernel!<br>
best,<br>
David<br>
<br>
<br>
<div class="moz-cite-prefix">On 9/27/2012 08:07,
<a class="moz-txt-link-abbreviated" href="mailto:marcello.caciolo@cofelyaxima-gdfsuez.com">marcello.caciolo@cofelyaxima-gdfsuez.com</a> wrote:<br>
</div>
<blockquote
cite="mid:04CA342531975549B5B81CCAECBCAC10092888A961@xs203439.MELINDA.LOCAL"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (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:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Webdings;
panose-1:5 3 1 2 1 5 9 6 7 3;}
/* 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:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Texte de bulles Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.TextedebullesCar
{mso-style-name:"Texte de bulles Car";
mso-style-priority:99;
mso-style-link:"Texte de bulles";
font-family:"Tahoma","sans-serif";}
.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="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Dear TRNSYS users,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I would like to create a
component similar to the type 70 (GROUPED PARAMETER
REPLACEMENT UNIT) and I am trying to figure out how this
component works. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Reading the code, I see
that this type access other units parameters by accessing
the npar, par and info arrays defined in trnsysData.f90. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I have two question:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">1) In TRNSYS 17, are new
access functions available in order to access parameters of
other units without using these global arrays?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">2) Is there a way for a
unit called only after convergence (i.e. a plotter) to
access in a similar way the outputs of other units?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thank you for your help.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal">Best regards,<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span
style="font-family:"Tahoma","sans-serif";color:#58595B">Marcello
Caciolo</span></b><span
style="font-family:"Tahoma","sans-serif";color:#58595B"><br>
</span><span
style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#58595B">Responsable
Outils et Méthodes d'Analyse Energétique</span><span
style="font-family:"Tahoma","sans-serif";color:#58595B"><o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:gray"><img
id="Image_x0020_1"
src="cid:part1.04020101.07030005@tess-inc.com"
alt="cid:image003.jpg@01CD4E08.954D04D0" height="62"
width="170"><br>
<b><br>
</b>Cellule Efficacité Energétique et Environnementale -
Pôle Projets et Réalisations<br>
46 Boulevard de la Prairie au Duc<br>
BP 40119 - 44201 Nantes Cedex 02</span><span
style="font-size:9.0pt;font-family:"Tahoma","sans-serif""><br>
</span><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:gray">Tél.:
+33 02 40 41 06 57</span><span
style="font-size:9.0pt;font-family:"Tahoma","sans-serif""><br>
<a moz-do-not-send="true"
href="mailto:prenom.nom@aximaseitha-gdfsuez.com">marcello.caciolo@cofelyaxima-gdfsuez.com</a></span><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:gray"><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:Webdings;color:#339966">P</span><span
style="font-size:10.0pt;font-family:Webdings;color:#339966">
</span><b><span
style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#339966">Pensez
à l'environnement avant d'imprimer ce message</span></b><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
TRNSYS-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:TRNSYS-users@cae.wisc.edu">TRNSYS-users@cae.wisc.edu</a>
<a class="moz-txt-link-freetext" href="https://mailman.cae.wisc.edu/listinfo/trnsys-users">https://mailman.cae.wisc.edu/listinfo/trnsys-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
22 North Carroll Street - suite 370
Madison, WI 53703 USA
P:+1.608.274.2577
F:+1.608.278.1475
<a class="moz-txt-link-abbreviated" href="mailto:d.bradley@tess-inc.com">d.bradley@tess-inc.com</a>
<a class="moz-txt-link-freetext" href="http://www.tess-inc.com">http://www.tess-inc.com</a>
<a class="moz-txt-link-freetext" href="http://www.trnsys.com">http://www.trnsys.com</a></pre>
</body>
</html>