Hi all, I'm probably clutching at straws but my new logic isn't working as expected and I'm running out of idea's. I'm really suspecting there is either an issue or a difference in 'once' logic with an 'and' condition when running on the PAC verses running in PICED. My logic below in PICED seems to work. It doesn't when downloaded onto the PAC Is it possible I need an extra set of brackets to enclose all the conditions in the 'once' statement below? I've copied the below logic out of two different modules: This logic is in one module: if (Time >= sunset) or (Time <= sunrise) then begin bDarkOutside := TRUE; end else begin bDarkOutside := FALSE; end; And this logic is in another module: once (bDarkOutside = TRUE) and (DayOfWeek in ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]) then begin { If they're already on, leave them on and don't schedule the auto off } if (GetLightingState("Verandah and Garage") = OFF) then begin SetLightingState("Verandah and Garage", ON); { Flag the fact that they're on automatically so we can automatically turn them off } bAutoFrontLightsOn := TRUE; end; end; I should mention that bDarkOutside is initialised to FALSE within 'Initialisation' and I checked that the lights weren't on when I downloaded the new code. Another piece of logic that seems to work from PICED but not on the PAC is: once (TimerTime(ord(TMR_STARTUP_SEND_SMS)) >= STARTUP_SMS_DELAY) and (GeneralSendSMSString = '') then begin TimerStop(ord(TMR_STARTUP_SEND_SMS)); Format(GeneralSendSMSString, 'PAC 1 Startup. Ver = ', Version); {Writeln('General: Sending Bootup SMS ', GeneralSendSMSString);} end; Again, GenerealSendSMSString is initialised in 'initialisation' to an empty string. Again it has 'once' and an 'and' but I didn't put extra brackets around the whole thing. I'm running PAC firmware 3.13. And finally, is it OK to leave WriteLn's in the logic downloaded to the PAC? I always take them out. I haven't tried to leave them in. I imagine they wouldn't do anything and the only benefit to leaving them in is I can be lazy and not have to remove them ;) Thanks Brad.