Page 36

Petruzella_ProgrammableLogicControllers__5e

Discrete inputs 1 2 3 4 5 6 7 Discrete inputs 8 9 10 11 12 B3:1/3 Figure 5-42  Programmed internal relay control. Hardwired circuit B3:1/3 Internal relay coil Discrete output User program providing the same results PB2 PB_1 PB_2 PL PL PB1 If the data table bit is XIC EXAMINE IF CLOSED XIO EXAMINE IF OPEN Logic 0 False True True False Input instructions Output instruction XIC XIO OTE Instruction outcome XIC XIO OTE XIC XIO OTE False False True True False True True Goes true False False Logic 1 Time t1 (initial) t2 t3 t4 90 Chapter 5  Basics of PLC Programming same results. You will note that both the NO and the NC pushbuttons are represented by the Examine If Closed symbol. This is because the normal state of an input (NO or NC) does not matter to the controller. What does matter is that if contacts need to close to energize the output, then the Examine If Closed instruction is used. Since both PB1 and PB2 must be closed to energize the pilot light, the Examine If Closed instruction is used for both. A simple program using the Examine If Open (XIO) instruction is shown in Figure 5-44. Both the hardwired circuit and user program are shown. In the hardwired circuit, when the pushbutton is open relay coil CR is de-energized and its NO contact closes to switch the pilot light on. When the pushbutton is closed, relay coil CR is energized and its NC contact opens to switch the pilot light off. The pushbutton is represented in the user program by an Examine If Open instruction. This is because 5.8  Programming Examine If Closed and Examine If Open Instructions A simple program using the Examine If Closed (XIC) instruction is shown in Figure 5-43. This figure shows a hardwired circuit and a user program that provides the Figure 5-43  Simple program that uses the Examine If Closed (XIC) instruction. Hardwired circuit CR PB1 CR PL User program providing the same results PB_1 PL Figure 5-44  Simple program that uses the Examine If Open (XIO) instruction. The status of the instruction is OTE OUTPUT ENERGIZE False False Input bit status 0 0 0 1 0 1 1 1 0 0 1 0 Goes false Remains false Figure 5-45  Simple program using both the XIC and XIO instructions. Rung 1 Rung 2 Internal relay contact


Petruzella_ProgrammableLogicControllers__5e
To see the actual publication please follow the link above