1. Industry Introduction
The finished product manufactured in this project is called an equal-diameter elbow in industry terms. Its function is to change the pipe diameter when making a 90-degree turn. It serves the same purpose as a reducer, but reducers cannot be used for turning. The price is approximately half that of a symmetrical elbow. Materials include carbon steel, stainless steel, alloy steel, PVC, and cast steel. The most common standards are the national standards GB/T12459-2005 and GB/T13401-2005. The main production area is Mengcun County, Cangzhou City, Hebei Province. This project is for equipment development specifically for elbows produced by Jianzhi Group. Most of Jianzhi Group's existing equipment uses manual tapping, which is inefficient and has a high error rate. Recognizing this problem, the company began to automate its equipment.
Figure 1 Tapping machine
2 System Design Scheme
2.1 Background of the Solution
Most of the elbow tapping equipment produced by Jianzhi Group is done manually. Manual tapping is inefficient and has a high error rate. Recognizing this problem, the company began searching for an automated solution to replace manual tapping. After learning about Yonghong PLCs, they adopted them for system control. Yonghong's economical PLCs offer better value for money compared to other brands, effectively meeting the customer's needs. Yonghong PLCs show great promise in tapping machine applications; the customer has adopted a Yonghong PLC + Yonghong C3 touchscreen combination.
Table 1 Tapping Machine System Scheme
2.2 Customer Needs
Based on processing requirements and mechanical design, the equipment supplier put forward the following requirements:
1. Manual and automatic modes work independently. In automatic mode, photoelectric detection detects the presence of a starting part and continuously cycles through processing. In manual mode, the customer can control each actuator individually for easy debugging and maintenance.
2. When there is no material at the machining position, the spindle will not descend.
3. When stopping a workpiece that is being processed, wait until the workpiece is finished before stopping.
4. In case of emergency stop, all components remain in their current positions.
5. User-adjustable delays are added between each action.
6. Daily output: 50,000 pieces.
2.3 Solution
The tapping machine system in this project is mainly used for tapping and bending heating pipes. According to the process requirements, the system mainly includes system hardware design and system software design; the system hardware design includes three parts: hardware (product) configuration, mechanical structure, and electrical control; the system software design includes three parts: process control, I/O configuration, and program design.
Table 2 Tapping Machine Parameters
Based on the above technical specifications, the tapping machine architecture is shown in Figure 2. The control system of this solution uses the Yonghong economical FBS series PLC controller, which mainly performs logic operations and controls the cylinders and vibrators. Actuators include the spindle motor, cylinders, and vibrators. The host computer uses the Yonghong C3 series HMI operating interface, which provides basic operation display, parameter settings, alarms, and IO monitoring. Users can perform various operations and parameter settings according to the process flow or manually.
Figure 2. Tapping machine solution architecture diagram
3. System Hardware Design
3.1 Hardware Configuration
The hardware system of the tapping machine consists of a Yung-Hong FBS-40MAR2-AC PLC controller, a Yung-Hong C3070SE touch screen, various cylinders, as well as a vibratory roller, spindle motor, various sensors, and peripheral input/output circuits (including buttons and alarm indicator lights). The hardware system list of the tapping machine is shown in Table 3; the hardware configuration of the tapping machine is shown in Figure 3.
Table 3 Hardware List of Tapping Machine Figure 3 Hardware Configuration Diagram of Tapping Machine
3.2 Electrical Control
The electrical control of the tapping machine uses a Yonghong PLC as the core control unit to control the actuators such as the vibrating and cylinder units, as well as to collect and judge sensor signals. Figure 4 shows the PLC wiring diagram of the tapping machine, and Figure 5 shows the wiring diagram of the PLC electrical control cabinet.
Figure 4. Wiring principle of PLC for tapping machine
Figure 5 Wiring diagram of the PLC electrical control cabinet for the tapping machine
4 System Software Design
4.1 Process Flow
First, the sensor detects no part at the starting position, and the machine opens smoothly. Once a part is present, actions such as material handling, tapping, and flipping occur. After the material is ready, the material handling gripper picks it up, moves it backward and then to the left to the center, before pushing it forward to the processing position to await processing. At this point, it checks if material is being fed in. If there is material, the spindle motor descends to tap; after tapping to the target position, it rises. If there is no material, the spindle motor does not operate. After normal processing is completed, it proceeds to the next processing step. (See Figure 6.)
Figure 6. Process flow diagram of tapping machine
4.2 Control Flow
• Reset: The action of returning each component to its original position;
• Fault diagnosis: Identifying which sensors are not sending signals or which actuators are malfunctioning during equipment operation;
• Mode selection: There are two modes: manual and automatic. In automatic mode, the material preparation stage is entered first. After the material is prepared, the material is transported. After the material is transported to the processing position, it is determined whether there is a valid workpiece in the processing position. If there is, the material is processed. If not, the process returns to continue the material preparation stage. After normal processing is completed, the material preparation stage is cycled back, as shown in Figure 7.
Figure 7. Control Flowchart of Tapping Machine
4.3 I/O Point Configuration
Based on the process flow and control flow requirements of the tapping machine, the I/O points of the Yonghong PLC program were configured; the input point configuration of the Yonghong PLC is shown in Table 4, and the output point configuration is shown in Table 5.
Table 4. Input Point Configuration Table for Tapping Machine PLC
Table 5. PLC Output Point Configuration Table for Tapping Machine
4.4 On-site issues and application of PLC function instructions
4.4.1 Use of the seismic controller
Control of the vibration controller: The SDVC20-S digital voltage regulating vibration controller is used on site. The control terminal needs to be wired according to the instruction manual. Its original function is sensor drive, but the customer now wants to use PLC control, as shown in Figure 8.
Solution: The customer did not have a manual. After finding one online, it was discovered that the function did not quite match the customer's requirements. The start/stop signal source was originally a sensor with three pins, but the PLC control only required two pins. Based on the working principle of the NPN sensor, one of the pins was eliminated. After soldering the wires correctly, the Y-point was connected to drive the vibration controller, and the solution worked.
Figure 8. Seismic controller
4.4.2 Main motor forward and reverse rotation brake and clutch system
I'd never seen a main motor forward/reverse brake/clutch system before, and the mechanical mechanism wasn't visible either. Only four wires were exposed externally, with the operating voltage provided by a transformer through a rectifier bridge. The solution was as follows: The mechanical mechanism was encased in a box with very tight sealant, so I had to determine the location based on the four exposed wires, testing each one individually. First, I measured the voltage polarity of the four wires from the rectifier bridge to the clutch system, identifying the negative terminal—the common ground for forward/reverse rotation and braking. Next, I sequentially connected the remaining three wires to determine the wires controlling forward rotation, reverse rotation, and braking.
4.4.3 PLC Program Instructions
This program has no special instructions but uses a lot of set and reset operations. When writing the program, pay attention to the energization and de-energization of the coils. There are many execution components, and they are interrelated. Some actions do not have sensors to serve as the starting condition to initiate the next step. Many timers are used to delay the start. Therefore, the timer parameter settings and reset timing must be carefully considered, as shown in Figure 9.
Figure 9 Application of PLC instructions
4.5 HMI Interface Design
4.5.1 Automatic Control Screen
First, the screen displays the total number of items, with a count reset option next to it. Users usually reset the count once a day. The screen also shows the start and stop options for automatic mode, as well as the running status of automatic mode, as shown in Figure 10.
Figure 10 Main screen
4.5.2 Parameter Setting Screen
The parameter settings screen mainly allows you to set various delay times, which is convenient for users and designers to debug, as shown in Figure 11.
Figure 11 Parameter Settings
4.5.4 Manual screen, monitoring screen
In addition, there is a manual monitoring screen to complete the manual and monitoring tasks, as shown in Figure 12.
In addition, an alarm pop-up window is provided. When an alarm is triggered, a corresponding window will pop up to prompt the user to find the problem.
Figure 12 Parameter Settings
5. Conclusion (Implementation Results)
After debugging, the tapping machine was successfully debugged and met customer requirements, with continuous operation and a daily output of 50,000 pieces. Some noteworthy issues arose during debugging, primarily concerning the spindle motor's clutch system. Many unfamiliar or unclear issues like these will arise later; patience is essential for thorough research. Avoid impatience and boldly test the solutions once found.
In addition, the inspiration gained from the vibration control system led to solving problems primarily by addressing the underlying principles. In the program design, the initial emergency stop function returned all components to their original positions, and the stop function was a power outage in automatic mode (it would stop even while the machine was in operation). However, after customer feedback, the system was improved so that pressing the stop button would allow the currently processed part to finish before stopping, and the emergency stop would save all actions, preventing them from being re-executed to return to their original positions, as this would pose a safety hazard.