November 20,2024
Analysis of the basic structure, selection and design of PLC
Basic structure
The essence of a programmable logic controller is a computer dedicated to industrial control. Its hardware structure is basically the same as that of a microcomputer. The basic structure is:
1. Power supply
The power supply of the programmable logic controller plays a very important role in the entire system. Without a good and reliable power supply system, it cannot work properly. Therefore, the manufacturer of the programmable logic controller also attaches great importance to the design and manufacture of the power supply. Generally, the AC voltage fluctuation is within the range of +10% (+15%), and the PLC can be directly connected to the AC power grid without taking other measures.
2. Central Processing Unit (CPU)
The central processing unit (CPU) is the control center of the programmable logic controller. It receives and stores the user program and data typed from the programmer according to the functions assigned by the programmable logic controller system program; checks the status of the power supply, memory, I/O and warning timer, and can diagnose syntax errors in the user program. When the programmable logic controller is put into operation, it first receives the status and data of each input device on site in a scanning manner, and stores them in the I/O image area respectively, and then reads the user program from the user program memory one by one, and after the command is interpreted, the results of the logical or arithmetic operation are sent to the I/O image area or data register according to the instructions. After all user programs are executed, the output status of the I/O image area or the data in the output register are finally transmitted to the corresponding output device, and the cycle runs until it stops.
In order to further improve the reliability of the PLC, large PLCs are also equipped with dual CPUs to form a redundant system, or a three-CPU voting system, so that even if a CPU fails, the entire system can still operate normally.
3. Memory
The memory that stores system software is called system program memory.
The memory that stores application software is called user program memory.
4. Input and output interface circuit
4.1. The field input interface circuit consists of an optical coupling circuit and a microcomputer input interface circuit, and serves as the input channel of the interface between the programmable logic controller and the field control.
4.2. The field output interface circuit is integrated with the output data register, the selection circuit and the interrupt request circuit, and the programmable logic controller outputs the corresponding control signal to the field execution component through the field output interface circuit.
5. Functional modules
Such as counting, positioning and other functional modules.
6. Communication module
PLC selection and case analysis
When selecting a PLC, you should analyze the characteristics of the process and the control requirements in detail, clarify the control tasks and scope, determine the required operations and actions, and then estimate the number of input and output points, required memory capacity, and determine the functions of the PLC and the characteristics of external devices based on the control requirements. Finally, select a PLC with a higher performance-price ratio and design a corresponding control system.
Below, we will detail the points that should be paid attention to when choosing PLC:
1. Estimation of Input and Output (I/O) Points
Appropriate margin should be considered when estimating the number of I/O points. Usually, based on the statistical number of input and output points, an expandable margin of 10% to 20% is added as the estimated data for the number of input and output points.
2. Estimation of memory capacity; memory capacity is the size of the hardware storage unit that the programmable controller itself can provide, and program capacity is the size of the storage unit used by the user application project in the memory, so the program capacity is smaller than the memory capacity. In order to have a certain estimate of the program capacity during design and selection, the estimation of memory capacity is usually used as a substitute. Generally speaking, it is 10 to 15 times the number of digital I/O points, plus 100 times the number of analog I/O points, and this number is the total number of words in the memory (16 bits is one word), and another 25% of this number is considered as a margin.
3. Selection of control functions; this selection includes the selection of characteristics such as calculation function, control function, communication function, programming function, diagnostic function and processing speed.
(1) Operation function; the operation function of simple PLC includes logic operation, timing and counting function; the operation function of ordinary PLC also includes data shift, comparison and other operation functions; more complex operation functions include algebraic operation, data transmission, etc.; large PLC also has analog PID operation and other advanced operation functions. With the emergence of open systems, PLCs now have communication functions. Some products have communication with lower computers, some products have communication with the same computer or upper computer, and some products also have the function of data communication with the factory or enterprise network. When designing and selecting, we should start from the requirements of actual application and reasonably select the required operation functions. In most applications, only logical operation and timing and counting functions are needed. Some applications require data transmission and comparison. When used for analog detection and control, algebraic operation, numerical conversion and PID operation are used. Decoding and encoding operations are required to display data.
(2) Control functions: Control functions include PID control operations, feedforward compensation control operations, ratio control operations, etc., which should be determined according to control requirements. PLC is mainly used for sequential logic control. Therefore, single-loop or multi-loop controllers are often used in most cases to solve analog control. Sometimes, dedicated intelligent input and output units are also used to complete the required control functions, improve the processing speed of PLC and save memory capacity. For example, PID control units, high-speed counters, analog units with speed compensation, ASC code conversion units, etc. are used.
(3) Communication function: Large and medium-sized PLC systems should support a variety of fieldbuses and standard communication protocols (such as TCP/IP), and should be able to connect to the factory management network (TCP/IP) when necessary. The communication protocol should comply with ISO/IEEE communication standards and should be an open communication network. The communication interface of the PLC system should include serial and parallel communication interfaces (RS 232C/422A/485), RIO communication port, industrial Ethernet, common DCS interface, etc.; the main forms of the communication network of the PLC system are the following: 1) PC is the master station, and multiple PLCs of the same model are slave stations, forming a simple PLC network; 2) 1 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 as a subnet of the DCS through a specific network interface; 4) Dedicated PLC network (dedicated PLC communication network of each manufacturer). In order to reduce the CPU communication task, according to the actual needs of the network composition, communication processors with different communication functions (such as point-to-point, fieldbus, industrial Ethernet) should be selected.
(4) Programming function; Offline programming mode: PLC and programmer share a CPU. When the programmer is in programming mode, the CPU only provides services for the programmer and does not control the field equipment. After programming is completed, the programmer switches to the running mode, and the CPU controls the field equipment and cannot be programmed. Offline programming can reduce system costs, but it is inconvenient to use and debug. Online programming mode: 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 the system debugging and operation are convenient, and it is often used in large and medium-sized PLCs.
(5) Diagnostic function
The diagnostic function of PLC includes hardware and software diagnosis. Hardware diagnosis determines the fault location of hardware through hardware logic judgment, and software diagnosis is divided into internal diagnosis and external diagnosis. Diagnosis of the internal performance and function of PLC through software is internal diagnosis, and diagnosis of the information exchange function between PLC CPU and external input and output components through software is external diagnosis.
The strength of the PLC's diagnostic function directly affects the technical capabilities required of operators and maintenance personnel, and affects the average repair time.
(6) Processing speed
PLC works in scanning mode. From the perspective of real-time requirements, the processing speed should be as fast as possible. If the signal duration is less than the scanning time, the PLC will not be able to scan the signal, resulting in the loss of signal data. The processing speed is related to the length of the user program, the CPU processing speed, the software quality, etc. At present, the PLC contacts have fast response and high speed. The execution time of each binary instruction is about 0.2 to 0.4Ls, so it can adapt to the application needs with high control requirements and fast response requirements. The scanning cycle (processor scanning cycle) should meet the following requirements: the scanning time of small PLC is not more than 0.5ms/K; the scanning time of large and medium-sized PLC is not more than 0.2ms/K.
4. Model selection
(1) Types of PLC
PLC is divided into two categories according to structure: integral type and modular type. It is divided into two categories according to application environment: field installation and control room installation. It is divided into 1 bit, 4 bit, 8 bit, 16 bit, 32 bit, 64 bit, etc. according to CPU word length. From the application point of view, it can usually be selected according to control function or input and output points. The I/O points of integral PLC are fixed, so users have less room for choice and are used in small control systems; modular PLC provides a variety of I/O cards or plug-in cards, so users can reasonably select and configure the I/O points of the control system. Function expansion is convenient and flexible, and it is generally used in large and medium-sized control systems.
(2) Selection of input and output modules; the selection of input and 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 to be selected should be considered. Generally, relay output modules have the characteristics of low price, wide voltage range, short life, and long response time; thyristor output modules are suitable for frequent switching and inductive low power factor load occasions, but they are more expensive and have poor overload capacity. Output modules also have DC output, AC output, and analog output, which should be consistent with application requirements. According to application requirements, intelligent input and output modules can be reasonably selected to improve the control level and reduce application costs. Consider whether an expansion rack or remote I/O rack is needed.
(3) Power supply selection
The power supply of PLC, in addition to the design and selection of PLC according to the requirements of the product manual when introducing equipment, the power supply of PLC should be designed and selected according to the requirements of the product manual. In general, the power supply of PLC should be designed and selected with 220VAC power supply, which is consistent with the voltage of the domestic power grid. For important applications, an uninterruptible power supply or a voltage-stabilized power supply should be used. If the PLC itself has a usable power supply, it should be checked whether the current provided meets the application requirements, otherwise an external power supply should be designed. In order to prevent the external high-voltage power supply from being introduced into the PLC due to misoperation, it is necessary to isolate the input and output signals, and sometimes a simple diode or fuse tube can be used for isolation.
(4) Memory selection: Due to the development of computer integrated chip technology, the price of memory has dropped. Therefore, in order to ensure the normal operation of the application project, the PLC memory capacity is generally required to be at least 8K memory according to 256 I/O points. When complex control functions are required, a larger capacity and higher grade memory should be selected.
(5) Economic Considerations
When choosing a PLC, you should consider the performance-price ratio. When considering economic efficiency, you should also consider factors such as the scalability, operability, and input-output ratio of the application, make comparisons and take them into account, and finally select a more satisfactory product.
The number of input and output points has a direct impact on the price. Each additional input and output card will increase the cost. When the number of points increases to a certain value, the corresponding memory capacity, rack, motherboard, etc. will also increase accordingly. Therefore, the increase in the number of points has an impact on the selection of CPU, memory capacity, control function range, etc. It should be fully considered during the estimation and selection to make the entire control system have a more reasonable performance-price ratio.
더 읽어보기