Using PLC to achieve automatic control of the production process
2026-04-06 06:58:53··#1
**1 Design Requirements** A certain production process previously used traditional relay control, which resulted in complex wiring, large size, heavy weight, low automation, incomplete functionality, and low reliability. Therefore, it was required to replace it with a programmable logic controller (PLC). The improved production process control flow diagram is shown in Figure 1. In the figure, tanks A and B have equal capacities and are half the capacity of tanks C and D. The requirements are: solutions A and B are added to tanks A and B respectively by pumps 1 and 2. After tank B is full, solution B is heated to 60°C. Then, pumps 3 and 4 add all the solutions from tanks A and B to tank C in a 1:1 ratio. After tank C is full, stirring continues for 60 seconds to allow for a complete chemical reaction. Then, pump 5 transfers all the finished product from tank C through a filter to finished product tank D. After tank D is full, pump 6 is activated to remove the entire finished product from the tank. Then, a new cycle begins. [b]2 Analysis of the Design Task[/b] 2.1 First, determine the number of I/O pins required by the PLC. Based on the aforementioned requirements, the PLC needs the following output terminals: 6 output terminals to control 6 pumps, 1 output terminal to control the heater, and 1 output terminal to control the stirrer, totaling 8 output terminals. The PLC requires the following input signal terminals: 1 temperature sensor to detect whether the temperature has reached 60℃ (TE in Figure 4 represents the temperature sensor); sensors are also needed to determine whether each tank is full or empty (AF, BF, CF, DF in Figure 4 are the full sensors for four tanks, and AE, BE, CE, DE are the empty sensors for four tanks, totaling 9 input terminals). Analysis shows that during the control process, the full sensor DF for tank D can be replaced by the empty sensor CE for tank C, thus eliminating the need for sensor DF and requiring only 8 input terminals. Therefore, a PLC with ≥8 input points and ≥8 output points should be selected. 2.2 Selection of User Program Memory Capacity As analyzed above, this system does not require analog signal conversion and storage, only 16 digital inputs and outputs. Therefore, the memory capacity can be estimated using the following formula: Memory word count ≥ Total number of digital I/Os * 8 = 16 * 8 = 148 [b]3 Selection of PLC Model[/b] Based on the above analysis, a PLC with ≥ 8 input points, ≥ 8 output points, and ≥ 148 memory words should be selected. There are no special requirements for the PLC's scanning speed or other aspects. We selected the OMRON C20P model. The C20P programmable controller's main unit (basic unit) has 12 input points (0000~0011), 8 output points (0500~0507), a programming capacity of 1194 addresses, 48 timers/counters (TIM00~TIM47), and auxiliary relays, etc. It can directly drive motors or control high-power loads through relays or contactors. 4. I/O contact allocation and PLC wiring diagram 5. Ladder diagram program design Table 2 shows the actual state and the correspondence between the sensor and the programming element, which can be used for comparison when analyzing the ladder diagram. Figure 3 is the flowchart of the control of each component, and Figure 4 is the ladder diagram program. [b]References[/b] [1] Lu Linji, Wang Jian, Jiang Longkang. Programmable Controller Principles and Applications [M], Beijing: Tsinghua University Press, 2002 [2] Wang Weixing, ed. Programmable Controller Principles and Applications [M], Beijing: China Water Resources and Hydropower Press, 2002 [3] OMRON C20 Programmable Controller USER'S MANUAL Editor: He Shiping