What Is Ladder logic ?



Ladder logic (or Ladder Diagram) is the most widely used language for programmable logic controllers(PLC). It resembles the rungs and uprights (or rails) of a… yep... a ladder. So basically, this is a graphic language using symbols that mimics a electrical schematic of relays.
The reason is for this is simple. It was what electricians and engineers were used to.

Remember PLCs replaced relay control of machines. It made sense to approach developing a programming language that would be quickly recognizable.

How do you program with ladder logic?

Programming with ladder logic takes some getting used...less so if you are electrician I suppose!
As I see it there are two ways to approach it:

  • From an electrical point of view. In a nutshell...contacts arranged in series (AND logic) and parallel (OR logic) combinations energize (turn on) or de-energize (turn off) a coil. That coil can represent a physical output or an internal coil that in turn will cause other contacts to operate. It imitates the electrical current flow.
  • A logic point of view. After some time, you recognize quickly the AND and OR combinations that would turn on (the coil). The logic AND are contacts arranged next one another on the same rung(series). The Logic OR contacts are placed on rungs above and below. The AND and OR are very often combined to produce the necessary function. These logic combinations would typical turn on a coil. If the logic combination was false, the coil would turn off.

Ladder Logic latch

Example 1: When the start push-button is pressed the motor coil is energized and since this is a latching coil it remain on until an unlatch coil is energized. That is done with the second rung when you pressed the stop push- button.



Ladder Logic hold

Example 2: Notice here that is one coil for controlling the motor and one rung. However, there is a parallel sub-rung with the motor's contact.
So the way to read this is... you pressed the start push-button and completed the flow to motor coil. That causes the coil to be energized and close the motor's contact. The flow is now through the motor contact and stop push button.

But wait a minute... yeah its contact is drawn differently. It is what is called a “normally closed contact”. You see the start push-button when pressed completes the flow. The stop push-button when pressed actually breaks the flow and the motor coil loses power.
And in turn its motor contact now opens and pushing the start push-button is needed to energized the motor again...assuming your buddy is not pushing the stop push-button!
These examples just touch on ladder logic programming, but PLCEdge will continue to provide more information.

Ladder Diagram is the most commonly used language and it is used on the less expensive, less featured PLCs. The lost cost PLCs include one language and it very likely will be Ladder Diagram (LD). Of course, it is also included with most high feature, more expensive PLCs. But these high feature PLCs may also have one or more of the 5 Languages of IEC 61131-3 either standard or at extra cost. Allen Bradley Rslogix 5000 is an example.

Having programmed in Instruction List (IL), Ladder Diagram (LD), and Function Block (FB), I prefer to use Function Block.One of the things I like most about it that you can combine common used logic in to your own standardized function block. All that you need to do is connect the standard inputs and outputs and you are done. No need to worry or rewrite code that has been proven to work.

It maybe argued that if the Ladder Diagram programming package includes subroutines, you can accomplish the same thing. In my experience it is harder to follow program flow and many Ladder Logic Programmers do not use it.


Ladder Logic to PLC Programming
PLC Edge Home


New! Comments

Have your say about what you just read! Leave a comment in the box below.





PLC Frontier
Newsletter

Enter Your E-mail Address
Enter Your First Name (optional)
Then

Don't worry — your e-mail address is totally secure.
I promise to use it only to send you PLC Frontier.
[?]Subscribe To This Site
  • XML RSS
  • follow us in feedly
  • Add to My Yahoo!