1. Introduction In modern industrial production equipment, there are a large number of digital and analog control devices, such as the start and stop of the motor, the opening and closing of the solenoid valve, the counting of products, the setting and control of temperature, pressure, flow, etc. PLC technology is the most effective and convenient tool to solve the above problems, so PLC has been widely used in industrial control. The following discusses the problems in the design of PLC industrial control systems.
2, PLC system equipment selection The main purpose of the PLC is to control the external system. This system may be a single machine, fleet or a production process. Different types of PLCs have different ranges of application. According to the production process requirements, the complexity of the controlled object is analyzed, and the statistics of I/O points and types of I/O points (digital, analog, etc.) are made and the list is listed. Appropriately estimate the memory capacity and determine the appropriate models (small, medium, and large machines) that will have a margin and not waste resources. In combination with the market conditions, the PLC manufacturer's products and their after-sales services, technical support, and network communications were reviewed, and PLC models with better price performance were selected.
At present, there are many PLC products on the market. Foreign well-known brands include SIEMENS from Germany, OMRON, MITSUBISHI, FUJI, Panasonic from Japan, GE from the United States, and LG from Korea. Domestic brands include Advantech, Aegis, and Heli. In recent years, the prices of PLC products have dropped significantly, and their cost-effectiveness has become higher and higher. PLC selection should start from the following aspects.
2.1 Determine the size of the PLC control system Determine the size of the system based on the production process and complexity of the plant. Can be divided into large, medium and small scale.
Small-scale PLC control system: single or small-scale production process, the control process is mainly the conditions, sequence control, the main switch, and I / O points less than 128 points. General use of micro-PLC, such as SIEMENSS7-200.
Medium-scale PLC control system: The production process is a complex logic control and closed-loop control, with I/O points between 128 and 512 points. Should use PLC with analog control, PID control and other functions, such as SIEMENSS7-300.
Large-scale PLC control system: The production process is a large-scale process control, DCS system and factory automation network control, and the I/O points are more than 512 points. Should use high-end PLC with communication networking, intelligent control, database, interrupt control and function calculation, such as SIEMENSS7-400, etc., and then combine industrial field bus to realize the communication and control of the factory industrial network.
2.2 Determine the type of PLC I/O point According to the production process requirements, analyze the complexity of the controlled object, and count the I/O points and types of I/O points (digital, analog, etc.), and list them. Appropriately estimate the memory capacity and determine the appropriate model (small, medium, and large machines) that will leave the software and hardware resources remaining without wasting resources.
According to the PLC output with the load is DC or AC type, is a large current or a small current, and the PLC output point of the frequency of the action, etc., to determine the output of the relay output, or the transistor output, or product gate output. Different loads use different output methods, which is very important for the stable operation of the system.
Electromagnetic valve opening and closing, large inductive load, low operating frequency equipment, PLC output relay output or solid state relay output; various indicators, inverter / digital DC governor start / stop transistor output should be used.
2.3 Determine PLC programming tools (1) General programming of handheld programmers. Hand-held programmers can only be programmed using statement tables (STL) in the business statement statement table. This method is inefficient, but it is suitable for products with small system capacity and small amount of usage. It has the advantages of small size, low price, and easy on-site debugging. This is mainly used for micro PLC programming.
(2) Graphics programmer programming. The graphic programmer uses Ladder Diagram (LAD) programming, which is convenient and intuitive. The general electrician can use it freely in a short period of time. However, the programmer has a higher price and is mainly used for micro-PLC and mid-range PLC.
(3) Computer plus PLC software package programming. This method is the most efficient way, but most company's PLC development software package is expensive, and this method is not easy to debug on the spot, mainly used for high-end PLC system hardware configuration and software programming.
3, PLC control system design PLC control system design includes hardware design and software design.
3.1 Hardware design of PLC control system Hardware design is a crucial part of the PLC control system, which relates to the reliability, safety and stability of PLC control system operation. It mainly includes input and output circuits.
(1) Input circuit design of PLC control system. PLC power supply is generally AC85-240V, and it is adaptable to a wide range of power supply, but in order to resist interference, power purification components (such as power filters, 1:1 isolation transformers, etc.) should be installed; isolation transformers can also adopt double isolation technology, ie The primary and secondary coil shields of the transformer are connected to the primary electrical neutral point and the secondary coil shield is connected to the ground of the PLC input circuit to reduce high- and low-frequency pulse interference.
PLC input circuit power supply should generally use DC24V, at the same time it should pay attention to the capacity with the load, and make a good measure against short-circuit, which is critical to the system power supply security and PLC safety, because the power supply overload or short circuit will affect the PLC's operation Generally, the power supply has a capacity of twice that of the input circuit. The PLC input circuit power supply branch is equipped with an appropriate fuse to prevent short circuits.
(2) Output circuit design of PLC control system. According to the production process requirements, the start and stop of various indicator lights, frequency converters/digital DC governors should adopt transistor output, which is suitable for high frequency operation and short response time; if the PLC system output frequency is less than 6 times per minute, The relay output should be the first choice. Using this method, the output circuit is simple in design, and it has strong anti-interference and load carrying capacity.
If the PLC outputs an inductive load such as an electromagnetic coil, the output of the PLC will cause an inrush current to impact the output of the PLC. For this reason, the DC inductive load should be connected to a freewheeling diode next to it, and the AC inductive load should be shunted. Surge absorption circuit can effectively protect the PLC.
When the PLC scanning frequency is 10 times/min or less, either the relay output mode or the PLC output can drive the intermediate relay or solid state relay (SSR) to drive the load.
For two important outputs, it is not only interlocked inside the PLC. It is recommended that hardware interlock be performed outside the PLC to enhance the safety and reliability of the PLC system operation.
For the common AC220V AC switch type load, such as AC contactor, solenoid valve, etc., should be driven by the DC24V micro-mini relay to avoid the direct contact of the PLC's DO contact point, although the PLC manual is nominally with the AC220V AC switch type load drive capability.
(3) Anti-jamming design of PLC control system. With the rapid development of industrial automation technology, thyristor controlled rectification and frequency conversion speed control devices are used more and more widely, which brings about the pollution of the AC power grid, and also brings many interference problems to the control system. The anti-interference is the PLC control system design. Must consider the issue. The following methods are generally used:
Isolation: Since the high-frequency interference in the power grid is mainly caused by the distributed capacitive coupling between the primary and secondary windings, it is recommended to use a 1:1 super-isolation transformer and ground the neutral point through the capacitor.
Shielding: It is generally shielded with a metal shell and the PLC system is built into the metal cabinet. The metal cabinet shell is reliably grounded, and can play a good electrostatic and magnetic shielding effect to prevent space radiation interference.
Wiring: Strong electric power lines, weak signal lines are separated, and there must be a certain interval; analog signal transmission lines are shielded with twisted pair cables.
3.2 The software design of PLC control system can carry on the design work of the software while carrying on the hardware design. The main task of software design is to convert the process flow diagram into a ladder diagram according to the control requirements. This is the most critical problem in PLC application. The programming of the program is a concrete expression of software design. In the application of control engineering, a good software design concept is the key. Excellent software design facilitates engineering and technical personnel to understand and control the system and daily system maintenance.
(1) PLC control system programming ideas. Due to the different complexity of production process control requirements, programs can be divided into basic programs and modular programs according to the structure.
Basic procedure: It can be used as a stand-alone program to control a simple production process, or it can be used as a unit program in a combined module structure. According to the design concept of a computer program, there are only three basic methods of structure: sequential structure, conditional branch structure and loop structure.
Modularization program: A general control object program is divided into a plurality of program modules with explicit subtasks, which are respectively written and debugged, and finally combined into a complete program for accomplishing the overall task. This method is called modular programming. We recommend that this kind of programming concept be adopted frequently because each module has relative independence, the mutual connection relationship is simple, and the program is easy to debug and modify. Especially for production processes that require complex control.
(2) Program design points of PLC control system. PLC control system I/O allocation, according to the production line from front to back, I/O points from small to large; as much as possible to a system, equipment or components I / O signals addressed in order to facilitate maintenance. The timers and counters must be numbered in the same way, and the same number cannot be used repeatedly to ensure the reliability of PLC operation.
Internally used relays or intermediate flag bits (not I/O bits) that are used extensively in the program are also numbered and allocated.
After the address allocation is completed, the I/O allocation table and internal relay or intermediate flag allocation table should be listed.
Output devices related to each other, such as motor forward/reverse, etc., whose output addresses should be continuously arranged, such as Q2.0/Q2.1.
(3) PLC control system programming skills. The principle of PLC program design is that the logic relationship is simple and clear, easy to program input, less memory, reduce the scan time, this is the principle that PLC programming must follow. Here are some tips.
Various PLC contacts can be reused multiple times, eliminating the need for complicated procedures to reduce contact usage.
The same relay coil is used twice in the same program as double coil output. The double coil output is likely to cause malfunctions. In the program, it is necessary to avoid repeated use of the coil. If it is necessary to have a dual coil output, set and reset operations (such as SQ4.0 or RQ4.0 for S7-300) can be used.
If you want to make multiple outputs of the PLC to a fixed value of 1 (normally closed), you can use word transfer instructions to complete, for example, Q2.0, Q2.3, Q2.5, and Q2.7 are all 1, and one instruction can be used to Hexadecimal data 0A9H can directly transmit QW2.
For non-essential devices, you can access the PLC input by connecting multiple contacts in series on the hardware, or reduce the number of I/O points through PLC programming and save resources. For example: We use a button to control the start/stop of the device, and we can use a divide-by-two to achieve.
The application of modular programming ideas: we can package the positive and negative self-locking interlocking program into a module. The forward/reverse motion package is a module. In the PLC program, we can repeatedly call this module, not only reducing the programming volume, but also Reducing the memory footprint is conducive to the preparation of large-scale PLC programs.
4, PLC control system program debugging PLC control system program debugging generally includes I/O terminal testing and system debugging two parts, good debugging steps are conducive to accelerating assembly debugging process.
4.1 I/O terminal test manual switch temporarily replaces the on-site input signal, and manually checks and verifies the PLC input terminal one by one. The indicator of the PLC input terminal is on, indicating normal; otherwise, the wiring or I/O should be checked. Bad point.
We can write a small program to check if all the output terminals of the PLC are fully illuminated with good output power. The indicator of the PLC input terminal lights, indicating normal. Instead, check the wiring or the I/O point is bad.
4.2 System debugging System debugging should first connect the power supply, external circuit and input and output terminals according to the control requirements. Then load the program in the PLC and run the PLC to debug. Connect the PLC to the field device. Check the entire PLC control system before formal commissioning, including power supply, grounding cable, device connection cable, I/O connection, etc. Ensure that the entire hardware connection is correct without powering up.
Set the PLC control unit's operating mode to "RUN" to start operation. Repeated debugging eliminates possible problems. In the debugging process, the hardware can also be appropriately modified to meet the debugging of the software according to actual needs. The operation time should be kept long enough to fully expose and correct the problem. Most of the debugging is a control program problem. Generally divided into the following steps:
(1) Make a separate test of each field signal and control volume;
(2) check the hardware / modify the program;
(3) Comprehensive testing of on-site signals and control quantities;
(4) with equipment debugging;
(5) Finished debugging
5. Conclusion The design of the PLC control system is an orderly system engineering. If you want to be proficient, you need to design and practice it repeatedly. This article is a summary of the design and practical experience of the PLC control system and has good results in practical applications.
2, PLC system equipment selection The main purpose of the PLC is to control the external system. This system may be a single machine, fleet or a production process. Different types of PLCs have different ranges of application. According to the production process requirements, the complexity of the controlled object is analyzed, and the statistics of I/O points and types of I/O points (digital, analog, etc.) are made and the list is listed. Appropriately estimate the memory capacity and determine the appropriate models (small, medium, and large machines) that will have a margin and not waste resources. In combination with the market conditions, the PLC manufacturer's products and their after-sales services, technical support, and network communications were reviewed, and PLC models with better price performance were selected.
At present, there are many PLC products on the market. Foreign well-known brands include SIEMENS from Germany, OMRON, MITSUBISHI, FUJI, Panasonic from Japan, GE from the United States, and LG from Korea. Domestic brands include Advantech, Aegis, and Heli. In recent years, the prices of PLC products have dropped significantly, and their cost-effectiveness has become higher and higher. PLC selection should start from the following aspects.
2.1 Determine the size of the PLC control system Determine the size of the system based on the production process and complexity of the plant. Can be divided into large, medium and small scale.
Small-scale PLC control system: single or small-scale production process, the control process is mainly the conditions, sequence control, the main switch, and I / O points less than 128 points. General use of micro-PLC, such as SIEMENSS7-200.
Medium-scale PLC control system: The production process is a complex logic control and closed-loop control, with I/O points between 128 and 512 points. Should use PLC with analog control, PID control and other functions, such as SIEMENSS7-300.
Large-scale PLC control system: The production process is a large-scale process control, DCS system and factory automation network control, and the I/O points are more than 512 points. Should use high-end PLC with communication networking, intelligent control, database, interrupt control and function calculation, such as SIEMENSS7-400, etc., and then combine industrial field bus to realize the communication and control of the factory industrial network.
2.2 Determine the type of PLC I/O point According to the production process requirements, analyze the complexity of the controlled object, and count the I/O points and types of I/O points (digital, analog, etc.), and list them. Appropriately estimate the memory capacity and determine the appropriate model (small, medium, and large machines) that will leave the software and hardware resources remaining without wasting resources.
According to the PLC output with the load is DC or AC type, is a large current or a small current, and the PLC output point of the frequency of the action, etc., to determine the output of the relay output, or the transistor output, or product gate output. Different loads use different output methods, which is very important for the stable operation of the system.
Electromagnetic valve opening and closing, large inductive load, low operating frequency equipment, PLC output relay output or solid state relay output; various indicators, inverter / digital DC governor start / stop transistor output should be used.
2.3 Determine PLC programming tools (1) General programming of handheld programmers. Hand-held programmers can only be programmed using statement tables (STL) in the business statement statement table. This method is inefficient, but it is suitable for products with small system capacity and small amount of usage. It has the advantages of small size, low price, and easy on-site debugging. This is mainly used for micro PLC programming.
(2) Graphics programmer programming. The graphic programmer uses Ladder Diagram (LAD) programming, which is convenient and intuitive. The general electrician can use it freely in a short period of time. However, the programmer has a higher price and is mainly used for micro-PLC and mid-range PLC.
(3) Computer plus PLC software package programming. This method is the most efficient way, but most company's PLC development software package is expensive, and this method is not easy to debug on the spot, mainly used for high-end PLC system hardware configuration and software programming.
3, PLC control system design PLC control system design includes hardware design and software design.
3.1 Hardware design of PLC control system Hardware design is a crucial part of the PLC control system, which relates to the reliability, safety and stability of PLC control system operation. It mainly includes input and output circuits.
(1) Input circuit design of PLC control system. PLC power supply is generally AC85-240V, and it is adaptable to a wide range of power supply, but in order to resist interference, power purification components (such as power filters, 1:1 isolation transformers, etc.) should be installed; isolation transformers can also adopt double isolation technology, ie The primary and secondary coil shields of the transformer are connected to the primary electrical neutral point and the secondary coil shield is connected to the ground of the PLC input circuit to reduce high- and low-frequency pulse interference.
PLC input circuit power supply should generally use DC24V, at the same time it should pay attention to the capacity with the load, and make a good measure against short-circuit, which is critical to the system power supply security and PLC safety, because the power supply overload or short circuit will affect the PLC's operation Generally, the power supply has a capacity of twice that of the input circuit. The PLC input circuit power supply branch is equipped with an appropriate fuse to prevent short circuits.
(2) Output circuit design of PLC control system. According to the production process requirements, the start and stop of various indicator lights, frequency converters/digital DC governors should adopt transistor output, which is suitable for high frequency operation and short response time; if the PLC system output frequency is less than 6 times per minute, The relay output should be the first choice. Using this method, the output circuit is simple in design, and it has strong anti-interference and load carrying capacity.
If the PLC outputs an inductive load such as an electromagnetic coil, the output of the PLC will cause an inrush current to impact the output of the PLC. For this reason, the DC inductive load should be connected to a freewheeling diode next to it, and the AC inductive load should be shunted. Surge absorption circuit can effectively protect the PLC.
When the PLC scanning frequency is 10 times/min or less, either the relay output mode or the PLC output can drive the intermediate relay or solid state relay (SSR) to drive the load.
For two important outputs, it is not only interlocked inside the PLC. It is recommended that hardware interlock be performed outside the PLC to enhance the safety and reliability of the PLC system operation.
For the common AC220V AC switch type load, such as AC contactor, solenoid valve, etc., should be driven by the DC24V micro-mini relay to avoid the direct contact of the PLC's DO contact point, although the PLC manual is nominally with the AC220V AC switch type load drive capability.
(3) Anti-jamming design of PLC control system. With the rapid development of industrial automation technology, thyristor controlled rectification and frequency conversion speed control devices are used more and more widely, which brings about the pollution of the AC power grid, and also brings many interference problems to the control system. The anti-interference is the PLC control system design. Must consider the issue. The following methods are generally used:
Isolation: Since the high-frequency interference in the power grid is mainly caused by the distributed capacitive coupling between the primary and secondary windings, it is recommended to use a 1:1 super-isolation transformer and ground the neutral point through the capacitor.
Shielding: It is generally shielded with a metal shell and the PLC system is built into the metal cabinet. The metal cabinet shell is reliably grounded, and can play a good electrostatic and magnetic shielding effect to prevent space radiation interference.
Wiring: Strong electric power lines, weak signal lines are separated, and there must be a certain interval; analog signal transmission lines are shielded with twisted pair cables.
3.2 The software design of PLC control system can carry on the design work of the software while carrying on the hardware design. The main task of software design is to convert the process flow diagram into a ladder diagram according to the control requirements. This is the most critical problem in PLC application. The programming of the program is a concrete expression of software design. In the application of control engineering, a good software design concept is the key. Excellent software design facilitates engineering and technical personnel to understand and control the system and daily system maintenance.
(1) PLC control system programming ideas. Due to the different complexity of production process control requirements, programs can be divided into basic programs and modular programs according to the structure.
Basic procedure: It can be used as a stand-alone program to control a simple production process, or it can be used as a unit program in a combined module structure. According to the design concept of a computer program, there are only three basic methods of structure: sequential structure, conditional branch structure and loop structure.
Modularization program: A general control object program is divided into a plurality of program modules with explicit subtasks, which are respectively written and debugged, and finally combined into a complete program for accomplishing the overall task. This method is called modular programming. We recommend that this kind of programming concept be adopted frequently because each module has relative independence, the mutual connection relationship is simple, and the program is easy to debug and modify. Especially for production processes that require complex control.
(2) Program design points of PLC control system. PLC control system I/O allocation, according to the production line from front to back, I/O points from small to large; as much as possible to a system, equipment or components I / O signals addressed in order to facilitate maintenance. The timers and counters must be numbered in the same way, and the same number cannot be used repeatedly to ensure the reliability of PLC operation.
Internally used relays or intermediate flag bits (not I/O bits) that are used extensively in the program are also numbered and allocated.
After the address allocation is completed, the I/O allocation table and internal relay or intermediate flag allocation table should be listed.
Output devices related to each other, such as motor forward/reverse, etc., whose output addresses should be continuously arranged, such as Q2.0/Q2.1.
(3) PLC control system programming skills. The principle of PLC program design is that the logic relationship is simple and clear, easy to program input, less memory, reduce the scan time, this is the principle that PLC programming must follow. Here are some tips.
Various PLC contacts can be reused multiple times, eliminating the need for complicated procedures to reduce contact usage.
The same relay coil is used twice in the same program as double coil output. The double coil output is likely to cause malfunctions. In the program, it is necessary to avoid repeated use of the coil. If it is necessary to have a dual coil output, set and reset operations (such as SQ4.0 or RQ4.0 for S7-300) can be used.
If you want to make multiple outputs of the PLC to a fixed value of 1 (normally closed), you can use word transfer instructions to complete, for example, Q2.0, Q2.3, Q2.5, and Q2.7 are all 1, and one instruction can be used to Hexadecimal data 0A9H can directly transmit QW2.
For non-essential devices, you can access the PLC input by connecting multiple contacts in series on the hardware, or reduce the number of I/O points through PLC programming and save resources. For example: We use a button to control the start/stop of the device, and we can use a divide-by-two to achieve.
The application of modular programming ideas: we can package the positive and negative self-locking interlocking program into a module. The forward/reverse motion package is a module. In the PLC program, we can repeatedly call this module, not only reducing the programming volume, but also Reducing the memory footprint is conducive to the preparation of large-scale PLC programs.
4, PLC control system program debugging PLC control system program debugging generally includes I/O terminal testing and system debugging two parts, good debugging steps are conducive to accelerating assembly debugging process.
4.1 I/O terminal test manual switch temporarily replaces the on-site input signal, and manually checks and verifies the PLC input terminal one by one. The indicator of the PLC input terminal is on, indicating normal; otherwise, the wiring or I/O should be checked. Bad point.
We can write a small program to check if all the output terminals of the PLC are fully illuminated with good output power. The indicator of the PLC input terminal lights, indicating normal. Instead, check the wiring or the I/O point is bad.
4.2 System debugging System debugging should first connect the power supply, external circuit and input and output terminals according to the control requirements. Then load the program in the PLC and run the PLC to debug. Connect the PLC to the field device. Check the entire PLC control system before formal commissioning, including power supply, grounding cable, device connection cable, I/O connection, etc. Ensure that the entire hardware connection is correct without powering up.
Set the PLC control unit's operating mode to "RUN" to start operation. Repeated debugging eliminates possible problems. In the debugging process, the hardware can also be appropriately modified to meet the debugging of the software according to actual needs. The operation time should be kept long enough to fully expose and correct the problem. Most of the debugging is a control program problem. Generally divided into the following steps:
(1) Make a separate test of each field signal and control volume;
(2) check the hardware / modify the program;
(3) Comprehensive testing of on-site signals and control quantities;
(4) with equipment debugging;
(5) Finished debugging
5. Conclusion The design of the PLC control system is an orderly system engineering. If you want to be proficient, you need to design and practice it repeatedly. This article is a summary of the design and practical experience of the PLC control system and has good results in practical applications.
Dongguan Sun Pak Packing Product Ltd. , https://www.dgsunpack.com