try coding like this:
Code:
IF (timer = 1) and (relay = 1) then
I am not sure if this will work, it seems maybe relay never = 1?