Ladder_logic Ladder_logic

Ladder logic - Definition and Overview

Ladder logic is a method of drawing electrical logic schematics. They are used widely in industrial PLC applications, where a series of complex logic checks are required before a signal is issued. Ladder logic is used when programming languages such as C, Java would consume too much overhead.

There are two main input components in ladder logic

--[ ]-- a relay normally open (N/O) contact

--[\]-- a relay normally closed (N/C) contact

These are input signals into the logic which can be configured to produce any logical function such as AND, OR, XOR, NAND, NOR, INV

i.e.

 ---[ ]-----[ ]---
     X       Y 

Represents X AND Y

 ---[\]-----[\]---    
     X       Y

Represents X NAND Y

 ----|---[ ]---|------
     |    X    |
     |         |
     |---[ ]---|
          Y          

Represents X OR Y Ladder logic is then used to drive output coils, so that when the preceding logical functions have been evaluated - the output coil changes state. --( )-- an N/O output coil

--(\)-- an N/C output coil

For Example

 ----[ ]---------|--[ ]--|------( )--
      X          |   Y   |       S
                 |       |
                 |--[ ]--|
                     Z

Realises the function S= X.(Y+Z)

Complex ladder logic is 'read' in the same way as a western book (left to right). The first point on the left, is the input signal (or high potential), as each of the lines (or rungs) are evaluated the output coil of a rung may feed into the next stage of the ladder as an input. In a complex system there will be many "rungs" on a ladder, which are numbered in order of evaluation.

 1 ----| |-----------|-| |-----|----( )--
        X            |  Y      |     S
                     |         |
                     |---| |---|
                          Z
 2 ----| |----| |-------------------( )--
        S      X                     T 

T=X.S

This represents a slightly more complex system for rung 2. After the first line has been evaluated, the output coil (S) is fed into rung 2, which is then evaluated and the output coil T could be fed into an output device (buzzer, light etc..) or into rung 3 on the ladder.

This system allows very complex logic designs to be broken down and evaluated fairly easily.

For more practical examples see below (my creations released to wikipedia):

pos                                       gnd

 |                                         |
 |                                         |
 |--][------------][-------------------O---|
    keysw1     keysw2           door motor

This circut shows the two key switches that security guards might use to activate motor on a bank vault door. When the normally open contacts of both switches close, electricity is able to flow to the motor which opens the door. This is a logical AND.

pos                                       gnd

 |                                         |
 |                            +-------+    |
 |----------------------------+       +----|
 |                            +-------+    |  
 |                         Remote receiver |
 |-----][------------------------------O---|
 |   remote unlock   |       lock solenoid |
 |-----][------------+
     interior switch

This circuit shows the two things that can trigger the power door locks in my imaginary car. The remote receiver is always powered. The lock solenoid gets power when either set of contacts is closed. This is a logical OR.

Since electrical engineers already knew how to read ladder logic, PLC makers made their systems programmable in ladder logic. This would allow electrical engineers to read, debug, troubleshoot and write computer programs for the PLCs which replaced their cabinets full of relays.

Additional Functionality

Additional functionality can be added to a ladder logic implementation by the PLC manufacturer as a special block. When the special block is powered, it executes code on predetermined arguments. These arguments may be displayed within the special block.

pos                                       gnd

 |                                         |
 |                            +-------+    |
 |-----][---------------------+  A    +----|
 | remote unlock              +-------+    |  
 |                         Remote counter  |
 |                                         |
 |                            +-------+    |
 |-----][---------------------+  B    +----|
 | interior unlock            +-------+    |  
 |                        Interior counter |
 |                                         |  
 |                    +--------+           |
 |--------------------+ A + B  +-----------|
                      + into C +             
                      +--------+             
                        Adder              

In this example, the system will count the number of times that the interior and remote unlock buttons are pressed. This information will be stored in memory locations A and B. Memory location C will hold the total number of times that the door has been unlocked electronically.

See also

Copyright 2009 WordIQ.com - Privacy Policy  :: Terms of Use  :: Contact Us  :: About Us
This article is licensed under the GNU Free Documentation License. It uses material from the this Wikipedia article.