EMS code for thermostat

asked 2022-01-17 12:48:24 -0600

updated 2022-01-18 09:58:47 -0600

Hi everyone, I'm trying to write an EMS code in DesignBuilder to set a heating thermostat for a PTHP which conditions a thermal zone. I want that the thermostat to turn off PTHP when it reaches 21°C and turn it back on when the temperature drops to 20.5°C. The thermal zone in my project is called 466217. The PTHP turns on at 7 am and turns off at 6 pm from Monday to Friday and I want that the thermostat to adjust while the PTHP is running. The Zone Heating setpoint is set to 21°C.

I followed the advice at this link: https://unmethours.com/question/4094/...

Schedule:Constant,Cycle,OnOff,1; ! New schedule object 

AvailabilityManager:Scheduled, ! Updated Availability Manager
PTHP Availability Manager,
Cycle;

EnergyManagementSystem:Sensor, 
 Zone1Temp, 
 466217, 
 Zone Mean Air Temperature;


EnergyManagementSystem:Sensor,
hSP,
466217,
Zone Thermostat Heating Setpoint Temperature;

EnergyManagementSystem:Actuator,
AvailSCH_Overwrite,
Cycle,
Schedule:Constant,
Schedule Value;

EnergyManagementSystem:ProgramCallingManager,
Supervision,
BeginTimestepBeforePredictor,
HVAC_uncontrolledloop_Supervision;

EnergyManagementSystem:Program,
HVAC_uncontrolledloop_Supervision,
SET Toffset = 0.50,
IF Zone1Temp > (hSP - 0.01),
SET AvailSCH_Overwrite = 0,
ELSEIF AvailSCH_Overwrite == 0 && Zone1Temp >= (hSP - Toffset),
SET AvailSCH_Overwrite = 0,
ELSE,
SET AvailSCH_Overwrite = 1,
ENDIF;

The problem is that the program runs and the simulation proceeds, but this script has no effect on the temperature regulation, i.e. the zone mean air temperature is always fixed at 21°C. Zone Mean Air Temperature

Can someone help me?

Thank you in advice

Marco

edit retag flag offensive close merge delete

Comments

Perhaps start by using the Output:EnergyManagementSystem, with "Verbose" for the EnergyPlus Runtime Language Debug Output Level field, to ensure the EMS program is operating as you expect.

shorowit's avatar shorowit  ( 2022-01-18 15:21:07 -0600 )edit

Thank you for your comment. I don't know why, but by inserting

Output:EnergyManagementSystem, None, None, Verbose;

the script doesn't run and the error message is: * Severe * <root>[Output:EnergyManagementSystem] - Object should have no more than 1 properties. * Fatal * Errors occurred on processing input file. Preceding condition(s) cause termination.

Any advice?

Marco_Fir's avatar Marco_Fir  ( 2022-01-21 07:31:56 -0600 )edit

I just pasted that exact string into my IDF and it worked correctly. Is it possible that you have two Output:EnergyManagementSystem objects in your file? Or maybe you are using an older version of EnergyPlus where the object has different fields?

shorowit's avatar shorowit  ( 2022-01-21 09:34:19 -0600 )edit