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

[EnergyPlus_Support] Re: Subroutine in EMS



Well, I finished writing EMS code where :
Main program
.....
....
Run subroutine 1
....
...

Subroutine1:
If ....
Run subroutine 2
Return
Endif
If .....
Run subroutine 3
Return
Endif

Subroutine 2 : 
.....
.....
....
Return

My goal here is the program first executes some lines then runs subroutine 1
In subroutine 1 there are 2 if conditions , if the program enters first if and run subroutine 2
In subroutine 2 the code lines execute then when the perogram reaches the return command line it will go back to subroutine 1 (inside the first if condition) , it will find a return command so it will return to the main program at the line subroutine 1 was called. This should also ensure that when code program enters the first if condition inside subroutine 1 it won't enter the second if condition in the same timestep.

I finished the code in that manner and program works fine except that for a few points the program seems to enter bothif conditions. My energyplus calling point is InsideHvacSystemIterationLoop

Please help
Thanks



------------------------------------
Posted by: alyelhefni@xxxxxxxxx
------------------------------------

EnergyPlus support is found at:
http://energyplus.helpserve.com or send a message to energyplus-support@xxxxxxxx

The EnergyPlus web site is found at:
http://www.energyplus.net/

The group web site is:
http://groups.yahoo.com/group/EnergyPlus_Support/

Attachments are currently allowed but be mindful that not everyone has a high speed connection.  Limit attachments to small files.

EnergyPlus Documentation is searchable.  Open EPlusMainMenu.pdf under the Documentation link and press the "search" button.
------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/EnergyPlus_Support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/EnergyPlus_Support/join
    (Yahoo! ID required)

<*> To change settings via email:
    EnergyPlus_Support-digest@xxxxxxxxxxxxxxx 
    EnergyPlus_Support-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    EnergyPlus_Support-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/