Design of Control System for Motor Stator and Rotor Height Difference Detection Device Based on PLC

. The design of a control system of the stator and rotor height difference detection device for air conditioning compressor motor based on PLC control, including hardware system, control system. XTG105 grating micrometer sensor is used to detect the difference between stator and rotor height. MITSUBISHI FX3U PLC controller is adopted as the system control core. The system parameter setting and operation monitoring are carried out through the WEINVIEW TK6070ip color display touch screen to ensure the normal operation of the system. The system controls the height difference detection device to automatically complete the detection, determination, marking and other processes. The working state is stable and the detection precision is high.


Introduction
The stator and rotor are important components of the motor, commonly known as the heart of the motor [3]. During the operation of the refrigeration compressor, the force on the rotor of the motor is complex. In order to reduce the power consumption caused by excessive friction, a certain height difference between stator and rotor is usually required in design [1]. Reasonable height difference can guarantee motor performance, improve motor demagnetization capacity, reduce power consumption and reduce motor cost, etc. [2]. Many manufacturers in China use manual measurement in height difference measurement, which fails to meet the requirements of high-precision measurement and automatic measurement [1]. In view of the existing air conditioning compressor, the stator and rotor height difference device cannot meet the requirements of high precision and automation measurement, the design will be MITSUBISHI FX3U PLC (Programmable Logic Controller) as the control core, WEINVIEW TK6070ip color display touch-screen for data acquisition and process monitoring, the XTG105 grating sensor as an executive components, so as to realize the high precision and automation detection of stator-to-rotor height difference.   Figure 1 shows the integral diagram of the height difference detection device and figure 2 shows the inspection mechanism diagram. The height difference detection device of the rotor and stator of the air conditioner compressor is composed of the following 6 parts: • Rack: mainly composed of two parts: electric control cabinet and aluminum alloy protective cover. The aluminum alloy protective cover is assembled with 5050 aluminum and installed with PMMA (Polymethyl methacrylate).
• Height difference detection mechanism: it is mainly composed of mechanical clamps, XTG105 grating measurement microsensor and thimble shield. It can be used to measure different types of motors by changing the mechanical clamps and adjusting the spacing of the grating measurement microsensor.
• Lifting mechanism: mainly consists of a lifting cylinder, guide rail, an upper plate, a lower plate, guide column and spring. The upper and lower plates are connected with the spring through the guide column to avoid the direct action of the cylinder pressure on the rear claw in the measurement process.
• Floating mechanism: it is mainly composed of two floating blocks which respectively compensate for X direction and Y direction. When the motor is not accurately positioned, the mechanical gripper contacts the inner wall of the motor enclosure, which ACTS as a guide slope, and the floating mechanism makes positioning compensation to ensure that the ejector pin of the grating micrometer falls to the measuring point correctly.
• Moving feeding mechanism: mainly consists of positioning cylinder and moving feeding plate.
• Electrical control: mainly consists of PLC and touch screen, system parameter setting and operation monitoring.

Operating principle of height difference detection device
Feeding plate loading workpiece System locates the protrusion of cylinder through induction work piece by photoelectric switch Positioning is completed and the lifting cylinder is lowered Floating mechanism positioning compensation, testing mechanism testing height difference when test is completed, the lifting cylinder rises, the positioning cylinder returns, marking Marking completed, the workpiece into the next process The workflow of the height difference detection device is shown in figure 3. Motor under test load to the feed plate, the system determines whether the motor to be tested is in place through the photoelectric switch, The positioning cylinder sends the motor to be tested to the designated position, lift cylinder drives the floating institutions and testing institutions to descend, floating mechanism performs positioning compensation during the descending process, making Mechanical claw, grating sensor thimble fell right to the measurement point, position of measurement point is shown in figure 4, when the measurement has been completed, the lifting cylinder drives the floating institutions, testing institutions returned to the initial height, positioning cylinder drives the feeding plate movement, return to the initial position, marking processing system. At this point, the height difference measurement is completed.

system control requirements
In order to ensure the normal operation of the system, the following control requirements shall be met: • Automatic/manual operation mode: the equipment is operated in automatic mode during normal detection, and when manual operation is performed, the manual/automatic transfer switch must be rotated to the "manual" direction. Moreover, system parameters can only be set in the manual mode, and the equipment cylinder movement can be debugged.
• Abnormal alarm: If an error occurs (emergency stop knob is not released, cylinder action is abnormal, the module is wrong, etc. ), after the sensor detects the abnormality, the buzzer will give an alarm and the warning light will be turned on. After the abnormality is eliminated, click the reset button to continue the normal operation of the system.
• Fault history: when a fault occurs, the system will collect fault information, and the content and time of the fault during the operation of the equipment can be viewed through the display screen.
• Safety guarantee: In the event of a fault, the interlock between the emergency stop button and the reset button is adopted to guarantee the safety of personnel in the maintenance of equipment.

Composition of control system
The main task of the control system is to control the equipment to detect the height difference and determine whether it meets the requirement of setting height difference. If the height difference exceeds the setting range, the control system will display that the height difference between the stator and rotor of the motor to be tested is unqualified. In order to complete the above control requirements, the hardware part of the control system of the detection device shall include PLC, touch screen, start button, stop button, reset button, scram button, photoelectric sensor, limit switch, cylinder, etc. The control principle is shown in figure 5.

PLC selection
According to the requirements of the control system and the requirements of economy and reliability, the system adopts the FX3U series PLC manufactured by MITSUBISHI company to control the height difference detection process automatically. This series of PLC has built-in 64K RAM memory. In addition to abundant arithmetic instructions such as floating point number and string processing, it also has powerful analog processing ability, high-speed counting function and communication function [4]. MITSUBISHI FX3U PLC has two methods for positioning control, namely PLC plus special function module control and PLC independent control [5]. This control system needs 17 I/O input interfaces and 17 output interfaces. In the selection of I/O interface, it should be noted that there is a certain amount of margin, which generally does not exceed 85% of the maximum I/O point [6]. So choose MITSUBISHI FX3U-48MT/ DS (24 input /24 output, transistor leakage type).

Selection of touch screen
The Human Machine Interface (HMI) is a special device for human-computer interaction between operators and control systems. [7]. WEINVIEW touch screen has simple operation, simple interface and high-cost performance [7]. Therefore, this system uses WEINVIEW TK6070ip touch screen for parameter design. The touch screen has the following features, one is 7"800x480 TFT LCD; Second, no fan cooling system; Three, built-in memory and calendar; Fourth, protection grade of the IP65 panel; Fifth, I/O interface of USB and serial interface, Com2 RS485 supports MPI 187. 5k [8]. In addition, the touch screen of this model has strong dust resistance and high reliability, which meets the special industrial control environment requirements. It is connected to PLC through Ethernet and recovers and backs up touch screen data through MPI programming port.

PLC programming
The control program is written according to the system control requirement. Procedure of PLC programming with flow chart method [9]: • Analysis control requirements list the I/O allocation table.
• Draw the procedure flow out according to the control requirements.
• Compile step ladder diagram according to the program flow chart. MITSUBISHI integrated PLC programming software GXWORKS2 is a powerful PLC development tool with monitoring, simulation debugging, program development and read-write programmable logic controller [10]. The system is programmed with GXWORKS2 . The system  input and output address allocation table are shown in  table 1 and table 2. When writing the PLC program, the action sequence of locating cylinder and lifting cylinder should be considered to avoid damage of the motor to be tested in operation. The control flow chart of the system is shown in figure 6. According to the control requirements, the system is first initialized when the system is powered on and the system start-up conditions are judged. If the start condition is not met, the control system will not run. When the system photoelectric sensor detects the motor to be tested, the system starts and controls the positioning cylinder for positioning, and the positioning cylinder stops after contacting the limit switch, and the positioning is completed. Then the system controls the lifting cylinder to descend, and the measured value of the grating sensor is compared with the set value inside the system to determine whether the height difference between the stator and rotor of the motor to be satisfies meets the standard.

Design of touch screen software
WEINVIEW EasyBuilder_Pro touch screen configuration software is a powerful touch screen programming software, providing a human-friendly human-computer interaction interface [11]. According to the control requirements, a visual control interface [12] is established to set the touch screen control parameters. By connecting with PLC, PLC parameters are controlled by touch screen.
The input monitoring interface of the height difference detection device is shown in figure 7. The current status of the input signal of the detection device is displayed in real time during the automatic operation of the detection device. When there is an input signal, the corresponding indicator lights up.
When setting parameters, the manual/automatic switch must be rotated to the "manual" sign direction, and the device connection is in the "offline" position. As shown in figure 8, the interface can be three grating sensor standard (placed below the condition that meets the conditions of standard, standard board, clicks on the "Standard", complete standard), in this interface can manually enter the upper limit and lower limit value, click on the "set" complete set, set the current value shows as set value indicates success.

Conclusion
The air conditioning compressor stator and rotor height difference detection device control system MITSUBISHI FX3U series PLC is the control core, and the XTG105 type grating micrometer sensor detects the height difference of the stator and rotor, thus automatically determining whether the motor stator and rotor height difference are qualified. After the system design is completed, the test of the height difference of the stator and rotor of the air conditioner compressor is carried out. The test results show that the control system runs stably, the detection accuracy is high, and the height difference detection automation is realized, which effectively improves the production efficiency of the enterprise.