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

Re: [EnergyPlus_Support] using macro to concatinate zoneprefix to variable name





Jean, would it work using:

##def CO2_EMS_FOR_ZONES_CurrentCO2Concentraion[mmzone]

or this way using some IF statements:

##def CO2_EMS_FOR_ZONES_CurrentCO2Concentraion1
##def CO2_EMS_FOR_ZONES_CurrentCO2Concentraion2
##def CO2_EMS_FOR_ZONES_CurrentCO2Concentraion3

On 9/15/2011 1:44 PM, YuanLu Li wrote:
 

Hi, jean
 
The parameter names in the square bracket must be unique.   More of the same name does not make sense.
===========================
##def  CO2_EMS_FOR_ZONES [ mmZone ]

EnergyManagementSystem:GlobalVariable,
#EVAL[ CO2_EMS_FOR_ZONES [ mmZone ] // _CurrentCO2Concentration ],
#EVAL[ CO2_EMS_FOR_ZONES [ mmZone ] // _CurrentCO2SP ],
#EVAL[ CO2_EMS_FOR_ZONES [ mmZone ] // _CurrentDamperPos ];
#enddef
=========================
 
 
 
CO2_EMS_FOR_ZONES [Zone1]
 
should give you:-
 
EnergyManagementSystem:GlobalVariable,
Zone1_CurrentCO2Concentration,
Zone1_CurrentCO2SP,
Zone1_CurrentDamperPos ; 
 
When using a MACRO just before a 'semicolon',  add a space before the semicolon to indicate the end of the macro.  Otherwise, the semicolon may be part of the macro name and not recognized for expansion.
===========================
 
If you want the substitution  
Can anyone give me a small example of using the #eval and // to concatinate ZoneName with "otherVariable" in a #set1 or #def declaration?

Something like:

##DEF CO2_EMS_FOR_ZONES [ mmZone,mmZone,mmZone,mmZone,mmZone,mmZone,mmZone,mmZone,mmZone,mmZone ]

EnergyManagementSystem:GlobalVariable,
#EVAL[ CO2_EMS_FOR_ZONES [ mmZone ] // _CurrentCO2Concentration ],
#EVAL[ CO2_EMS_FOR_ZONES [ mmZone ] // _CurrentCO2SP ],
#EVAL[ CO2_EMS_FOR_ZONES [ mmZone ] // _CurrentDamperPos ];



-- 
Richard A. Raustad
Senior Research Engineer
Florida Solar Energy Center
University of Central Florida
1679 Clearlake Road
Cocoa, FL  32922-5703
Phone:   (321) 638-1454
Fax:     (321) 638-1439 or 1010
Visit our web site at: http://www.fsec.ucf.edu

UCF - From Promise to Prominence: Celebrating 40 Years


__._,_.___


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

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

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.




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___