DIGITAL INPUT/OUTPUT CARD IOD-144 USER MANUAL
6-7
writeln('This is the IOD card demonstration program. This ');
writeln('program will simulate an alarm system program for ');
writeln('sixteen sensors and four arming stations, along with');
writeln('four separate alarm outputs which could be routed to');
writeln('a siren, lights, silent alarm,etc');
writeln;
writeln('THIS PROGRAM IS INTENDED FOR DEMONSTRATION PURPOSES,');
writeln('ONLY AND IS NOT MEANT TO BE USED AS AN ACTUAL ALARM ');
writeln('SYSTEM.');
writeln;writeln;
writeln('Press any key to begin program.');
key:readkey;
old_arming_stations:=get_status; {this loads the status of the arming switches}
repeat {at the time the program is first activated. A}
clrscr; {change in status would indicate arming}
{would indicate arming}
read_sensors(sensors_now); {this reads the current status of the sensors}
for i=0 to 15 do begin {which is then displayed to indicate open }
if sensors_now[i]=OFF then {windows, etc}
writeln('Sensor #',i,'is open');
end;
writeln;
writeln('Press ESC to re-scan, RETURN to begin alarm scanning.');
key:=readkey;
until key=#13; {the repeat/until loop gives the user an}
{opportunity to shut open windows or doors}
{and then re-scan the sensors}
clrscr;
WHILE TRUE do begin {this WHILE is used to form an infinite loop}
Writeln('Waiting to be armed, or press any key to halt program.');
repeat {this repeat/until-loop continues until arming}
arming_stations:=get_status; {station status changes, indicating arming}
if key pressed then halt(1); {arming, or until a key is pressed terminating}
(the program}
until arming stations <> old arming stations;
sound(900); {short tone indicating alarm has been
armed}
delay(300); { " " " " " " " }
nosound; { " " " " " " " " }
writeln('Alarm system will activate in 15 seconds');
read_sensors(sensors_at_arm);
old_arming_stations : get_status;
gettime(hour,min,sec,hun); {this code reads the system clock}