Programmable Logic Controllers. Su Chen Jonathon Lin
Чтение книги онлайн.

Читать онлайн книгу Programmable Logic Controllers - Su Chen Jonathon Lin страница 22

Название: Programmable Logic Controllers

Автор: Su Chen Jonathon Lin

Издательство: Ingram

Жанр: Физика

Серия:

isbn: 9780831193690

isbn:

СКАЧАТЬ alt="image"/>

      Figure 4.9: True table to 2-input car horn circuit

image

      Figure 4.10a: NOT gate

image

      Figure 4.10b: NOT gate

image

      Figure 4.11: A normally closed relay contact as an inverter

image

      Figure 4.12: NOT function with AND and OR functions

      4.2.3The Not Function

      Logically, the NOT function causes the output state to be the opposite state of the input. Because of this, it is often called the inverter. The NOT output is False (“0”) if the input is True (“1”) and, inversely, the output becomes True (“1”) if the input is False (“0”). The NOT function has only one input. It is graphically shown in Figure 4.10a and it has two states in its true table, as in Figure 4.10b.

      In relay logic applications, a normally closed switch or a normally closed contact has the function of NOT gate (Figure 4.11). The normally closed push button in the first rung serves as an inverter function, image, to control the output of the relay coil CR. The second rung of this relay diagram uses a normally closed relay contact, image, as an inverter to control the output.

      The NOT function of A is called “NOT A” and is represented as an A with a bar on top, image. Often a NOT function is used in conjunction with the AND and OR functions, as in Figure 4.12.

      4.3.1Three Logic Functions

      Boolean algebra is the fundamental mathematical expression of logic circuits. The algebraic symbols indicate the logical relationships between groups of inputs and outputs. Often they are called Boolean expressions. Series and parallel combinations are built with AND, OR, and NOT logical operators. Use a dot (•) between inputs to represent the AND operator, a (+) between inputs to represent the OR operator, and a bar over the letter (image) to represent the NOT operator (inverse or negation function). The dots between two inputs connected by AND are often omitted in writing the AND expressions. For example, Y = AB is used to represent Y = A∙B. Table 4.4 shows the logic, ladder logic expression, and Boolean equation of the three basic logic functions.

      Table 4.4: Logic operations using Boolean algebra

image

      Boolean algebra can be used to express any complex logic relations by using a combination of the three basic logic functions. Two examples follow:

image

      4.3.2Order of Boolean Algebra Operations

      The order of Boolean algebra operations follows two rules:

      1.Grouping signs have the highest precedence. When grouping items, the order is parentheses ( ) first, brackets [ ] second, and braces { } third.

      2.Besides grouping signs, the order of priority is the NOT function first, the AND function second, and the OR function last.

       Example 4.1: Priority of operations

      The priority of operations in this Boolean equation

      Y = (A + B)C + (B + C)D

      means that equations are to be done in the demonstrated order.

1st precedence (parentheses):(A + B) and (B + C)
2nd precedence (AND function):(A + B)C and (B + C)D
3rd precedence (OR function):(A + B)C + (B + C)D

      Many logic control circuits are given in the logic gate form. It is often desirable to convert logic gate circuits to their corresponding Boolean equations. The converting procedure follows the associated level from left to right. The output of the logic gate in the lower (left) level becomes one of input of the next (right) level. Two examples are given in this section to convert the logic circuits to their Boolean equations.

       Example 4.2: Using Boolean equation to express a circuit

      The logic circuit shown in Figure 4.13 consists of one OR and one AND function.

      The Boolean equation can be derived as follows. From the OR function we can find,

X = A + B(1)

      From the AND function we have,

Y = XC(2)

      Substitute (1) into (2) to obtain,

      Y = (A + B)C

       Example 4.3: Convert a gate circuit to its Boolean equation

      The gate logic circuit in Figure 4.14 has two AND functions, one NOT function, and one OR function.

      The Boolean equations for the three basic logic functions can be derived as below:

image(1)
image(2)
image(3)

      Combine (1), (2), and (3) to yield the Boolean equation as:

image image

      Figure 4.13: Sample logic circuit

image

      Figure 4.14: Gate logic circuit

      Boolean equations are often converted to ladder diagrams in PLC applications. Understanding the connecting relationship between input elements for the three basic logic functions (AND, OR, and NOT) in the ladder diagrams is the key to constructing ladder diagrams from Boolean equations.

      4.5.1The NOT Function

      The NOT function of an element is translated into either a normally closed (NC) contact or switch. Inversely, СКАЧАТЬ