Programmable Logic Controllers. Su Chen Jonathon Lin

Чтение книги онлайн.

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

Автор:
Жанр:
Серия:
Издательство:
Programmable Logic Controllers - Su Chen Jonathon Lin

Скачать книгу

4.18: NC switch and NC contact

image

      Figure 4.19: NO switch and NO contact

image

      Figure 4.20: Ladder diagram

image

      Figure 4.21: Ladder diagram

      The three outputs are X, Y, Z, which are in the left side of the equations. Therefore, all X, Y, and Z elements in the right hand side of the three Boolean equations must be considered as the contacts (internal inputs). The remaining four elements in the right hand side, A, B, C, and D are switching devices. We assume that A and B are push button switches, whereas C and D are limit switches. The ladder diagram of these three Boolean equations appears as Figure 4.21.

      A state table shows the output state for all possible input combinations of a circuit. It can be used to verify the control logic. The number of possible combinations is determined by the number of inputs and can be calculated as 2n, where n is the number of inputs. A state table looks like the truth table of a logic gate. The only difference is how the output state is determined. In the truth table of a logic gate, the output state of each input combination is already determined by the logic gate. The output state in a state table is determined by the Boolean equation. Figure 4.22 shows the blank state diagram for three inputs. A state table can have more than one output. Figure 4.23 shows the state table of 3-inputs and 2-outputs.

image

      Figure 4.22: Three-input state table

      4.7.1Procedure of Developing a State Table

      A circuit may be expressed in the form of a ladder logic diagram or with Boolean equations. Both the ladder logic diagram and Boolean equations can be used in constructing the state table of a logic circuit.

      The procedure steps to analyze the the ladder diagrams and develop a state table are as follows:

image

      Figure 4.23: Three-inputs and two-outputs state table

       Step 1: Convert the ladder logic diagram to Boolean equations if necessary.

       Step 2: Identify all inputs and outputs.

       Step 3: Construct a table that shows all possible combinations of inputs.

      Note that the number of possible input combinations is 2n, where n is the number of input variables. A two-input system, for example, has 22 = 4 input combinations. Likewise, a three-input system has 23 input combinations.

       Step 4: Determine the output state, 1 or 0, for each output in all input combinations.

      Two examples are presented in this section. The first example constructs a state table from a ladder diagram that consists of three rungs. The second example constructs a state table from three Boolean equations that have a total of two outputs.

      4.7.2Constructing State Table Examples

       Example 4.6: Construct a state table for the ladder logic diagram in Figure 4.24.

      Three Boolean equations can be derived from the three horizontal ladder rungs in the diagram. They are:

X = A(1)
Y = B(2)
image(3)

      Substitute (1) and (2) to (3) to yield

image

      Originally, this is a two input, three output system. Output X and Y are directly controlled by push button A and B, respectively. Therefore, we can regard this is a single output system. The controlling Boolean equation is

image image

      Figure 4.24: A ladder logic diagram

image

      Figure 4.25: State table

      The state table shown in Figure 4.25 is constructed based on this Boolean equation.

      For Row 1: Given A = 0 and B = 0, so image = 1

image

      For Row 2: Given A = 0 and B = 1, so image = 1

image

      For Row 3: Given A = 1 and B = 0, so image = 0

image

      For Row 4: Given A = 1 and B = 1, so image = 0

image

      Add the output state of the above four rows to the table to complete the state table, as shown in Figure 4.25.

       Example 4.7: Construct a state table from these two Boolean equations:

image

      This system has four inputs (A, B, C, and D) and two outputs (X and Y). The state table of the system is shown in Figure 4.26.

      For Row 1: Given A = 0, B = 0, C = 0, and D = 0, so image = 1, image = 1, image = 1, and image = 1

image

      For Row 2: Given A = 0, B = 0, C = 0, and D = 1, so image = 1,

Скачать книгу