<div>Daniel,<br></div><div><br></div><div>The "undefined reference" errors are due to the plotter-specific variables exposed by the TrnsysData module that are not included in the "known" TRNSYS variables that are handled behind the scenes in Type Studio's compiler. Type Studio started as a mathematical / component-level Type creator, which never considered the need to compile custom online plotter Types. It may be possible to add that functionality to Type Studio in the future, but I'm not sure it's necessary.<br></div><div><br></div><div>To accomplish what you're trying to do, I would suggest creating an Equation (for a simple integrated unit conversation) or a custom Type (for more complex situations) that outputs the values you expect to plot. In other words, use Type 65d as-is with the custom output you want plotted calculated outside of it.<br></div><div><br></div><div>Best regards,<br></div><div>John</div><div><br></div><div>‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br></div><div> On Tuesday, January 15, 2019 8:49 AM, Hofmann, Daniel <daniel.hofmann@dreso.com> wrote:<br></div><div> <br></div><blockquote type="cite" class="protonmail_quote"><div><p><span style="color:black">Hello John,</span><br></p><p><span style="color:black"> </span><br></p><p><span style="color:black">thank you for your prompt reply. I tried your suggestion with only the Type201.f90 file loaded. But compiling interrupts with the following error:</span><br></p><p><span style="color:black"> </span><br></p><p><span style="color:black">C:\Users\HofmannD\AppData\Local\Temp\cc482Y2Q.o:Type201.f90:(.rdata$.refptr.__trnsysdata_MOD_ontitl[.refptr.__trnsysdata_MOD_ontitl]+0x0): undefined reference to `__trnsysdata_MOD_ontitl'</span><br></p><p><span style="color:black">C:\Users\HofmannD\AppData\Local\Temp\cc482Y2Q.o:Type201.f90:(.rdata$.refptr.__trnsysdata_MOD_onlab[.refptr.__trnsysdata_MOD_onlab]+0x0): undefined reference to `__trnsysdata_MOD_onlab'</span><br></p><p><span style="color:black">C:\Users\HofmannD\AppData\Local\Temp\cc482Y2Q.o:Type201.f90:(.rdata$.refptr.__trnsysdata_MOD_plout[.refptr.__trnsysdata_MOD_plout]+0x0): undefined reference to `__trnsysdata_MOD_plout'</span><br></p><p><span style="color:black">C:\Users\HofmannD\AppData\Local\Temp\cc482Y2Q.o:Type201.f90:(.rdata$.refptr.__trnsysdata_MOD_prout[.refptr.__trnsysdata_MOD_prout]+0x0): undefined reference to `__trnsysdata_MOD_prout'</span><br></p><p style="margin-bottom:12.0pt"><span style="color:black"> </span><br></p><p style="margin-bottom:12.0pt"><span style="color:black">Thats probably because the compiler searches the functions declared in the “Use-statements” at the beginning of my source code:</span><br></p><p style="margin-bottom:12.0pt"><span style="color:black"> </span><br></p><p style="margin-bottom:12.0pt"><span style="color:black">Subroutine Type201 </span><br></p><p style="margin-bottom:12.0pt"><span style="color:black">!export this subroutine for its use in external DLLs.</span><br></p><p style="margin-bottom:12.0pt"><span style="color:black">!DEC$ATTRIBUTES DLLEXPORT :: TYPE201</span><br></p><p style="margin-bottom:12.0pt"><span style="color:black">!-----------------------------------------------------------------------------------------------------------------------</span><br></p><p style="margin-bottom:12.0pt"><span style="color:black">Use TrnsysConstants</span><br></p><p style="margin-bottom:12.0pt"><span style="color:black">Use TrnsysFunctions</span><br></p><p style="margin-bottom:12.0pt"><span style="color:black">Use TrnsysData, Only:onlab,prout,plout,ontitl</span><br></p><p style="margin-bottom:12.0pt"><span style="color:black">!-----------------------------------------------------------------------------------------------------------------------</span><br></p><p style="margin-bottom:12.0pt"><span style="color:black">Here the code continues…..</span><br></p><p style="margin-bottom:12.0pt"><span style="color:black"> </span><br></p><p style="margin-bottom:12.0pt"><span style="color:black">Deleting the part “Only:onlab,prout,plout,ontitl” doesn’t help, too.</span><br></p><p style="margin-bottom:12.0pt"><span style="color:black"> </span><br></p><p style="margin-bottom:12.0pt"><span style="color:black">Best regards</span><br></p><p><span style="color:black">Daniel Hofmann<br> </span><span lang="EN-US" style="mso-fareast-language:EN-US"></span></p><p></p><div><b>From:</b> TRNSYS-users <trnsys-users-bounces@lists.onebuilding.org> <b>On Behalf Of </b>John Dyreby via TRNSYS-users<br></div><div> <b>Sent:</b> Tuesday, January 15, 2019 2:20 PM<br></div><div> <b>To:</b> Hofmann, Daniel via TRNSYS-users <trnsys-users@lists.onebuilding.org><br></div><div> <b>Cc:</b> John Dyreby <john@nnumerics.com><br></div><div> <b>Subject:</b> Re: [TRNSYS-users] TRNSYS18 Own Component Message 105<br></div><p></p><p> <br></p><div><p>Hello,<br></p></div><div><p> <br></p></div><div><p>I’m not sure exactly what the problem is, but it’s not necessary or advised to open all the extra source files (TrnsysFunctions.f90, TrnsysData.f90, etc...) into Type Studio. That could be causing the problem.<br></p></div><div><p> <br></p></div><div><p>Please try again with only your Type201.f90 file loaded into a new Type Studio workspace and see if that fixes the problem. After a successful compilation you should see in the UserLib directory the newly created single Type201.dll file
that TRNSYS will load externally.<br></p></div><div><p> <br></p></div><div><p>If that doesn’t fix the problem, feel free to send me your custom Type source code (assuming it isn’t proprietary) and I can try to compile and load it on my computer to help sort out what is going wrong.<br></p></div><div><p> <br></p></div><div><p>Regards,<br></p></div><div><p>John<br></p></div><div><p><a href="mailto:john@nnumerics.com">john@nnumerics.com</a><br></p></div><div><p> <br></p></div><div><p> <br></p></div><div><p> <br></p></div><p>On Tue, Jan 15, 2019 at 6:17 AM, Hofmann, Daniel via TRNSYS-users <<a href="mailto:trnsys-users@lists.onebuilding.org">trnsys-users@lists.onebuilding.org</a>> wrote:<br></p><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><div><p style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:black">Dear TRNSYS-Users,</span><br></p><p style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:black"> </span><br></p><p style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:black">I rewrote the Type 65d Source Code to include an integrated custom unit conversion. I called this new Type “Type201”.</span><br></p><p style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:black">I used the Type Studio to compile the Type. In Type Studio I loaded the source files SSRData.f90, TrnsysFunction.f90, TrnsysData.f90, TrnsysConstants.f90
and of course the Type201.f90. Compiling went successful and the expected dll.-files in the “UserLib” folders were created. I put the Type201 source code in the “MyTypes”-folder and created a suitable proforma in …TRNSYS18StudioProformas.</span><br></p><p style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:black"> </span><br></p><p style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:black">However when creating a new TRNSYS Project in Simulation Studio and testing the new component I get an Error message 105: “A TYPE was called
in the TRNSYS input file but was either not linked into trndll.dll or was not found in an external dll. A dummy subroutine was called in its place. Please link the TYPE or remove it from the input file Reported information : Type201 could not be located
in either the TRNdll64.dll or in an external dll. Please relink theTRNDll64.dll including this Type or make sure that an external DLL in the UserLibDebugDLLs and UserLibReleaseDLLs folders contain the Type.”</span><br></p><p style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:black"> </span><br></p><p style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:black">I really don’t know what causes this problem. I thought that I don’t need to recompile the TRNDLL when I put the external dlls into the UserLib-folder.
Has anyone an idea of how to solve the problem?</span><br></p><p style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:black"> </span><br></p><p style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><span style="color:black">Best regards</span><br></p><p style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><span style="color:black">Daniel Hofmann</span><br></p></div></blockquote><div><p> <br></p></div><div><p> <br></p></div></div></blockquote><div><br></div>