! ! Bob Morrison HCS_C Xpress Control Program ! First HCS_C home control program ! revised 6/10/2007 ! NOTE: This test requires that HCS_C Combo card and video be connected define remote_inputs = variable(0) define hcs_inputs = variable(1) define garage_door_open = variable(0,0) define front_door_sensor = input(0) define garage_door_sensor = input(1) define three_sec_timer = timer(0) define relay_drive = output(0) define alarm_sensor = input(4) config hcsnet CMB1 end begin ! Start with display dumps to the Console and the ! RS485 LCD_Link. Kick off timer to initiate polling hcsnet. if reset then console = "Example HCS_C events" ! escape clears the video screen, displays date and time video = "%N1 Starting HCS_C %D %B" three_sec_timer = on end ! poll the HCS_Combo card if change_value(timer(0)) = 3 then hcsnet="CMB1 E" remote_inputs = hcsnet(CMB1,I) garage_door_open = garage_door_sensor if garage_door_open = 1 then console = "garage door open" end ! restart the timer three_sec_timer = on end !Continuous assignment example if 1 then relay_drive = alarm_sensor end