The Design of LabVIEW ‐ based Measurement & Control System of Automatic Straightening Machine

: With the development of the machinery industry and the popularization of shaft parts, the bending and deformation problems of shaft parts in the machining process have become particularly prominent. In order to reduce the bending deformation and improve the yield of parts, shaft straightening machines have become a necessary choice. According to the development status of straightening machines at home and abroad, and based on the consideration of improving the automation and intelligence level of domestic straightening machines, a fully automatic straightening machine measurement and control system has been proposed and developed in this paper based on the LabVIEW platform. It has been proved that the straightening machine can realize parallel operation of data in the working process, with high straightening accuracy and good operation stability.


Introduction
With the development of the machinery industry, shaft parts are put to an increasingly wide use in the machinery industry, and the bending and deformation of shaft parts in machining not only affects the subsequent processes of machining and manufacturing, but also brings a heavy burden to enterprises.In order to reduce the bending deformation in an effort to improve the yield of parts, shaft straightening machines have become a necessary choice [1] [2] [3].There are many companies and scientific research institutions abroad specializing in the research and development of straightening machines, with the more famous companies as follows: MAE in Germany, Galdabini in Italy, TAA TRANDING in the United States, Towa Seiki Co., Ltd. of Japan and International Measuring Co., Ltd. and so on.Their straightening machines have relatively high measurement accuracy, automation and intelligence [3] [4 [5] [6] [7] [8] [9] .In China, the development of straightening machines is still at a low level in terms of intelligence and automation and the measurement accuracy.Based on the consideration of improving the automation and intelligence level of domestic ones, a fully automatic straightening machine measurement and control system based on the LabVIEW platform is proposed and developed in this paper to flexibly detect and straighten shaft workpieces.

Overall Design Scheme of Measurement and Control System
The circular bounce detection and straightening correction of the workpiece is one of the main problems to be solved by this design.It can be seen from the straightening diagram of the measurement and control system in Figure 1 that the measurement and control system of the automatic straightening machine mainly includes four parts: data acquisition, data processing, positioning and straightening, and FPGA controller.The first part includes the displacement sensor of differential variable voltage, data acquisition card, and photoelectric encoder.The second part is mainly completed by the industrial control computer.The third includes motion control card, stepper motor, servo motor, and servo drive; The FPGA controller uses AX-7035 development board of the black gold.

Figure 1. Calibration Schematic of Measurement and Control System
The core of the automatic measurement and control system of the straightening machine designed in this paper is the industrial computer processing and FPGA control, which realizes the functions of data acquisition, data processing, workpiece detection, positioning and straightening, monitoring of the operating status of the control system, data statistics and query.Based on the versatility of the straightening measurement and control system of shaft parts, the automatic measurement and control system of the straightening machine designed in this paper mainly has the following five functions: 1) The collected data is transmitted to the industrial computer for analysis and processing through Gigabit Ethernet, with the processing results returned to the FPGA; 2) With the adoption of distributed assembly operation, different shaft parts are straightened to meet different needs; 3) The measurement and control system uses multi-channel displacement sensors to collect data, arrange them in different measurement positions, and detect the workpiece according to what is needed; 4) On the basis of the complexity of detecting shaft parts, adjust the number of displacement sensors and the installation angle of the encoder are adjusted to achieve a good detection effect; 5) with the identification and judge of whether the workpiece is qualified, the straightened and corrected unqualified workpiece and the qualified one is put into the corresponding storage silo or different assembly lines to record and query the detection process and results of the workpiece.Therefore, the overall structure of the measurement and control system of the automatic straightening machine is shown in Figure 2, which mainly includes automatic loading and unloading, data collection, data processing, positioning and straightening, qualification determination, data recording and other parts of the workpiece.

The Hardware System of Measurement and Control System
Through the analysis of the working principle and overall architecture of the measurement and control system of the automatic straightening machine, its hardware system is mainly composed of industrial computer, FPGA, displacement sensor, photoelectric encoder, data acquisition card, motion control card, servo motor and servo drive, solenoid valve components, with the specific relationship between each component shown in Figure 3.Among them, the industrial computer is selected as a domestic IPC610 working equipment and control system with 14 slots, supporting PCI and ISA bus, the industrial computer has high stability and reliability, with a strong anti-interference ability to operate in various complex environments.The FPGA module is selected from the FPGA development board developed by Xilinx XC7A35T-2FGG484I, which is equipped with a DDR3 data cache module with a capacity of 256MB, and the clock frequency of 400MHz can increase the FPGA development bandwidth to 12.8GB/s.The sensor is selected from the high-precision displacement sensor of German VOLFA.The data acquisition card is selected by Advantech's PCI-1716, which has a maximum bandwidth of 250KS, automatic analog input scanning, and provides 8 analog gradient inputs, with a good noise reduction effect; The role of motion control card is mainly used to control servo motor, so the motion control card selected in this paper

The Software System
As for the traditional application system development of FPGA, VHDL or Verilog text programming language is used to write code, with a large workload, and high difficulty of development.An icon program instead of a text program is used in the LabVIEW FPGA tool, which is less difficult to develop and easy to learn and use, so LabVIEW FPGA tool is applied in this paper as the development platform of the system.

The Workflow of Automatic Straightening Machine
The workflow of automatic straightening machine is mainly divided into seven steps, as shown in Figure 5, i.e., 1) power supply and system initialization to confirm the status of relevant indicators.Dial the "hand/self-transfer switch" to the "automatic" position, with the "automatic mode" in the straightening manipulator control system selected, and press the "automatic start" and "manipulator start" buttons of the main interface of the host operation at the same time to start automatic operation; 2) The automatic feeding manipulator takes out the workpiece from the process storage position, transports it to the straightening workbench, and starts the automatic straightening process; 3) the pneumatic unit of FPGA control solenoid valve control drives top clamping workpiece; At the same time, control the servo motor to drive the workpiece to rotate; 4) During the rotation of the workpiece, the three-way displacement sensor and photoelectric encoder measure the circular runout of the workpiece and the rotation angle of the motor, and the FPGA control data acquisition card collects the measured data to transmit it to the industrial computer through the serial port after signal processing; 5) The industrial computer analyzes the obtained data, calculates the circular runout of the three channels, and finds the maximum bending amount and direction angle of the workpiece; 6) If straightening is required, the industrial computer presses down the workpiece through the FPGA control servo motor drives the indenter of the workbench, and feedback the amount of pressure to the industrial computer.If it cannot be straightened, the manipulator will take out the workpiece and put it into the unqualified belt; 7) If all measuring points are qualified, the straightening is completed and the next straightening begins.If any measuring points are unqualified, repeat ( 6) and subsequent steps within the given number of straightening times and time until all measuring points are qualified.

Figure 5. The workflow of the automatic straightening machine
The inspection system is shown in Figure 6.Displacement sensors collect data once for every 1 degree of shaft rotation, and 360 times per sensor after one rotation of the shaft.The data collected by the acquisition card is processed by the industrial computer to obtain the maximum bending deformation and direction of the workpiece at the position of the displacement sensor.

The Theory & Method of Data Acquisition and Processing
Data collection, processing and storage of straightening machine measurement and control system are inseparable, of which data acquisition is the premise of control.In this paper, PCI-1716 data acquisition card is used to collect relevant data of each sensor.Data processing is the basis of the application, and the data of this system mainly has three processing processes: 1) F/V filter conversion of the sensor output signal; 2) Digital filtering, nonlinear compensation and signal scaling are used to process the data once; 3) Through the calculation and analysis of the data, discover the signal law, determine the nature of the object, generate the necessary control signal, and study the control effect after the control and the secondary processing of the control program before control.The random error is mainly processed by remote point detection and digital filter, with the singularity point eliminated by prediction and the collected data smoothed by digital filters such as sequencing filtering, RM filtering, weighted filtering, reference filtering, debugging filtering and single filtering, eliminating or reducing various noises and improving the signal-to-noise ratio.For the systematic error, the methods of lookup table, curve comparison and interpolation are in place to eliminate the nonlinear error of the sensor, and the models of temperature error and the dynamic characteristic curve change is applied to correct the error of the temperature characteristic of the sensor and the error of the dynamic characteristics of the system.

The Interface of Measurement & Control System of the Straightening Machine
The interface of the Automatic straightening machine's measurement and control system designed by LabVIEW t shown in Figure 7, includes six modules: main interface operation, sensor test, debugging panel, parameter setting, data query and statistics.The first is shown in Figure 8, with a total of 6 functional areas, the top of which is the actual value area of the differential, the middle is the runout quantity display area and the bending direction display area measured by the displacement sensor, the bottom is the manipulator operation area, the left side is the function menu area, and the right side is the working status display area and the correction quantity display area.Figure 13 is the monitoring program of equipment condition, which is used to monitor the operation of displacement sensors and encoders in real time during the straightening process, and if there is an abnormality, it is fed back to the industrial computer through the FPGA to make an alarm signal.

Summary
Based on the consideration of improving the automation and intelligence level of domestic straightening machine, this paper constructs the hardware part of the measurement and control system of straightening machine with the FPGA controller as the core, with LabVIEW platform applied to develop the software part of the measurement and control system.It has proved that the straightening machine designed in this paper can realize parallel operation of data during the working process, with high straightening accuracy and good operation stability.However, there is also the problem of slow speed of the data interaction and the straightening accuracy needs to be further improved.

Figure 2 .
Figure 2. The Overall Structure Diagram of Measurement & Control system is of DMC5410A with multiple general I/O, continuous interpolation cache I/O, external CAN bus I/O expansion to meet the needs of various control I/O, and the various pulse signals and switching signals connected to the control card are shown in Figure 4.The servo motor is selected from MINAS A5 family AC servo of Panasonic, with the controller of a feed-forward function to increase the stability of the straightening control system operation and improve the accuracy of detecting workpieces.

Figure 6 .
Figure 6.Basic Schematic Diagram of the Detection System

Figure 7 .
Figure 7.The interface of the Automatic straightening machine's measurement and control system

Figure 8 .
Figure 8.The Main Interface of Measurement & Control System Figure 9 is the interface of sensor test, which displays the measurements (in microns) collected by each channel in real time.The abscissa is the measurement channel number (expandable to six channels, and Figure 8 shows the case where three channels are enabled), and the ordinate is the

Figure 9 .
Figure 9. Sensor Test InterfaceFigure10shows the debug window interface of the system, which is mainly used to monitor the function setting of the

Figure 10 .
Figure 10.The Debug Window Interface Figure 11 is the parameter setting interface, including four modules: workpiece setting, correction quantity parameter setting, reverse correction parameter setting and weighted