Abstract: This paper introduces the modification of the electrical control system of an X62W universal milling machine using a Siemens S7-200 PLC and a touch screen, and elaborates on the system's hardware composition and software design. Practice has proven that after the technical modification using the PLC and touch screen, the hardware circuitry of the control system was simplified, its operation became more reliable, and the machine tool's working efficiency was improved.
Keywords: Universal milling machine; PLC; Touch screen; MCGS configuration software
Abstract: the text of Siemens PLC (S7-200 PLC) and the touch screen used X62W Universal Milling Machine Electrical Control System was introduced in the transformation of the system's hardware and software design in the paper. Practice has proved that technological transformation in the application of PLC and touch screen, the control system hardware has been simplified. more reliable, improved the machine efficiency.
Keywords: Touch Screen Universal Milling Machine system;MCGS Configuration Software
0 Introduction
The X62W universal milling machine is a high-efficiency machining tool widely used in machining and repair. Operating a universal milling machine involves simultaneously controlling the electrical and mechanical systems via a handle, achieving close electromechanical coordination to complete predetermined operations. It is a typical example of combined mechanical and electrical control, representing a highly automated combination machine tool. However, troubleshooting and fault finding in electrical control systems is extremely difficult, especially in relay-contact control systems. Due to the numerous contacts, complex wiring, high failure rate, and long maintenance cycles in electrical control circuits, production and maintenance suffer significant inconvenience, severely impacting production. With the development of industrial automation, the requirements for industrial intelligence are increasing, and the market economy demands that manufacturing respond quickly to market demands—producing small batches, diverse varieties, multiple specifications, low-cost, and high-quality products. To meet these requirements, the control systems of production equipment and automated production lines must possess extremely high reliability and flexibility. This necessitates the use of highly intelligent control systems to replace traditional control systems, making electrical control systems more flexible, reliable, easier to maintain, and better adaptable to frequently changing process conditions. Based on these issues, this paper proposes a solution for technically upgrading the relay contact-type electrical control system of the X62W horizontal universal milling machine using Siemens S7-200 and a touch screen.
1. Working principle and relay wiring diagram of X62W universal milling machine
1.1 Working Principle
The main circuit contains three motors: M1 is the main motor, driving the spindle to power the milling cutter for milling; M2 is the feed motor, driving the lifting table and worktable feed; and M3 is the coolant pump motor, supplying coolant. All three motors share a single fuse FU1 for short-circuit protection. Each motor has a thermal relay FR for overload protection. The thermal relays FU1 for the main motor and FU2 for the coolant pump motor provide overall protection, their normally closed contacts connected in series on the control circuit bus. The thermal relay FR3 for the feed motor only protects the feed system, its normally closed contact connected in the feed control circuit. Because the main motor requires infrequent forward and reverse rotation, a combination switch SA5 controls the phase reversal. The feed motor requires frequent forward and reverse rotation, using contactors KM3 and KM4 for phase reversal. The coolant pump can only be started after the main motor has started, and is controlled by a manual switch SA1. The main motor uses two sets of start buttons SB3 and SB4 connected in parallel, and two sets of stop buttons SB1 and SB2 connected in series. Contactor KM1 is the control contactor for motor M1, and SQ7 is a position switch used as an impulse switch for spindle speed change. To start the spindle, press start button SB3 or SB4, contactor KM1 is energized, latches, and starts the main motor M1. After the main motor starts, the auxiliary contact of KM1 connects to the feed control section of the control circuit, allowing the feed motor to start.
When the motor reaches a certain speed, the speed relay is activated. When the stop button SB1 or SB2 is pressed, the contactor KM2 is energized, and the spindle motor reverses.
The worktable feeds to the right. After the spindle starts, the worktable control power is turned on. Rotating the position switch SQ1 closes the normally open contact of SQ1-1, energizes the contactor KM3, and causes the motor M2 to rotate forward. When the predetermined position is reached, the position switch SQ1 resets, and the motor M2 stops rotating.
When the worktable feeds to the left, rotating position switch SQ2 closes SQ2-1 and opens SQ2-2, energizing contactor KM4 and causing the motor to reverse, thus moving the worktable to the left.
When SA3-1 and SA3-3 are closed and SA3-2 is open, current flows through 11, SQ6, 15, SQ4-2, 16, SQ3-2, 17, SA3-1, 18, SQ1-1 (or 11, SA3-3, 21, SQ2-2, 22, SQ1-2, 17, SA3-1, 18, SQ3-1), 19, KM4, and 20. KM3 is energized, M2 rotates forward, and the worktable moves downward.
When SA3-1 and SA3-3 are closed and SA3-2 is open, current flows through 11, SQ6, 15, SQ4-2, 16, SQ3-2, 17, SA3-1, 18, SQ2-1 (or 11, SA3-3, 21, SQ2-2, 22, SQ1-2, 17, SA3-1, 18, SQ4-1), 24, KM3, and 25. KM4 is energized, M2 reverses, and the worktable moves upward.
When SA3-2 is closed and SA3-1 and SA3-3 are open, current flows through 11, SQ6, 15, SQ4-2, 16, SQ3-2, 17, SQ1-2, 22, SQ2-2, 21, SA3-2, 19, KM4, and 20, energizing KM3. When SA3-2 is closed and SA3-1 and SA3-3 are open, the feed motor M2 reverses in both directions, creating an interlock. The position switches SQ1, SQ2, SQ3, and SQ4 control the rotation of the disc to different positions.
Regardless of the motor's forward or reverse rotation, the coil current of contactors KM3 and KM4 is connected by SQ1-2 and SQ3-2. If the machine tool is feeding to the left, and SQ2 or SQ4 is rotated, their normally closed contacts SQ2-2 or SQ4-2 are open. Therefore, if a misoperation occurs during right feed, pressing the up/down or forward/backward handles, one of SQ3-2 or SQ4-2 will definitely open, de-energizing KM3 or KM4 and stopping motor M2 to ensure safety. Position switch SQ6 is the feed speed change impulse switch.
For cooling and lighting control, the cooling pump can only start after the main motor has started. Therefore, in the main circuit, M3 is connected after the contacts of the main contactor KM1, and SA1 controls the cooling pump. The lighting circuit uses a safe voltage of 36 volts and is controlled by switch SA4.
Hardware configuration of the control system for the 2x62W universal milling machine
2.1 PLC selection and hardware design.
According to the electrical control requirements of the X62W universal milling machine, all inputs and outputs are switching signals. The PLC needs to monitor 8 buttons, 5 limit switches, and 2 selector switches, totaling 21 input points. The PLC output control signals include 6 relays and 1 light, totaling 7 points. Therefore, a Siemens S7-200 PLC was selected, with the following configuration: CPU226CN AC/DC/DC type (6ES7 216-2BD23-0XB8), featuring 24 input points, 16 output points, two RS-485 interfaces (PORT0 and POT1), and one communication interface, which meets the control requirements. The PLC's I/O port allocation is based on the characteristics and control requirements of the controlled object, connecting the I/O ports to the corresponding electrical equipment to achieve control and monitoring functions. The specific I/O allocation is shown in Table 1. After completing the I/O allocation, the PLC hardware design is performed. The PLC external hardware circuit is shown in Figure 1.
I/O Allocation Table
Table 1
Internal Register I/O Allocation Table
Table 2
2.2 PLC Programming:
According to the machine tool control requirements, the PLC statement list is shown in Program 1. During the program design process, six internal auxiliary relays were used to simplify the program design. The spindle motor forward/reverse interlock and the feed motor forward/reverse interlock improved the system's operational reliability. Different control methods were designed separately in the program, resulting in a concise and clear program structure. Since the entire system is controlled by a touchscreen, which can replace physical buttons, switches, and indicator lights, internal registers M0.6-M3.1 were used for these buttons and switches during programming. Simply change the input registers in the following program to the corresponding internal registers. The internal register program is shown in Program 2.
Program 1 Manual Control Program
Program 2 Automatic Control Program
3. Touchscreen Selection and Design
Touchscreens are increasingly used in industry due to their convenience and ease of remote control. Based on the control requirements of the X62W milling machine, we used an NTOUCH touchscreen and MCGS configuration software in conjunction with a PLC to replace physical components such as buttons and selector switches on the control cabinet. Furthermore, the touchscreen allows for monitoring of the milling machine's operation.
3.1 MCGS Configuration Editing
Through system analysis, this system utilizes the MCGS system design configuration screen to achieve system operation and monitoring. (See Figure 2)
Figure 2 Overall system control screen
As mentioned above, both the inputs and outputs of this system are switch signals, so the name type defined in the real-time database of the MCGS configuration must also be switch type, as shown in Figure 3.
Figure 3 Real-time database
3.2 Communication Connection
Since MCGS is used to control this system, how can it communicate with the Siemens PLC to achieve monitoring? The MCGS configuration software establishes connections between the system and external hardware devices in the device window, enabling the system to read data from external devices and control their operating status, thus achieving real-time monitoring of the industrial process. Based on the system's control requirements and method, PPI cables can be used to transmit data between them for monitoring purposes.
In the device window, you need to set the properties of Device 0 - [General Purpose Serial Port Parent Device] and Device 1 - [Siemens S7-200PPI]. At this point, you also need to set the internal device properties to add the corresponding PLC channels and channel read/write types. Input channels mostly use internal registers, with read-only type. Output registers Q0.0 to Q0.6 are read-write type, while Q1.0 and Q1.1 are read-only, reading the switching signals of SA313 and SA32. In actual communication, in the device property settings, set the "Serial Port Number" to 0-COM1, the communication baud rate to 6-9600, the data bit width to 3-8 bits, the data parity method to even parity, one stop bit, and the data acquisition method to synchronous acquisition. After setting, click the "OK" button to return.
For better communication between the Siemens S7-200 PLC and MCGS, the following settings must be configured in the Device Properties dialog box: [Device 1] Device annotation: Siemens S7-200PPI, initial operating status: Started, minimum sampling period: 1000ms, PLC address: 2. Internal property settings must ensure the PLC channel name corresponds to the name defined in the implementation database. (See Figure 4).
Figure 4 PLC Channel Attribute Settings
After editing the configuration screen and successfully testing it on the host computer, you can connect it to the touch screen using a network cable through the host computer's network interface. In the MCGS embedded configuration software menu bar, set the IP address under "Tools" > "Download Configuration" to download the configuration to the touch screen, as shown in Figure 8. Then, connect the touch screen and PLC using a PPI cable, with the female connector connected to the touch screen's COM5 port and the male connector connected to the PLC interface. This allows you to eliminate the need for buttons on the control cabinet panel and control the screen using soft buttons on the touch screen, resulting in a vivid and clear display.
4. Conclusion
The proposed solution described in this paper is a modification of an existing relay-contact analog control system using a PLC and a touchscreen, and has been implemented in a laboratory control cabinet. Operational results show that the PLC control system, both in hardware and software, is stable and reliable, while minimizing operational risks. References:
[1] Chen Yuanling. Automatic Electrical Control of Machine Tools [M]. Chongqing University Press, 1997.
[2] Lü Jingquan. Programmable Logic Controllers and Their Applications [M]. Beijing: China Machine Press, 2001.
[3] Yang Changneng, Zhang Guangyi. Fundamentals and Applications of Programmable Logic Controllers [M]. Chongqing University Press, 1992.
[4] MCGS Embedded User Manual, Beijing Kunlun Tongtai Automation Software Technology Co., Ltd.
[5] Liao Changchu, PLC Programming and Application [M] Beijing: Machinery Industry Press, 2005, 5