1、Based on LabVIEWAbstract: This paper introduces the design process of a virtual oscillograph based on LabVIEW. Mainly analyzes the amplitude value and time base adjusting methods during the real-time display. At the same time, it simply introduces the basic thought when measuring the period and freq
2、uency of the waveform gate voltage method and its application. At the end of this paper, combining the parameter measurement and waveform display of the virtual oscillograph with the modern motor close-loop lock-phase speed control, it analyzes the parameter measurements effect in PID control.Keywor
3、ds: Virtual Oscillograph; Time-Base; Motion Control. INTRODUCTIONIn the rapidly developing industry control field, measuring technologies and apparatus become more and more important. But because of the disadvantages of the traditional instruments such as high price, single function, bad expansibili
4、ty, etc., they can hardly meet the industry requirement. With the development of computer technologies and virtual instruments (VI for short), the scope designed by users becomes widely. There are many different functions with the same hardware which can make two or more machines work synchronously
5、with the advanced bus technologies such as PXI bus technology 1.Virtual instruments become more and more popular for its upstanding characteristics like low cost, multi-function, facility and so on. All measuring instruments consist of three parts: data acquisition, data analysis and results output
6、2. In these three parts, data acquisition can be done by the system hardware like A/D module or digital I/O modules. Data analysis and results output can be completed by software system based on computer. So, if given some necessary data acquisition hardware, a measuring instrument based on computer
7、 can be constituted. The software technology is the essential one in the virtual instrument. 3 Visual C+, LabVIEW, LabWindows/CVI, VEE etc. are all development software environment. LabVIEW is a graphic programming language called G language, which can be used in GPIB, VXI, PXI, PCI Bus and data acq
8、uisition cards based hardware system, has powerful analyzing ability. Its graphic programming method can be used to finish the total program by dataflow clearly and simply. Using its embedded board card driver interface, we can conveniently operate a board card. 4, 5 Multi-channel digital oscillogra
9、ph, which mainly used in real-time data acquisition, is one of the most widely used general measuring instruments. It also can display the changes of some electric signals and compare the differences among different signals. So the research and development of virtual oscillograph is the hotspot in t
10、he area. Making use of the Graph platte in LabVIEW, you can conveniently acquire the dynamic waveforms and make them displayed. But most virtual oscillographs based on LabVIEW use the Graph platte to operate and analyze the waveform data. Although this is very facile to use, it also has many disadva
11、ntages: (1) When the waveform changes all the time, the screen will keep refreshing and the graph platte could not properly work. (2) The operation method cant satisfy most of operators because it is different from the tradition oscillograph in operation. To solve these problems, this paper brings f
12、orward some ways. In the real- time waveform display, we redevelop the waveform operation and introduce some related software arithmetic. It introduces the exploiting thinking of adjusting dynamic time base and put forward two concepts: the FIFO process and E-M process. In addition, it introduces a
13、successful gate-voltage measure way in the measurement of the period and frequency, and based on which, the paper puts forward the application in the close-loop lock-phase System.II. RESEARCH ON THE MULTICENTER DIGITALOSCILLOGRAPHS SOFTWARE ARITHMETICThe virtual oscillograph introduced by this paper
14、 is mainly used in laboratory for the measurement and storage of various analog signals. The main functions are: data acquisition, waveform display, parameter measurement, waveform storage and replay etc. It has 64 analog signal input channels and can take 8 signal observations at the same time with
15、 the choice of switch matrix. According to the requirement, we use the NI-6133 Daq card for the data acquisition. The block diagram of virtual oscillograph is shown in Fig. 1: 6Now we will introduce the soft arithmetic to the basic functions of virtual oscillograph.A.Characteristics of Graph Control
16、In LabVIEW, there are three controls for waveform displaying: Graph, Chat and x-y graph. Every control has its own advantages. This paper takes Graph control for example to discuss the soft arithmetic to the basic function of virtual oscillograph. Graph oscillograph displays all waveform data input
17、in the screen at a time. Every time when the waveform data are input, the screen will be freshed. 7 Using its own operation tools, you can move, zoom the waveform or use the cursors to measure the parameters. But it could not work well on dynamic waveform. So its necessary to develop a more convenie
18、nt operation tool to real-time display of dynamic waveform. In the virtual oscillograph introduced in this paper, there are some basic functions such as amplitude and position value adjustment, time base change, trigger mode selection etc. The oscillographs front panel is shown in fig.2.B.Amplitude
19、Value AdjustmentMulti-center oscillograph can display more than one waveform at the same time, so it is very convenient to compare every signal change. Every waveform displayed should be operated separately through the selecting box on the front panel. At first, we distribute the screen into 1010 gr
20、ids and set every channel a Y-axis. The value of every one of the 10 grids in the Y-axis is equal to the value of related amplitude knob control. With the property node of the waveform graph, you can set the minimum value of each Y-axis as -5 times much as the knob value whereas the maximum value se
21、t 5 times. So when you change the amplitude knob value, the minimum and the maximum value of the relevant Y-axis should be changed at the same time, the waveform display can be zoomed as required, and the zero point position is kept in the original location.Use an array to save the amplitude values
22、every Y-axis changed. When a channel is selected, put its old amplitude value to the knob first; and after adjusting, replace the related array element with the new value. And then the amplitude value change function is finished.C.Time Base AdjustmentTime base adjusting is one of the basic functions
23、 in oscillograph. The time base adjusting knobs value shows the time of every one grid of X-axis in the screen which is the nodus during the oscillograph design procedure.1)Basic ClewAccording to the characteristics of the Graph control, it displays all the data input at a time. So distribute the X-
24、 axis into 10 grids and make every grids time t. If the waveform could bestride the whole X-axis, the time spent to collect all the data is 10t. Suppose the boards sampling rate is f, in other word, the board collects f data every second. So the number N needed in the waveform is: N= fl0t =l0ft (1)K
25、eeping the board sampling at the frequency of f, the program reads N data points from the board memory and put them to the oscillograph in every loop. Change the t value is to change the N value read from board memory every time, and thus adjust the time base in the real-time sampling.But through th
26、e experiment we can see, when the time base is too long (100ms) or too short ( 500us), the waveform displayed has time lags to different extend. That is because when the time base is too long (if the length of the needed waveform exceeds 1 second), we must wait for enough time to get all needed data
27、 collected by the board, and display them on the screen at a time. So that can cause discontinuous waveform displayed in the screen. When the time base is too short, the N value read every loop is too small, the number of data points in one second should be read for many times. There is another work
28、 to be done at the same time every loop in addition. So it will cause that the old data can not be read in time and may be covered by the new data because the board is sampling all time, the board memory will overflow. So it is needed to dispose the number read from board at long and short time base
29、 separately.2)Long time baseTo avoid the time lag discussed above, it must reduce the number of data read from sampling board every loop. Considering the display characteristics of Graph control, it can not put the data points read from boards to the graph every loop because it will make the oscillo
30、graph refreshing all the time, and the waveform displayed could not bestride the whole X-axis. An array could be set to save the waveform data points displayed. The arrays capacity is N, which is the number of data points calculated via Eq. (1). Suppose the number of data points read from board card
31、 every time is a fixed value m, which is the number of data points to be read at the proper time base.The whole procedure is made up of two parts. First, set the whole array NULL. At the beginning of the display procedure, the array is not full. So put the new m data points into the end of the array
32、 (Enqueue), and then display the whole array value in the graph control. A continuously moving waveform should be showed in the screen. Second, when the array is full, get rid of first m elements of the array; move the rest N-m elements forward the beginning of the array; and put the new m data points into the end of the array. We call this process FIFO. Then a full waveform should be showed in the screen, from one side to the other side. The Enqueue and FIFO are shown in Fig 3.Because the number of data points m read
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1