Page 101 - Programmable Logic Controllers, Fifth Edition - Mobile version
P. 101

manufacturer. Figure 5-15c shows how the original hard-
                                                                                                       PL 1
               wired circuit could be programmed using the instruction           Sensor 1  Sensor 2   Caution
               list programming language. Note that the instructional
               list consists of a series of instructions that refer to the
               basic AND, OR, and NOT logic gate functions.                              Ladder diagram
                  Functional block diagram programming uses instructions
               that are programmed as blocks wired together on screen                      BAND_01
               to accomplish certain functions.  Typical types of func-                     BAND
               tion blocks include logic, timers, and counters. Functional                Boolean And           Caution
               block diagrams are similar in layout to electrical/electronic                         Out  0      PL 1
               block diagrams used to simplify complex systems by show-         0
               ing blocks of functionality. The primary concept behind a   Sensor 1  0  In1
               functional block diagram is data flow. Function blocks are   Sensor 2  In2
               linked together to complete a circuit that satisfies a control
               requirement. Data flow on a path from inputs, through func-            Function block diagram
               tion blocks or instructions, and then to outputs.     Figure 5-17  PLC ladder and equivalent function block
                  The use of function blocks for programming of pro-  diagram.
               grammable logic controllers (PLCs) is gaining wider
               acceptance. Rather than the classic contact and coil repre-  The function block solution consists of a logic  Boolean
               sentation of ladder diagram or relay ladder logic program-  And function block with two input references tags for the
               ming, function blocks present a graphical image to the   sensors and a single output reference tag for the pilot light.
               programmer with underlying algorithms already defined.   Note there are no power rails in the function block diagram.
               The programmer simply completes needed information       Sequential function chart programming language is
               within the block to complete that phase of the program.   similar to a flowchart of your process. SFC programming
               Figure 5-16 shows function block diagram equivalents to   is designed to accommodate the programming of more
               ladder logic contacts.                                advanced processes. This type of program can be split
                  Figure  5-17 illustrates how ladder diagram and func-  into steps with multiple operations happening in paral-
               tional block diagram programming could be used to pro-  lel branches. The basic elements of a sequential function
               duce the same logical output. For this application, the   chart program are shown in Figure 5-18.
               objective is to turn on caution pilot light PL 1 whenever
               both sensor switch 1 and sensor switch 2 are closed. The
               ladder logic consists of a single rung across the power rails.
               This rung contains the two input sensor instructions pro-
               grammed in series with the pilot light output instruction.                        Initial         Action
                                                                                                 Step 1
                                                                      Wire
                                               Functional block       loop                             Transition
                       Ladder logic           diagram equivalent
                                                                                            Wire
                                                 AND_BOOL
                      A       B                                                                  Step 2          Action
                                           A
                                           B
                        A                                                              Transition
                                                  OR_BOOL
                                           A
                        B
                                           B                                                     Step 3          Action


                                                 AND_BOOL
                      A       B                                                                        Transition
                                           A
                                           B                                                            Stop

               Figure 5-16  Function block diagram equivalents to ladder   Figure 5-18  Major elements of a sequential function chart
               logic contacts.                                       program.



               82         Chapter 5  Basics of PLC Programming







          pet73842_ch05_074-097.indd   82                                                                               05/11/15   4:17 PM
   96   97   98   99   100   101   102   103   104   105   106