Abstract: This paper mainly describes the application of Yonghong PLC in a mobile phone case inspection machine. Designed by Dongguan Komus Automation, this equipment uses a Yonghong FBs series PLC as the control system and a Panasonic A6 servo system and pneumatic system as the machine's execution system. The mobile phone case inspection machine is an automated inspection device that completes processes such as feeding, wire blowing, inspection, and sorting. It is mainly used for inspecting the size, shape, and hole positions of mobile phone cases and is an important inspection device in the electronics industry. The entire machine consists of a PLC, touch screen, rotary encoder, and servo drive system. This maximizes the control accuracy of the entire machine, improves the adjustment range, reliability, and intelligence, simplifies the mechanical transmission system, and significantly reduces mechanical noise and failure rate, while making the control and operation of the entire machine more user-friendly. It is simple to operate, saves manpower, and increases production capacity.
1. Industry Introduction
As electronic products trend towards thinner and lighter designs, phone cases need to be both lightweight and functional, providing protection, heat dissipation, and aesthetics. This necessitates increasingly higher precision in their manufacturing. Since electronic product production is generally mass-produced, verifying the dimensions of mass-produced phone cases often requires inspection of their length and width. Currently, this inspection typically involves manual checks using tools like calipers or projectors. Manual inspection is slow, inefficient, and inaccurate. While projectors can be used, they cannot achieve full inspection of large batches and are inefficient. Furthermore, inspecting different models and sizes of phone cases requires changing or adding different imaging equipment, limiting the equipment's adaptability. Therefore, there is a strong need for a fully automated phone case size inspection device that is simple in structure, highly efficient, highly accurate, and adaptable to overcome these problems.
In many sectors, customers require mobile phone case testing machines and related equipment. Currently, most mobile phone case testing machine suppliers do not produce the necessary supporting products. While the future of this solution is uncertain, those manufacturers that clearly possess the capability to produce and design mobile phone case testing machines and related equipment—or those who strategically position themselves in this direction—will undoubtedly become the future leaders in the mobile phone case testing machine market.
Modular solutions, where everything in the mobile phone case testing machine provided by the company is variable and selectable, are quite attractive to customers. Of course, this is contingent on good cost-effectiveness and technical support. Market experience shows that manufacturers with this solution capability exhibit a significant competitive edge in the market. This mutually beneficial relationship not only boosts machine sales but, more importantly, fosters mutual growth.
Today, the latest mobile phone case inspection machines are often fully automated devices integrating mechanics, electricity, and pneumatics. They fully utilize the latest technological advancements, employing advanced technologies such as pneumatic actuators and servo motor drives, significantly shortening the overall mechanical transmission chain, greatly simplifying the mechanical structure, and greatly improving working speed and precision. If the design of automatic mobile phone case inspection machines in my country was previously a stage of complete imitation, then now we should possess an innovative design mindset and design advanced and easy-to-use twisting machines.
The mobile phone case inspection machine system developed in this paper (as shown in Figure 1) can completely replace traditional manual operation. It adopts automation technology, produces products with good consistency, stable and reliable quality, and high production efficiency.
Figure 1-1 Mobile phone case testing machine
2 System Design Scheme
2.1 Background of the Solution
Yung-Hong's FBs series high-function PLCs are available in models ranging from 10 to 60 points. The main unit's input/output can be expanded to a maximum of 512 points, including 32 analog input/output channels, 4 high-speed pulse output channels at 920kHz, and can be expanded with 5 communication ports, using Yung-Hong's high-speed communication protocol at a speed of 921.6Kbps. The PLC's program execution speed is 0.33µs, with a program capacity of up to 20KWords, 36 sequential instructions, and 326 application instructions (126 types). In particular, Yung-Hong's unique PACK feature facilitates batch downloading, copying, and program expansion.
The characteristics of a mobile phone case testing machine are complex and frequent operations with numerous actuators. Using relay control logic in such applications would require many intermediate relays and high-speed pulse outputs, such as those for servo control, which relays cannot replace. However, if these intermediate relays are controlled by a PLC, their internal auxiliary relays can be programmed to replace them. Furthermore, PLCs are flexible and can incorporate various modules; for example, high-speed pulse output can effectively solve the servo positioning control problem of this equipment. From a physical perspective, relay systems require specific electrical components, while PLCs only use internal registers. As long as it's within the PLC's programming capacity, complex control logic can be implemented without incurring additional costs. PLCs have hundreds or even more internal auxiliary relays and various dedicated internal circuits, sufficient to handle complex control requirements. The only work required is programming the PLC using specialized software. Moreover, modern mobile phone case testing machines require high-speed counting and pulse output functions, which relay control systems cannot achieve. In fact, PLCs best demonstrate their economic advantages in this application. Considering factors such as economy, effectiveness, and positioning accuracy, the customer chose Yonghong PLC as the control system.
Based on a comprehensive cost-performance analysis, the Yonghong PLC control system offers a higher cost-performance ratio compared to other PLC control systems used in mobile phone case inspection machines. This article primarily focuses on the application of Yonghong PLC in mobile phone case inspection machines, providing a detailed explanation of the hardware design, software design, and implementation results (application effects) of this solution. The mobile phone case inspection machine control system solution is shown in Table 2-1.
Table 2-1 Mobile Phone Case Inspection Machine Control System Solution
2.2 Customer Needs
According to customer requirements, the overall operation of the mobile phone case inspection machine mainly consists of five parts: a feeding mechanism for conveying and feeding products; a No. 1 gripping mechanism sequentially gripping products and placing them in the first five inspection positions; a No. 2 gripping mechanism and a rotating mechanism together rotating the products to the sixth inspection position; a flipping mechanism flipping the products to the seventh inspection position; and finally, a sorting OK/NG conveyor belt transporting OK/NG products to different material positions. These five parts of the operation are repeated multiple times, and the overall operation needs to be stable. Specific process and functional requirements for the mobile phone case inspection machine are shown in Table 2-2.
Table 2-2 Specific Process and Functional Requirements for Mobile Phone Case Inspection Machine
2.3 Solution
According to the control and process requirements, the control scheme of the mobile phone case inspection machine mainly includes system hardware design and system software design. The system hardware design includes four parts: hardware (product) configuration, mechanical structure, pneumatic control and electrical control. The system software design includes three parts: process control, I/O configuration and program design. The design parameters of the mobile phone case inspection machine are shown in Table 2-3. The physical picture of the mobile phone case inspection machine is shown in Figure 2-1.
Design parameters and physical renderings
Control System Yonghong PLC
User interface Yung-Hong HMI
Panasonic A6400W servo drive
Pneumatically driven SMC solenoid valve
Pressure range: 7 kPa
Operating power supply: 220VAC 50Hz
Table 2-3 Design parameters of the mobile phone case testing machine Figure 2-1 Actual effect diagram of the mobile phone case testing machine
Based on the above technical specifications, the system architecture of the mobile phone case inspection machine is shown in Figure 2-2. The control system of this solution uses two Yonghong FBs series economical PLC controllers, mainly controlling the overall operation of the mobile phone case inspection machine. The servo system uses Panasonic A6400W servo drivers and Panasonic A6400W servo motors to control the positioning and homing actions of the feeding, blowing, inspection, and sorting mechanisms. The pneumatic system uses SMC solenoid valves to control the unloading rotation and the movement of the unloading clamp cylinder. The monitoring system uses the Yonghong C3 series HMI operating interface for user operations such as function selection, manual debugging, parameter setting, and automatic debugging.
3 System Hardware Design
The mechanical structure of the mobile phone case inspection machine mainly consists of six parts: feeding mechanism, No. 1 gripping mechanism, No. 2 gripping mechanism, rotating mechanism, flipping mechanism and OK/NG conveying mechanism.
The feeding mechanism primarily transports products to the gripping position of gripping mechanism 1. Gripping mechanism 1 then grips the products from the feeding position to the first five camera inspection positions. Gripping mechanism 1 has four gripping suction cups that can grip four products at a time. Gripping mechanism 2 transfers products from gripping mechanism 1 to the rotating mechanism, and simultaneously transfers products from the rotating mechanism to the flipping mechanism. The rotating mechanism rotates the products to camera inspection position 6 for inspection. The flipping mechanism flips the products to camera inspection position 7 for inspection. The OK/NG conveyor mechanism sorts the inspected products. The system hardware architecture diagram of the mobile phone case inspection machine is shown in Figure 3-1.
Figure 3-1 Hardware Design Architecture Diagram of Mobile Phone Case Inspection Machine System
3.1 Hardware Configuration
The system hardware of the mobile phone case testing machine consists of an FBs-60MAT2-ACFBs-40MCT2-ACFBs-24XYTPLC controller, a Yung-Hong C3102SEHMI touchscreen, Panasonic servo drives and motors, a Leadshine closed-loop stepper driver and its motor, and peripheral input/output circuitry (including buttons, proximity sensors, and photoelectric sensors). The system hardware list for the mobile phone case testing machine is shown in Table 3-1; the system hardware configuration is shown in Figure 3-2.
3-1 Hardware List for Mobile Phone Case Testing Machine
Hardware configuration diagram
Figure 3-2 Hardware configuration diagram of mobile phone case testing machine
3.2 Mechanical Structure
The mechanical structure of the mobile phone case inspection machine mainly consists of six parts: feeding mechanism, No. 1 gripping mechanism, No. 2 gripping mechanism, rotating mechanism, flipping mechanism and OK/NG conveying mechanism.
The feeding mechanism primarily transports products to the gripping position of gripping mechanism 1. Gripping mechanism 1 then grips the products from the feeding position to the first five camera inspection positions. Gripping mechanism 1 has four gripping suction cups that can grip four products at a time. Gripping mechanism 2 primarily grips the products from the transfer position of gripping mechanism 1 to the rotating mechanism, and simultaneously grips the products from the rotating mechanism to the flipping mechanism. The rotating mechanism rotates the products to camera inspection position 6 for inspection. The flipping mechanism flips the products to camera inspection position 7 for inspection. The OK/NG conveying mechanism mainly sorts the inspected products. The overall structure of the mobile phone case inspection machine is shown in Figure 3-3, the feeding structure in Figure 3-4, the gripping structure in Figure 1 in Figure 3-5, the gripping structure in Figure 2 in Figure 3-6, the rotating structure in Figure 3-7, and the flipping structure in Figure 3-8.
Figure 3-3 Analytical diagram of the overall structure of the mobile phone case testing machine
Figure 3-4 Analytical diagram of the feeding mechanism of the mobile phone case inspection machine
Figure 3-5 Analytical diagram of the No. 1 gripping structure of the mobile phone case inspection machine
Figure 3-6 Analytical diagram of the No. 2 gripping structure of the mobile phone case inspection machine
Figure 3-7 Analytical diagram of the rotating structure of the mobile phone case inspection machine
Figure 3-8 Analytical diagram of the flipping structure of the mobile phone case inspection machine
3.3 Electrical Control
The electrical control of the mobile phone case testing machine is mainly divided into two parts: the main circuit and the control circuit. The main circuit uses AC220V power supply and mainly powers the AC motor. AC220V mainly powers the PLC control unit, switching power supply, and cooling fan, and displays the power supply through power indicator lights. The control circuit uses DC24V power supply and mainly powers the HMI operating interface, solenoid valves, sensors, and indicator lights. The control circuit also uses solid-state relays and ordinary relays for intermediate control switching. The schematic diagram of the PLC control main station circuit of the mobile phone case testing machine is shown in Figure 3-9.
Figure 3-9 Schematic diagram of PLC control circuit for mobile phone case inspection machine
The electrical control cabinet configuration of a mobile phone case testing machine mainly includes the electrical wiring for the control unit (PLC), execution unit (stepper drive, ordinary relay, etc.), power supply unit (switching power supply, circuit breaker, AC contactor, power socket, etc.), and connection unit (terminal block). The actual wiring of the electrical control cabinet of the mobile phone case testing machine is shown in Figure 3-11.
Figure 3-11 Actual wiring diagram of the electrical control cabinet of the mobile phone case testing machine
4 System Software Design
The system software design of the mobile phone case testing machine mainly includes three parts: process control, I/O point configuration, and program design. The process control mainly describes the process flow and control flow, the I/O point configuration mainly describes the PLC input/output point configuration and servo wiring pin configuration, and the program design mainly describes the PLC program and HMI program. The system software design architecture diagram of the mobile phone case testing machine is shown in Figure 4-1.
Figure 4-1 Software Design Architecture Diagram of Mobile Phone Case Inspection Machine System
4.1 Process Control
4.1.1 Process Flow
The process flow of the mobile phone case inspection machine mainly includes three parts: a feeding mechanism, a No. 1 gripping mechanism, a No. 2 gripping mechanism, a rotating mechanism, and a flipping mechanism for feeding the products, placing them at eight camera positions; the CCD cameras take pictures and send the data to the PLC, which processes the data; OK and NG products are detected and transported to the OK and NG positions respectively. The process flow is executed sequentially, thus achieving excellent process results. The process flow of the mobile phone case inspection machine is shown in Figure 4-2.
Figure 4-2 Process flow diagram of mobile phone case testing machine
4.1.2 Control Flow
The mechanical structure of the mobile phone case inspection machine mainly consists of six parts: a feeding mechanism, a No. 1 gripping mechanism, a No. 2 gripping mechanism, a rotating mechanism, a flipping mechanism, and an OK/NG conveying mechanism. The feeding mechanism primarily transports products to the gripping position of the No. 1 gripping mechanism; the No. 1 gripping mechanism mainly picks up products from the feeding position to the first five camera inspection positions; the No. 1 gripping mechanism has four gripping suction cups and can pick up four products at a time; the No. 2 gripping mechanism mainly picks up products from the No. 1 gripping position to the rotating mechanism, and simultaneously picks up products from the rotating mechanism to the flipping mechanism; the rotating mechanism mainly rotates the products to the No. 6 camera inspection position for inspection; the flipping mechanism mainly flips the products to the No. 7 camera inspection position for inspection; the OK/NG conveying mechanism mainly sorts the inspected products. The control flow of the mobile phone case inspection machine is shown in Figure 4-3.
Figure 4-3 Control Flowchart of Mobile Phone Case Inspection Machine
4.2 I/O Point Configuration
4.2.1 PLCI/O point configuration
Based on the specific requirements of the process flow and control flow of the mobile phone case inspection machine, the I/O points of the Yonghong PLC program were configured. The I/O point configuration of the Yonghong PLC is shown in Table 4-1.
Table 4-2 PLCI/O Point Configuration Table
4.3 Programming
4.3.1 PLC Programming
4.3.1.1 High-speed communication control program temperature
When designing the high-speed communication control program for the mobile phone case testing machine, the Yung-Hong CLINK convenient communication command MOD3 is used. The program can be designed using the Yung-Hong [FUN151CLINK (Communication Connection Convenience Command)] command. The communication control program for the mobile phone case testing machine is shown in Figure 4-3.
Figure 4-3 High-speed communication control program diagram of mobile phone case testing machine
Figure 4-4 High-speed communication setup program diagram for mobile phone case testing machine
Figure 4-5 Explanation of High-Speed Communication Commands for Mobile Phone Case Testing Machine
4.3.1.2 Application of Yonghong High-Speed Pulse Output Command
The high-speed pulse output instruction [FUN140HSPSO] of the Yonghong PLC is used to control the positioning of the feeding stepper and the discharging servo. The PLS/DIR mode is used when setting the high-speed pulse output of the PLC, and the minimum setting unit is set through instruction 141 to improve the display accuracy of the length. The pulse output instruction control of the mobile phone case inspection machine is shown in Figure 4-6, the pulse output setting method of the mobile phone case inspection machine is shown in Figure 4-7, and the explanation of the high-speed pulse output instruction of the mobile phone case inspection machine is shown in Figure 4-7.
Figure 4-6 Pulse Output Command Control Diagram of Mobile Phone Case Testing Machine
Figure 4-7 Pulse output setting diagram for mobile phone case testing machine
Figure 4-8 Explanation of High-Speed Pulse Output Command of Mobile Phone Case Testing Machine
4.3.1.3 Parameter Setting Program
When designing and planning the PLC program for the mobile phone case testing machine, the parameter setting program uses the Yonghong PLC [FUN141 (servo parameter setting)] instruction to set the relevant parameters of the stepper and servo motors. A single parameter setting instruction can complete the editing of the parameter setting program, which greatly facilitates the program editor and debugger. The PLC parameter setting program for the mobile phone case testing machine is shown in Figure 4-9, and the servo parameter table for the mobile phone case testing machine is shown in Figure 4-10.
Figure 4-9 Servo parameter setting program diagram for mobile phone case testing machine
Figure 4-10 Servo parameter table for mobile phone case testing machine
4.3.1.4 Origin Reset Control Program
Using the mechanical origin reset instruction of the Yonghong PLC, the mechanical origin reset procedure can be easily implemented in tabular form, with high accuracy. Yonghong offers three mechanical origin reset modes: MOD0, MOD1, and MOD2 for customer selection. This program uses MOD0 mode. The reset action in MOD0 mode is shown in Figure 4-11. The origin reset control program for the mobile phone case testing machine is shown in Figure 4-12, and the PLC origin reset control program for the mobile phone case testing machine is shown in Figure 4-13.
Figure 4-11 Diagram of MOD0 mode for mechanical origin return of mobile phone case testing machine
Figure 4-12 PLC origin reset control program diagram for mobile phone case inspection machine
Figure 4-13 PLC origin reset control program diagram for mobile phone case inspection machine
4.3.1.5 Program Block Division Control Program
When designing and planning the overall PLC program for a mobile phone case testing machine, different control programs and calculation programs can be divided into several program blocks, which can then be selected and called in the main program area. These program blocks can be divided in the subroutine area using the Yonghong [FUN65 (mark)] instruction, and the selection and calling function in the main program area can be implemented using the [FUN67 (call)] instruction. The program block division control program for the mobile phone case testing machine is shown in Figure 4-14.
Figure 4-14 Program block division control program diagram of mobile phone case inspection machine
4.3.2 HMI Screen Design
4.3.2.1 Main Page
The main page of the mobile phone case inspection machine is primarily used for displaying currently rejected (NG) products, setting up the device (start, stop, return to origin), and some screen switching functions. The main page of the mobile phone case inspection machine is shown in Figure 4-15.
Figure 4-15 HMI main page of the mobile phone case testing machine
4.3.2.2 Parameter Screen
The parameter screen of the mobile phone case inspection machine is mainly used for setting parameters such as the return speed of robot A, the waiting position of robot A, and the vacuum suction data of robot A. The parameter screen of the mobile phone case inspection machine is shown in Figure 4-15.
Figure 4-16 HMI parameter screen of mobile phone case testing machine
4.3.2.3 Manually Adjusting the Screen
The manual adjustment screen of the mobile phone case inspection machine is mainly used for the manual adjustment functions of robotic arm A, robotic arm B, OK conveyor belt, vacuum suction, etc. Figure 4-17 shows the manual adjustment screen of the mobile phone case inspection machine.
Figure 4-17 Manual debugging screen of HMI for mobile phone case testing machine
4.3.2.4 Camera Selection Screen
The camera selection screen of the phone case testing machine is mainly used to enable and disable functions such as turning cameras 1 to 8 on and off. The camera selection screen of the phone case testing machine is shown in Figure 4-18.
Figure 4-18 HMI camera selection screen for mobile phone case testing machine
4.3.2.5 Alarm Screen
The alarm screen on the mobile phone case testing machine is mainly used for displaying and clearing alarm information. The alarm screen of the mobile phone case testing machine is shown in Figure 4-19.
Figure 4-19 HMI alarm screen of mobile phone case testing machine
Conclusion (Implementation Results)
The on-site debugging of the mobile phone case inspection machine significantly improved product inspection accuracy, reduced power consumption, improved product quality, and increased production capacity. After extensive testing, it met customer requirements. Furthermore, the mobile phone case inspection machine operates smoothly and with high production efficiency. This allows customers to improve production efficiency, reduce labor intensity, save labor costs, improve the production environment, and ultimately lower production costs. This control solution effectively demonstrates the powerful expansion and instruction capabilities of Yonghong PLCs.