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
When estimating the number of I/O points, an appropriate margin should be considered. Typically, based on the statistically estimated number of input/output points, an expansion margin of 10% to 20% is added to obtain the estimated number of input/output points. When actually ordering, the number of input/output points also 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 logic controller (PLC) itself can provide, while program capacity refers to the size of the storage units used by the user application within 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 can only be determined after program debugging. To allow for a certain estimation of program capacity during design and selection, an estimate of memory capacity is usually used as a substitute.
There is no fixed formula for estimating memory capacity. Many documents provide different formulas, which are generally based on 10 to 15 times the number of digital I/O points, plus 100 times the number of analog I/O points. This number is used as the total number of words in memory (16 bits is one word), and a margin of 25% is added.
III. Selection of Control Functions
This selection includes options for features such as computing capabilities, control capabilities, communication capabilities, programming capabilities, diagnostic capabilities, and processing speed.
1) Computational functions
Simple PLCs offer basic logical operations, timing, and counting functions. Ordinary PLCs also include data shifting and comparison functions. More complex PLCs offer algebraic operations and data transfer. Large PLCs also include analog PID control and other advanced functions. With the advent of open systems, most PLCs now have communication capabilities. Some communicate with lower-level computers, some with peer or upper-level computers, and some even with factory or enterprise networks. When designing and selecting a PLC, the required functions should be chosen based on the specific application requirements. Most applications only require logical operations and timing/counting functions. Some applications require data transfer and comparison. Algebraic operations, numerical conversions, and PID control are used for analog signal detection and control. Data display requires decoding and encoding.
(ii) Control Functions
Control functions include PID control calculations, feedforward compensation control calculations, ratio control calculations, etc., and should be determined according to control requirements. PLCs are mainly used for sequential logic control; therefore, in most cases, single-loop or multi-loop controllers are used to handle analog quantity control. Sometimes, dedicated intelligent input/output units are used to complete the required control functions, improving the PLC's processing speed and saving memory capacity. Examples include PID control units, high-speed counters, analog units with speed compensation, and ASCII code conversion units.
(iii) Communication Functions
Large and medium-sized PLC systems should support multiple fieldbuses and standard communication protocols (such as TCP/IP), and should be able to connect to the factory management network (TCP/IP) when needed. The communication protocol should conform to ISO/IEEE communication standards 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. The communication bus (including interface devices and cables) of large and medium-sized PLCs 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 communication network of a PLC system, the communication speed of the upper-level network should be greater than 1Mbps, and the communication load should not exceed 60%. The main forms of communication networks for PLC systems are as follows: 1) A PC is the master station, and multiple PLCs of the same model are slave stations, forming a simple PLC network; 2) One PLC is the master station, and other PLCs of the same model are slave stations, forming a master-slave PLC network; 3) The PLC network is connected to a large DCS through a specific network interface as a subnet of the DCS; 4) Dedicated PLC network (dedicated PLC communication networks of 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 based on the actual needs of the network composition.
(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 run mode, and the CPU controls the field devices but cannot program again. 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, and 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 are required: three graphical languages—Sequential Function Chart (SFC), Ladder Diagram (LD), and Function Block Diagram (FBD)—and two text-based languages—Instruction List (IL) and Structured Text (ST). The selected programming language should comply with its standard (IEC 6113123) and should also support multiple programming language formats, 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, while 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 its information exchange functions with external input/output components through software.
The strength of a PLC's diagnostic capabilities directly affects the technical skills required of operators and maintenance personnel, and also influences the mean time to repair (MTBL).
(vi) Processing speed
PLCs operate using a scanning method. From a real-time perspective, the processing speed should be as fast as possible. If the signal duration is shorter than the scan time, the PLC will not be able to scan the signal, resulting in the loss of signal data.
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 of 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: scan time for small PLCs should not exceed 0.5 ms/K; scan time for medium and large PLCs should not exceed 0.2 ms/K.
IV. Model Selection
1) Types of PLCs
PLCs are classified into two types according to their structure: integrated and modular; and according to their application environment: field-installed and control room-installed. They are also classified according to their CPU word length: 1-bit, 4-bit, 8-bit, 16-bit, 32-bit, 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, limiting user options and making them suitable for small control systems. Modular PLCs, on the other hand, offer a variety of I/O cards or plug-ins, allowing users to select and configure the I/O points of the control system more effectively. They also provide convenient and flexible function expansion and are generally used in medium to large-scale control systems.
II) Selection of Input/Output Modules
The selection of input/output modules should be consistent 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 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 applications with 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 application requirements.
Intelligent input/output modules can be selected appropriately according to application requirements in order to improve control level and reduce application costs.
Consider whether rack expansion or remote I/O racks are needed.
(III) Power Supply Selection
For PLC power supplies, in addition to the requirement that the PLC be designed and selected according to the product manual when the equipment is imported, a 220VAC power supply should generally be designed for the PLC, consistent with the domestic power grid voltage. For critical applications, an uninterruptible power supply (UPS) or a regulated power supply should be used.
If the PLC itself has a usable power supply, the provided current should be checked to ensure it 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 diode or fuse isolation can also be used.
IV) Memory Selection
Due to advancements in computer integrated circuit technology, memory prices have decreased. Therefore, to ensure the normal operation of application projects, a minimum memory capacity of 8KB is generally required for PLCs with 256 I/O points. For complex control functions, larger capacity and higher-grade memory should be selected.
(v) Selection of Redundancy Functions
Redundancy of the control unit
(1) Important process units: CPU (including memory) and power supply should both 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.
Redundancy of I/O interface units
(1) The multi-point I/O cards of the control loop should be redundantly configured.
(2) Redundant configuration of multi-point I/O cards for important detection points. (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 also be taken into account. A comparison and balance should be made to ultimately select the most satisfactory product.
The number of input/output points (I/O points) directly impacts the price. Each additional I/O card increases the cost. As the number of points increases to a certain level, the corresponding memory capacity, rack space, motherboard, etc., also need to be increased. Therefore, increasing the number of points affects the selection of the CPU, memory capacity, and control function range. These factors should be fully considered during estimation and selection to ensure a reasonable performance-price ratio for the entire control system.