Boolean Algebra for Ladder Logic

Embed Size (px)

Citation preview

  • 8/11/2019 Boolean Algebra for Ladder Logic

    1/21

    Boolean Algebra

  • 8/11/2019 Boolean Algebra for Ladder Logic

    2/21

    Boolean Algebra

    after mathematician George Boole

    A means of reducing the number of logic

    input needed to realize the desired output.

  • 8/11/2019 Boolean Algebra for Ladder Logic

    3/21

    Drill Motor Boolean Equations

    CR1

    CR1

    CR3

    CR1

    CR3

    CR2

    CR3

    CR3

    CR3

    CR2

    CR1=Stop (Start + CR1)

    CR2=CR1*LS1*LS2

    CR3=LS2 * (CR2+CR3)

    Extend = CR3

    Retract = CR3

    Motor = CR3

  • 8/11/2019 Boolean Algebra for Ladder Logic

    4/21

    Boolean Algebra

    OR operation is Boolean ADDITION

    X = A + B

    AND operation is BooleanMULTIPLICATION

    X = AB

    These operations follow some of the samelaws as standard algebra.

  • 8/11/2019 Boolean Algebra for Ladder Logic

    5/21

  • 8/11/2019 Boolean Algebra for Ladder Logic

    6/21

    Associative Laws

    Associate: group together

    Addition

    X = A + (B + C) = (A + B) + C

    Multiplication

    X = A(BC) = (AB)C

  • 8/11/2019 Boolean Algebra for Ladder Logic

    7/21

    Distributive Laws

    Distribute: divide into groups

    X = A(B + C) = AB + AC

    X = (A + B) (C + D) = AC + AD + BC + BD changes logic from

    OR then AND to AND then OR

  • 8/11/2019 Boolean Algebra for Ladder Logic

    8/21

    Boolean Theorems

    Boolean Rules

  • 8/11/2019 Boolean Algebra for Ladder Logic

    9/21

    Operations with 1 and 0

    A0 = 0 (A and Zero is Zero)

    any 0 input gives 0 output with AND

    A1 = A (A and One is A) A + 0 = A

    A + 1 = 1

    A 1 X

    0 1 0

    1 1 1

  • 8/11/2019 Boolean Algebra for Ladder Logic

    10/21

    Idempotent Laws

    Idem = same

    AA = A

    0 and 0 = 0

    1 and 1 = 1

    A + A = A

    0 or 0 = 0 1 or 1 = 1

  • 8/11/2019 Boolean Algebra for Ladder Logic

    11/21

    Define Compliment

    Compliment means inverse.

    Put A into a NOT logic and the result is A-

    compliment

    Sometimes written: A

    rather than A with a bar over it

    apostrophe is easier to type.

  • 8/11/2019 Boolean Algebra for Ladder Logic

    12/21

    Involution Law

    A double negative is a positive.

    Compliment the input twice and its back to

    the original.

    (A)=A

  • 8/11/2019 Boolean Algebra for Ladder Logic

    13/21

    Laws of Complimentarity

    Combine input and inputs compliment.

    AA = 0.

    Either the number or its compliment is alwayszero.

    A + A = 1.

    One term will always be zero. The other term will always be one.

  • 8/11/2019 Boolean Algebra for Ladder Logic

    14/21

    Simplification Theorems

    A + AB = A + B

    A + AB = A + B

    Cant derive from

    previous theorems, but

    can demonstrate the

    theorems validity with

    a truth table.

    Last two columns are

    the same. Thus thesolution is the same for

    all possible A, B.

    A B A A

    B

    A+

    A

    B

    A+

    B

    0 0 1 0 0 00 1 1 1 1 1

    1 0 0 0 1 1

    1 1 0 0 1 1

  • 8/11/2019 Boolean Algebra for Ladder Logic

    15/21

    More Simplification Theorems

    Can derive these from previous theorems.

    AB + AB = A

    (A + B) (A + B) = A A + AB = A

    A(A+B) = A

  • 8/11/2019 Boolean Algebra for Ladder Logic

    16/21

    Proof of A + AB = A

    A B AB A+AB

    0 0 0 0

    0 1 0 0

    1 0 0 1

    1 1 1 1

    A+AB = A(1+B)

    distributive

    A(1+B) = A(1)

    operations with 1, 0.

    A(1) = A

    operations with 1, 0.

  • 8/11/2019 Boolean Algebra for Ladder Logic

    17/21

    Example

    Convert the given ladder diagram into a

    Boolean equations which contains a control

    relay, a solenoid, two push buttons and three

    limit switches.

  • 8/11/2019 Boolean Algebra for Ladder Logic

    18/21

    Solution

    2111

    3))21(1(1

    LSLSCRSOL

    LSPBPBCRCR

  • 8/11/2019 Boolean Algebra for Ladder Logic

    19/21

    Example

    Two push buttons, PB1 and PB2 are used to

    control four lamps LAMP1, Lamp2 and LAMP

    3 using the set of equations below:

    2)14(4

    213

    212

    211

    PBPBLAMPLAMP

    LAMPLAMPLAMP

    PBPBLAMP

    PBPBLAMP

  • 8/11/2019 Boolean Algebra for Ladder Logic

    20/21

  • 8/11/2019 Boolean Algebra for Ladder Logic

    21/21

    Solution