5 Program Example
5.1 An Alarm System
Task description
The objective is to create an alarm system with several alarm circuits and a delay function for
arming and disarming the system.
–
The system will be armed after a delay between turning the switch and activation.This pro
-
vides time for the user to leave the house without tripping the alarm.
–
An n alarm is activated after a delay to make it possible to disarm the system after entering
the house.
–
The siren will only be sounded for 30 seconds, but the alarm lamp will remain activated un
-
til the system is disarmed.
Operation and function of the alarm system
–
The system will be armed with a key switch, with a 20-second delay.
– When an alarm is triggered a siren and a blinking alarm lamp are activated after a delay of
10 seconds.
– The key-operated switch will also be used to deactivate the alarm system.
I/O List
The following table contains an overview of the used inputs, outputs, and timer.The inputs
are used to read the status of the alarm circuits. The siren and a blinking alarm lamp are
connected to outputs. The timer are used for the required delays.
Program Example An Alarm System
Training Manual GX IEC Developer 5 - 1
Function Adress Remarks
Input
Arm system X1 Make contact (key-operated switch)
Alarm circuit 1 X2
Break contacts (an alarm is triggered when the input
has the signal state “0”)
Alarm circuit 2 X3
Alarm circuit 3 X4
Output
Display “system armed” Y0
The outputs functions are activated when the corre
-
sponding outputs are switched on (set). For exam
-
ple, if Y1 is set the acoustic alarm will sound.
Acoustic alarm (siren) Y1
Optical alarm (rotating beacon) Y2
Alarm circuit 1 display Y3
Alarm circuit 2 display Y4
Alarm circuit 3 display Y5
Timer
Arming delay T0 Time: 20 seconds
Alarm triggering delay T1 Time: 10 seconds
Siren activation duration T2 Time: 30 seconds