laitimes

How can a novice independently design a complete PLC application system?

author:Construction care

Project analysis

Project analysis requires a comprehensive analysis of the production process, working environment, hardware requirements and control requirements of the project. This work is the basis for the design of the entire system. If the early project analysis is not in place, it will cause inaccurate hardware selection in the back, resulting in project delays.

How can a novice independently design a complete PLC application system?

First, the project analysis engineering and technical personnel must first analyze the engineering project, that is, the control process of the project project and the control type of each process, and make a prejudgment of possible problems in the entire project. (1) Analyze the control process. When analyzing the control flow, it is recommended to draw a relevant control flow diagram that clearly marks the content of each step of the work and the conditions to the next step. (2) Analyze the control type and estimate the parameters required for PLC selection. General PLC is suitable for four control types, namely sequence control, process control, motion (or position) control and network communication. After analyzing the control requirements, the engineering and technical personnel will classify the control type of each control process according to the control flow chart drawn, and then combine the control type according to the complexity of the project, so accurately analyzing the control type of each step in the early stage will help the accuracy of the selection and the estimation of the problem. While analyzing the type of project control, the engineer and technician must also estimate the important parameter values required for PLC selection. For example, the number of I/O points in the sequence control; if the encoder is used, the frequency value of the output pulse is calculated according to the parameters of the encoder, and then converted into the pulse frequency of the PLC high-speed count. For example, the number of analogs and analog accuracy in process control, the response speed of the PLC to the feedback signal of the servo drive and the number of high-speed pulse outputs of the PLC in motion control, and whether the selected PLC supports the corresponding network type when communicating with the network.

Second, the estimation of possible problems for the estimation of possible problems is a more difficult part of engineering analysis. This not only requires engineering and technical personnel to have a good grasp of the working environment on site and the control difficulties of the entire project, but also to have a preliminary prediction of possible emergencies and dangers. (1) Grasp the working environment of the equipment. Engineers need to have a more comprehensive understanding of the production environment. For example, the working environment of textile machinery has high air humidity and vibration, so the design of PLC system should be done with shockproof treatment. Another example is the environmental temperature of the building materials processing plant is relatively high, and there is a lot of dust and strong static electricity, so the engineering and technical personnel should further do a good job in dustproof and static treatment under the premise of ensuring good ventilation of the electrical control cabinet. The grasp of the working environment of the equipment is not limited to the physical environment, and with the deepening of PLC applications, it is necessary to consider personnel factors. For example, when the quality of equipment operators is low, it is necessary to develop a more concise equipment operation interface. (2) Expectation of project difficulties. The expectation of the difficulty of the project is actually the grasp of the core problems of the project. For example, the control core of the air jet loom equipment is how to quickly and orderly control the solenoid valve, use the friction of the compressed air to pull the weft yarn through the textile shuttle, and complete the weft introduction work of the textile, which requires the PLC to have a very fast response speed. After determining the difficulty of the project, the engineer and technician can select the PLC according to the difficulty. From the perspective of the whole project, the difficulty of the project is the characteristics of the system design, and it is also the direction of PLC selection. (3) Preliminary estimate of project hazards. In the early stage of project design, engineering and technical personnel need to predict the possible dangers of the project. Such as sequential control or motion control in the debugging of equipment for the protection of malfunction; in the process control, test whether there are high pressure, high temperature or toxic and harmful substances and related protective measures. Estimating hazards early in the design of a project helps to increase the safety awareness of engineers and technicians.

The selection of PLC hardware selection PLC is that engineers and technicians choose the appropriate PLC according to the expectations of the early project analysis and project difficulties, mainly based on the following principles. First, the principle of first special and then general According to engineering experience, the factors restricting the selection of PLC in most engineering projects are mainly concentrated in several key points, so the PLC should be selected according to the principle of first special and then general. The so-called special refers to the special control requirements of the project, and different control types have different primary constraints. For example, in sequence control, the program capacity of the CPU and the expansion ability of the I/O point are the main factors in PLC selection. In process control, the number of analog quantities controlled and the accuracy of analog quantities are selected as the starting point. In the relatively simple motion control, the PLC needs to receive the position signal sent back from the field encoder and send a certain frequency of pulses accordingly to control the servo motor, so the speed of the PLC processing data, the ability of the input to receive high-speed pulses and the ability to transmit high-speed pulses at the output will become the primary factors in PLC selection. In large composite projects, different PLC networking needs to be used, so the type of network supported by the PLC becomes the primary factor in PLC selection. Engineering and technical personnel need to arrange different control requirements in order from special to general according to the core needs of the project, so that the selection will be more effective with half the effort and can reduce the overall difficulty of the project. Second, the bottom-up principle The purpose of the bottom-up principle is to maximize the cost performance of PLC selection. At present, most manufacturers' PLC products are divided into multiple series. When the engineer and technical personnel select the type, according to the first step from the special to the general selection order, starting from the lowest PLC, one by one to compare the performance parameters. When it is found that the requirements are not met, consider a higher product. And so on until you select a PLC model that fully meets the requirements. If the model is selected from top to bottom, it will waste the PLC function and cause a big horse-drawn cart. Third, the PLC switching input / output unit selection PLC switching input point is used to accept the level signal input by the field sensor, the switch is the role of the output point according to the internal control signal to drive the external load. (1) The selection of switching input terminals. Now the PLC input points on the market are all transistor inputs, and users only need to select according to the number of input points estimated in the early stage. However, it should be noted here that due to the different types of PLC terminal wiring, there are npn and PNP input methods, respectively, the meaning is whether the input end is active at low level or active at high level, once the type of wiring at the input terminal is determined, it is necessary to select the same type of input sensor, that is, NPN and PNP type sensors can not share a PLC input terminal. Now the PLC input terminal on the market is mostly the input voltage of DC 24V, if it is necessary to connect the sensor of his voltage specification to the PLC, it is necessary to use a relay to do the corresponding isolation to ensure that the signal connected to the PLC input terminal is DC 24V voltage. (2) The selection of switching output terminals. The types of PLC switching output points are mainly relay type output and transistor output. (1) Relay output type. The relay output load capacity is good, can withstand higher overvoltage and overcurrent for a short time, and has a strong isolation effect. However, because the relay is a mechanical contact inside, the operating life is limited, so it can only be used to connect the operation frequency is low and does not require high-speed pulse output. (2) Transistor output type. Transistor-type output is to control the output terminal on-off purpose by controlling the on-on of its internal transistor, and there is no mechanical contact structure inside it, so compared with the relay output contact, the transistor output contact has a long life, a high operating frequency, and is not easy to damage, and the disadvantage is poor load capacity. (3) The precautions for the selection of switching output terminals are similar to the input terminals, and the transistor output terminals are also divided into NPN type and PNP type. Once the model number is determined, the load can only be connected according to the same wiring method. In practical applications, it is recommended that engineering and technical personnel choose more transistor output PLC, and use relays at the output to connect external loads to form electrical isolation for downstream load equipment, which combines the advantages of long transistor life and strong relay load capacity. In the event of an electrical fault in the field, the PLC output terminals will be protected from damage by an isolated relay, and only the damaged relay needs to be replaced. Once the relay output PLC terminal is damaged, the damaged terminal cannot be repaired. Fourth, the principle of first built-in and then expansion With the continuous upgrading of PLC, especially the continuous enhancement of minicomputer functions, PLC stand-alone machine has built-in many expansion module functions, such as analog functions, communication functions, etc. Therefore, the selection of PLC with as many built-in functions as possible not only reduces the cost, but also saves the space of the control cabinet, and can simplify the setup and programming workload. Fifth, the grasp of the redundancy of PLC selection Due to the need for early estimation, on-site construction changes and later maintenance and upgrading, PLC selection needs to consider a certain amount of redundancy. Mainly considering the number of I/O points, the smaller project is controlled in the redundancy range of 20% and the larger project is controlled at 5% to 10%. Other such as analog, communication and bus function redundancy problems, need engineering and technical personnel according to the site hardware configuration flexible grasp, if the control function is built-in PLC, you need to replace the high-level stand-alone PLC; if the control function is achieved through the expansion module, then consider the redundancy when only need to update the corresponding module.

PLC programming points (1) according to the control flow chart to allocate program segments according to the previous control flow chart to decompose the control program into different program segments, so that the overall structure of the program can be clear, convenient for later debugging programs. If the project is more complex, the program is segmented and easily assigned to several programmers to program and debug at the same time, which improves the overall programming efficiency. (2) Compiling I/O tables and memory tables Compiling I/O tables is to assign addresses and comment on each input/output point to avoid the problem of I/O point confusion during programming. Compiling a memory table is an intermediate variable that allocates the PLC memory address to the program and annotates it for easy reference when programming. (3) Simplify the programming programmer on the basis of familiarity with the PLC instruction system, proficiency in the use of advanced instruction programming, can greatly reduce the programming workload, save PLC memory space, help to better play PLC function. (4) Clear comments In order to facilitate the post-debugging program, the comments of each relevant point should be clearly marked in the program when programming, including the purpose of the special instructions used. The program is readable and lays the foundation for later project maintenance and upgrade.

PLC program debugging method The debugging work of PLC applications can be divided into two steps: analog debugging and online debugging. First, analog debugging analog debugging refers to the debugging according to the display state of the corresponding light-emitting diodes on the switching I/O unit without output equipment. After designing the control program, generally do simulation debugging first. Some PLC manufacturers provide simulation software that runs on a computer and can be used to replace PLC hardware to debug programs, such as Omron's CX-Simulator simulation software that is compatible with CX-Programmer programming software. During simulation, according to the requirements of the system function, some input component bits are forced to ON or OFF, or the data in some components is overwritten to monitor whether the function of the system can be implemented correctly. If the PLC hardware is connected to debug the program, the small switches and buttons connected to the input terminals can be used to simulate the actual input signals of the PLC, such as issuing operating instructions with them, or they can be used to simulate the actual feedback signals, such as the on and off of the stroke switch contacts. Through the light-emitting diode corresponding to each output point on the switching output unit, observe whether the output signal meets the design requirements. The main task of the debugging sequence control program is to check whether the operation of the program conforms to the provisions of the sequential chart, that is, whether the correct change in the state of the active step occurs when a certain transition is implemented, whether all the previous steps of the transition become inactive steps, whether all subsequent steps become active steps, and whether the load driven by each step changes accordingly. In the debugging, we should fully consider various possible situations, and check the various different working modes of the system, each branch in the control chart, and various possible progress routes one by one, and cannot be omitted. Modify the program as soon as problems are found until the relationship between the input signal and the output signal is fully compliant in various possible situations. If the setpoints of some timers or counters in the program are too large, in order to shorten the debugging time, you can reduce them during debugging and write their actual setpoints after the end of the simulation debugging. In short, simulation debugging is a very important part of the entire programming work, which can initially check the actual effect of the program. Analog debugging and programming are inseparable, and many functions of the program are constantly modified and gradually improved in debugging. Simulation commissioning can be carried out either in the laboratory or in the field. If the simulation and debugging is carried out in the field, the PLC system should be isolated from the field signal and the external power supply of the I/O unit should be cut off to avoid unnecessary losses. Second, online debugging online debugging refers to the process of installing the PLC into the control cabinet, connecting the input components and output loads, and running the control program for overall debugging. While simulating and debugging the program, the control cabinet can be designed and produced, and the installation and wiring of other hardware other than PLC can also be carried out at the same time. After completing the wiring inside the control cabinet, the wiring should be tested. The switching input signal outside the PLC can be simulated on the terminal blocks of the control cabinet, or the buttons and command switches on the control cabinet panel can be operated to observe whether the state changes of the corresponding PLC input points are correct. Use a programmer or programming software to force the output point of the PLC to set or reset, and observe whether the load corresponding to the PLC (such as external relays, contactors, etc.) is normal, or whether the state change of the output signal on the terminal block of the corresponding control cabinet is correct. For systems with analog inputs, the transmitter can be provided with a standard input signal, by adjusting the potentiometer on the unit or parameters in the program, so that the relationship between the analog input signal and the converted digital quantities to meet the requirements. After installing the control cabinet on site and completing the wiring test in the cabinet, the external input components and actuators are connected to the PLC, the PLC is placed in the running mode, the control program is run, and the control system is checked to check whether the control system can meet the requirements. During the debugging process, the possible hardware problems of the PLC system and the problems in the ladder design will be exposed, and the problems will be solved on the spot after the problems are found until the requirements are fully met. After all commissioning is completed, a period of trial operation is also required to verify the reliability of the system.