Programming Examples V

In this alarm system, there are 4 (danger) inputs to protect the factory, so that in case of any danger signals any of these inputs, it will give an certain alarm.

Using programmable logic controllers, we will write a program according to the following requirements:

1. If only one of the inputs (sensors) is turned on, nothing will happen.
2. If two of the inputs are turned on, the Red Pilot Light will be activated.
3. If three of the inputs is turned on at same time, it would trigger an Alarm (SIREN)
4. If all the four inputs are ON together, it would trigger an alarm to the Fire Department. which indicates that all of the four signals together means fire will erupt.

What we want is:
*determine the inputs and outputs of the system.
*write a PLC program using ladder logic to accomplish that.

Inputs and Outputs are as following:

Output

INPUT

Out 17         Red Pilot Light
Out 18          Alarm *Siren
Out 19     Fire Department

IN1    A    NO
IN2    B    NO
IN3    C    NO
IN4    D    NO

And the Ladder Logic Diagram for this alarm system is something like this:

ladder diagram examples 5