The Problem

The Problem:

There are two Push Buttons,

i.e. One for Switching On The Lamp
     Another for switching off the Lamp

 So, there are total 3 devices, i.e. The Start Push Button, Stop Push Button and The Lamp.

Now let us try to make the Ladder logic:

Here one Button, let us say the Start Push Button (I0) is connected to the lamp say (Q0).

Note: I0 and Q0 will vary while actually programming a plc, depending upon the brad/model of the PLC.

In the above case, what will happen is, the output i.e. the lamp(Q0) will remain on as long as the input button i.e. Start Push Button is kept pressed on.O releasing the force from the push button the lamp will turn off. Of course we don't want that.

So here is the solution We have to latch it.i.e. the lamp should be on even after we are releasing the push button.It is shown in the figure below.

 

 In the above ladder diagram, the lamp will be turned on even after releasing the push button.

Want to know why?

It is because how the PLC executes the Ladder Diagram according to it's Scan Cycle.

So when it executes the first line it turns on the Lamp(Q0). When q(0) is turned on All references to Q0 in the program will also change the state,i.e. ON.So when it executes the second line, it makes Q0 on. This continues for each scan cycle, ad the output Q0 or the lamp remains ON.

The above technique is also very popularly known as latching an output.In fact we will be using that a lot often.

Now it can't be made OFF by just removing the force from I0,hence  we need another method to turn it OFF.It is explained Below.

 

The latch which was formed by the output Q0 is now can be cutoff by the STOP Push Button I1.So when I1 is pressed it breaks the latch momentarily, thereby turning off the output Q0, which stays off, till the start button is pressed again.