config sc = HCS180 config pl-link = 1 ! for the RBUF define Switch = input(0) define relay = output(0) ! For the pl-link X10 define sensor = input(1) define lamp1 = module(L1) define lamp2 = module(L2) define lampdelay = timer(1) display modules = a,b,c,d begin !!!!!!!!!!!!!!!!!!!!!!!!!!! Continuous control commands !!!!!!!!!!!!!!!!!!!!! ! This is just to get the RBUF up if switch=on then relay=on end if switch=off then relay=off end ! End RBUF ! Now let's get the PLIX-X10 module working if sensor=on then lamp1=on end if sensor=edge and sensor=on then lamp2=on lampdelay=on end if lampdelay>=5 then lamp2=off lampdelay=off end ! Test the lamp module set to position A1 if time>19:15:sa and time<19:25:sa then module(A1) = ON else module(A1) = OFF end !!!!!!!!!!!!!!!!!!!!!!!!!!!! Sequential control commands !!!!!!!!!!!!!!