[TRNSYS-users] Building a TRNSYS DLL to couple run Simulink and TRNSYS

David BRADLEY d.bradley at tess-inc.com
Fri Feb 26 05:54:26 PST 2016


Mustafa,
   The TRNSYS kernel and TRNSYS types communicate with each other in a 
fundamentally different way between Trnsys16 and Trnsys17. In Trnsys16 
the kernel passed certain pieces of relevant information (like the list 
of parameters, inputs, outputs, and certain flags for where the 
simulation is in its overall process) to the Types whereas in Trnsys17 
the Types query the kernel for the information that they need. That 
said, the Trnsys17 kernel is able to communicate with Trnsys16 Types 
using the "passed information" method so long as the Types identify 
themselves as being written using the Trnsys16 coding standard. I don't 
think that the problem you are facing lies here. More likely the issue 
is in either the compiler project settings not matching up with those of 
the Visual Studio Fortran project that is used to compile the DLL or 
that your project cannot access the compiled libraries that contain the 
definitions of all the functions and data structures that your Type 
needs but that are contained and declared in the TRNDLL. I have not 
written any C++ components for TRNSYS so I am afraid that I can't offer 
any hints on how to resolve the problems. If any other users have 
experience with this, I would greatly appreciate hearing about it.
kind regards,
  David


On 02/23/2016 14:47, Mustafa Ahmed Syed wrote:
>
> Hello,
>
> I’m using TRNSYS 17, MATLAB R2012b (32-bit), and Microsoft Visual C++ 
> 2008 to build a TRNSYS DLL which will compile a Simulink project.
>
> I’m using a dissertation written by Saleh Nasser Al-Saadi, titled 
> “/Modeling and Simulation of PCM-Enhanced Façade Systems” /as a guide 
> to help me (I’ve linked the paper to this question and the guide 
> starts on p. 475 of the pdf).
>
> https://www.researchgate.net/publication/261633240_MODELING_AND_SIMULATION_OF_PCM-ENHANCED_FACADE_SYSTEMS
>
> A brief summary of guide is:
>
> 1)Compile the Simulink project and generate the C++ files
>
> 2)Open the .makefile in Microsoft Visual Studio 2008
>
> 3)Build the solution
>
> 4)DLL files will automatically be generated in TRNSYS’ Release DLLs folder
>
> In our case, we were unable to build the solution in Microsoft Visual 
> Studio. The output window in Microsoft Visual Studio had a bunch of 
> errors and warnings which I can’t make any sense of.
>
> The only reason why the solution won’t build – that I can think of – 
> is that the person who wrote the dissertation was using TRNSYS 16 
> (confirmed by the author) instead of TRNSYS 17.
>
> If anyone has had a similar problem and were able to rectify the 
> issue, please let me know. Your help will be greatly appreciated!
>
>
>
> _______________________________________________
> 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
22 North Carroll Street - suite 370
Madison, WI  53703 USA

P:+1.608.274.2577
F:+1.608.278.1475
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/20160226/d1d69c63/attachment.htm>


More information about the TRNSYS-users mailing list