FPC Machine 当前位置: Home >>News>>FPC Reinforcement Machine News
The design steps and application examples of PLC control system
1. Determine the control object and control scope
 
The first step of control system design is to determine the control object and control range. Because of this, we can know the functions that the PLC control system should have, and then choose a suitable PLC model.
 
 
First of all, it is necessary to analyze the controlled object, control process and requirements in detail, to be familiar with the process flow and to list all the functions and index requirements, then compare with the relay control system and the industrial control system to make a selection. If the requirements for reliability and safety are relatively high, and the environment of the controlled object is relatively poor, especially if the system process is complex and changeable, and the input/output is mostly switched, it is more suitable to use PLC for control. Conventional relay control systems are often difficult to perform. After the control object is determined, the control range of the PLC should be further determined. For the kind of mechanical repetitive operation, or error-prone operation, and the more precise operation, it should be controlled by PLC. And for those emergency situations, and operations that require more intelligent judgment, you can leave an interface for manual operation.
 
I.C.T is a manufacturer of SMT machines. It mainly provides customers with SMT production lines including SMT Stencil Printers,  Pick and place machines, Reflow Oven, AOI Machine, Wave Soldering Machine and PCB Handling Machine etc. I.C.T has more than 25 researches on SMT and DIP technology,  for the world Customers provide SMT total solutions. There are successful cases of SMT technICal team in Asia, Europe, AmerICa, AfrICa, and Australia.
More details, please contact us:
Tel: +86 13670124230 (WhatsApp/Skype/WeChat)
 
Second, the choice of PLC model
 
The basic principle of PLC model selection: On the premise of satisfying functions, strive for the best cost performance and have a certain degree of upgradeability. First, select the function according to the actual control requirements: stand-alone control or network communication; general switch control, or add special units; whether remote control is required; what are the requirements for the response speed of the controller on site; the control system is separated from the site Still together, wait. Then, select the appropriate number of I/O points and channels according to the number of control objects; select the I/O module according to the I/O signal, and select the appropriate program storage capacity. The following aspects can be considered when selecting the PLC model.
 
1. The choice of function
 
For equipment that is mainly on-off and with a small amount of analog control, a general small PLC can meet the requirements. For the analog control system, there are many closed-loop control systems, depending on the size and complexity of the control scale, select mid-range or high-end machines. For control systems that require networked communication, attention should be paid to the unity of models so that their modules can be interchanged, which facilitates the purchase and management of spare parts. The unification of functions and programming methods is conducive to product development and upgrading, and is conducive to the improvement and accumulation of technical levels. For systems with special control requirements, PLCs with the same or similar functions can be selected. It is not necessary to add special function modules if PLCs with special functions are selected. After equipped with a host computer, each independent PLC can be conveniently controlled to form a multi-level distributed control system for mutual communication and centralized management.
 
2. Selection of basic unit
 
The choice of basic unit includes response speed, structure and expansion capability.
 
For systems that are based on switch control, the response speed of general PLC is sufficient to meet the needs of control. But for the analog control system, the response speed of the PLC must be considered. In small PLCs, the integral type is cheaper and smaller than the modular type, but the hardware configuration is not as flexible as the modular type. In terms of the time required for troubleshooting, the modular type is relatively short. More attention should be paid to the number and types of expandable units and the number of channels occupied by expansion and expansion ports.
 
3. Programming method
 
PLC programming includes online programming and offline programming.
 
PLC online programming: There are two independent CPUs, respectively on the host and the programmer. The host CPU mainly completes the task of controlling the scene, and the programmer CPU mainly processes keyboard programming commands. At the end of the scan cycle, the two CPUs will communicate with each other, and the CPU in the programmer will transmit the modified program to the host, and the host will control in accordance with the new program in the next scan cycle to complete the online programming operation. PLC that can be programmed online has a higher price due to the addition of software and hardware, but it has a wide range of applications.
 
PLC offline programming: the host and the programmer share a CPU. At the same time, the CPU is either in the programming state or in the running state, which can be selected through the "run/program" switch on the programmer. This method reduces the software and hardware costs, so the price is relatively cheap, and the medium and small PLCs mostly use offline programming.
 
Three, memory capacity estimation
 
The capacity of the memory will be affected by the memory utilization, the number of switch I/O points, the number of analog I/O points and the level of user programming.
 
1. Memory utilization
 
Memory utilization is the ratio of the number of contacts in a program segment to the number of memory words required to store the machine code represented by the program segment. For the same program, high utilization can reduce the amount of memory used, it can also shorten the scanning time and improve the response speed of the system.
 
2. Number of switch input and output points
 
The total number of PLC input and output points has a greater impact on the size of the required memory capacity. In a general system, the ratio of digital input and output is 6:4. According to the empirical formula, the number of words in the required memory can be calculated: the number of words in the required memory = the total number of points of the switch (input + output) × 10
 
3. Number of analog input and output points
 
The processing of the analog quantity uses the functional instructions of digital transmission and calculation, and the memory utilization rate is low, and more memory is required. Analog input generally requires reading, digital filtering, transmission and comparison. Analog output may also require more complicated calculations and closed-loop control. Programming the above steps into subroutines for calling can greatly reduce the memory capacity required. . The following is an empirical formula for the analog quantity around 10 points.
 
When there is only analog input: the number of memory words = the number of analog points × 100
 
When analog input/output coexist: the number of memory words = the number of analog points × 200
 
When the number of points is less than 10, the memory should be increased appropriately, otherwise it can be reduced appropriately.
 
4. Program quality
 
High-quality programs tend to be short and lean, and take up less memory. For beginners, you can leave a little more margin when considering the memory capacity.
 
Fourth, the choice of I/O modules
 
1. Estimation of the number of I/O points of the PLC control system
 
The following table is a table of I/O points required for typical transmission equipment and electrical components.
 
picture
 
1) The number of I/O points required to control the solenoid valve
 
PLC control a single-coil solenoid valve requires 2 input points and 1 output point; control a double-coil solenoid valve requires 3 input points and 2 output points; control a proportional solenoid valve requires 3 input points and 5 Output point. In addition, one input point is required to control a switch, one output point is required for a signal light, and several input points are required for a band switch with several bands. In general, two input points are required for various position switches.
 
2) The number of I/O points required to control AC motors
 
When PLC controls an AC motor, it takes the master signal and feedback signal as the input signal of the PLC. For example, using PLC to control a reversible cage motor requires 5 input points and 2 output points. To control an AC motor started by Y-△, 4 input points and 3 output points are required.
 
3) The number of I/O points required to control the DC motor
 
The main form of DC speed regulation is the thyristor DC motor speed regulation system, which mainly uses the thyristor rectifier device to supply power to the DC motor. Generally speaking, using PLC to control a reversible DC drive system requires about 12 input points and 8 output points, and an irreversible DC drive system requires 9 input points and 6 output points.
 
After estimating the number of I/O points of the controlled object, there should be 20% to 30% of the I/O spare capacity, and then the corresponding PLC can be selected. For stand-alone automation or mechatronics products, you can choose a small PLC; for a large-scale control system and a large number of input/output points, you can choose a large and medium-sized PLC.
 
2. Selection of input and output modules
 
The function of the input module is mainly to detect the input signal from the field device and convert it into a level signal that can be processed inside the PLC. There are two types of input modules: DC and AC. DC is divided into 5V, 12V, 24V, 60V and 68V; AC is divided into 115V and 220V. For the relatively short transmission distance, low level can be selected, such as 5V, 12V and 24V; for the relatively long transmission distance, from the perspective of reliability, it is advisable to use a high-voltage module. In terms of the number of connected loads, the number of points connected at the same time shall not exceed 60%. In addition, in order to improve the stability of the system, the threshold level (the difference between the on level and the off level) must also be considered. The larger the threshold level, the better the long-distance transmission, and the stronger its anti-interference ability.
 
The function of the output module is to convert the internal output level into a control signal that can match the external load device.
 
Note: The cumulative current value of the output module connected points at the same time must be less than the current value allowed by the common terminal. The output current of the output module must be greater than the rated value of the load current.
 
Five, PLC hardware design
 
The hardware design must complete the design of the system flow chart, specify the relationship between each input information flow, specifically arrange the configuration of the input and output, and assign the address of the input and output.
 
When assigning addresses to inputs, all buttons and limit switches can be centrally configured, and input points of the same type should be grouped as much as possible. For each type of device number, define the address of the input point in sequence. If there are redundant input points, the input points of each input module can be assigned to one device. Insert those high-noise input modules as far as possible into the slots away from the CPU module to avoid cross-interference. Therefore, the addresses of such input points are relatively large.
 
When performing output configuration and address assignment, try to group the output points of the same type of equipment together. According to different types of equipment, sequentially define the output point addresses. If there are redundant output points, the output points of each output module can be assigned to one device. In addition, for output devices that are related to each other, such as forward and reverse rotation of a motor, their output addresses should be assigned continuously.
 
When carrying out the above work, the software design and system debugging must also be considered. Reasonable arrangement of configuration and address allocation will bring a lot of convenience to future software and hardware design, and system debugging.
 
Six, PLC software design
 
The software design mainly completes the definition of the parameter table, the drawing of the block diagram, the preparation of the program and the preparation of the program specification.
 
The parameter table prepares the program for writing, and the standardized definition of each interface parameter of the system is not only conducive to the writing of the program, but also to the debugging of the program. The definition of parameter table includes the definition of input signal table, output signal table, intermediate mark table and storage table. The definition and format of the parameter table vary from person to person, but the general principle is ease of use.
 
The block diagram describes the direction of the system control flow and the description of the system functions. It should be the structural form of each functional unit in the entire application program. Based on this, you can understand the position of all control functions in the entire program. A detailed and reasonable block diagram is conducive to program writing and debugging.
 
The main process of software design is to write user program, which is the specific realization process of control function. The program specification is an annotative comprehensive description of the content of the entire program, which should include the basis for program design, the basic structure of the program, detailed analysis of each functional unit, the principle of the formula used, the source of each parameter, and the test situation of the program, etc.
 
When designing the system, both hardware and software can be designed at the same time. This is conducive to promptly discovering some problems in cooperation with each other, improving related designs early, sharing resources better, and improving efficiency.
 
Seven, final assembly overall adjustment
 
Before the design of software and hardware is finalized, it must be debugged many times to find and correct errors and deficiencies. For the PLC control system, you can first simulate debugging, generate analog signals with circuits composed of hardware equipment, such as input devices, and connect these signals to the input terminals of the PLC system in a hard-wired manner to simulate the state of the field input signals; Use the output indicator to simulate the controlled object; use FXGP or GPPW software to transfer the designed control program to the PLC for program monitoring and simulation debugging. In the process of simulation debugging, the method of segmented debugging can be adopted and gradually expanded until the entire program is debugged.
 
After the simulation debugging is passed, the actual overall assembly adjustment will be carried out. First, carefully check whether the wiring of the PLC peripheral equipment is correct, and whether the working voltage on the equipment pins is normal. Before transferring the user program to the PLC, you can use some short test programs to detect the external wiring status to see if there is a wiring fault. When performing this kind of pre-adjustment, the main circuit should be disconnected first to avoid misoperation or circuit failure to damage the main circuit components. After everything is confirmed to be correct, the program is sent to the memory for general debugging until the functions of each part are normal, harmonized, and become a correct overall control. If you find a problem, you need to make adjustments to the hardware and software design. After all debugging is over, the program can be stored for a long time in EPROM or E2 PROM with memory function.
 
8. Application examples-PLC control system for robots to transfer workpieces
 
1. Control requirements
 
The following figure shows the schematic diagram of the action of the robot to transfer the workpiece.
 
picture
 
Before the system runs, the manipulator is in the original position, that is, the right limit SQ3 and the lower limit SQ5 are under pressure. Press the start button, conveyor B starts to run, and the manipulator starts to rise from the lower right limit; when the manipulator rises to the upper limit, SQ4 moves, the rising action ends, and the manipulator starts left-hand rotation; the manipulator rotates to the left limit, SQ2 moves, and the left-hand movement ends , At the same time the manipulator begins to descend; the manipulator descends to the lower limit, SQ5 moves, the descending action ends, and conveyor A starts at the same time; conveyor A transfers the workpiece to the photoelectric switch detection area, SQ6 acts, conveyor A stops running, and the robot starts grabbing objects action. The manipulator grabs the workpiece, SQ1 moves, and the grasping action is completed, and the manipulator starts to rise again; when the manipulator rises to the upper limit position, SQ4 moves, the raising movement ends, and the manipulator starts to rotate to the right; when the manipulator rotates to the right limit position, SQ3 moves, right At the end of the spinning action, the manipulator begins to descend; the manipulator descends to the lower limit, SQ5 moves, the descending action ends, and the manipulator starts to place the object. After a delay, the object placement is completed.
 
The above is a complete work flow for the robot to transfer the workpiece. The conveyor B in the system works with the operating state of the robot, that is, press the start button to start operation, and press the stop button to end the operation.
 
2. Analyze control requirements, perform PLC selection and I/O distribution
 
The input terminals of the PLC have 9 input terminals such as the single cycle start button, the cycle start/stop button, the robot clamping SQ1, the left limit SQ2, the right limit SQ3, the rising limit SQ4, the falling limit SQ5, and the photoelectric switch SQ6. , Conveyor belt A and B are running, the arm rises, falls, swings left and right, and the gripper grips the workpiece with 7 PLC output terminals.
 
According to the design requirements, the system needs 9 input points, 7 output points, and 16 I/O interfaces. To ensure a 20% margin, the I/O points should be no less than 32.
 
According to the control requirements and I/O points, the system is analyzed and the FX2N PLC control system is selected. The I/O distribution table is shown in the following table.
picture
 
3. Draw a sequential function diagram
 
The sequence function diagram of the robot transfer workpiece control system is shown in the figure below.
 
 
4. Design ladder diagram program
 
According to the "start-safe-stop" setting
文章From:http://www.smt44.com/te_news_bulletin/2021-09-10/19570.chtml