Design and Research on the detection system of controllable distance measuring device

In view of the defects of the existing hand-held Multimeter in measurement, such as difficult to operate and low measurement accuracy, a new type of component measurement device based on controllable distance expansion is proposed, and its detection system is designed and studied based on the device. By using LabVIEW programming software as the development environment and calling DAQ assistant function to configure the relevant voltage and current parameters, the DAQ acquisition board module integrated in the measurement device realizes the interactive communication between the data, and realizes the voltage and current acquisition of the system control. The experimental results show that the system can detect the voltage, current or resistance of components quickly, and the system has strong readability and high data precision.


Introduction
With the rapid development of manufacturing industry, the level of productivity has gradually increased [1] . At the same time of production, the most indispensable is to carry out regular functional inspection and maintenance of the main components of the equipment. The demand of products makes the scale of the production line more and more large, and the automation of production is also higher and higher. Therefore, the layout of the equipment introduced in the production line is more complex, which is no longer related to the traditional mechanical control system, but more tend to mechanical and electrical integration, that is, electrical control system. Due to the complexity and diversity of electrical components and parts on the equipment, the difficulty of maintenance and detection is relatively large, including the most common use of multimeter to detect the current and resistance at both ends of the components. Because of the large size of the equipment and the installation position of the components, there are many obstacles and defects in the detection. For example, first, the positive and negative lead lines of the multimeter are short, and there are certain obstacles in the detection of the electrical components located at a higher position, which is not easy to operate; second, due to the large number of equipment, the number of electrical components is large and complex, and the installation location is relatively deep. If the multimeter is held by hand, there are certain problems in the detection of the electrical components that need maintenance or have faults Danger; third, in general, when detecting electrical components manually, it is necessary to hold the multimeter with the left hand and the positive and negative electrode probes with the right hand. If the distance between two detection terminals of electrical components is large, it is not easy to operate.

Structural design of measuring device
Therefore, based on the above research and analysis, in order to solve the shortcomings of the existing products, a controllable distance retractable component measuring device [2] with simple structure, high measuring accuracy, convenient use and strong practicability is designed to realize the voltage and current detection of components.
A controllable distance retractable component measuring device, as shown in Figure 1 is an integral three-dimensional diagram, which includes a detection structure, a retractable insulating pull rod, a rockable handle structure, a multimeter integration module and a DAQ acquisition board card module. As shown in Figure 2, it is an internal three-dimensional diagram of the detection end. The current or resistance mode is selected through the control buttons of the multimeter integration module, and the electricity is detected according to the requirements Adjust the extension length of the pull rod to make the metal contacts at the left and right detection ends touch the position of the electrical components. Then, by shaking the handle, according to the different arc length of the pulley rotation, under the action of the spring, driven by the guide wire and guide wire of the guide wheel, control the left and right detection ends of the detection structure to contract inward or move outward at the same time to achieve accuracy and detection The purpose of measuring terminal alignment is as shown in Figure 3.

Design of upper computer of detection system
In hardware, by integrating DAQ acquisition board module, chip and display screen on the expansion bar, not only the detection can be completed in different environments, but also the integration of detection module on the expansion bar is realized, which makes the operation of operators more convenient and safer; By the manual control of the shaking handle, the measuring device can complete the precise alignment under the condition of retraction, and the movement accuracy can reach 1mm. Because the two metal contacts on the left and right detection ends are highly sensitive, they can quickly detect the specific values of voltage, current or resistance of components and the detection data has high accuracy.
Based on the hardware part of the measurement device, a software of voltage and current synchronous acquisition system for controllable distance measurement device is designed to display, store, record and analyze the data collected by the device in real time, as shown in Figure 4 is the flow chart of voltage and current acquisition.

upper computer software program design
The LabVIEW development environment provided by Ni company, as a graphical programming language software [4] , provides rich data collection and library functions, which has more advantages than the traditional VB or VC language, and is simpler to write control and monitoring programs. Its function library includes numerical analysis, signal processing, hardware device driving function of data acquisition board, which can develop user interface quickly and efficiently and realize communication with hardware. Therefore, LabVIEW is used to design the human-computer interactive measurement control operation software [5] . Before programming the upper computer software, it is necessary to initialize the device through the mesurement & Automation Explorer software, and then create the NI-DAQ Max task [6] after the initialization is completed. By calling the measurement I / O on the function panel into the "DAQ assistant" express VI, the express VI is placed on the program block diagram. Then open the DAQ assistant, display the new express task dialog box, and select the task measurement type. Click acquisition signal analog input, select voltage to create a new voltage analog input, configure the maximum and minimum value of voltage input as well as the corresponding acquisition mode, sampling rate and other parameters. Because the value of voltage and current needs to be collected synchronously, add current analog input channel in the task bar at the same time, and configure the corresponding parameters as well. Next, in the list of supported physical channels, select the physical channel to which the instrument is connected with the signal and click the finish button, as shown in Figure 5 is the voltage parameter configuration interface.  Figure 5. Voltage parameter configuration interface After the configuration of the voltage and current parameters is completed, the program design starts, as shown in Figure 6 is the program diagram of the data acquisition part. To ensure the continuous acquisition of the measurement data, the "DAQ assistant" express VI and other functions are enclosed in the main frame of the whole program with the "while cycle". The stop button of the while loop is connected to the stop input of the "DAQ assistant" express VI. The stopped output of express VI is connected to the conditional terminal of the while loop. The purpose is to specify that the task will be stopped and the device resources will be released after the express VI is completed. For this continuous data collection task, the input is false by default. Then the voltage and current signals collected from the channel are split by the split signal function, and finally the waveform is drawn and displayed on the interface in real time with specific data.
After the collection of voltage and current data of components is completed, the acquired data shall be analyzed and processed. Firstly, the excel table storing the measured data shall be imported by using the file path, and the data of each column in the table shall be extracted by index array and event structure, then the waveform diagram and array shall be connected and displayed in the upper computer interface in the form of curve diagram and data column, and then the data shall be connected Add "waveform" as the event source and "mouse movement" as the event structure to capture the key data value of the waveform data curve. Figure 7 shows the data processing area program design.  Figure 8 [7][8] , which is composed of reading area and analysis area. The reading area includes the drawing of waveform for the change of voltage and current of two channels, the real-time display of specific values, and the analysis area analyzes and processes the data by importing the excel table of measurement data.

upper computer software test
After the completion of the design, the voltage and current measurement experiment is carried out through the components to be tested, and the test device cooperates with the function of the upper computer software. First, connect the PC end of the upper computer with the measuring device by USB data line [9] , start the measurement after the measurement is ready, click the start collection button of the upper computer interface, at this time, the measured voltage and current data are uploaded to the developed upper computer software in real time, and the data collection results in the measurement process are shown in the collection area and display of the upper computer.
As shown in Figure 9, the current measurement change status is displayed in the form of a waveform chart, and the specific data value is displayed through the receiving column. At the same time, the excel table is automatically created and named, and the data is stored in the table for later analysis and processing [10] . Figure 9. voltage and current waveform and data receiving column As shown in Figure 10, the simulation uses a large number of data imported into the excel table to detect the status of key values. It can display the current coordinate data value of the mouse in real time, including X coordinate value and Y coordinate value. At the same time, it can enlarge the data curve through the graphic tool display board, and finally realize the key value capture of the measured data.

Conclusion
The design of the upper computer operation software based on the controllable distance measurement device and its voltage and current synchronous acquisition is to solve a series of problems such as unstable measurement data, poor accuracy and inconvenient to view and record data when the electrician uses the multimeter. The DAQ board integrated module in the measuring device is used to detect the voltage and current of the tested components, and the data is uploaded to the developed upper computer software in real time through USB data line. The software of the system, together with the measuring device, makes the measurement flexible and safe, which can meet different working conditions. The accuracy of detection is 95% -99%, and it has reliability.