Page 727 - Mechatronics with Experiments
P. 727

PROGRAMMABLE LOGIC CONTROLLERS  713
                                                  Controller : PLC







                                                                                   Relay: Door
                            START
                                                                                   close/open
                             STOP             Presence
                                               sensor             Heater           LS1
                                            Product  Door  Temp sensor    Door
                                                       1                    2
                                                                                   LS2


                                              Conveyor



                               Motor
                                &              Drive
                              encoder

                             FIGURE 9.13: PLC control (logic and closed loop control) of a heater and a conveyor motor.


                             The desired control logic is expressed in pseudo-code as follows:
                                1. The operation is started when the START button is pressed. When the STOP button
                                  is pressed the cycle is stopped.
                                2. PLC opens the doors of the furnace and waits until the doors open switch is ON.
                                3. Then the motor is started. The motor is stopped when the part presence sensor is ON.
                                4. The furnace doors are closed.
                                5. The PID loop which controls the furnace temperature is enabled. The PID controls the
                                  heater output based on the preprogrammed desired temperature range and temperature
                                  sensor feedback. The PID control output has a deadband. In other words, when
                                  the temperature is within a desired range, the heater is turned OFF. These aspects of
                                  the PID control loop are specified as part of the PID block setup.
                                6. After the furnace temperature is within the desired range, a timer is started and the
                                  temperature control continues for a specified amount of time (i.e., 2 minutes).
                                7. When the heating time expires, the heater is turned OFF (PID loop is disabled).
                                8. Repeat starting with Step 2.

                                  Figure 9.14 shows the ladder logic diagram program that implements the above
                             described control logic. Notice that for each I/O, there is a memory location assigned (see
                             the numbers under the input and output devices as illustration on left and right side of the
                             diagram). Then the basic cycle logic is implemented in the ladder diagram using the input–
                             output memory references, timer, and PID functions. Notice that in order to implement the
                             desired logic, internal memory (local data) is used in addition to the memory mapped to the
                             I/O channels. The desired temperature range and heating time data should be adjustable by
                             an appropriate operator interface device, such as a PC communicating with the PLC over a
                             serial communication bus.
   722   723   724   725   726   727   728   729   730   731   732