Now in this problem we have Three Push Buttons, and one lamp.

The conditions are as follows:

  1. Upon pressing any one push button at a time , the lamp will not glow.
  2. Upon pressing any two push buttons, the lamp will glow.
  3. But, when all three push buttons are pressed ata the same time, the lamp will not glow.

 

Let us see the solution:

%IX0.1,%IX0.2 and %IX0.3 are the address of the three input push buttons.The %QX0.0 is the address of the Lamp.%MX0.0 is an auxiliary memory bit.

  1. Now, looking at the second rung,as we can see, the Lamp(%QX0.0) will only be on when any two buttons are pressed simultaneously.i.e. three OR operations, each one is an ANDing of any Two buttons, i.e total three possible combinations.
  2. But, again the lamp has to be turned off, upon pressing all three buttons at the same time.To acheive, this functionality, The ANDing of all three input buttons has been done, which results in making the Auxiliary bit, %MX0.0, being Turned ON or Off.Threrfore, if all three buttons are pressed simultaneously, then M0 turns on, which breaks the path, in the second rung, being a Normally closed type of contact.