Optimization Design of PLC-based Automatic Control System
2026-04-06 07:38:34··#1
1. Introduction In modern industrial production equipment, there are numerous digital and analog control devices, such as motor start/stop, solenoid valve opening/closing, product counting, and temperature, pressure, and flow setting and control. PLC technology is the most effective and convenient tool for solving these problems, hence its widespread application in industrial control. The following discusses issues in the design of PLC industrial control systems. 2. PLC System Equipment Selection The primary purpose of a PLC is to control an external system. This system could be a single machine, a group of machines, or a production process. Different PLC models have different applicable ranges. Based on production process requirements, analyze the complexity of the controlled object, conduct statistics on the number and types of I/O points (digital, analog, etc.), and compile a list. Appropriately estimate memory capacity and determine a suitable model (small, medium, or large machines) with sufficient margin to avoid resource waste. Furthermore, consider market conditions, examine the PLC manufacturer's products, after-sales service, technical support, network communication, and other comprehensive aspects to select a PLC model with a good price-performance ratio. Currently, there are numerous PLC products on the market. Well-known international brands include SIEMENS from Germany; OMRON, MITSUBISHI, FUJI, and Panasonic from Japan; GE from the United States; and LG from South Korea. Domestic brands include Advantech, Acer, and Helix. In recent years, the price of PLC products has decreased significantly, making them increasingly cost-effective. PLC selection should be approached from the following aspects: 2.1 Determining the Scale of the PLC Control System The system size is determined based on the factory's production process and complexity. It can be divided into three scales: large, medium, and small. Small-scale PLC control system: For single-machine or small-scale production processes, the control process mainly involves conditional and sequential control, primarily using switching quantities, and the number of I/O points is less than 128. Generally, micro PLCs, such as the SIEMENS S7-200, are selected. Medium-scale PLC control system: The production process involves complex logic control and closed-loop control, with the number of I/O points between 128 and 512. PLCs with analog control and PID control functions, such as the SIEMENS S7-300, should be selected. Large-scale PLC control systems: For production processes involving large-scale process control, DCS systems, and factory automation network control, with more than 512 I/O points, high-end PLCs with communication networking, intelligent control, database, interrupt control, and function operations, such as the SIEMENS S7-400, should be selected. These should be combined with an industrial fieldbus to achieve communication and control within the factory's industrial network. 2.2 Determining the Type of PLC I/O Points: Based on production process requirements, analyze the complexity of the controlled object, and compile a list of I/O points and their types (digital, analog, etc.). Estimate the appropriate memory capacity and determine suitable models (small, medium, and large machines) that allow for sufficient hardware and software resource margins without wasting resources. Based on whether the load connected to the PLC output is DC or AC, whether it's high or low current, and the frequency of the PLC output operation, determine whether to use relay outputs, transistor outputs, or thyristor outputs. Different output methods are selected for different loads, which is very important for the stable operation of the system. For the opening and closing of solenoid valves, large inductive loads, and equipment with low operating frequency, the PLC output terminal uses relay output or solid-state relay output; for various indicator lights, the start/stop of frequency converters/digital DC speed controllers, transistor output should be used. 2.3 Determine the PLC programming tool (1) General handheld programmer programming. Handheld programmers can only use the statement list (STL) in the statement list specified by the vendor. This method is inefficient, but it is more suitable for products with small system capacity and small usage. It has the advantages of small size, low price and easy on-site debugging. This is mainly used for micro PLC programming. (2) Graphical programmer programming. Graphical programmers use ladder diagram (LAD) programming, which is convenient and intuitive. General electrical personnel can use it freely in a short period of time, but the price of this programmer is relatively high. It is mainly used for micro PLCs and mid-range PLCs. (3) Computer plus PLC software package programming. This method is the most efficient, but most companies' PLC development software packages are expensive, and this method is not easy to debug on site. It is mainly used for hardware configuration and software programming of mid-to-high-end PLC systems. 3 Design of PLC Control System The design of PLC control system includes hardware design and software design. 3.1 Hardware Design of PLC Control System Hardware design is a crucial part of PLC control system, which is related to the reliability, safety and stability of PLC control system operation. It mainly includes two parts: input and output circuits. (1) Input circuit design of PLC control system. PLC power supply is generally AC85-240V, which is suitable for a wide range of power supplies. However, in order to resist interference, power purification components (such as power filters, 1:1 isolation transformers, etc.) should be added; the isolation transformer can also adopt double isolation technology, that is, the shielding layer of the primary and secondary coils of the transformer is connected to the ground with the primary electrical neutral point, and the shielding layer of the secondary coil is connected to the ground of the PLC input circuit to reduce high and low frequency pulse interference. The power supply for the PLC input circuit should generally be DC 24V. At the same time, when it is under load, attention should be paid to the capacity and short-circuit protection measures should be taken. This is crucial for the safety of the system power supply and the PLC, because the overload or short circuit of the power supply will affect the operation of the PLC. Generally, the capacity of the power supply should be twice the power of the input circuit. Appropriate fuses should be installed in the power supply branch of the PLC input circuit to prevent short circuits. (2) Output circuit design of PLC control system. According to the production process requirements, the start and stop of various indicator lights, frequency converters/digital DC speed controllers should use transistor outputs, which are suitable for high-frequency operation and have a short response time. If the output frequency of the PLC system is less than 6 times per minute, relay output should be preferred. Using this method, the output circuit design is simple, and the anti-interference and load-carrying capacity are strong. If the PLC output is equipped with inductive loads such as electromagnetic coils, the output of the PLC will be impacted by surge current when the load is de-energized. Therefore, a freewheeling diode should be connected next to the DC inductive load, and a surge absorption circuit should be connected in parallel for the AC inductive load, which can effectively protect the PLC. When the PLC scanning frequency is less than 10 times/min, either relay output mode or PLC output can be used to drive intermediate relays or solid-state relays (SSRs) to drive the load. For the two important output quantities, it is recommended to not only interlock inside the PLC, but also to perform hardware interlocking outside the PLC to enhance the safety and reliability of the PLC system operation. For common AC220V AC switch loads, such as AC contactors and solenoid valves, they should be driven by DC24V miniature intermediate relays to avoid direct drive by the PLC's DO contacts, even though the PLC manual states that it has the capability to drive AC220V AC switch loads. (3) Anti-interference design of PLC control system. With the rapid development of industrial automation technology, thyristor-controlled rectifiers and variable frequency speed control devices are increasingly widely used, which brings pollution to the AC power grid and many interference problems to the control system. Anti-interference is a problem that must be considered when designing a PLC control system. The following methods are generally adopted: Isolation: Since the high-frequency interference in the power grid is mainly caused by the distributed capacitance coupling between the primary and secondary windings, it is recommended to use a 1:1 super isolation transformer and ground the neutral point through a capacitor. Shielding: Generally, a metal shell is used for shielding, and the PLC system is built into the metal cabinet. The metal cabinet shell is reliably grounded, which can play a good role in electrostatic and magnetic field shielding and prevent spatial radiation interference. Wiring: Strong power lines and weak signal lines are run separately and there should be a certain interval; the analog signal transmission line uses twisted pair shielded cable. 3.2 Software design of PLC control system While carrying out hardware design, software design work can be started. The main task of software design is to convert the process flow diagram into a ladder diagram according to the control requirements. This is the most critical issue in PLC application. The writing of the program is the specific manifestation of software design. In the application of control engineering, good software design ideas are key. Excellent software design makes it easier for engineering technicians to understand, master, debug the system and maintain the system daily. (1) Program design ideas of PLC control system. Due to the different complexity of the production process control requirements, the program can be divided into basic program and modular program according to the structural form. Basic program: It can be used as an independent program to control a simple production process, or as a unit program in a modular structure; according to the design ideas of computer programs, there are only three structural ways of basic programs: sequential structure, conditional branch structure and loop structure. Modular program: Divide a total control target program into multiple program modules with clear sub-tasks, write and debug them separately, and finally combine them into a complete program to complete the total task. This method is called modular programming. We recommend that this programming idea be used frequently because each module has relative independence, simple inter-connection relationship, and the program is easy to debug and modify. Especially for production processes with complex control requirements. (2) Key points of PLC control system program design. PLC control system I/O allocation should be based on the production line from front to back, with the number of I/O points increasing from small to large; I/O signals of a system, equipment or component should be centrally addressed as much as possible to facilitate maintenance. Timers and counters should be uniformly numbered and the same number should not be reused to ensure the reliability of PLC operation. Internal relays or intermediate flag bits (not I/O bits) used extensively in the program should also be uniformly numbered and allocated. After address allocation is completed, I/O allocation table and internal relay or intermediate flag bit allocation table should be listed. The output addresses of related output devices, such as the forward/reverse of motors, should be arranged consecutively, such as Q2.0/Q2.1, etc. (3) PLC control system programming skills. The principle of PLC program design is that the logical relationship is simple and clear, easy to program and input, less memory occupation, and reduced scanning time. This is a principle that must be followed in PLC programming. Here are some tips. Various contacts of PLC can be reused multiple times without the need for complicated programs to reduce the number of times contacts are used. Using the same relay coil twice in the same program is called double coil output. Double coil output is prone to malfunction. Try to avoid reusing coils in the program. If double coil output is necessary, set and reset operations can be used (e.g., SQ4.0 or RQ4.0 for S7-300). To make multiple PLC outputs a fixed value of 1 (normally closed), a word transfer instruction can be used. For example, if Q2.0, Q2.3, Q2.5, and Q2.7 are all 1 simultaneously, a single instruction can be used to directly transfer the hexadecimal data 0A9H to QW2. For non-critical equipment, multiple contacts can be connected in series in hardware before being connected to the PLC input, or the number of I/O points can be reduced through PLC programming to save resources. For example, if we use a button to control the start/stop of the equipment, we can use a frequency divider. Application of modular programming: We can encapsulate the forward and reverse self-locking interlocking program into one module, and the forward and reverse jogging program into another module. In the PLC program, we can repeatedly call this module, which not only reduces the amount of programming but also reduces memory usage, which is beneficial for the development of large PLC programs. 4. Debugging of PLC Control System Programs Debugging of PLC control system programs generally includes two parts: I/O terminal testing and system debugging. Good debugging procedures help accelerate the final assembly and debugging process. 4.1 I/O Terminal Testing: Temporarily replace field input signals with manual switches. Manually check and verify each PLC input terminal one by one. If the indicator light on the PLC input terminal is lit, it indicates normal operation; otherwise, check the wiring or a faulty I/O point. We can write a small program to check if all PLC output terminal indicator lights are lit when the output power is good. If the indicator light on the PLC input terminal is lit, it indicates normal operation; otherwise, check the wiring or a faulty I/O point. 4.2 System Debugging: System debugging should begin by connecting the power supply, external circuits, and input/output terminals according to the control requirements. Then, load the program into the PLC and run the PLC for debugging. Connect the PLC to the field equipment. Before formal debugging, thoroughly check the entire PLC control system, including the power supply, grounding wire, equipment connection wires, and I/O connections. Power on the PLC once all hardware connections are correct. Set the PLC control unit to "RUN" mode and start running. Repeatedly debug to eliminate any potential problems. During debugging, the hardware can be modified appropriately according to actual needs to coordinate with software debugging. Sufficient running time should be maintained to allow problems to be fully exposed and corrected. Most problems during debugging are related to the control program. Generally, the following steps are taken: (1) Test each field signal and control quantity individually; (2) Check the hardware/modify the program; (3) Perform comprehensive testing on the field signals and control quantities; (4) Debug with the equipment; (5) Debugging is completed. 5 Conclusion The design of a PLC control system is a systematic engineering project with orderly steps. To achieve proficiency, repeated design and practice are required. This article is a summary of the design and practical experience of PLC control systems, which has good results in practical applications.