'Rev 1.0 Let a = 32.5 'high env temp Let b = 15 'low env temp Let c = 60 'weep cycle(secs) Let f = 70 'max boil Let g = 55 'min boil Let i = 15 'setback Let et1 = 20:00:00 'setback start Let et2 = 07:00:00 'setback end' '----DO NOT EDIT BELOW THIS LINE----' 'calc slopes Let e = b - a Let d = c * 0.90 Let d = d / e Let h = f - g Let h = h / e Let t0 = 0 Let t1 = 0 Let t2 = 0 Let t3 = 0 '--main loop-- Do If t0 = 0 Then Let t0 = 10 Call LOWTEMP If e <= a Call WEEP If t3 = 0 Then Let relay2 = 1 Call BOILER Let t3 = 600 End If Else Let relay1 = 1 If t3 = 0 Then Let relay2 = 0 Let relay3 = 0 Let t3 = 600 End If Let t1 = 0 Let t2 = 0 End If End If Loop End 'find lowest env temp(e) Sub LOWTEMP Let e = temp1 If temp2 < e Then Let e = temp2 End If If temp3 < e Then Let e = temp3 End If End Sub 'handle weep functionality Sub WEEP If t1 > 0 Then Let Relay1 = 0 'on Else If t2 = 0 Then If e < b Then Let j = c Else Let j = e - b Let j = j * d Let j = j + c End If Let t2 = c * 10 Let t1 = j * 10 Else Let Relay1 = 1 End If End If End Sub 'handle boiler Sub BOILER Let j = e - b Let j = j * h Let j = j + f 'check boil temp in range If j >= f Then Let j = f End If If j < g Then Let j = g End If 'handle setback If et1 > et2 If time >= et1 Then Let j = j - i Else If time < et2 Then Let j = j - i End If End If Else If time >= et1 Then If time < et2 Then Let j = j - i End If End If End If 'turn boil on/off If temp4 <= j Then Let relay3 = 1 Else Let relay3 = 0 End If End Sub