Method for oscilloscope 3D mapping in scan mode
10677817 ยท 2020-06-09
Assignee
Inventors
- Kuojun YANG (Chengdu, CN)
- Wuhuang Huang (Chengdu, CN)
- Peng YE (Chengdu, CN)
- Qinchuan ZHANG (Chengdu, CN)
- Hao ZENG (Chengdu, CN)
- Duyu QIU (Chengdu, CN)
- JUN JIANG (CHENGDU, CN)
- Huiqing PAN (Chengdu, CN)
- Lianping GUO (Chengdu, CN)
- Feng TAN (Chengdu, CN)
Cpc classification
G01R13/02
PHYSICS
International classification
Abstract
A method for oscilloscope 3D mapping in scan mode. The input signal is acquired using a real-time sampling rate which is D.sub.r times higher, thus more sampling points, i.e. D.sub.r acquired data can be obtained during the time interval between two consecutive horizontal pixels. The D.sub.r acquired data are mapped into a same column of the screen to implement fluorescent waveform display. In addition, to realize the scanning display, a flag X is introduced into the three-dimensional database, when the screen refresh signal arrives, the first D.sub.s acquired data are read out from the unread acquired data in FIFO memory. The three-dimensional database is updated from the flag X, which make the leftmost waveform always be the oldest waveform, the rightmost waveform always be the newest waveform. Thus the 3D mapping is realized in scan mode, letting the DSO have a fluorescent waveform display at slow time-base.
Claims
1. A method for oscilloscope 3D mapping in scan mode, comprising: (1) reading of acquired data 1.1) setting a real-time sampling rate f.sub.s of a digital storage oscilloscope (DSO) as:
D.sub.s=D.sub.sD.sub.s%D.sub.r(2) where % is a remainder operator; (2) three-dimensional compression mapping 2.1) value resetting writing data 0 to the column pointed to by the flag X to a plurality of addresses A.sub.s from a starting address XR.sub.y to an address XR.sub.y+A.sub.s1 of the three-dimensional database of the DSO, when the address XR.sub.y+A.sub.s1 is greater than or equal to an address R.sub.xR.sub.y out of the address range of the three-dimensional database, a corresponding address is changed to XR.sub.y(X240+A.sub.s)+A.sub.s1R.sub.xR.sub.y, where R.sub.x is a horizontal resolution of the DSO, R.sub.y is a vertical resolution of the DSO, and the number A.sub.s of a plurality of reset addresses is:
Y=(XR.sub.y)+(R.sub.yV1)(4) where V is the value of the acquired data; where in the process of data mapping, after each point for mapping D.sub.r acquired data are mapped, the flag X is updated such that if X+1 is equal to R.sub.x, then X=0, else X=X+1; (3) importing to video memory after the data mapping of all the D.sub.s acquired data is completed, importing the values of the three-dimensional database into a video memory of the DSO from the column pointed to by the flag X from the starting address XR.sub.y to display a waveform, where in the process of importing, when reaching an address R.sub.xR.sub.y1, the importing continues from an address 0 until an address XR.sub.y1; then returning to the step 1.2) for a next three-dimensional compression mapping and importing to the video memory.
Description
BRIEF DESCRIPTION OF THE DRAWING
(1) The above and other objectives, features and advantages of the present invention will be more apparent from the following detailed description taken in conjunction with the accompanying drawings, in which:
(2)
(3)
(4)
(5)
(6)
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
(7) Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings. It should be noted that the similar modules are designated by similar reference numerals although they are illustrated in different drawings. Also, in the following description, a detailed description of known functions and configurations incorporated herein will be omitted when it may obscure the subject matter of the present invention.
(8) The core of the present invention is that: in scan mode, the DSO acquires the input signal by using a higher sampling rate, so that a plurality of acquired data can be obtained during the time interval represented by the spacing between two consecutive horizontal pixels on the screen of the DSO, and then the plurality of acquired data are mapped into the pixels of a same column of the screen of DSO by using the three-dimensional mapping technology, thus a fluorescent waveform display is realized. In present invention, three-dimensional compression mapping, as well as the scanning display are realized by introducing the flag X.
(9)
(10) In one embodiment, as shown in
(11) the ADC 1 acquires the input signal and sends the acquired data to the FIFO memory 2. In the embodiment, the reading and writing enable generating module 4 generates a writing enable signal wen to keep the write enable of the FIFO memory 2 turned on all the time, thus the DSO will perform the data acquisition continuously. DSP 3 controls all operations of the DSO, and sends a screen refresh signal update to the read and write enable generating module 4 at each cycle. Upon the receipt of the screen refresh signal update, the read and write enable generating module 4 generates a read enable signal ren, which make the unread acquired data in the FIFO memory 2 be read out and sent to the three-dimensional mapping module 5 for three-dimensional compression mapping. After three-dimensional compression mapping, the values in the three-dimensional database are alternately imported into the first video memory 7 and the second video memory 8, and when one video memory is in the process of importing, the other video memory will send the values imported to the screen of the DSO for waveform display under the control of the three-dimensional mapping module 5. In the embodiment, the LCD 6 is adopted as the screen of the DSO. The importing to video memory and waveform display of the screen belong to the prior art of DSO, the elaborate description is omitted.
(12)
(13) In one embodiment, as shown in
(14) Step S1: reading of acquired data
(15) Step S1.1: setting digital storage oscilloscope's (DSO's) real-time sampling rate f.sub.s as:
(16)
(17) where D.sub.r is the number of points for mapping for each column of a DSO's screen, N is the number of columns of each horizontal grid on the DSO's screen, B is a time base, i.e. the time represented by a horizontal grid.
(18) In the embodiment, the number of points for mapping for each column of the DSO's screen is 100, i.e. D.sub.r=100, the number of columns of each horizontal grid on the DSO's screen is 50, i.e. N=50. The current time base is chosen as 500 ms/div, then according to equation (1), the current real-time sampling rate of DSO f.sub.s is:
(19)
(20) Letting the DSO acquire an input signal at real-time sampling rates 10 Ksps, and store the acquired data into a FIFO memory.
(21) Step S1.2: when the screen refresh signal arrives, reading out the first D.sub.s acquired data from the unread acquired data in FIFO memory, where the total number of the unread acquired data is D.sub.s, and D.sub.s can be obtained according to equation (2):
D.sub.s=D.sub.s%D.sub.r(2)
(22) where % is remainder operator.
(23) In the process of data acquisition, the acquired data is calculated, while waiting for the arrival of the screen refresh signal. When the screen refresh signal arrives, the total number of acquired data D.sub.s, is obtained. In order to complete a column entirely during the three-dimensional compression mapping, it is necessary to guarantee that the total number of data for the three-dimensional compression mapping is an integral multiple of the number of points for mapping for each column of a DSO's screen. Therefore, as shown in equation (2), it is required to subtract a value from the total number of acquired data D.sub.s, so that the number of acquired data D.sub.s for the three-dimensional compression mapping is the maximal integral multiple of the number of points D.sub.r for mapping for each column of a DSO's screen. The remainder of the acquired data is left to the three-dimensional compression mapping of the next cycle. Supposing the number of the remainder of the acquired data is D.sub.o, the number of acquired data obtained in a new acquisition, i.e. during the time interval between the new screen refresh signal and the previous screen refresh signal, is D.sub.n, the total number of acquired data D.sub.s is D.sub.s=D.sub.n+D.sub.o.
(24) Since the total number of acquired data D.sub.s is the total number of the acquired data which are not read out when the screen refresh signal arrives, the total number of the unread acquired data is D.sub.s. Moreover, since the acquired data is always stored in FIFO memory, and the FIFO will not be reset, the remainder of the acquired data will not be lost. In addition, although the ADC acquires the input signal continuously during the three-dimensional compression mapping, the FIFO memory will not be filled fully due to the slow acquisition, this ensures the continuity and integrity of the acquired data.
(25) In the embodiment, when the first screen refresh signal arrives, 415 data are acquired, which are unread acquired data, that is, D.sub.s=415. According to the equation (2), the number of points mapping for each column of a DSO's screen D.sub.r=100, the first D.sub.s acquired data are needed to readout, that is, D.sub.s=400.
(26) Step S2: three-dimensional compression mapping
(27) Step S2.1: value resetting
(28) In three-dimensional compression mapping phase, the first to do is resetting the corresponding addresses of the three-dimensional database according to the number of columns of data mapping, i.e. writing data 0 to corresponding addresses of a SRAM, the arrangement of the SRAM's addresses of a three-dimensional database depends on the actual size of DSO's screen, the horizontal resolution of the DSO is R.sub.x, the vertical resolution of the DSO is R.sub.y. In the embodiment, as shown in
(29) Because the screen refresh take column as a unit, the numbers of the addresses to be reset and the address to be mapped are both multiple times of R.sub.y, the relation between the number A.sub.s of reset addresses and the number D.sub.s of acquired data is as follows:
(30)
(31) In the embodiment, the number A.sub.s of reset addresses is:
(32)
(33) In the present invention, a flag X is introduced into the three-dimensional database, and the flag X points to the column where three-dimensional compression mapping is performed, the value of the flag X ranges from 0 to R.sub.x. In the embodiment, the value of the flag X ranges from 0 to 799, the initial value of the flag X is 0. Value resetting is from the column pointed to by the flag X, i.e. writes data 0 to the A.sub.s addresses from address XR.sub.y to XR.sub.y+A.sub.s1 of the three-dimensional database. When the address XR.sub.y+A.sub.s1 is greater than or equal to R.sub.xR.sub.y, i.e. out of the address range of the three-dimensional database, the corresponding address is changed to XR.sub.y(X240|+A.sub.s1R.sub.xR.sub.y, where R.sub.x is the horizontal resolution of the DSO, R.sub.y is the vertical resolution of the DSO. In the embodiment, When the address XR.sub.y+A.sub.s1 is greater than the maximal address 191999, the value resetting starts from address 0. The waveforms in three-dimensional database before and after value resetting are shown in
(34) Step S2.2: data mapping
(35) Data mappings are performed in turn to the first D.sub.s acquired data which are read out in step S1: the value of address Y of the three-dimensional database is read out, adding 1 to it, then written back to address Y of the three-dimensional database, where address Y of the three-dimensional database is:
Y=(XR.sub.y)+(R.sub.yV1)(4)
(36) where V is the value of the acquired data;
(37) where in the process of data mapping, after each D.sub.r acquired data are mapped, the flag X is updated: if X+1 is equal to R.sub.x, then X=0, else X=X+1.
(38) After value resetting, there is data mapping. In the embodiment, the value of acquired data ranges 0256, which represents the amplitude of waveform, in order to match the number of the rows of the three-dimensional database, the value greater than R.sub.y1, ie, 239, is taken as R.sub.y1, ie, 239. Address Y of three-dimensional database which corresponds to value V is:
Y=(XR.sub.y)+(R.sub.yV1)=(500240)(240V1)=12000(240V1)
(39) In the embodiment, data mappings are performed in turn to the first D.sub.s, i.e. 400 acquired data which are read out in step S1: the value of address Y of the three-dimensional database is read out and added 1, then written back to address Y of the three-dimensional database. In the process of data mapping, after each D.sub.r, i.e. 100 acquired data are mapped, namely the mapping of a column's data is completed, the flag X is updated: if X+1 is equal to R.sub.x, then X=0, else X=X+1. In the embodiment, the 1st to 100th acquired data in data mapping will be mapped to the corresponding addresses, i.e. address 120000 to 120239, after the 100 acquired data are mapped, the flag X will be increased by 1, i.e. X=501; The 101th to 200th acquired data in data mapping will be mapped to the corresponding addresses, i.e. address 120240 to 120479, after the 100 acquired data are mapped, the flag X will be increased by 1, i.e. X=502. Similarly, when all 400 acquired data are mapped, X=504. The waveforms in three-dimensional database before and after three-dimensional compression mapping are shown in
(40) When the flag X=799 and the flag is updated, X+1=800, that is, X+1 is equal to R.sub.x, then X=0.
(41) Step S3: importing to video memory
(42) After the data mappings of all the D.sub.s acquired data are completed, importing the values of the three-dimensional database into the video memory of the DSO from the column pointed to by the flag X, i.e. from the starting address XR.sub.y to display the waveform, where in the process of importing, when reaching the address R.sub.xR.sub.y1, the importing continues from the address 0 until the address XR.sub.y1.
(43) Then returning to the Step S1.2 for the next three-dimensional compression mapping and importing to video memory.
(44) In the embodiment, after the data mapping of all the D.sub.s acquired data is completed, the importing to video memory starts. When importing to video memory, as shown in
(45) In the embodiment, the importing to video memory is from the column pointed to by flag X, i.e. from address 120960, after reaching address 191999, it starts from address 0 again, until address 12059.
(46)
(47) In the embodiment, when the first screen refresh signal arrives, 415 data are acquired, all of them are unread read data, i.e, D.sub.s=415. Thus the first D.sub.s, i.e., 400 acquired data are read out for three-dimensional compression mapping. The initial value of flag X is 0, then the addresses to be reset in the three-dimensional database range from 0 to 959. After the value resetting, the data mapping starts. In the process of data mapping, after each 100 acquired data are mapped, the flag X is increased by 1. Thus, as shown in
(48) When the second screen refresh signal arrives, 405 data are acquired, and 15 acquired data are left after the first reading, then the number D.sub.s of unread acquired data is 420. According to equation (2), the number D.sub.s of acquired data to be read out is 400, the value resetting and data mapping starts from the column X (X=4). After each 100 acquired data are mapped, the flag X is increased by 1. Thus, as shown in
(49) While illustrative embodiments of the invention have been described above, it is, of course, understand that various modifications will be apparent to those of ordinary skill in the art. Such modifications are within the spirit and scope of the invention, which is limited and defined only by the appended claims.