[TRNSYS-users] Component with output cycles
David BRADLEY
d.bradley at tess-inc.com
Mon Nov 2 10:07:38 PST 2015
Anthonie,
I am no expert in C++. However, writing new components and using the
templates requires a pretty deep understanding of the compiler you are
using and of how to control the its settings. Unless you have the
settings correct (compatible with those of the TRNDll) you're going to
have a very hard time getting your component to communicate with the
TRNDll.
As to your specific question, I believe that xout[n] (where n is an
integer) refers to the nth element of an array. The code
xout[0] = 3.0 ;
sets the 0th element of the xout[] array to a value of 3
I would guess that the association between the output and the parameter
is that the parameter dictates how many outputs there are going to be.
In your code, you need to declare an array (xout perhaps) that is at
least as big as the maximum allowable value of the parameter. Then you
need to loop through the array, setting each element of the array to the
correct output value.
regards
David
On 11/01/2015 07:46, Anthonie Vandamme wrote:
> Dear,
>
> I'm trying to make a new component. I declared some outputs, that are
> in cycle associated with a parameter. When I export as C++, i receive
> a nice template.
>
> This is a normal output:
> xout[0]=?; //normal ouput
>
> But how can i acces the cycle??
>
> like this?:
> xout[0][*parameter*]=????
>
> How?
>
> Thx.
>
> Best regards,
> Anthonie
>
>
> _______________________________________________
> 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/20151102/eb884f8c/attachment.htm>
More information about the TRNSYS-users
mailing list