Dimas,
You can do this through greater than (gt) and less than (lt) functions in an equation block.
For example: inputs: a=1, b=3
X=gt(a,b)=0
Y=lt(a,b)=1
What I often do then after the gt or lt commands is scale the value or use it in another equation.
ControlSignal=5*X+3*Y=5*0+3*1=3
Essentially, just create the logic through a bunch of gt and lt functions along with some basic mathematical functions and you can do if, then, else functions.
If you do create a component with a traditional if, then, else setup please publish it. It would be very helpful.
Hope that helps.
Fred
Fred Betz PhD., LEED AP
Sustainable Systems Analyst
AEI | AFFILIATED ENGINEERS, INC.
5802 Research Park Blvd. | Madison, WI 53719
P: 608.236.1175 | F: 608.238.2614
fbetz@aeieng.com | www.aeieng.com
From: Dimas Firmanda Al Riza [mailto:dimasfirmanda@gmail.com]
Sent: Tuesday, October 26, 2010 5:29 AM
To: trnsys-users@cae.wisc.edu
Subject: [TRNSYS-users] logic function in TRNSYS
Dear all,
I'd like to ask, are there any way to built a logic function or are there any component in TRNSYS that can be used to built logic function?
especially IF (logical statement) then .... (TRUE) else ..... (FALSE)
or do we need to create new component to do this?
Thank you
Regards,
Dimas