When designing a programmable logic controller system, the first step is to determine the control scheme. The next step is to select the programmable logic controller for the engineering design. The characteristics of the process flow and application requirements are the main basis for design selection. The programmable logic controller and related equipment should be integrated and standardized. The selection should be based on the principle of facilitating integration with industrial control systems and easy expansion of its functions. The selected programmable logic controller should be a mature and reliable system with operational performance in the relevant industrial field. The system hardware, software configuration and functions of the programmable logic controller should be adapted to the scale of the device and control requirements. Being familiar with programmable logic controllers, function block diagrams and related programming languages is beneficial for shortening the programming time. Therefore, during engineering design selection and estimation, detailed analysis of the characteristics of the process flow, control requirements, clear control tasks and scopes, and determination of required operations and actions should be conducted. Then, based on the control requirements, estimate the input and output points, required memory capacity, determine the functions of the programmable logic controller, and the characteristics of external devices, etc. Finally, select a programmable logic controller with a higher performance-to-price ratio and design the corresponding control system. [5]
Point count estimation
When estimating I/O points, an appropriate margin should be considered. Usually, based on the statistically calculated input and output points, an additional 10% to 20% of expandable margin is added as the estimated data for input and output points. During actual ordering, the input and output points need to be rounded according to the product characteristics of the programmable logic controller of the manufacturer. [5]
Memory capacity
Memory capacity refers to the size of the hardware storage units provided by the programmable controller itself. Program capacity refers to the size of the storage units used by the user’s application programs in the memory. Therefore, program capacity is smaller than memory capacity. During the design stage, since the user’s application programs have not yet been compiled, the program capacity is unknown at this stage and can only be known after the program debugging. To enable a certain estimation of program capacity during the design selection process, the memory capacity estimation is usually adopted as a substitute. [5]
There is no fixed formula for estimating the memory capacity. Many literature sources provide different formulas. Generally, they are based on multiplying the number of digital I/O points by 10 to 15, and adding 100 times the number of analog I/O points. This number is taken as the total number of memory words (16 bits as one word), and an additional 25% is considered as a reserve. [5]
Control function selection
This selection includes the options for arithmetic functions, control functions, communication functions, programming functions, diagnostic functions, and processing speed, etc. [5]
1. Computing Function
The computing functions of simple programmable logic controllers include logical operations, timing and counting functions; the computing functions of ordinary programmable logic controllers also include data shifting, comparison and other computing functions; more complex computing functions include algebraic operations, data transmission, etc.; in large programmable logic controllers, there are also analog PID computing and other advanced computing functions. With the emergence of open systems, communication functions have been available in programmable logic controllers. Some products have communication with lower-level machines, some have communication with peer-level machines or upper-level machines, and some have the function of data communication with factories or enterprise networks. When selecting and designing, it should be based on the actual application requirements and reasonably choose the required computing functions. In most application scenarios, only logical operations and timing/counting functions are needed; some applications require data transmission and comparison; when used for analog quantity detection and control, algebraic operations, numerical conversion and PID operations, etc. are used. When displaying data, decoding and encoding operations are also required. [5]
2. Control Function
The control functions include PID control calculation, feedforward compensation control calculation, ratio control calculation, etc. These should be determined according to the control requirements. The programmable logic controller is mainly used for sequential logic control. Therefore, in most cases, single-loop or multi-loop controllers are commonly used to solve the control of analog quantities. Sometimes, dedicated intelligent input/output units are used to complete the required control functions, thereby improving the processing speed of the programmable logic controller and saving memory capacity. For example, PID control units, high-speed counters, analog units with speed compensation, ASC code conversion units, etc. are adopted. [5]
3. Communication Function
The medium and large-sized programmable logic controller systems should support various field buses and standard communication protocols (such as TCP/IP), and when necessary, they should be able to connect to the factory management network (TCP/IP). The communication protocols should comply with ISO/IEEE communication standards and should be open communication networks. [5]
The communication interfaces of the programmable logic controller system should include serial and parallel communication interfaces, RIO communication ports, common DCS interfaces, etc. For large and medium-sized programmable logic controllers, the communication bus (including interface devices and cables) should be configured in a 1:1 redundant manner. The communication bus should comply with international standards, and the communication distance should meet the actual requirements of the device. [5]
In the communication network of a programmable logic controller system, the communication rate of the upper-level network should be greater than 1 Mbps, and the communication load should not exceed 60%. The main forms of the communication network of the programmable logic controller system are as follows: [5]
1) The PC serves as the master station, and multiple programmable logic controllers of the same model serve as slave stations, forming a simple programmable logic controller network; [5]
2) One programmable logic controller serves as the master station, while other programmable logic controllers of the same model act as slave stations, forming a master-slave programmable logic controller network. [5]
3) The programmable logic controller network is connected to the large DCS through a specific network interface and serves as a sub-network of the DCS. [5]
4) Specialized Programmable Logic Controller Network (communication network for each manufacturer’s specialized programmable logic controller). [5]
To reduce the CPU’s communication workload, based on the actual requirements of the network configuration, communication processors with different communication functions (such as point-to-point and fieldbus) should be selected. [5]
4. Programming Function
Offline Programming Mode: The programmable logic controller and the programmer share one CPU. When the programmer is in programming mode, the CPU only provides services for the programmer and does not control the on-site equipment. After the programming is completed, the programmer switches to the operation mode, and the CPU controls the on-site equipment. It cannot perform programming. Offline programming mode can reduce system costs, but it is inconvenient for use and debugging. Online Programming Mode: The CPU and the programmer have their own CPUs. The host CPU is responsible for on-site control and exchanges data with the programmer within one scanning cycle. The programmer sends the online-programmed programs or data to the host, and in the next scanning cycle, the host runs according to the newly received programs. This method is costly, but it is convenient for system debugging and operation. It is often adopted in medium and large programmable logic controllers. [5]
Five standardized programming languages: Sequential Function Chart (SFC), Ladder Diagram (LD), Function Block Diagram (FBD), three graphical languages, and Instruction List (IL), Structured Text (ST), two text-based languages. The programming language selected should comply with its standards (IEC 61131-23), and at the same time, it should support various programming forms such as C, Basic, etc., to meet the control requirements of special control scenarios. [5]
5. Diagnostic Function
The diagnostic function of the programmable logic controller includes both hardware and software diagnostics. Hardware diagnostics determine the location of hardware faults through logical judgments of the hardware. Software diagnostics are divided into internal diagnostics and external diagnostics. Internal diagnostics involve diagnosing the performance and functions of the PLC through software. External diagnostics involve diagnosing the information exchange functions between the CPU of the programmable logic controller and external input/output components through software. [5]
The strength of the diagnostic function of a programmable logic controller directly affects the technical requirements for operators and maintenance personnel, as well as the average maintenance time. [5]
6. Processing Speed
The programmable logic controller operates in a scanning mode. From the perspective of real-time requirements, the processing speed should be as fast as possible. If the duration of a signal is shorter than the scanning time, the programmable logic controller will fail to scan this signal, resulting in the loss of signal data. [5]
The processing speed is related to the length of the user program, the CPU processing speed, and the quality of the software. The response speed of the programmable logic controller contacts is fast and high. The execution time of each binary instruction is approximately 0.2 to 0.4 seconds. Therefore, it can meet the requirements of high control and fast response in applications. The scan cycle (processor scan cycle) should meet the following conditions: the scan time of a small programmable logic controller is no more than 0.5 ms/K; the scan time of a medium-sized programmable logic controller is no more than 0.2 ms/K. [5]
Controller types
Programmable logic controllers are classified into two types based on their structure: integrated type and modular type. They are further categorized by application environment into field installation and control room installation types. According to the CPU word length, they are divided into 1-bit, 4-bit, 8-bit, 16-bit, 32-bit, 64-bit, etc. From an application perspective, selection is typically based on control functions or the number of input/output points. [5]
The I/O points of the integrated programmable logic controller are fixed, so users have limited choices and it is suitable for small-scale control systems. The modular programmable logic controller provides various I/O cards or modules, allowing users to reasonably select and configure the I/O points of the control system. The function expansion is convenient and flexible, and it is generally used in medium and large-scale control systems. [5]
Input and output types
Switching quantities mainly refer to input quantities and output quantities, which refer to the auxiliary points of a device. For example, the relay auxiliary points of the temperature controller of a transformer (the relay changes state when the transformer overheats), the auxiliary points of the valve cam switch (the relay changes state after the valve is switched), the auxiliary points of the contactor (the relay changes state after the contactor operates), the thermal relay (the relay changes state after the thermal relay operates), these points are generally transmitted to the PLC or integrated protection device. The power is generally provided by the PLC or integrated protection device, and they do not have their own power supply, so they are called passive contacts or PLC or integrated protection device’s input quantities. [5]
1. Digital quantity
A physical quantity that is discrete both in time and quantity is called a digital quantity. The signal representing the digital quantity is called a digital signal. The electronic circuits operating under digital signals are called digital circuits. [5]
For example: When using electronic circuits to record the number of parts output from an automatic production line, each time a part is sent out, an electronic circuit receives a signal, which is 1. While there is no part being sent out, the signal given to the electronic circuit is 0. This is for counting. It can be seen that this signal for the number of parts is discontinuous both in time and quantity. Therefore, it is a digital signal. The smallest unit of quantity is 1 part. [5]
2. Analog Quantity
A physical quantity that is continuous in both time and value is called an analog quantity. The signal representing an analog quantity is called an analog signal. The electronic circuits operating under analog signals are called analog circuits. [5]
For example: The voltage signal output by a thermocouple during operation belongs to an analog signal. This is because the measured temperature will not experience sudden jumps under any circumstances. Therefore, the voltage signal measured is continuous both in time and in quantity. Moreover, any value of this voltage signal during its continuous change process represents a specific physical meaning, that is, it indicates a corresponding temperature. [5]
Conversion Principle
1. A digital-to-analog converter is a system that converts digital signals into analog signals. Generally, a low-pass filter can achieve this. The digital signal is first decoded, that is, the digital code is converted into the corresponding level, forming a stepped signal, and then a low-pass filter is applied. [5]
According to the theory of signals and systems, a digital step-like signal can be regarded as the convolution of an ideal impulse sampling signal and a rectangular pulse signal. Then, by applying the convolution theorem, the frequency spectrum of the digital signal is the product of the frequency spectrum of the impulse sampling signal and the frequency spectrum of the rectangular pulse (i.e., the Sa function). Thus, by using the reciprocal of the Sa function as the spectral characteristic compensation, the digital signal can be restored to the sampling signal. According to the sampling theorem, the frequency spectrum of the sampling signal, after being filtered by an ideal low-pass filter, results in the frequency spectrum of the original analog signal. [5]
In general, these principles are not directly applied because sharp sampling signals are difficult to obtain. Therefore, these two filters (the Sa function and the ideal low-pass filter) can be combined (cascaded), and since the filtering characteristics of these systems are physically impossible to achieve, they can only be approximated in the actual system. [5]
2. The analog-to-digital converter is a system that converts analog signals into digital signals, involving a process of filtering, sampling, holding and encoding. [5]
The analog signal is filtered by a band-pass filter, sampled and held by a circuit, and then transformed into a stepped-shaped signal. Subsequently, it passes through an encoder, converting each level of the stepped signal into a binary code.