My heating control is quite simple. The openings of all valves for which the temperature set point is above the actual temperature are added in a criterion. If the criterion is above a certain threshold, the heating is switched on, otherwise its switched off.
This leads to a script which is periodically checked:
Code: Alles auswählen
var objIDs = dom.GetObject(ID_DEVICES).EnumUsedIDs();
string id;
real sum = 0.0;
foreach(id, objIDs){
var device = dom.GetObject(id);
if (device.Name().StartsWith("Kraan:")){
var ch = device.Channels().GetAt(1);
var valve = ch.DPByHssDP("LEVEL").Value();
var Tsoll = ch.DPByHssDP("SET_POINT_TEMPERATURE").Value();
var Tist = ch.DPByHssDP("ACTUAL_TEMPERATURE").Value();
if (Tsoll>Tist){ sum =sum + valve * 100; }
}
}
var systemv = dom.GetObject("Sum_Valves");
systemv.State(sum);
Due to the current temperatures I can not check the system under normal heating conditions.