Quest BDL Function Programming

2 posts / 0 new
Last post

Daric, the following code should work for you. Add extra if-then
statements for additional space types.

/*

* Sets minimum outside air based on control zone activity description.

* Copy and paste into Minimum Air Schedule field under Outside Air

* tab of system.

*/

if(#LR("CONTROL-ZONE","SPACE","C-ACTIVITY-DESC") =="Off") then

#SI("Office Min OA Sch", "SYSTEM", "MIN-AIR-SCH")

else

#SI("Residential Min OA Sch", "SYSTEM", "MIN-AIR-SCH")

endif

In this case, I have spaces with Activity Description = "Off" and two
fraction schedules (one for offices and one for residential). A short
warning: the Activity Description field always gets cut off at 4 letters.
So if you have two space types with with Activity Description =
"Residential 1" and "Residential 2", then running #L("C-ACTIVITY-DESC")
will return "Resi" for both space types and won't recognize them as
different. As a safety precaution, I always keep my Activity Descriptions
to 4 letters or less so that I don't get surprises. I'm not exactly sure
for the reason of the cut-off, but I have a feeling this keyword was
originally only intended to be used internally by eQuest for code
compliance runs.

Aaron

Hello All;

Has anyone had success using a User Default expression for a System to
reference the control zone?s Activity Description to set a MinOA Schedule?

Effectively, the System?s MinOA Schedule to references the Control-Zone,
which will look at the Control-Zone?s to determine the Space, and then
determine the Activity Description of the Space.

I believe the use of #LR and #L gets me on the right path, but haven?t been
able to ?crack the nut??.

The code below attempts pass referenced names, but unsure where the
breakdown is?

FAN-SCHEDULE =

{switch(#LR(#LR(#L("CONTROL-ZONE"),"NAME")),"SPACE")

case "SCHO" : #SI("FAN SUP EVNT","CONTROL-ZONE","FAN-SCHEDULE")

case "OFFI" : #SI("FAN SUP EVNT","CONTROL-ZONE","FAN-SCHEDULE")

default : no_default

endswitch}

There are more than 2 activity types, but it has been shorted for testing &
debugging.

In reality, IF this is possible, any of the System level schedules should
be able to be set from the Controlling Zone?s Space?s Activity Description.

Any help is greatly appreciated.

Thanks,

DARIC R. ADAIR PE, C.E.M.
Mechanical Engineer, Energy Analyst

[image: HEI logo]

*Henderson Engineers, Inc.* 8345 Lenexa Drive, Suite 300 Lenexa, KS 66214
*dir* 913 742 5530 *tel* 913 742 5000 *fax* 913 742 5001 *tx id* #F-001236
*www.hei-eng.com*

Licensed in KS.
Sending me large files? Please use my HEI DropBox

[image: Facebook Logo]

[image: Twitter Logo]

[image: Linkedin Logo]

Aaron Powers2's picture
Offline
Joined: 2011-09-30
Reputation: 0

All;

Thanks for your help, to follow up: Julien and Aaron were both right and got me going in the correct direction.
I took Arron?s if-then statement structure and did some testing with my space types, and got that to work. It had a much simpler #LR(?) structure than I was initially attempting. His code below, w/ my project specific edits:

MIN-AIR-SCH =
{ if(#LR("CONTROL-ZONE","SPACE","C-ACTIVITY-DESC") =="CLUB") then
#SI("MINOA EVNT-NL YR", "SYSTEM", "MIN-AIR-SCH")
else
#SI("MINOA MEDS YR", "SYSTEM", "MIN-AIR-SCH")
endif}

This project has a respectable number of space types (and for future project flexibility) AND with my renewed faith, I tried a Switch statement again ? and got it to work:

MIN-AIR-SCH =
{switch(#LR("CONTROL-ZONE","SPACE","C-ACTIVITY-DESC"))
case "CLUB" : #SI("MINOA EVNT-NL YR","SYSTEM","MIN-AIR-SCH")
case "CNCR" : #SI("MINOA EVNT-NL YR","SYSTEM","MIN-AIR-SCH")
case "LOBY" : #SI("MINOA EVNT-NL YR","SYSTEM","MIN-AIR-SCH")

-Etc-
default : no_default
endswitch}

Note: -Etc- is just a place where more ?case?? statements can be placed; it is NOT part of the actual code. Remove before use.

So, Julien was right, my issue previously was with my #LR(?) statement. This is far simpler and works thus far.

Thanks for the assist!

Thanks,
DARIC R. ADAIR PE, C.E.M.
Henderson Engineers, Inc.?|?Mechanical Engineer, Energy Analyst
dir 913 742 5530? tel 913 742 5000? fax 913 742 5001? tx id #F-001236? email daric.adair at hei-eng.com? www.hei-eng.com
Licensed in KS.?

daric.adair's picture
Offline
Joined: 2014-06-18
Reputation: 0