[Equest-users] Quest BDL Function Programming
Daric Adair
Daric.Adair at hei-eng.com
Fri Jun 19 15:09:23 PDT 2015
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<http://www.hei-eng.com/>
Licensed in KS.
From: Aaron Powers [mailto:caaronpowers at gmail.com]
Sent: Friday, June 19, 2015 4:06 PM
To: Daric Adair; equest-users at lists.onebuilding.org
Subject: Quest BDL Function Programming
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
[HEI logo]
Henderson Engineers, Inc. 8345 Lenexa Drive, Suite 300 Lenexa, KS 66214
dir 913 742 5530<tel:913%20742%205530> tel 913 742 5000<tel:913%20742%205000> fax 913 742 5001<tel:913%20742%205001> tx id #F-001236 www.hei-eng.com<http://www.hei-eng.com/>
Licensed in KS.
Sending me large files? Please use my HEI DropBox<https://apps.hei-eng.com/DropBox/upload.aspx?to=daric.adair@hei-eng.com>
[Facebook Logo]<http://www.facebook.com/hendersonengineers>
[Twitter Logo]<http://twitter.com/hei_eng>
[Linkedin Logo]<http://www.linkedin.com/company/henderson-engineers-inc>
________________________________
This email and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. This communication represents the originator's personal views and opinions, which do not necessarily reflect those of Henderson Engineers, Inc. If you are not the original recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error, and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you received this email in error, please immediately notify administrator at hei-eng.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20150619/b0fe6f72/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 5566 bytes
Desc: image001.gif
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20150619/b0fe6f72/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 192 bytes
Desc: image002.gif
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20150619/b0fe6f72/attachment-0001.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.gif
Type: image/gif
Size: 177 bytes
Desc: image003.gif
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20150619/b0fe6f72/attachment-0002.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.gif
Type: image/gif
Size: 198 bytes
Desc: image004.gif
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20150619/b0fe6f72/attachment-0003.gif>
More information about the Equest-users
mailing list