When designing a PLC system, the first step is to determine the control scheme, followed by PLC engineering design and selection. The characteristics of the process flow and application requirements are the main basis for design selection. The PLC and related equipment should be integrated and standardized, selected according to the principles of easy integration with the industrial control system and easy expansion of its functions. The selected PLC should be a mature and reliable system with operational experience in the relevant industrial field. The PLC's system hardware, software configuration, and functions should be compatible with the scale of the device and control requirements. Familiarity with programmable controllers, function tables, and relevant programming languages can help shorten programming time. Therefore, during engineering design, selection, and estimation, the characteristics of the process and control requirements should be analyzed in detail, the control tasks and scope should be clarified, and the required operations and actions should be determined. Then, based on the control requirements, the number of input/output points, the required memory capacity, the functions of the PLC, and the characteristics of external equipment should be estimated. Finally, a PLC with a high performance-price ratio should be selected, and a corresponding control system should be designed. I. Estimation of Input/Output (I/O) Points The estimation of I/O points should include an appropriate margin. Typically, based on the statistically calculated number of I/O points, an additional 10% to 20% expansion margin is added to obtain the estimated I/O point count. When actually ordering, the I/O point count needs to be rounded up according to the product characteristics of the PLC from the manufacturer. II. Estimation of Memory Capacity Memory capacity refers to the size of the hardware storage units that the programmable controller itself can provide. Program capacity refers to the size of the storage units used by the user application in the memory; therefore, program capacity is smaller than memory capacity. During the design phase, since the user application program has not yet been written, the program capacity is unknown and only becomes known after program debugging. To allow for a certain estimation of program capacity during design and selection, memory capacity estimation is usually used as a substitute. There is no fixed formula for estimating memory capacity. Many documents provide different formulas, but generally, it's based on 10-15 times the number of digital I/O points plus 100 times the number of analog I/O points. This number represents the total number of words in memory (16 bits per word), with an additional 25% margin. III. Selection of Control Functions This selection includes choosing the characteristics of the PLC, such as arithmetic functions, control functions, communication functions, programming functions, diagnostic functions, and processing speed. (I) Arithmetic Functions: Simple PLCs include logic operations, timing, and counting functions; ordinary PLCs also include data shifting and comparison functions; more complex arithmetic functions include algebraic operations and data transmission; large PLCs also have analog PID calculations and other advanced arithmetic functions. With the emergence of open systems, most PLCs now have communication functions. Some products can communicate with lower-level machines, some with peer or upper-level machines, and some can even communicate with factory or enterprise networks. When designing and selecting a PLC, the requirements of the actual application should be taken into account, and the necessary calculation functions should be selected reasonably. In most applications, only logic operations and timing and counting functions are needed. Some applications require data transmission and comparison. Algebraic operations, numerical conversion, and PID operations are used when used for analog quantity detection and control. Decoding and encoding operations are required when displaying data. (II) Control Functions Control functions include PID control operations, feedforward compensation control operations, ratio control operations, etc., which should be determined according to the control requirements. PLCs are mainly used for sequential logic control. Therefore, in most cases, single-loop or multi-loop controllers are often used to solve analog quantity control. Sometimes, dedicated intelligent input/output units are used to complete the required control functions, improve the PLC's processing speed, and save memory capacity. For example, PID control units, high-speed counters, analog units with speed compensation, and ASCII code conversion units are used. (III) Communication Functions Large and medium-sized PLC systems should support multiple fieldbuses and standard communication protocols (such as TCP/IP). When necessary, they should be able to connect to the factory management network (TCP/IP). The communication protocol should conform to the ISO/IEEE communication standard and should be an open communication network. The communication interfaces of a PLC system should include serial and parallel communication interfaces (RS2232C/422A/423/485), RIO communication ports, industrial Ethernet, and common DCS interfaces. Large and medium-sized PLC communication buses (including interface devices and cables) should be configured with 1:1 redundancy. The communication bus should conform to international standards, and the communication distance should meet the actual requirements of the device. In the PLC system's communication network, the upstream network communication rate should be greater than 1Mbps, and the communication load should not exceed 60%. The main forms of PLC system communication networks are as follows: 1) A PC as the master station and multiple PLCs of the same model as slave stations, forming a simple PLC network; 2) One PLC as the master station and other PLCs of the same model as slave stations, forming a master-slave PLC network; 3) A PLC network connected to a large DCS through a specific network interface as a subnet of the DCS; 4) Dedicated PLC networks (dedicated PLC communication networks from various manufacturers). To reduce the CPU's communication workload, communication processors with different communication functions (such as point-to-point, fieldbus, and industrial Ethernet) should be selected according to the actual needs of the network configuration. (iv) Programming Functions: Offline Programming: The PLC and programmer share a single CPU. When the programmer is in programming mode, the CPU only provides services to the programmer and does not control the field devices. After programming is complete, the programmer switches to running mode, and the CPU controls the field devices but cannot program. Offline programming reduces system costs, but it is inconvenient to use and debug. Online Programming: The CPU and programmer have their own CPUs. The host CPU is responsible for field control and exchanges data with the programmer within a scan cycle. The programmer sends the online-compiled program or data to the host. In the next scan cycle, the host runs according to the newly received program. This method is more expensive, but system debugging and operation are convenient, and it is commonly used in medium and large-sized PLCs. Five Standardized Programming Languages: Sequential Function Chart (SFC), Ladder Diagram (LD), Function Block Diagram (FBD) – three graphical languages – and Statement List (IL) and Structured Text (ST) – two textual languages. The selected programming language should comply with its standard (IEC 6113123) and should also support multiple programming language forms, such as C and Basic, to meet the control requirements of special control applications. (V) Diagnostic Functions PLC diagnostic functions include hardware and software diagnostics. Hardware diagnostics determine the location of hardware faults through logical judgments. Software diagnostics are divided into internal and external diagnostics. Internal diagnostics diagnose the PLC's internal performance and functions through software, while external diagnostics diagnose the PLC's CPU and external input/output components' information exchange functions through software. The strength of the PLC's diagnostic functions directly affects the technical skills required of operators and maintenance personnel, and also affects the mean time to repair (MTBL). (VI) Processing Speed PLCs operate using a scanning method. From a real-time perspective, the faster the processing speed, the better. If the signal duration is less than the scanning time, the PLC will not be able to scan the signal, resulting in data loss. Processing speed is related to the length of the user program, CPU processing speed, and software quality. Currently, PLC contacts have fast response and high speed, with each binary instruction execution time being approximately 0.2–0.4 ms, thus meeting the needs of applications with high control requirements and fast response. The scan cycle (processor scan cycle) should meet the following requirements: the scan time for small PLCs should not exceed 0.5ms/K; the scan time for medium and large PLCs should not exceed 0.2ms/K. IV. Model Selection (I) PLC Types PLCs are classified into two types according to their structure: integrated and modular. They are also classified into two types according to their application environment: field installation and control room installation. According to CPU word length, they are classified into 1-bit, 4-bit, 8-bit, 16-bit, 32-bit, and 64-bit, etc. From an application perspective, selection is usually based on control functions or the number of input/output points. Integrated PLCs have a fixed number of I/O points, thus limiting user choice and are used in small control systems. Modular PLCs provide various I/O cards or plug-ins, allowing users to more reasonably select and configure the number of I/O points in the control system. Functional expansion is convenient and flexible, and they are generally used in medium and large control systems. (II) Input/Output Module Selection The selection of input/output modules should consider consistency with application requirements. For example, for input modules, application requirements such as signal level, signal transmission distance, signal isolation, and signal power supply method should be considered. For output modules, the type of output module to be selected should be considered. Relay output modules are generally characterized by low price, wide operating voltage range, short lifespan, and long response time. Thyristor output modules are suitable for frequent switching and low inductive power factor loads, but they are more expensive and have poor overload capacity. Output modules also include DC output, AC output, and analog output, which should be consistent with the application requirements. Intelligent input/output modules can be reasonably selected according to application requirements to improve control level and reduce application costs. Consider whether an expansion rack or remote I/O rack is needed. (III) Power Supply Selection The power supply for PLC should be designed and selected according to the product manual when the PLC is introduced. Generally, the power supply for PLC should be designed and selected to be 220VAC, consistent with the domestic power grid voltage. For important applications, uninterruptible power supplies or regulated power supplies should be used. If the PLC itself has a usable power supply, it should be checked whether the provided current meets the application requirements; otherwise, an external power supply should be designed. To prevent external high-voltage power from being introduced into the PLC due to misoperation, isolation of input and output signals is necessary. Sometimes, simple diodes or fuses can be used for isolation. (IV) Selection of memory Due to the development of computer integrated chip technology, the price of memory has decreased. Therefore, to ensure the normal operation of the application project, the memory capacity of the PLC is generally required to be at least 8K based on 256 I/O points. When complex control functions are required, a larger capacity and higher grade memory should be selected. (V) Selection of redundancy function 1. Redundancy of control unit (1) Important process units: CPU (including memory) and power supply should be 1B1 redundant. (2) When necessary, a hot standby redundant system composed of PLC hardware and hot standby software, a dual or triple redundant fault-tolerant system, etc. can also be selected. 2. Redundancy of I/O interface unit (1) Multi-point I/O cards of control loops should be redundantly configured. (2) Multi-point I/O cards of important detection points can be redundantly configured. (3) For important I/O signals, dual or triple I/O interface units can be selected as needed. (vi) Economic Considerations When selecting a PLC, the performance-price ratio should be considered. When considering economic factors, factors such as application scalability, operability, and return on investment should be considered simultaneously. Comparisons and balances should be made to ultimately select a more satisfactory product. The number of input/output points directly affects the price. Each additional input/output card increases the cost. When the number of points increases to a certain value, the corresponding memory capacity, rack, motherboard, etc., must also increase accordingly. Therefore, the increase in the number of points affects the selection of CPU, memory capacity, and control function range. Figure 1 shows the relationship between the total number of points and the price. These factors should be fully considered during estimation and selection to ensure a reasonable performance-price ratio for the entire control system.