[TRNSYS-users] Calling external program from a new C++ Component

Bezzarga, Amine (SCR US EXT) amine.bezzarga.ext at siemens.com
Tue Oct 5 14:56:01 PDT 2010


Hi everybody,

I'm stuck with TRNSYS  v 16.1 , the part of the API that normally allow
to call an external program (an exe written in c++) seems to not be
supported by the C++ plugin (I can just create my  own component that
will basically calculate the output from the input)
I mean the linker can't find the "call"  subroutine just like described
in the programmer's guide of the manual (part 8):
8.4.4.1. Calling External Programs
I know the example shown is for fortran but, in the file
..\Trnsys16_1\SourceCode\Templates\CppType.cpp we have this at the line
133:
  //*** Call N ('normal' call)

That seems to be the function that allow me to call an external program,
however there is no reference of that function in the "TRNSYS.h", So I'm
being stuck with a linker problem.

What I want to do is to start a simulation in TRNSYS, then when it reach
a certain component, TRNSYS will call a external program with data (in
argument if possible)  and wait for it to finish, and then get back
value from my program?

Unfortunately, TRNSYS doesn't seem to support Socket connection to
exchange data. I see that type66 do it  (This routine calls a program
called Engineering Equation Solver (EES)) with the data exchange
protocol via the windows' clipboard. 

To resume:
So do I have to start over with the fortran plugin to be able to call
external program?
Or do you know a other way to do what I want ?
And do you think I need to communicate through a file ?


Thanks a lot for your help.
Amine


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20101005/f03bafce/attachment-0001.htm>


More information about the TRNSYS-users mailing list