CN109343374B - Pulse synchronous control two-dimensional scanning and signal acquisition method based on LabVIEW - Google Patents
Pulse synchronous control two-dimensional scanning and signal acquisition method based on LabVIEW Download PDFInfo
- Publication number
- CN109343374B CN109343374B CN201811063971.5A CN201811063971A CN109343374B CN 109343374 B CN109343374 B CN 109343374B CN 201811063971 A CN201811063971 A CN 201811063971A CN 109343374 B CN109343374 B CN 109343374B
- Authority
- CN
- China
- Prior art keywords
- signal
- acquisition
- axis
- module
- scanning
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 230000001360 synchronised effect Effects 0.000 title abstract description 7
- 230000033001 locomotion Effects 0.000 claims abstract description 19
- 238000005070 sampling Methods 0.000 claims description 40
- 238000003860 storage Methods 0.000 claims description 19
- 238000004891 communication Methods 0.000 claims description 15
- 230000006870 function Effects 0.000 claims description 10
- 238000013500 data storage Methods 0.000 claims description 8
- 238000005520 cutting process Methods 0.000 claims description 5
- 230000001960 triggered effect Effects 0.000 claims description 5
- 238000012360 testing method Methods 0.000 claims description 4
- 230000002159 abnormal effect Effects 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 claims description 2
- 238000006073 displacement reaction Methods 0.000 claims description 2
- 230000005540 biological transmission Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 6
- 239000000523 sample Substances 0.000 description 6
- 238000013461 design Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 230000008054 signal transmission Effects 0.000 description 2
- 230000003321 amplification Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 238000010895 photoacoustic effect Methods 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Control Of Stepping Motors (AREA)
- Sampling And Sample Adjustment (AREA)
Abstract
The invention discloses a LabVIEW-based pulse synchronous control two-dimensional scanning and signal acquisition implementation method. The method comprises a hardware structure and a software module; the hardware structure consists of a workstation, an onboard data acquisition card, a signal amplifier, a workstation power supply, a motion control module power supply and an ultrasonic sensor; the software module is developed based on a LabVIEW platform, two motors are controlled by hardware to perform two-dimensional grid scanning, and meanwhile, the acquisition of electric signals is realized; the software module consists of a control panel and a display panel, wherein the control panel comprises a position adjusting module, a parameter setting module and a signal acquisition module, and the display panel comprises a two-dimensional real-time signal display module, a real-time signal display module and a signal position display module. The method can realize the independent and combined control of the X-axis motor and the Y-axis motor and set the high-precision signal acquisition interval, quickly and accurately position the signal acquisition point, and effectively improve the efficiency and the stability of signal acquisition.
Description
Technical Field
The invention belongs to the technical field of automatic control and signal acquisition and storage, and particularly relates to a pulse synchronous control two-dimensional scanning and signal acquisition implementation method based on LabVIEW.
Background
In the signal acquisition technology, it is extremely important to acquire and store time-varying signals in real time by using a control system. The operating platform design is carried out based on a LabVIEW (laboratory Virtual Instrument Engineering workbench) graphical programming language, and compared with other programming languages, the operating platform design is intuitive and easy to understand in programming interfaces and friendly in user interface. Compared with other control motor forms such as a single chip microcomputer and the like, the control motor form has the advantages that special programming knowledge is needed, the professional threshold is high, the LabVIEW operation interface is simpler, and the visual programming language is convenient to understand and control. The lack of a combination of coordinated movement of the motor and the collection of signals during movement is taught in the patent application. For example, in a patent "a LabVIEW-based multi-motor control system" applied to gazeyuan of university of continental care in 12 months in 2015, the method realizes the rapid and stable control of a plurality of motors, but the implementation process of the method is complex and cannot meet the requirement of simultaneously acquiring signals in the movement process. The signal analysis in the motion process is in line with the actual requirement of production in the field of signal acquisition and storage. Therefore, a new method is needed to solve the problem of multi-motor fast and stable control of cooperative signal acquisition.
LabVIEW is a program development environment, developed by National Instruments (NI) corporation of america, similar to the C and BASIC development environments, but the significant differences between LabVIEW and other computer languages are: other computer languages all use text-based language to generate code, while LabVIEW uses graphical editing language G to write a program, the generated program being in the form of a block diagram. LabVIEW software is the core of the NI design platform and is also an ideal choice for developing a measurement or control system. LabVIEW development environment integrated engineers and scientists quickly build all the tools required for various applications, aimed at helping them solve problems, improve productivity and continue innovation.
Like C and BASIC, LabVIEW is a general programming system with a large library of functions that can be used to accomplish any programming task. The function library of the LabVIEW comprises data acquisition, GPIB, serial port control, data analysis, data display, data storage and the like. LabVIEW also has conventional program debugging tools, such as setting breakpoints, displaying data and results of sub-programs (sub-VI) in an animation manner, performing single steps, and the like, so as to facilitate debugging of programs.
LabVIEW is a graphical programming language that creates applications with icons instead of text lines. The traditional text programming language determines the execution sequence of the program according to the sequence of the sentences and the instructions, while LabVIEW adopts a data flow programming mode, and the data flow direction between nodes in a program block diagram determines the execution sequence of VI and functions. VI refers to a virtual instrument, which is a LabVIEW program module.
LabVIEW provides many controls similar in appearance to traditional instruments (e.g., oscilloscopes, multimeters) that can be used to conveniently create a user interface. The user interface is referred to as the front panel in LabVIEW. Using icons and wiring, objects on the front panel can be programmatically controlled. This is the graphical source code, also known as G-code. The graphical source code of LabVIEW is somewhat similar to a flow chart and is therefore also referred to as the program block code. LabVIEW is characterized in that: universal hardware is adopted as much as possible, and the difference of various instruments is mainly software; the capability of a computer can be fully exerted, a strong data processing function is realized, and a more powerful instrument can be created; the user can define and manufacture various instruments according to the needs of the user.
LabVIEW is widely accepted by the industry, academia, and research laboratories as a standard data acquisition and instrument control software. LabVIEW integrates all functions of communication with hardware and a data acquisition card meeting GPIB, VXI, RS-232 and RS-485 protocols. It also embeds library functions which are convenient for applying software standards such as TCP/IP, ActiveX and the like. This is a powerful and flexible software. The virtual instrument can be conveniently established by utilizing the virtual instrument, and the graphical interface of the virtual instrument enables the programming and using processes to be vivid and interesting.
The graphical programming language is also called "G" language. Programming in this language essentially does not write program code, but rather flow charts or block diagrams. It makes use of the terms, icons and concepts familiar to technicians, scientists, engineers and the like to the extent possible, and thus LabVIEW is an end-user oriented tool. The method can enhance the ability of building own scientific and engineering system, and provides a convenient way for realizing instrument programming and a data acquisition system. When the device is used for principle research, design and test and realizing an instrument system, the working efficiency can be greatly improved. Using LabVIEW, an independently running executable file can be generated, which is a true 32-bit/64-bit compiler. Like many important software, LabVIEW offers multiple versions of Windows, UNIX, Linux, Macintosh. The method is mainly convenient to realize the functions of different instruments and meters by changing software under the condition of the same hardware.
Disclosure of Invention
In order to solve the problems of poor real-time performance and low accuracy in the existing time-varying signal real-time acquisition and storage method, the invention provides a pulse synchronous control two-dimensional scanning and signal acquisition implementation method based on LabVIEW.
In order to achieve the aim, the invention adopts the following technical scheme:
a pulse synchronization control two-dimensional scanning and signal acquisition implementation method based on LabVIEW comprises a hardware structure and a software module. The hardware structure consists of a workstation, an onboard data acquisition card, a signal amplifier, a workstation power supply, a motion control module power supply and an ultrasonic sensor; the on-board data acquisition card, the signal amplifier and the ultrasonic sensor are sequentially connected, and the ultrasonic sensor is connected with the on-board data acquisition card through the signal amplifier to perform data acquisition, analog-to-digital conversion and data storage; the onboard data acquisition card is arranged in the main board of the workstation. The software module is developed based on a LabVIEW platform, two motors are controlled by hardware to perform two-dimensional raster scanning, and meanwhile, the acquisition of point source signals is realized; the software module is composed of a control panel and a display panel. The control panel comprises a position adjusting module, a parameter setting module and a signal acquisition module, and the display panel comprises a two-dimensional real-time signal display module IV, a real-time signal display module V and a signal position display module VI.
The invention aims to solve the problem of constructing a set of control system for realizing two-dimensional scanning by combining a single-dimensional motor and a signal storage system for simultaneously acquiring signals. The control system consists of a software module and a hardware part, wherein the software module is based on a control program compiled by a LabVIEW graphical programming platform and a system operation interface, and the control program is utilized to realize high-precision two-dimensional grid scanning of an X axis and a Y axis by 2 stepping motors, so that a signal acquisition device combined with the software module can quickly and stably acquire point-to-point signals and is matched with an onboard multi-channel data acquisition card to acquire, transmit and store data. In addition, the control system can realize independent and combined control of motors of an X axis and a Y axis, set a signal high-precision acquisition interval, quickly and accurately position a signal acquisition point, and effectively improve the efficiency and the stability of signal acquisition.
The software module is composed of a control panel and a display panel. The control panel comprises a position adjusting module I, a parameter setting module II and a signal acquisition module III; the display panel comprises a two-dimensional real-time signal display module IV, a real-time signal display module V and a signal position display module VI.
The position adjusting module I can independently adjust each stepping motor and comprises X-axis motor distance adjustment, Y-axis motor distance adjustment and two-dimensional motor synchronous adjustment; meanwhile, an initial position point can be set, so that the two-axis motor can be conveniently restored during the period of non-scanning. The position adjustment module comprises the following structural and operational steps: a serial port sequence selection window, an X-axis motor position adjustment input button and a Y-axis motor position adjustment determination button; the general operation steps are as follows: the method comprises the steps of firstly, correspondingly connecting a serial port with a workstation before a serial port sequence selection window selection motor to realize serial port communication functions such as serial port initialization, serial port reading and writing, serial port closing and the like, inputting motor displacement distances in millimeter units at X-axis and Y-axis motor position adjustment serial ports after completing serial port communication, and clicking a position adjustment determination button to realize one-dimensional or two-dimensional space position adjustment after checking a selection frame of a corresponding axis.
The parameter setting module II is used for setting the sizes of X-axis and Y-axis areas of two-dimensional operation of the motor, grid scanning intervals and motor stepping speed adjustment; and the embedded emergency stop control is used for rapidly cutting off all signals, stopping all motor operation and data acquisition card acquisition before an accident occurs, and automatically returning to the set initial position after the motor stops, and resetting acquisition card data. After the parameter setting is finished, a start button is clicked, and the motor moves according to the given parameters. The parameter setting module comprises the following structural and operational steps: an X-axis and Y-axis scanning length input window, a scanning interval input window, a data storage position selection window and a file naming window; the general operation steps are as follows: firstly, determining the size of a signal acquisition range, inputting X-axis and Y-axis scanning lengths in millimeter units successively, and then determining an X-axis scanning interval, wherein the smaller the interval setting is, the finer the signal acquisition is, the more corresponding acquisition cycle times are, the longer the acquisition time is completed, and the input scanning interval parameters are set according to actual conditions. And finally, naming the pre-collected data file and setting a storage position.
The signal acquisition module III is used for setting parameters of signal acquisition. The module can adjust the data acquisition card in consideration of the characteristics of the acquired signals, and efficiently and accurately acquires and stores the required signal segments by setting parameters such as sampling frequency, sampling length, sampling starting point and the like. The signal acquisition module comprises the following structural and operational steps: the method comprises the following steps of inputting or selecting a window such as a sampling rate, a sampling length, a clock mode, trigger timeout, an acquisition mode, trigger waiting, a sampling depth, trigger delay and the like; the general operation steps are as follows: starting from the frequency of the signal, selecting a proper sampling rate according to the Nyquist theorem; and parameters such as sampling length, clock mode, trigger delay, acquisition mode, trigger waiting and the like are selected according to the characteristics such as amplitude, length, period, frequency and the like of different signals, so that the accuracy and efficiency of final signal acquisition are optimal. And the embedded emergency stop control is used for rapidly cutting off all signals, stopping all motor operation and data acquisition card acquisition before an accident occurs, and automatically returning to the set initial position after the motor stops, and resetting the data of the acquisition card.
The two-dimensional image real-time display module IV is used as an auxiliary module and mainly provides previewing conditions of acquired signals for experimenters. By displaying the signal waveform and combining and processing the signals, an experimenter can intuitively observe whether the acquired signals are interesting contents or not, so that the control and acquisition processes can be adjusted in time. The two-dimensional image real-time display module comprises the following structural and operational steps: the X-axis and Y-axis coordinates represent the X-axis and Y-axis scan lengths in the parameter setting module, respectively. The two coordinates are positioned, and the acquired signals are reconstructed in real time to obtain a two-dimensional image for real-time display; further, by adjusting the maximum value and the minimum value of the coordinate axes, the range of the image area which is particularly interested in being displayed in the module can be adjusted; in addition, by changing the magnitude value of the color intensity of the right color bar, the optimal display contrast of the two-dimensional image can be obtained according to the signal intensity adjustment.
The signal display module V can provide relevant information such as the waveform, amplitude and peak position of a measured point source signal in real time, and comprises the following structures and operation steps: the X, Y axis coordinates represent the sample length and signal amplitude magnitude of the time domain signal, respectively. The length of the X axis is mainly determined by the sampling length in the signal acquisition module, the initial sampling point is determined by the trigger delay, namely after the trigger delay is finished, the acquisition card starts to acquire signals, and the real-time signal display module displays the signal waveform of the sampling length.
The signal position display module VI can display the signal positions of the row of signals in the Z-axis direction after one X-axis scanning is finished in real time, and judge the relative position relationship of the same product surface of the signal generating point source and the relative position relationship of different signal generating point sources of the row. The signal position display module comprises the following structural and operational steps: the X, Y axis coordinates represent the X-axis length and the signal depth respectively, which are determined by the X-axis scanning length of the parameter setting module and the sampling length of the signal acquisition module respectively. The length of the X axis can be adjusted to display the signal depth in different scanning ranges; the depth of the Y-axis signal is obtained by inverting the sampling rate, the sampling length and the signal transmission rate, so as to observe the depth information of the deep layer signal and the surface signal.
The control flow of the control software is as follows: and initializing a serial port, testing whether the communication between the workstation and the controller and the acquisition board card is normal, and debugging until the communication is normal if the communication is abnormal. When the port detects a high-level trigger signal, the motor controller sends an instruction to control the X-axis motor to travel a specified distance, and synchronously, the acquisition card is triggered by the trigger signal to acquire data. And when the X-axis motor finishes the specified distance, stopping the motion, stopping data acquisition by the acquisition board card, uploading the data to the workstation, and writing the data into a storage file. Meanwhile, the Y-axis motor travels a designated distance until stopped. At the moment, the X-axis motor moves in the reverse direction for a designated distance, and synchronously, the acquisition card is triggered by a trigger signal to acquire data. And when the X-axis motor finishes the specified distance, stopping the motion, stopping data acquisition by the acquisition board card, uploading the data to the workstation, and writing the data into a storage file. Meanwhile, the Y-axis motor advances for a specified distance until the Y-axis motor stops, the X-axis motor moves reversely again, a data acquisition and storage process synchronously occurs, and the process is repeated in a circulating mode until coverage scanning of the specified area is completed. And finally, the collected data are all stored in one file, and the software control process is finished.
The invention has the advantages and beneficial effects that:
1) a two-dimensional motor and signal acquisition cooperative control system is developed based on LabVIEW design, the program is simple, the operation is convenient, the portability is better than that of the control by utilizing equipment such as a single chip microcomputer and a PLC (programmable logic controller), and the two-dimensional motor and the signal acquisition card can be efficiently and cooperatively controlled;
2) the independent and cooperative control of the X-axis and Y-axis two-dimensional spatial positions and the acquisition and storage of the time-varying pulse signals are realized, and the accuracy and the efficiency of signal acquisition are improved.
Drawings
FIG. 1 is a hardware connection diagram of a control system constructed according to the present invention, in which 1 is a workstation, 2 is a signal acquisition card, 3 is a signal amplifier, 4 is a workstation power supply, 5 is a motion control module power supply, 6 is a motion control module, and 7 is an ultrasonic sensor;
FIG. 2 is a software interface of the control panel according to the present invention;
FIG. 3 is a software interface of the display panel according to the present invention;
FIG. 4 is a control flow diagram of the control software according to the present invention;
fig. 5 is a schematic diagram of a two-dimensional grid scanning method according to the present invention.
FIG. 6 is a flow chart illustrating the structure and implementation of the position adjustment module according to the present invention;
FIG. 7 is a flow chart illustrating the structure and execution of a parameter setting module according to the present invention;
FIG. 8 is a flow chart of the structure and implementation of the signal acquisition module according to the present invention;
FIG. 9 is a flow chart illustrating the structure and implementation of a two-dimensional real-time image display module according to the present invention;
FIG. 10 is a flow chart illustrating the structure and implementation of a signal display module according to the present invention;
FIG. 11 is a flow chart illustrating the structure and implementation of a signal location display module according to the present invention;
Detailed Description
The present invention will be further described with reference to the following examples.
In a specific implementation process, according to the principle of the photoacoustic effect, a focused pulse laser is used for exciting a sample to generate a pulse ultrasonic source as an acquisition signal. The two-dimensional mechanical scanning device is characterized in that two stepping motors are arranged in a mutually vertical direction, and a signal source and the two-dimensional motor are relatively fixed and move along with the motors to construct a pulse ultrasonic signal source in a two-dimensional plane. In order to realize flexible coordination control of the whole mechanical device and simultaneously acquire pulse ultrasonic signals, a method for realizing coordination control of a two-dimensional motor and a signal acquisition card is needed, and the independent and coordinated control adjustment of the scanning range, speed and interval of the motor in a two-dimensional plane and the point-to-point pulse signal acquisition are completed.
Example 1
See figures 1, 2, 3. A pulse synchronization control two-dimensional scanning and signal acquisition implementation method based on LabVIEW comprises a hardware structure and a software module. The hardware structure consists of a workstation 1, an onboard data acquisition card 2, a signal amplifier 3, a workstation power supply 4, a motion control module power supply 5, a motion control module 6 and an ultrasonic sensor 7; the workstation power supply 4 is connected with the workstation 1 and supplies power to the workstation; the data acquisition card 2 is carried on the workstation 1 and is connected with the signal amplifier 3 and the ultrasonic sensor 7 to realize signal acquisition, amplification and storage; and the power supply 5 is connected with a power supply stepping motor combination and drives the ultrasonic sensor to perform X-axis and Y-axis motion scanning.
The software module is compiled and developed based on a LabVIEW graphical programming platform, and is combined with the hardware part to realize the control of the stepping motor and the data acquisition card. The software module is composed of a position adjusting module I, a parameter setting module II, a signal acquisition module III, a two-dimensional real-time signal display module IV, a real-time signal display module V and a signal position display module VI in a control panel and a display panel.
FIG. 2 illustrates the control interface of a position adjustment module I that includes separate and coordinated position adjustment control of the X-axis and Y-axis motors; the parameter setting module II comprises X-axis and Y-axis scanning lengths, scanning intervals, storage positions and related parameter settings of file naming; and the signal acquisition module III is used for realizing the setting of parameters such as sampling frequency, sampling length, sampling starting points and the like aiming at different signal characteristics.
The two-dimensional real-time signal display module IV shown in fig. 3 is configured to display a signal image of each X-axis scanning line in real time; the real-time signal display module V is used for displaying the waveform and amplitude generated by each single-point signal in real time, so that the scanning position can be adjusted in time; and a signal position display module VI, which can be used for determining the position relation between the signal point and the multipoint signal relative to the depth of the detection surface.
When the system runs, a system operation interface is opened at the workstation 1. The control flow of the software comprises the following steps: first, setting the adjustment distances of the X axis and the Y axis in the position adjustment module I, for example, setting the adjustment distances of the X axis and the Y axis to be 5 mm and 3 mm respectively, and positioning the scanning initial position to a preset position 5 mm and 3 mm away from the initial origin of adjustment on the X axis and the Y axis. Then, the X-axis and Y-axis scanning lengths and scanning intervals are respectively input into the parameter setting module II, and the positions of data disk symbols and file names in a data storage and work station are set. Then, in the signal acquisition module III, the system sampling rate is set according to the Nyquist theorem, and acquisition card parameters such as sampling length, clock mode, trigger delay, acquisition mode, trigger waiting and the like are selected according to the characteristics of the detected signal. Clicking a start button, sending an instruction after judging that the Boolean button is true, including position adjustment, scanning distance and related parameters of the acquisition card, entering a laminated sequential structure, firstly initializing the acquisition card and a motor, acquiring basic parameters of a workstation operating system, then sending a panel parameter setting instruction to a stepping motor and the acquisition card for driving, and starting data acquisition. And nesting a while loop structure in the sequence structure to repeatedly receive the trigger signal until the data acquisition is completed. If the scanning acquisition needs to be adjusted in the acquisition process, a stop button is clicked, after the Boolean button is in the future, the system stops the acquisition of the data acquisition card after the current line scanning is finished, and the currently finished data acquisition result is transmitted and stored into the preset workstation drive letter. If an emergency occurs in the acquisition process, pressing an emergency stop button, and if the Boolean button is Ture, converting the global variables of the system into False, interrupting all signals and stopping the system.
Fig. 5 shows a two-dimensional raster scan motion pattern for signal acquisition: the ultrasonic sensor is driven by the stepping motor to perform grid scanning movement of XY axes; the scanning range x y, the scanning precision dx, dy can be set in the motion control module, wherein x controls the scanning length and the data storage. The detailed process is as follows: the ultrasonic sensor moves synchronously with the motor, steps every dx mum according to the scanning precision in the X-axis scanning process, and finishes one X-axis scanning record and stores a full-waveform X scanning signal and stores the full-waveform X scanning signal into a program file; after the x-length scanning is finished, the probe is longitudinally stepped by dy microns, then the probe is longitudinally stepped by dy microns, the probe is transversely scanned in a negative direction after the stepping, the data is recorded and cached into a program file according to the mode, the longitudinal stepping by dy microns is finished after the x-length scanning is finished, and the steps are repeated. The data acquisition module acquires ultrasonic scanning signals after completing scanning of each X axis and sequentially records the ultrasonic scanning signals to a data line of a program file, and after completing scanning of all X axes, data are stored into the workstation once, wherein the number of data lines is X/dx, and the number of data lines is y/dy.
See fig. 6. The position adjusting module I can independently adjust each stepping motor and comprises X-axis motor distance adjustment, Y-axis motor distance adjustment and two-dimensional motor synchronous adjustment; meanwhile, an initial position point can be set, so that the two-axis motor can be conveniently restored during the period of non-scanning. The position adjustment module comprises the following structural and operational steps: the system comprises a serial port sequence, an X-axis motor adjusting parameter input window, a Y-axis motor adjusting parameter input window and a position adjusting button. Firstly, a motor serial port sequence is selected to realize the communication between a lower computer (a motor controller) and an upper computer (a workstation), after the adjustment parameters of an X axis and a Y axis are input, a front end square frame of a corresponding axis parameter input line is selected, and a position adjusting button is clicked to realize a one-dimensional or two-dimensional position adjusting function.
The parameter setting module II is used for setting the sizes of X-axis and Y-axis areas of two-dimensional operation of the motor, grid scanning intervals and motor stepping speed adjustment; after the parameter setting is finished, a start button is clicked, and the motor moves according to the given parameters. The parameter setting module comprises the following structural and operational steps: an X-axis scanning length parameter input window, a Y-axis scanning length parameter input window, an acquisition cycle display window, a scanning interval parameter input window, a data storage position selection window and a file naming window; corresponding millimeter (mm) unit lengths are respectively input into the X-axis scanning length input window and the Y-axis scanning length input window, the size of a scanning area, namely the size of a signal detection area, can be determined, and data can be conveniently distinguished and stored by selecting a storage position and naming a corresponding file.
The signal acquisition module III is used for setting parameters of signal acquisition. The module can adjust the data acquisition card in consideration of the characteristics of the acquired signals, and efficiently and accurately acquires and stores the required signal segments by setting parameters such as sampling rate, sampling length, clock mode, trigger delay, sampling starting point and the like. And the embedded emergency stop control is used for rapidly cutting off all signals, stopping all motor operation and data acquisition card acquisition before an accident occurs, and automatically returning to the set initial position after the motor stops, and resetting acquisition card data. The signal acquisition module comprises the following structural and operational steps: the method comprises the following steps of inputting or selecting a window such as a sampling rate, a sampling length, a clock mode, trigger timeout, an acquisition mode, trigger waiting, a sampling depth, trigger delay and the like; the general operation steps are as follows: starting from the frequency of the signal, selecting a proper sampling rate according to the Nyquist theorem; and parameters such as sampling length, clock mode, trigger delay, acquisition mode, trigger waiting and the like are selected according to the characteristics such as amplitude, length, period, frequency and the like of different signals, so that the accuracy and efficiency of final signal acquisition are optimal. And the embedded emergency stop control is used for rapidly cutting off all signals, stopping all motor operation and data acquisition card acquisition before an accident occurs, and automatically returning to the set initial position after the motor stops, and resetting the data of the acquisition card.
The two-dimensional image real-time display module IV is used as an auxiliary module and mainly provides previewing conditions of acquired signals for experimenters. By displaying the signal waveform and combining and processing the signals, an experimenter can intuitively observe whether the acquired signals are interesting contents or not, so that the control and acquisition processes can be adjusted in time. The two-dimensional image real-time display module comprises the following structural and operational steps: the X-axis and Y-axis coordinates represent the X-axis and Y-axis scan lengths in the parameter setting module, respectively. The two coordinates are positioned, and the acquired signals are reconstructed in real time to obtain a two-dimensional image for real-time display; further, by adjusting the maximum value and the minimum value of the coordinate axes, the range of the image area which is particularly interested in being displayed in the module can be adjusted; in addition, by changing the magnitude value of the color intensity of the right color bar, the optimal display contrast of the two-dimensional image can be obtained according to the signal intensity adjustment.
The signal display module V can provide relevant information such as the waveform, amplitude and peak position of a measured point source signal in real time, and comprises the following structures and operation steps: the X, Y axis coordinates represent the sample length and signal amplitude magnitude of the time domain signal, respectively. The length of the X axis is mainly determined by the sampling length in the signal acquisition module, the initial sampling point is determined by the trigger delay, namely after the trigger delay is finished, the acquisition card starts to acquire signals, and the real-time signal display module displays the signal waveform of the sampling length.
The signal position display module VI can display the signal positions of the row of signals in the Z-axis direction after one X-axis scanning is finished in real time, and judge the relative position relationship of the same product surface of the signal generating point source and the relative position relationship of different signal generating point sources of the row. The signal position display module comprises the following structural and operational steps: the X, Y axis coordinates represent the X-axis length and the signal depth respectively, which are determined by the X-axis scanning length of the parameter setting module and the sampling length of the signal acquisition module respectively. The length of the X axis can be adjusted to display the signal depth in different scanning ranges; the depth of the Y-axis signal is obtained by inverting the sampling rate, the sampling length and the signal transmission rate, so as to observe the depth information of the deep layer signal and the surface signal.
The control flow of the control software is as follows: and initializing a serial port, testing whether the communication between the workstation and the controller and the acquisition board card is normal, and debugging until the communication is normal if the communication is abnormal. When the port detects a high-level trigger signal, the motor controller sends an instruction to control the X-axis motor to travel a specified distance, and synchronously, the acquisition card is triggered by the trigger signal to acquire data. And when the X-axis motor finishes the specified distance, stopping the motion, stopping data acquisition by the acquisition board card, uploading the data to the workstation, and writing the data into a storage file. Meanwhile, the Y-axis motor travels a designated distance until stopped. At the moment, the X-axis motor moves in the reverse direction for a designated distance, and synchronously, the acquisition card is triggered by a trigger signal to acquire data. And when the X-axis motor finishes the specified distance, stopping the motion, stopping data acquisition by the acquisition board card, uploading the data to the workstation, and writing the data into a storage file. Meanwhile, the Y-axis motor advances for a specified distance until the Y-axis motor stops, the X-axis motor moves reversely again, a data acquisition and storage process synchronously occurs, and the process is repeated in a circulating mode until coverage scanning of the specified area is completed. And finally, the collected data are all stored in one file, and the software control process is finished.
Finally, it should be noted that: it should be understood that the above examples are only for clearly illustrating the present invention and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are intended to be within the scope of the invention.
Claims (1)
1. A pulse synchronization control two-dimensional scanning and signal acquisition implementation method based on LabVIEW is characterized in that:
the method comprises a hardware structure and a software module;
the hardware structure consists of a workstation, an onboard data acquisition card, a signal amplifier, a workstation power supply, a motion control module power supply and an ultrasonic sensor; the on-board data acquisition card, the signal amplifier and the ultrasonic sensor are sequentially connected, and the ultrasonic sensor is connected with the on-board data acquisition card through the signal amplifier to perform data acquisition, analog-to-digital conversion and data storage; the onboard data acquisition card is arranged in the main board of the workstation; the software module is developed based on a LabVIEW platform, two motors are controlled by hardware to perform two-dimensional grid scanning, and meanwhile, the acquisition of electric signals is realized;
the software module consists of a control panel and a display panel, wherein the control panel comprises a position adjusting module, a parameter setting module and a signal acquisition module, and the display panel comprises a two-dimensional image real-time display module, a real-time signal display module and a signal position display module;
the software module is a control program and a system operation interface which are compiled based on a LabVIEW graphical programming platform, and the control program is utilized to realize that 2 stepping motors carry out high-precision two-dimensional grid scanning on an X axis and a Y axis, so that a signal acquisition device combined with the software module can rapidly and stably carry out point-to-point signal acquisition and is matched with an onboard multi-channel data acquisition card to carry out data acquisition, transmission and storage;
wherein, in the control panel:
the position adjustment module comprises the following structural and operational steps: a serial port sequence selection window, an X-axis motor position adjustment input button and a Y-axis motor position adjustment determination button; the operation steps are as follows: firstly, a serial port sequence selection window selection motor is correspondingly connected with a serial port of a workstation to realize serial port initialization, serial port reading and writing and serial port communication closing functions, after serial port communication is completed, motor displacement distances in millimeter units are input into an X-axis motor position adjustment serial port and a Y-axis motor position adjustment serial port, and after a selection frame of a corresponding shaft is selected in a pointing mode, a position adjustment determination button is clicked to realize one-dimensional or two-dimensional space position adjustment;
the parameter setting module comprises the following structural and operational steps: an X-axis and Y-axis scanning length input window, a scanning interval input window, a data storage position selection window and a file naming window; the operation steps are as follows: firstly, determining the size of a signal acquisition range, sequentially inputting X-axis and Y-axis scanning lengths in millimeter units, and then determining an X-axis scanning interval, wherein the smaller the interval setting is, the finer the signal acquisition is, the more corresponding acquisition cycle times are, the longer the acquisition time is completed, and the input scanning interval parameters are set according to actual conditions; finally, naming and storing positions of the pre-collected data files are set;
the signal acquisition module comprises the following structural and operational steps: sampling rate, sampling length, clock mode, trigger timeout, acquisition mode, trigger wait, sampling depth, trigger delay input or selection window; the operation steps are as follows: starting from the frequency of the signal, selecting a proper sampling rate according to the Nyquist theorem; selecting sampling length, clock mode, trigger delay, acquisition mode and trigger waiting parameter according to amplitude, length, period and frequency characteristics of different signals, so that the accuracy and efficiency of final signal acquisition are optimal; the embedded emergency stop control is used for rapidly cutting off all signals, stopping all motor operation and data acquisition card acquisition before an accident occurs, and automatically returning to a set initial position after the motor stops, and resetting the data of the acquisition card;
wherein, in the display panel:
the two-dimensional image real-time display module comprises the following structural and operational steps: the X-axis coordinate and the Y-axis coordinate respectively represent the X-axis scanning length and the Y-axis scanning length in the parameter setting module; the two coordinates are positioned, and the acquired signals are reconstructed in real time to obtain a two-dimensional image for real-time display; further, by adjusting the maximum value and the minimum value of the coordinate axes, the range of the image area which is particularly interested in being displayed in the module can be adjusted; in addition, by changing the value of the color intensity of the right color bar, the optimal display contrast of the two-dimensional image can be obtained according to the signal intensity adjustment;
the real-time signal display module comprises the following structural and operational steps: the X axis of a coordinate axis represents a sampling length value in a signal acquisition module, the Y axis is a signal amplitude value, the position and the signal amplitude value of a point source signal are displayed by the module, and the image changes along with the scanning position and reflects the change condition of the signal position and the amplitude value in real time;
the signal position display module comprises the following structural and operational steps: the X axis of the coordinate axis represents the X scanning length in the parameter setting, and the Y axis is a sampling length value in the signal acquisition module and can represent the position where the maximum value of each point source signal appears; after completing one X-axis scanning, the display module can present the position where the maximum value of the line source signal appears, and then enter the next scanning cycle, and the process is repeated;
wherein,
the control flow of the software module is as follows:
1) initializing a serial port, testing whether the communication between the workstation and the controller and the acquisition board card is normal, and debugging until the communication is normal if the communication is abnormal;
2) when the port detects a high-level trigger signal, the motor controller sends an instruction to control the X-axis motor to travel a specified distance, and synchronously, the acquisition card triggers a data acquisition process by the trigger signal; stopping moving after the X-axis motor finishes the appointed distance, stopping data acquisition by the acquisition board card, uploading the data to a workstation, and writing the data into a storage file; meanwhile, the Y-axis motor advances for a specified distance until stopping; at the moment, the X-axis motor moves reversely for a designated distance, and synchronously, the acquisition card is triggered by a trigger signal to acquire data; stopping moving after the X-axis motor finishes the appointed distance, stopping data acquisition by the acquisition board card, uploading the data to a workstation, and writing the data into a storage file; meanwhile, the Y-axis motor advances for a specified distance until the Y-axis motor stops, the X-axis motor moves reversely again, a data acquisition and storage process synchronously occurs, and the process is repeated in a circulating manner until coverage scanning of the area of a specified area is completed;
3) and finally, the collected data are all stored in one file, and the software control process is finished.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811063971.5A CN109343374B (en) | 2018-09-12 | 2018-09-12 | Pulse synchronous control two-dimensional scanning and signal acquisition method based on LabVIEW |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811063971.5A CN109343374B (en) | 2018-09-12 | 2018-09-12 | Pulse synchronous control two-dimensional scanning and signal acquisition method based on LabVIEW |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109343374A CN109343374A (en) | 2019-02-15 |
CN109343374B true CN109343374B (en) | 2020-01-07 |
Family
ID=65304837
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811063971.5A Active CN109343374B (en) | 2018-09-12 | 2018-09-12 | Pulse synchronous control two-dimensional scanning and signal acquisition method based on LabVIEW |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109343374B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113116511B (en) * | 2021-04-16 | 2023-04-07 | 杭州维纳安可医疗科技有限责任公司 | Electric signal output method, device, equipment, system and storage medium |
CN115452484B (en) * | 2022-09-13 | 2023-09-12 | 中国科学院地理科学与资源研究所 | Automatic collection system for high-concentration runoff sediment sample |
CN116088464A (en) * | 2022-11-08 | 2023-05-09 | 北京理工大学 | LabView-based scanning galvanometer and displacement table linkage control test system and method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6102965A (en) * | 1996-09-23 | 2000-08-15 | National Instruments Corporation | System and method for providing client/server access to graphical programs |
CN104237787A (en) * | 2014-09-18 | 2014-12-24 | 国网河南禹州市供电公司 | LabVIEW based motor speed test system and test method thereof |
CN104297686A (en) * | 2014-11-19 | 2015-01-21 | 芜湖杰诺瑞汽车电器系统有限公司 | Electromobile motor data monitoring system based on LabVIEW |
CN105141204A (en) * | 2015-09-24 | 2015-12-09 | 大连理工大学 | Multi-motor control system based on LabVIEW |
CN107765182A (en) * | 2017-12-07 | 2018-03-06 | 智灵飞(北京)科技有限公司 | A kind of ground unmanned plane motor electricity commissioning test system and method based on LABVIEW |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN202776268U (en) * | 2012-09-12 | 2013-03-13 | 无锡微奥科技有限公司 | Real-time image displaying system based on swept source and optical coherence tomography (OCT) |
-
2018
- 2018-09-12 CN CN201811063971.5A patent/CN109343374B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6102965A (en) * | 1996-09-23 | 2000-08-15 | National Instruments Corporation | System and method for providing client/server access to graphical programs |
CN104237787A (en) * | 2014-09-18 | 2014-12-24 | 国网河南禹州市供电公司 | LabVIEW based motor speed test system and test method thereof |
CN104297686A (en) * | 2014-11-19 | 2015-01-21 | 芜湖杰诺瑞汽车电器系统有限公司 | Electromobile motor data monitoring system based on LabVIEW |
CN105141204A (en) * | 2015-09-24 | 2015-12-09 | 大连理工大学 | Multi-motor control system based on LabVIEW |
CN107765182A (en) * | 2017-12-07 | 2018-03-06 | 智灵飞(北京)科技有限公司 | A kind of ground unmanned plane motor electricity commissioning test system and method based on LABVIEW |
Non-Patent Citations (1)
Title |
---|
基于LABVIEW的电机数据采集系统;胡文彪 等;《海军工程大学学报》;20050630;第17卷(第3期);第61-65页 * |
Also Published As
Publication number | Publication date |
---|---|
CN109343374A (en) | 2019-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109343374B (en) | Pulse synchronous control two-dimensional scanning and signal acquisition method based on LabVIEW | |
Morozov et al. | Off-line scan path planning for robotic NDT | |
CN105264474B (en) | The NI Vision Builder for Automated Inspection program editing environment with paste feature is replicated including operation context-aware | |
Latif et al. | Development of a feature-based open soft-CNC system | |
CN104457566A (en) | Spatial positioning method not needing teaching robot system | |
JPH0642210B2 (en) | Electronic device control method | |
US20020149628A1 (en) | Positioning an item in three dimensions via a graphical representation | |
US7930643B2 (en) | System and method for previewing a sequence of motion control operations | |
EP2801876B1 (en) | System, GUI and method for editing step and repeat operation instructions in a machine vision inspection system | |
CN102854251B (en) | Supersonic imaging system utilizing virtual instrument technology, and imaging method thereof | |
BR112016008313B1 (en) | SMART TESTING METHOD OF A NON-DESTRUCTIVE TEST ROBOT IN A NUCLEAR REACTOR PRESSURE CONTAINER BASED ON VIRTUAL REALITY TECHNOLOGY | |
CN103106076A (en) | Machine vision inspection system and method for editing part program on the machine vision inspection system | |
CN109910004B (en) | User interaction method, control device and storage medium | |
CN104181467A (en) | Portable linear motor multi-axis linkage measuring and controlling system | |
EP4239308A1 (en) | Speed reducer transmission error test apparatus and method | |
CN109807896B (en) | Motion control method and system, control device, and storage medium | |
CN103344419A (en) | Ultrasonic cutting sound spindle comprehensive performance test analysis system | |
CN210155652U (en) | Mouse test system | |
CN205691485U (en) | A kind of scan table for Terahertz Non-Destructive Testing and scanned imagery device | |
CN214225341U (en) | Test machine and test platform | |
CN1093806A (en) | Have four types Ultrasonic Detection image formation method and system thereof | |
JPS63206607A (en) | Three-dimensional measuring machine | |
Morozov et al. | Computer-aided tool path generation for robotic non-destructive inspection | |
CN113626313B (en) | Automatic test system based on manual operation simulation | |
CN217405010U (en) | Radar imaging experimental device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |