<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Janne,<br>
You do need to move the file to the
..\Trnsys17\UserLib\ReleaseDLLs\ directory.<br>
<br>
From what you describe, it sounds as though the error is in the
code, not in the compiling. If there were a compiling (or more
likely a linking error) then your component would generate an error.
Instead it is generating values, but not the right ones. It is
possible (and very helpful) to add the component to the TRNDll
recompile project then to debug the entire simulation run from the
compiler. This allows you to step one line at a time through the
code and look at intermediate values. The procedure is laid out in
the 07-Programmer's Guide.<br>
<br>
If that is too complicated, I would recommend that you create a
few outputs in your Type that simply mirror the input and parameter
values, then watch those and make sure you can simply pass data
through your Type.<br>
<br>
Yes, it is possible to call a subroutine within your Type. Simply
end it with RETURN though (not Return 1)<br>
Kind regards,<br>
David<br>
<br>
<br>
<div class="moz-cite-prefix">On 11/29/2012 02:50, Mäkinen Janne
wrote:<br>
</div>
<blockquote
cite="mid:C410EAA5225D0240A1B6C728BDCF286D0B0C6E63@EXMDB04.org.aalto.fi"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">Hi,<br>
<br>
I was able to make .dll file using TRNSYS manual example and
what you told, but should I move that .dll file from
..\Trnsys17\Compilers\Ivf11x\MyType\Release to
..\Trnsys17\UserLib\ReleaseDLLs\?
<br>
<br>
Compiling didnt give any errors and allso TRNSYS does not give
any errors for the simulation but that new component does not
seem to work. I am using Equa + my own type to test it (like
getting started manual does):<br>
Equa: time*2<br>
my own type: Out1=Inp1+Par1<br>
<br>
Result is that every timestep Out1 = 0<br>
<br>
Is there something else that I should do while compiling that
file? <br>
<br>
On another topic, is it possible to use own subroutine within
Type?<br>
<br>
Thanks,<br>
<br>
Janne<br>
<div style="font-family: Times New Roman; color: #000000;
font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF544285"><font
color="#000000" size="2" face="Tahoma"><b>Lähettäjä:</b>
David BRADLEY [<a class="moz-txt-link-abbreviated" href="mailto:d.bradley@tess-inc.com">d.bradley@tess-inc.com</a>]<br>
<b>Lähetetty:</b> 26. marraskuuta 2012 23:25<br>
<b>Vastaanottaja:</b> Mäkinen Janne<br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:trnsys-users@cae.wisc.edu">trnsys-users@cae.wisc.edu</a><br>
<b>Aihe:</b> Re: [TRNSYS-users] Creating new component<br>
</font><br>
</div>
<div>Janne,<br>
The Intel compiler used to be able to convert a *.dsp file
(which was the project format for Compaq's Fortran compiler)
to its own *.sln format. It doesn't seem to be able to do so
anymore. Open the ..\Trnsys17\Compilers\Ivf11x\Ivf11x.sln
file. In it, there should be a MyType project. Right click
that project and add the skeleton code that was created by
the Studio.<br>
Kind regards,<br>
David<br>
<br>
<br>
<div class="moz-cite-prefix">On 11/22/2012 07:21, Mäkinen
Janne wrote:<br>
</div>
<blockquote type="cite">
<pre>Hi,
I am trying to create a new component by using Intel Visual Fortran Composer XE 2011 with Microsoft Visual Studio 2008. I followed the instructions described in Chapter 1.8 in the getting stated manual to generate the new component; however the project workspace generated by TRNSYS has an extension .dsp and I am unable to open this project file. When I try to open the .dsp file with Microsoft Visual Studio, I am asked if I want to convert the file into a Visual C++ project file, which generates a .ncb and a .vcproj files. When I try to build the project compailer creates .sln file and I obtain the following two errors(Build log as attachment file):
Error LNK2001: unresolved external symbol__DllMainCRTStartup@12
Fatal error LNK1120: 1 unresolved externals
Is that compiler supposed to convert that .dsp file into visual C++ project? Could there be problems with some settings or that project file or am I perhaps doing something wrong?
Thank you,
Janne</pre>
<br>
<fieldset class="mimeAttachmentHeader" target="_blank"></fieldset>
<br>
<pre>_______________________________________________
TRNSYS-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:TRNSYS-users@cae.wisc.edu" target="_blank">TRNSYS-users@cae.wisc.edu</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://mailman.cae.wisc.edu/listinfo/trnsys-users" target="_blank">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 moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:d.bradley@tess-inc.com" target="_blank">d.bradley@tess-inc.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.tess-inc.com" target="_blank">http://www.tess-inc.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.trnsys.com" target="_blank">http://www.trnsys.com</a></pre>
</div>
</div>
</div>
</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>