The Problem's Conditions:

  1. The Bell O/P-1 turns on as long as the Door bell switch is kept pressed.Releasing the Door Bell Switch, turns off the Bell.
  2. For detecting the glass break there are two common types of sensors can be applied.
    1. 1st, If there is an intrusion attempt(Glass break) then the Glass Break Sensor is permanently set.( can be done using a continuity break detection ckt using a lot of very thin wires pasted on the glass from the inside, which triggers the alarm when the wire breaks due to breaking of the glass).
    2. 2nd, a vibration sensor can be employed, to detect the heavy force on the glass applied to the glass, which gives a pulse.
  3. Whatever may be the condition, if the glass break sensor is set, then the Bell keeps on ringing as an intrusion alarm.
  4. When The Bell is ringing as an alarm, as an indicator of the glass has been broken, then only by pressing the I/P-2 Button, manually, can turn off the alarm.Of course, we have to change the glass, and its its certain circuit elements , as necessary, for the system to be useful once again in future.

Lt us now try to develop the ladder logic, for the above situation.

Step 1: Pressing the door bell switch, rings the door bell for the time the switch is kept pressed on.The ladder for this will be very simple as showed below,

Step 2: For the glass break sensor to work properly, we have to make a rung where we can latch an auxiliary bit, say M0(%MX0.0) , upon receiving a pulse from the Glass break detector.In the above animation, however, it is not shown, but let us consider a third Button, %IX0.3 as the Glass Break Sensor Output.The rung for this is given below,

Step 3: When the %MX0.0 is set, then the bell should keep on ringing, therefore, let us connect this M0 in the First rung of our ladder diagram, as another condition for the bell to ring.It is shown below.

Step 4: When The Bell is ringing, as indicating the Glass break, then it can only be stopped by Manually pressing the 2nd IP,i.e IP-2 or %IX0.2.Pressing %IX0.2 Should break the latched condition for %MX0.0. This completes our Ladder diagram as shown here.