@PROGRAM_NR 0 //Init Vars //Loop Start //running LEDs (=indicator for program unning) 3 A = 1 4 SET_LED A 5 A = A * 2 6 SET_LED A 7 IF A <= 128 THEN GOTO 5 //Actualize System-Time 10 M = QUERY_RTC_MINUTE 11 H = QUERY_RTC_HOUR 12 T = 60 * H 13 T = T + M //Trigger points Timer 50 IF T = 0 THEN GOTO 100 ;@Midnight 51 IF T = 420 THEN GOTO 120 ;@Morning 7:00 52 IF T = 600 THEN GOTO 140 ;@Day 10:00 53 IF T = 1200 THEN GOTO 120 ;@Evening 20:00 54 IF T = 1215 THEN GOTO 100 ;@Night 20:15 59 NOP //Overflow Alert 1 (Warning + Action) 70 A = QUERY_SENSOR 3 71 If A < 1 THEN GOTO 200 72 OUTPUT_OFF 4 79 NOP //Overflow Alert 2 (critical water alert + Action) 80 B = QUERY_SENSOR 4 81 If B < 1 THEN GOTO 210 82 OUTPUT_ON 5 89 NOP //Check Water-Temperature 90 B = QUERY_SENSOR 2 91 B = B - 240 //Offset -2,4°C 92 If B > 2550 THEN GOTO 95 93 OUTPUT_OFF 6 // Fan = Off 94 GOTO 96 95 OUTPUT_ON 6 // Fan = On 96 NOP 99 GOTO 3 //------------------- // = Lights = // 0=2x9W // 1= HQI // 2= Moonlight // 3=Reserve //------------------- //@Night 100 OUTPUT_OFF 0 101 OUTPUT_OFF 1 102 OUTPUT_ON 2 119 GOTO 59 //@Morning / evening 120 OUTPUT_ON 0 121 OUTPUT_OFF 1 122 OUTPUT_OFF 2 139 GOTO 59 //@day 140 OUTPUT_ON 0 141 OUTPUT_ON 1 142 OUTPUT_OFF 2 159 GOTO 59 //Pump Overflow Alert 200 OUTPUT_ON 4 209 GOTO 79 //Main Pump (emergency stop !) 210 OUTPUT_OFF 5 219 GOTO 89