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

•  When the weight reaches a preset value, the flow is
                    cut off.
                 •  While the vessel fills, the PLC performs a compari-
                    son between the vessel’s current weight and a pre-
                    determined constant programmed in the processor.
                 •  If the programmer uses only the equal instruction,
                                                                                                           BCD
                    problems may result.                                              Thumbwheel        input module
                                                                                         switch
                 •  As the vessel fills, the comparison for equality will                (TWS)             Bit
                    be false. At the instant the vessel weight reaches the     Decimal            BCD    address
                    desired preset value of the equal instruction, the in-                         1        0
                    struction becomes true and the flow is stopped.                                0        1
                                                                                1s units   5       1        2
                 •  However, should the supply system leak additional                              0        3
                    material into the vessel, the total weight of the ma-
                    terial could rise above the preset value, causing the                          0
                    instruction to go false and the vessel to overfill.                            1        4
                                                                                                            5
                                                                               10s units   6       1
                 •  The simplest solution to this problem is to program                            0        6
                                                                                                            7
                    the comparison instruction as a greater than or equal
                    to instruction. This way, any excess material enter-                           1
                    ing the vessel will not affect the filling operation.                          1        8
                                                                              100s units   7       1        9
                 •  It may be necessary, however, to include addi-                                 0        10
                    tional programming to indicate a serious overfill                                       11
                    condition.
                                                                                                   0
                                                                                                   0        12
                                                                             1000s units   0       0        13
               10.5  Numerical Data I/O Interfaces                                                 0        14
                                                                                                            15
               The expanding data manipulation processing capabilities
               of PLCs led to the development of I/O interfaces known          L1
               as numerical data I/O interfaces. In general, numerical         L2
               data I/O interfaces can be divided into two groups: those
               that provide interface to multibit digital devices and those   Figure 10-38  BCD input interface module connected to a
               that provide interface to analog devices.             thumbwheel switch.
                  The multibit digital devices are like the discrete I/O   Source: Photo courtesy Omron Industrial Automation, www.ia.omron.com.
               because processed signals are discrete (on/off). The dif-  The  seven-segment LED display board, shown in Fig-
               ference is that, with the discrete I/O, only a single bit is   ure 10-39, is a typical Binary Coded Decimal (BCD) output
               required to read an input or control an output. Multibit   device. It displays a decimal number that corresponds to the
               interfaces allow a group of bits to be input or output as a   BCD value it receives at its input. Conversion of the four bi-
               unit. They can be used to accommodate devices that re-  nary bits to a single decimal digit on the display is performed
               quire BCD inputs or outputs.                          by the LED display device. The BCD output module is used
                  The  thumbwheel switches (TWS), shown in Fig-      to output data from a specific register or word location in
               ure 10-38, are typical BCD input devices. Each one of the   memory. This type of output module enables a PLC to oper-
               four switches provides four binary digits at its output that   ate devices that require BCD coded signals.
               correspond to the decimal number selected on the switch.   Figure 10-40 shows a PLC program that uses a BCD
               The conversion from a single decimal digit to four binary   input interface module connected to a thumbwheel switch
               digits is performed by the TWS device. The BCD input   and a BCD output interface module connected to an LED
               module allows the processor to accept the 4-bit digital   display board. The program is designed so that the LEDs
               codes and input their data into specific register or word   display the setting of the thumbwheel switch. Both the
               locations in memory to be used by the control program.   MOV and EQU instructions form part of the program. The
               Data manipulation instructions can be used to access the   operation of the program can be summarized as follows:
               data from the input module allowing a person to change
               set points, timer, or counter presets  externally without   •  The LED display board monitors the decimal set-
               modifying the control program.                             ting of the thumbwheel switch.



               224        Chapter 10  Data Manipulation Instructions







          pet73842_ch10_207-233.indd   224                                                                              03/11/15   4:03 PM
   238   239   240   241   242   243   244   245   246   247   248