Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

EMS code for thermostat

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/thermostat-schedule-set/#8592

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

EMS code for thermostat

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/thermostat-schedule-set/#8592

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