[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRNSYS-users] running trnsys input file through console Fortran program



Hi Mohammad,

TRNSYS has a subroutine called CALLPROGRAM, which you can use as the basis of your program. You can just grab it, remove the calls to TrnsysConstants and TrnsysData, and it is ready to be used in any console application. You can call it with a subroutine that looks like this:

program CallTRNSYS

   implicit none

   logical(4) bWait                   !wait/no wait for new process to end
   integer*4 prochand,thrdhand
   character(200) cmdline       !Command line to call TRNSYS
   integer errorCode

   !Call TRNSYS
   cmdline = 'c:\Trnsys16\Exe\TRNExe.exe c:\Trnsys16\MyProjects\MyDeck.dck'
!Wait until it is done
   bwait = .true.
   call CALLPROGRAM(CMDLINE,bwait,prochand,thrdhand,errorCode)
end program


Best regards,

Diego

mohammad abdunnabi wrote:
Dear All;

Does any one have any idea about how can I run an executable program ( Trnsys executable input file) by using fortran program (I'm using Fortran 90). in other words, I want to run Trnsys via a fortran program. what's the statement (to be written the fortran program) that satisfy this purpose.

any help will \be highly appreciated

many thanks in advance

M. Abdunnabi


____________________________________________________________________________________Get the Yahoo! toolbar and be alerted to new email wherever you're surfing.
http://new.toolbar.yahoo.com/toolbar/features/mail/index.php
_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@engr.wisc.edu
https://www.cae.wisc.edu/mailman/listinfo/trnsys-users


--
Diego A. Arias
TRNSYS Coordinator
Solar Energy Laboratory
University of Wisconsin - Madison
1500 Engineering Drive
Madison, WI 53706