When planning a PLC system, the first step is to determine the control plan, followed by PLC engineering planning and selection. The characteristics of the process flow and application requirements are the primary basis for planning and 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 equipment design and control requirements. Familiarity with programmable logic controllers, function tables, and related programming languages can help shorten programming time. Therefore, during engineering planning, selection, and budgeting, the characteristics of the process flow and control requirements should be analyzed in detail. The control tasks and scope should be clearly defined to determine the required operations and actions. Then, based on the control requirements, the number of input/output points, required memory capacity, PLC functions, and external device characteristics should be budgeted. Finally, a PLC with a high performance-to-price ratio should be selected, and a corresponding control system should be designed.
I. Budgeting for Input/Output (I/O) Points
When budgeting I/O points, an appropriate margin should be considered. Typically, based on the calculated number of input/output points, an additional 10% to 20% for expansion is added. This margin is then used as the budgeted I/O point count. In actual ordering, the I/O point count also needs to be rounded up according to the features of the PLC from the manufacturer.
II. Memory Capacity Budget
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, because the user application has not yet been written, the program capacity is unknown and can only be determined after program debugging. To allow for a certain budget for program capacity during design and selection, a budget for memory capacity is usually used as a substitute.
There is no fixed formula for estimating memory capacity. Many documents provide different formulas, but they 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 the total number of words in memory (16 bits per word), and then a margin of 25% is considered.
III. Selection of Control Functions
The selection includes features such as computing power, control function, communication function, programming function, diagnostic function, and processing speed.
(I) Computational Functions
Simple PLCs include logic operations, timing, and counting functions; typical PLCs also include data shifting and comparison functions; more complex functions include algebraic operations and data transmission; large PLCs also include PID calculations for analog signals and other advanced functions. With the advent of open systems, PLCs now generally have communication capabilities. Some products can communicate with lower-level machines, some with peer or upper-level machines, and some even have the ability to communicate with factory or enterprise networks. When planning and selecting a PLC, the practical application requirements should be considered, and the necessary functions should be selected appropriately. In most applications, only logic operations and timing/counting functions are needed. Some applications require data transmission and comparison. Algebraic operations, numerical transformations, and PID calculations are used only when used for analog signal checking and control. Decoding and encoding operations are required to display data.
(II) Control Functions
Control functions include PID control calculations, feedforward compensation control calculations, ratio control calculations, etc., which should be determined according to the control requirements. PLCs are primarily 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 also 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 Function
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 required. 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 equipped with 1:1 redundancy, the communication bus should conform to international standards, and the communication interval should meet the actual requirements of the equipment.
In the communication network of a PLC system, the communication speed of the upstream network should be greater than 1Mbps, and the communication load should not exceed 60%. The main methods of PLC system communication network are as follows: 1) PC as master station, multiple PLCs of the same type as slave stations, forming a simple PLC network; 2) 1 PLC as master station, other PLCs of the same type as slave stations, forming a master-slave PLC network; 3) PLC network connected to a large DCS through a specific network interface as a subnet of the DCS; 4) Dedicated PLC network (dedicated PLC communication network of each manufacturer).
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 practical needs of the network configuration.
(iv) Programming Functions
Offline programming method: 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 again. Offline programming reduces system costs, but it is inconvenient to use and debug. Online programming method: 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 are required: three graphical languages—Sequential Function Chart (SFC), Ladder Diagram (LD), and Function Block Diagram (FBD)—and two text-based languages—Statement List (IL) and Structured Text (ST). The selected programming language should adhere to its standard (IEC 6113123) and should also support multiple programming language methods, such as C and Basic, to meet the control requirements of special control applications.
(V) Diagnostic Function
PLC diagnostics include both hardware and software diagnostics. Hardware diagnostics uses logical judgments to determine the location of hardware faults, while software diagnostics is divided into internal and external diagnostics. Internal diagnostics involves diagnosing the PLC's internal performance and functions through software, while external diagnostics involves diagnosing the PLC's CPU and its communication functions with external input/output components through software.
The strength of a PLC's diagnostic capabilities directly affects the skill requirements for operators and maintenance personnel, and also impacts the average repair time.
(vi) Processing speed
The PLC uses a scanning method for operation. From a real-time perspective, the processing speed should be as fast as possible. If the signal duration is shorter than the scanning 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 are fast and efficient, with each binary instruction executing in approximately 0.2–0.4 ms, thus meeting the needs of applications with high control demands and fast response times. The scan cycle (processor scan cycle) should meet the following requirements: for small PLCs, the scan time should not exceed 0.5 ms/K; for medium and large PLCs, the scan time should not exceed 0.2 ms/K.
IV. Model Selection
(I) Types of PLCs
PLCs are classified into two types according to their structure: integrated type and modular type; according to their application environment: field device type and control room device type; and according to their CPU word length: 1-bit, 4-bit, 8-bit, 16-bit, 32-bit, 64-bit, etc. From an application perspective, the selection can usually be based on the control function or the number of input/output points.
A fixed number of I/O points in a standard PLC limits the user's choices, making it suitable for small control systems. A modular PLC, on the other hand, provides a variety of I/O cards or plug-ins, allowing users to select and configure the I/O points of the control system more efficiently. It also offers convenient and flexible function expansion and is typically used in medium to large control systems.
(II) Selection of Input/Output Modules
The selection of input/output modules should consider the 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. Generally, relay output modules have the characteristics of low price, wide operating voltage range, short lifespan, and long response time; thyristor output modules are suitable for frequent switching and low 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 based on application requirements to improve control levels and reduce application costs.
Consider whether there is a need to expand rack space or remote I/O racks, etc.
(III) Power Supply Selection
For PLC power supplies, in addition to being imported along with the equipment and designed and selected according to the product manual, a 220VAC power supply, compatible with the domestic power grid voltage, should generally be selected. In major applications, an uninterruptible power supply (UPS) or a regulated power supply should be used.
If the PLC has its own power supply, the supplied current should be checked to ensure it meets the operating requirements; otherwise, an external power supply should be planned. To prevent external high-voltage power from being introduced into the PLC due to misoperation, it is necessary to isolate the input and output signals. Sometimes, simple diodes or fuses can be used for isolation.
(iv) Selection of memory
Due to advancements in computer integrated circuit technology, memory prices have decreased. Therefore, to ensure the normal operation of applications, PLC memory capacity is typically required; for 256 I/O points, at least 8KB of memory should be selected. For complex control functions, larger capacity and higher-level memory should be chosen.
(V) Selection of Redundancy Functions
1. Redundancy of the control unit
(1) The main process units: CPU (including memory) and power supply should both be redundant.
(2) When required, 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 units
(1) The multi-point I/O cards of the control loop should be redundantly equipped.
(2) Redundant I/O cards can be equipped at the main inspection points. (3) Depending on the requirements, dual or triple I/O interface units can be selected for the main I/O signals.
(vi) Economic Considerations
When selecting a PLC, the performance-price ratio should be considered. When considering economic factors, factors such as 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 (I/O) points directly impacts the price. Each additional I/O card incurs a cost. As the number of points increases to a certain level, the corresponding memory capacity, rack space, motherboard, etc., must also be increased. Therefore, increasing the number of points affects the selection of the CPU, memory capacity, and control functionality. Careful consideration should be given during budgeting and selection to ensure a reasonable performance-to-price ratio for the entire control system.
For more information, please follow the PLC channel.