Here we have Two Push Buttons, which are assigned to address %IX0.1,%IX0.2 and Three lamps which are assigned to addresses % QX0.1, %QX0.2, %QX0.3 .
The conditions are,
- Pressing PB-1 , turns on Lamp-1 and Lamp-2.
- Pressing Both PB-1 and PB-2, Turns on Lamp-3 only.
- Pressing only PB-2, Turns on Lamp-2 only.
Let us try to make the ladder for the above program in a very basic step-by-step method.
1. As we can see both Lamps Lamp-1 and Lamp-2 are being turned on by the same Push Button, PB-1.So the ladder diagram for this will be,
2. Now pressing both PB-1, and PB-2 at the same time turns off Lamp-1 and lamp-2, And it also turns on Lamp-3.It is done in the following ladder.
Here the two push buttons PB-1 and PB-2 are ANDed in the third rung, which makes %MX0.1 on whenever, both the push buttons are Pressed.It should turn on Lamp-3, which is shown in the 4th rung of the above ladder.But, it also should prevent the First two lamps, from being turned on, which is accomplished by adding a Normally closed contact, in the 1st and 2nd rungs before the 1st and 2nd Lamp.
3. Pressing the PB-2 only, makes the Lamp-2 to glow, but not the other lamps.It is acheived in the following and Final Ladder by adding a parallel Normally Open contact of PB-2 with PB-1.It should be observed carefully, that, Lamp-2(%QX0.2) is being turned on by either PB-1 or PB-2, but not when both PB-1 and PB-2 are Pressed Simultaneously.Because pressing them simultaneously, makes %MX0.1 On, which in turn breaks the path to %qx0.2 , being a normally closed contact , as shown in the 2nd rung of the following ladder.