Access IOD-144 Microscope & Magnifier User Manual


 
DIGITAL INPUT/OUTPUT CARD IOD-144 USER MANUAL
6-8
i:=sec+15; {for the current time which is}
if i > 60 then i :=i-60; {used to delay for 15 seconds}
repeat
gettime(hour,min,sec,hun);
until sec = i; {end of delay loop}
writeln;
writeln('ALARM SYSTEM ACTIVE AND ARMED');
sound(900); {short tone indicating that alarm}
delay(300); {is fully activated}
no sound;
j:=0 {the following code compares current}
{status of sensors against status when}
{armed to determine if break-in has occurred}
{break-in has occurred.. Any change indicates break-in}
repeat
read_sensors(sensors_now);
for i:= 1 to 16 do begin
if sensors_now[i-1] <> sensors_at_arm[i-1]then
j:=1;
end;{for}
arming_stations: get_status;
if arming_stations <> old_arming_stations then
j:= -i; {flag used to signal that alarm is}
{de-activated}
until j <> 0;
if j = -1 then begin {if j was set to -1 in the above loop, then} {alarm is
de-activated}
gettime(hour,min,sec,hun);
writeln('Alarm deactivated at ', hour,':',min,':',sec);
sound(900); {the following code chirps the speaker to}
{indicate disarming}
delay(100);
no sound;
delay(50);
sound(900);
delay(100);
nosound;
end {end of disarming routine}
else {if alarm}begin
writeln('Sensor #', j,' has been activated!!');
gettime(hour,min,sec,hun);
writeln('The time of alarm is ',hour,':',min,':',sec);
ALARM;
end; {else}
end; {WHILE this "end" sends the program back}