CN102663145A - Variable-frequency test data sampling and storage method - Google Patents

Variable-frequency test data sampling and storage method Download PDF

Info

Publication number
CN102663145A
CN102663145A CN2012101286308A CN201210128630A CN102663145A CN 102663145 A CN102663145 A CN 102663145A CN 2012101286308 A CN2012101286308 A CN 2012101286308A CN 201210128630 A CN201210128630 A CN 201210128630A CN 102663145 A CN102663145 A CN 102663145A
Authority
CN
China
Prior art keywords
data
passage
frequency
storage
buffer
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.)
Granted
Application number
CN2012101286308A
Other languages
Chinese (zh)
Other versions
CN102663145B (en
Inventor
蔡远文
程龙
李岩
解维奇
姚静波
辛朝军
张宇
王�华
Original Assignee
蔡远文
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 蔡远文 filed Critical 蔡远文
Priority to CN201210128630.8A priority Critical patent/CN102663145B/en
Publication of CN102663145A publication Critical patent/CN102663145A/en
Application granted granted Critical
Publication of CN102663145B publication Critical patent/CN102663145B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a variable-frequency test data sampling and storage method, which comprises the following steps of: acquiring data at an actual frequency f of 1,000 Hz; respectively storing the acquired data into a cache with n channels according to the channels; setting the acquisition frequency of each channel and acquiring the effective number of data to be stored at each time; and gradually traversing the data from 0 to 999 in the channels of the cache, sequentially compressing the acquired data in the cache in the form of binary according to the sampling frequency of each channel, recording channel information and relevant information on the head and the tail, and storing to a memory. The variable-frequency test data sampling and storage method has the advantages that a data sampling and storage frequency is changed at any time, and the hardware bottom layer configuration is not changed, so that frequent hardware bottom layer operation and calibration work are avoided, and a tester can flexibly select the data to be recorded conveniently.

Description

Sampling of test figure frequency conversion rate and the method for storing
Technical field
The present invention relates to data processing method, especially a kind of test figure frequency conversion rate sampling and the method for storing.
Background technology
In the prior art, the SF of test figure generally is provided with through the method for hardware switch wire jumper or change configuration function parameter, and for the reliability of warranty test data acquisition, frequency is in case set seldom change.If need to change frequency acquisition, must manually be provided with the wire jumper of hardware, switch etc., or call the bottom hardware configuration function, work efficiency is lower, and it is many to adapt to acquisition channel, the testing experiment requirement that frequency shift is frequent.Frequently change the frequency acquisition of hardware simultaneously, possibly reduce the reliability of acquisition system.
When frequency acquisition is set, at least 4 counter parameters need be set in initialization procedure like certain capture card (PXI-2200): the hits of sweep spacing, SI, the scanning times that once triggers and each scanning.The sampling number of every passage need be set simultaneously.The setting of these parameters must called corresponding configuration function with change before each test, and each change of hardware bottom layer parameter all needs self check again and proofreads measuring error and precision, and process is more loaded down with trivial details.
Summary of the invention
The purpose of this invention is to provide a kind of hardware bottom layer configuration that need not to change; Can change data sampling and stored frequency at any time; Avoided operation of frequent hardware bottom layer and proof-reading, selections need data recorded flexibly, sampling of the rate of test figure frequency conversion easily and the method for storing.
For realizing above-mentioned purpose, test figure frequency conversion rate sampling provided by the invention and the method for storing are provided with data acquisition unit, buffer and storer, and this method may further comprise the steps:
1) said data acquisition unit is the actual frequency image data of 1000Hz with f;
2) data of gathering are stored to the buffer ReadBuf that port number is n respectively by passage, the metadata cache time is 1s, respectively corresponding 1000 data of each passage;
3) the frequency acquisition fn of each passage and obtain each needs stored valid data number according to the frequency acquisition fn that is provided with is set, frequency acquisition fn is 1000, and then per 1 data storage once; Frequency acquisition fn is 100, and then per 10 data storage once; Frequency acquisition fn is 10, and then per 100 data storage once; Frequency acquisition fn is 1, and then per 1000 data storage once;
4) travel through 0-999 the data of each passage in said buffer one by one; SF according to each passage; Compress the image data in the said buffer with binary mode successively, and, be stored to said storer then in data head and data trailer recording channel information and relevant information.
Test figure frequency conversion rate sampling of the present invention and the method for storing, wherein said step (4) may further comprise the steps:
(1) at first travel through the 0th data in each passage buffer memory, each channel data is effectively, and stores said the 0th data successively by the passage order;
(2) then travel through the 1st data in each passage buffer memory, only passage 1 data are effectively, and said the 1st data of storage continue;
(3) similar with step (2), travel through 2-9 data in each passage buffer memory successively, said the 1st data of storage continue;
(4) when the 10th data of each passage of traversal, then passage 1 is effectively with passage 2 data, and the 10th data of storage continue; The rest may be inferred, accomplishes until the 999th data traversal, and each channel data storage of the 1st second finishes;
(5) repeating said steps (1) is accomplished the 2nd second later data storage respectively to step (4);
(6) in data head and trailer record channel information and relevant information, be stored to said storer then.
Test figure frequency conversion rate sampling of the present invention and the method for storing, the channel information that wherein writes down at the data head comprises the SF of total number of channels and each passage, comprises the parameter of the signal that takes off in the relevant information of data trailer record.
Test figure frequency conversion rate of the present invention sampling is with the advantage of the method for storage: change the method for data sampling and storing frequencies at any time through software operation, do not change hardware bottom layer and dispose.Avoid frequent hardware bottom layer operation and proof-reading, made things convenient for the flexible selection of laboratory technician to need data recorded.
Embodiment of the present invention is described in detail with embodiment below in conjunction with accompanying drawing.
Description of drawings
Fig. 1 is the synoptic diagram of the method channel data cache way of test figure frequency conversion rate sampling of the present invention and storage;
Fig. 2 is the synoptic diagram of the method sampled data scale-of-two compression memory mode of test figure frequency conversion rate sampling of the present invention and storage.
Embodiment
Test figure frequency conversion rate sampling of the present invention and the method for storing; Do not change data acquisition unit, buffer and the storer of hardware bottom layer configuration; Gather and store the interval time of data with software mode control, thereby realize changing at any time data sampling and stored frequency.Simultaneously, utilize binary data format to realize the compression memory of image data, can recombinate to data according to data recording and interpretation demand, and through waveform and textual form output.
Test figure frequency conversion rate sampling of the present invention may further comprise the steps with the method for storage:
1) data acquisition unit is the actual frequency image data of 1000Hz with f;
2) data of gathering are stored to the buffer ReadBuf that port number is n respectively by passage, the metadata cache time is 1s, respectively corresponding 1000 data of each passage;
3) the frequency acquisition fn of each passage and obtain each needs stored valid data number according to the frequency acquisition fn that is provided with is set, frequency acquisition fn is 1000, and then per 1 data storage once; Frequency acquisition fn is 100, and then per 10 data storage once; Frequency acquisition fn is 10, and then per 100 data storage once; Frequency acquisition fn is 1, and then per 1000 data storage once;
4) travel through 0-999 the data of each passage in buffer one by one,,, and, be stored to storer then in head and trailer record channel information and relevant information successively with the image data in the binary mode compressed cache device according to the SF of each passage.Specifically may further comprise the steps:
(1) at first travel through the 0th data in each passage buffer memory, each channel data is effectively, and stores said the 0th data successively by the passage order;
(2) then travel through the 1st data in each passage buffer memory, only passage 1 data are effectively, and said the 1st data of storage continue;
(3) similar with step (2), travel through 2-9 data in each passage buffer memory successively, said the 1st data of storage continue;
(4) when the 10th data of each passage of traversal, then passage 1 is effectively with passage 2 data, and the 10th data of storage continue; The rest may be inferred, accomplishes until the 999th data traversal, and each channel data storage of the 1st second finishes;
(5) repeating said steps (1) is accomplished the 2nd second later data storage respectively to step (4);
(6) in data head and trailer record channel information and relevant information, comprise the SF of total number of channels and each passage, comprise in the relevant information of trailer record the parameter of the signal that takes off being stored to storer then.
To combine embodiment that embodiment of the present invention is elaborated below.
As shown in Figure 1, wherein the frequency acquisition of passage 3 is 10, and per 100 data storage once; Similar, passage 1 per 1 data are stored once, and passage 2 per 10 data are stored once, and passage 4 per 1000 data storages are once.The gray background data are the needs stored valid data among the figure.
As shown in Figure 2; During the binary file storage, top of file travels through 0-999 data of each passage buffer memory then one by one with the byte form successively SF of memory channel sum, each passage; In conjunction with the channel sample frequency, store the valid data of each passage successively.
In the method for test figure frequency conversion rate sampling of the present invention and storage, the data file of storage can be reduced in the channel data buffer.At first read top of file total number of channels and each channel sample frequency, understand each channel data then successively.
Test figure frequency conversion rate sampling of the present invention has realized with the method for storage:
1) changes the method for data sampling and storing frequencies at any time through software operation, do not change the hardware bottom layer configuration.
2) avoid frequent hardware bottom layer operation and proof-reading, made things convenient for the flexible selection of laboratory technician to need data recorded.
Above-described embodiment describes preferred implementation of the present invention; Be not that scope of the present invention is limited; Do not breaking away under the prerequisite that the present invention relates to spirit; Various distortion and improvement that the common engineering technical personnel in this area make technical scheme of the present invention all should fall in the definite protection domain of claims of the present invention.

Claims (3)

1. a test figure frequency conversion rate is sampled and the method for storing, and data acquisition unit, buffer and storer are set, and it is characterized in that this method may further comprise the steps:
1) said data acquisition unit is the actual frequency image data of 1000Hz with f;
2) data of gathering are stored to the buffer ReadBuf that port number is n respectively by passage, the metadata cache time is 1s, respectively corresponding 1000 data of each passage;
3) the frequency acquisition fn of each passage and obtain each needs stored valid data number according to the frequency acquisition fn that is provided with is set, frequency acquisition fn is 1000, and then per 1 data storage once; Frequency acquisition fn is 100, and then per 10 data storage once; Frequency acquisition fn is 10, and then per 100 data storage once; Frequency acquisition fn is 1, and then per 1000 data storage once;
4) travel through 0-999 the data of each passage in said buffer one by one; SF according to each passage; Compress the image data in the said buffer with binary mode successively, and, be stored to said storer then in data head and data trailer recording channel information and relevant information.
2. test figure frequency conversion rate sampling according to claim 1 and the method for storing is characterized in that wherein said step (4) may further comprise the steps:
(1) at first travel through the 0th data in each passage buffer memory, each channel data is effectively, and stores said the 0th data successively by the passage order;
(2) then travel through the 1st data in each passage buffer memory, only passage 1 data are effectively, and said the 1st data of storage continue;
(3) similar with step (2), travel through 2-9 data in each passage buffer memory successively, said the 1st data of storage continue;
(4) when the 10th data of each passage of traversal, then passage 1 is effectively with passage 2 data, and the 10th data of storage continue; The rest may be inferred, accomplishes until the 999th data traversal, and each channel data storage of the 1st second finishes;
(5) repeating said steps (1) is accomplished the 2nd second later data storage respectively to step (4);
(6) in data head and trailer record channel information and relevant information, be stored to said storer then.
3. according to claim 1 or 2 said test figure frequency conversion rate samplings and the method for storing; It is characterized in that; The channel information that wherein writes down at the data head comprises the SF of total number of channels and each passage, comprises the parameter of the signal that takes off in the relevant information of data trailer record.
CN201210128630.8A 2012-04-27 2012-04-27 Variable-frequency test data sampling and storage method Expired - Fee Related CN102663145B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210128630.8A CN102663145B (en) 2012-04-27 2012-04-27 Variable-frequency test data sampling and storage method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210128630.8A CN102663145B (en) 2012-04-27 2012-04-27 Variable-frequency test data sampling and storage method

Publications (2)

Publication Number Publication Date
CN102663145A true CN102663145A (en) 2012-09-12
CN102663145B CN102663145B (en) 2014-01-29

Family

ID=46772636

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210128630.8A Expired - Fee Related CN102663145B (en) 2012-04-27 2012-04-27 Variable-frequency test data sampling and storage method

Country Status (1)

Country Link
CN (1) CN102663145B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106227085A (en) * 2016-07-19 2016-12-14 浙江昱能科技有限公司 The method of single-chip data sampling processing, system, single-chip microcomputer and photovoltaic DC-to-AC converter
CN106855787A (en) * 2016-12-30 2017-06-16 深圳市易联网络技术有限公司 A kind of method of sampling of Internet of Things analog signal
CN109241010A (en) * 2018-09-11 2019-01-18 中国人民解放军战略支援部队航天工程大学 A kind of data storage method, stocking system and computer storage medium
CN113589124A (en) * 2021-07-16 2021-11-02 杭州中安电子有限公司 Method and device for acquiring variable frequency data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5997171A (en) * 1986-02-10 1999-12-07 Texas Instruments Incorporated Method and system for digital data storage, abstraction and compression to preserve the most useful characteristics of the data
CN101169635A (en) * 2007-11-28 2008-04-30 蔡远文 Multichannel data acquisition system and method
CN102254013A (en) * 2011-07-21 2011-11-23 深圳市华力特电气股份有限公司 Data processing method and data processing device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5997171A (en) * 1986-02-10 1999-12-07 Texas Instruments Incorporated Method and system for digital data storage, abstraction and compression to preserve the most useful characteristics of the data
CN101169635A (en) * 2007-11-28 2008-04-30 蔡远文 Multichannel data acquisition system and method
CN102254013A (en) * 2011-07-21 2011-11-23 深圳市华力特电气股份有限公司 Data processing method and data processing device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
蔡远文 等: "运载火箭多路测试信息采集处理系统的设计与实现", 《导弹与航天运载技术》, 30 June 2004 (2004-06-30) *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106227085A (en) * 2016-07-19 2016-12-14 浙江昱能科技有限公司 The method of single-chip data sampling processing, system, single-chip microcomputer and photovoltaic DC-to-AC converter
CN106227085B (en) * 2016-07-19 2018-12-18 浙江昱能科技有限公司 Method, system, single-chip microcontroller and the photovoltaic DC-to-AC converter of single-chip data sampling processing
CN106855787A (en) * 2016-12-30 2017-06-16 深圳市易联网络技术有限公司 A kind of method of sampling of Internet of Things analog signal
CN109241010A (en) * 2018-09-11 2019-01-18 中国人民解放军战略支援部队航天工程大学 A kind of data storage method, stocking system and computer storage medium
CN113589124A (en) * 2021-07-16 2021-11-02 杭州中安电子有限公司 Method and device for acquiring variable frequency data
CN113589124B (en) * 2021-07-16 2023-11-28 杭州中安电子有限公司 Method and device for collecting variable frequency data

Also Published As

Publication number Publication date
CN102663145B (en) 2014-01-29

Similar Documents

Publication Publication Date Title
US10656182B2 (en) Method and device for accessing data acquired by digital oscilloscope, and digital oscilloscope
CN103376380B (en) A kind of test system and method
CN102663145B (en) Variable-frequency test data sampling and storage method
CN109901472B (en) Sequence equivalent sampling system based on FPGA
CN107102186B (en) Digital oscilloscope fluorescent image parallel high-speed processing system and method
US10851647B2 (en) Downhole vibration and impact data recording method
KR100692782B1 (en) Data recording apparatus, and examination apparatus and control apparatus having the data recording apparatus
CN112362939A (en) Signal recording method and device, lower computer, upper computer and medium
CN108732398A (en) Simulation transformation storage
CN104180894A (en) Railway environment vibration real-time monitoring and analyzing system
CN109241010A (en) A kind of data storage method, stocking system and computer storage medium
US7366628B2 (en) Compressed logic sample storage
JP4756347B2 (en) Waveform measuring device
CN102518622A (en) Displacement testing based hydraulic oil cylinder characteristic testing method and system
CN205920142U (en) Oscilloscope
CN108874645A (en) A kind of method and system for integrating FIO performance data
CN102779104A (en) Fault injection method and device for serial port data
JP5365288B2 (en) Recording device
US20120106928A1 (en) Apparatus and method for testing signal channels of digital video recorder
CN109142835B (en) Data acquisition system with waveform multi-frame recording function
JP4510476B2 (en) Ultrasonic diagnostic equipment
US11454524B2 (en) Measurement apparatus and measurement method
CN112713897A (en) Oscilloscope and signal display method and device thereof
CN117368571B (en) Real-time spectrum analyzer and data processing method thereof
CN202049482U (en) Fault injection device for serial data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140129

Termination date: 20150427

EXPY Termination of patent right or utility model