! XPRESS programs consist of 3 sections: configuration, continuous, & ! sequential. ! ! NJC Tue Jul 28 19:43:24 EDT 1998 ! Used to experiment. ! !*[ Config ]****************************************************************** !CONFIG SC = HCS180 CONFIG SC = IND180 !CONFIG IND54 = OUT,IN,IN,OUT !CONFIG PL-LINK = 1 !CONFIG DIO-LINK = 1 DEFINE LED51 = Output(51) DEFINE LED52 = Output(52) DEFINE BLTimer = Timer(0) DEFINE Daytime = 1 DEFINE MODE = Variable(0) DEFINE Y = Variable(1) DEFINE M = Variable(2) DEFINE D = Variable(3) DEFINE Count = Variable(4) DEFINE Cnt = Variable(5) DEFINE Cnt2 = Variable(5) ! A ! B ! C ! D ! E ! F ! G Dining room DR ! H Kitchen KI ! I Bathroom (Up) UB ! J Bedroom #1 B1 ! K Bedroom #2 B2 ! L Master Bedroom BM ! M Garage GA ! N Back yard BY ! O Front yard FY ! P Broadcast FF ! Which X10 House codes to monitor Display Modules = A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P !*[ Continuous ]************************************************************** BEGIN IF Reset then ! Don't put any variable before this, they will be cleared ClearVariables; ClearTimers ClearLog BlTimer = ON Refresh = 0 Y = Year M = Month D = Day Mode = 1 Log(0) = 1 Count = 0 !Put the entry in European format for easy sorting by time Console = "%P0/%P0/%P0 %B : Reset occured", Y, M, D !Network = "DIO0 RESET" END !*[ Sequential ]************************************************************** IF BlTimer >= 2 THEN IFA LED52 = OFF THEN LED52 = ON ELSE LED52 = OFF ! THis is a pain, the PL-LINK keeps sending junk all the time! Refresh = 0 END BlTimer = ON END IFA Count >= 100 THEN Console = "Count %P0", Cnt Count = 0 Cnt = Cnt + 1 IFA LED51 = OFF THEN LED51 = ON ELSE LED51 = OFF END Else Count = Count + 1 END !*[ End ]*********************************************************************