CN102223259A - Method and device for collecting and storing data - Google Patents

Method and device for collecting and storing data Download PDF

Info

Publication number
CN102223259A
CN102223259A CN2010101511576A CN201010151157A CN102223259A CN 102223259 A CN102223259 A CN 102223259A CN 2010101511576 A CN2010101511576 A CN 2010101511576A CN 201010151157 A CN201010151157 A CN 201010151157A CN 102223259 A CN102223259 A CN 102223259A
Authority
CN
China
Prior art keywords
data
interface
test data
usb
visa
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.)
Pending
Application number
CN2010101511576A
Other languages
Chinese (zh)
Inventor
冯景锋
刘骏
常江
李国松
何剑辉
代明
谢锦辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING GUANGDIANTIANDI INFORMATION CONSULTATION Co Ltd
Original Assignee
BEIJING GUANGDIANTIANDI INFORMATION CONSULTATION Co Ltd
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 BEIJING GUANGDIANTIANDI INFORMATION CONSULTATION Co Ltd filed Critical BEIJING GUANGDIANTIANDI INFORMATION CONSULTATION Co Ltd
Priority to CN2010101511576A priority Critical patent/CN102223259A/en
Publication of CN102223259A publication Critical patent/CN102223259A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

The embodiment of the invention provides a method for collecting and storing data, comprising the following steps of: receiving test data from an antenna; collecting the test data through a USB (Universal Serial Bus) interface, a GPIB (General Purpose Interface Bus) interface, a VISA (Virtual Instrument Software Architecture) interface and a serial interface; and storing and playing back the test data from the USB interface, the GPIB interface, the VISA interface and the serial interface. The embodiment of the invention further provides a device for collecting and storing the data, comprising a receiving module, a collecting module and a storing module, wherein the collecting module comprises a USB communication unit, a GPIB/VISA communication unit and a serial interface communication unit. According to the method and the device provided by the embodiment of the invention, the test data is collected through the USB interface and the like; precise signal parameters are recorded with other testing apparatuses, such as a frequency spectrograph and the like; the obtained test data is stored and played back, and then is analyzed and post-treated; and the test operation is simple and easily carried out.

Description

The method of a kind of data acquisition and storage and device
Technical field
The present invention relates to communication and field of broadcast televisions, especially relate to the method and the device of a kind of data acquisition and storage.
Background technology
CMMB (China Mobile Multimedia Broadcasting, China Mobile's DMB) is the China Mobile multimedia broadcasting industry standard of SARFT(The State Administration of Radio and Television) in October, 2006 promulgation.CMMB determines to adopt the mobile TV acceptance criteria STiMi of China's independent research, and this standard was from enforcement on November 1 in 2006.It is the digital multimedia broadcasting system of first cover of domestic independent research towards mobile phone, PDA, MP3, MP4, digital camera, the multiple portable terminal of notebook computer.CMMB has stipulated in the broadcasting service frequency range, frame structure, chnnel coding and the modulation of mobile multimedia broadcast system broadcast channel transmission signals, this standard is applicable to that 30MHz is to the interior broadcasting service frequency of 3000MHz frequency range, via satellite and/or the broadcast system of multi-media signals such as terrestrial wireless emission TV, broadcasting, data message, can realize whole nation roaming.
In order to accelerate the promotion and application of CMMB, comprehensive assessment CMMB performance is especially tested mobile reception and the city coverage effect of CMMB, is necessary the mobile reception/coverage test system at CMMB of design specialized.In the middle of each metropolitan CMMB networking process of the whole nation, the coverage test of CMMB signal provides important data foundation for the network optimization with adjusting.The construction of digital TV broadcasting network is an intricately process, need constantly optimize and adjust, and just can reach best performance, obtains best coverage effect.And the foundation of constantly adjusting and optimizing then comes from accurate, effectively network coverage test.Therefore, a mature and stable CMMB network coverage test macro, both the development for CMMB had very big benifit, also was simultaneously to save the government investment cost, and it is indispensable efficiently to build the CMMB network.
In the coverage test of CMMB network, the collection of data and storage are one of important process.How can be to computer the transfer of data of receiving terminal demodulation generation, tester in conjunction with other writes down the accurate signal parameter again, as frequency spectrograph etc., the testing software that uses automation at last is resulting data preparation and storage, is one of those skilled in the art's major issue that need solve
Summary of the invention
Purpose of the present invention is intended to one of address the above problem at least, especially by collecting test data such as USB interface, tester in conjunction with other writes down the accurate signal parameter again, as frequency spectrograph etc., and with the test data storage and the playback that obtain, carry out the analysis and the reprocessing of data, test job is simple, and is easy to operate.
In order to achieve the above object, embodiments of the invention have proposed the method for a kind of data acquisition and storage on the one hand, comprise the steps:
Reception is from the test data of antenna;
Described test data is gathered by USB interface, gpib interface, VISA interface and serial ports;
To preserve and playback from the test data of described USB interface, gpib interface, VISA interface and serial ports.
Embodiments of the invention have also proposed the device of a kind of data acquisition and storage on the other hand, comprise receiver module, acquisition module and memory module,
Described receiver module is used to receive the test data from antenna;
Described acquisition module is used for described test data is gathered by USB interface, gpib interface, VISA interface and serial ports;
Described memory module will be preserved and playback from the test data of described USB interface, gpib interface, VISA interface and serial ports.
The such scheme that the present invention proposes, by collecting test data such as USB interface, the tester in conjunction with other writes down the accurate signal parameter again, as frequency spectrograph etc., and, carry out the analysis and the reprocessing of data with the test data storage and the playback that obtain, test job is simple, and is easy to operate.
Aspect that the present invention adds and advantage part in the following description provide, and part will become obviously from the following description, or recognize by practice of the present invention.
Description of drawings
Above-mentioned and/or additional aspect of the present invention and advantage are from obviously and easily understanding becoming the description of embodiment below in conjunction with accompanying drawing, wherein:
Fig. 1 is the FB(flow block) of the method for embodiment of the invention data acquisition and storage;
Fig. 2 is the structured flowchart of CMMB test macro;
Fig. 3 is the USB driving class hierarchy schematic diagram according to the embodiment of the invention;
Fig. 4 is the USB firmware program flow chart according to the embodiment of the invention;
Fig. 5 is the structural representation according to the device of the data acquisition of the embodiment of the invention and storage.
Embodiment
Describe embodiments of the invention below in detail, the example of described embodiment is shown in the drawings, and wherein identical from start to finish or similar label is represented identical or similar elements or the element with identical or similar functions.Below by the embodiment that is described with reference to the drawings is exemplary, only is used to explain the present invention, and can not be interpreted as limitation of the present invention.
In order to realize the present invention's purpose, the invention discloses the method for a kind of data acquisition and storage, Fig. 1 shows the FB(flow block) of this method, and this method comprises the steps:
S101: receive test data from antenna.
In conjunction with shown in Figure 2, CMMB coverage test system is divided into peripheral hardware and computer (PC) two parts.Peripheral hardware partly is used for linking to each other with antenna and is used for the acceptance test signal, comprises CMMB test dash receiver, portable frequency spectrum instrument and GPS receiver.Specifically, CMMB test dash receiver is used for the video information and the mistake package informatin of the test signal of reception antenna emission.The portable frequency spectrum instrument is used for the field intensity information of acceptance test signal.The GPS receiver is used for the latitude and longitude information of acceptance test signal.
S102: test data is gathered by USB interface, gpib interface, VISA interface and serial ports.
PC part in the CMMB coverage test system can realize test data is gathered and stored.Specifically, wrap data by the USB interface collection from the video data and the mistake of CMMB beta version.
Traditional data-interface generally adopts pci bus or RS-232 universal serial bus.Pci bus has higher transmission rate, can reach 132Mbit/s, also can plug and play, but their expansion slot is limited and the plug inconvenient.The RS-232 universal serial bus connects more convenient, but transmission rate is too slow, is not easy for high-speed transferring data and transmits mass data.USB (Universal Serial BUS, USB) is a kind of computer interface, is widely used between main frame and various peripheral hardware and carries out transfer of data.USB2.0 is the 3rd version of usb bus agreement, and theoretical maximum speed reaches 480Mbps.Except transmission speed was fast, USB2.0 also had numerous advantages, as had unified the connector of various interface equipment and used the joint model of single special use, can connect a plurality of interface equipments etc.The most outstanding advantage is the characteristic with " hot plug ", can plug and play, and can detect resource, dispense with outer connecting power with configuration-system automatically, this has just concentrated the advantage of PCI and RS-232 universal serial bus, therefore, it is fit closely the USB interface technology being applied to data acquisition.
In the present embodiment, USB interface adopts the CY7C68013A in the Cypress EZ-USB FX2 of the company series.This chip comprises a FIFO memory and the general programmable interface (GPIF) of RAM, 512 byte Scratch RAM, 4kB on one 8051 processor, a serial interface engine (SIE), USB transceiver, the 8kB sheet.Intelligent SIE among the EZ-USB FX2 can handle most of USB2.0 agreement, make microcontroller can be absorbed in application function, thereby reduced the development time, the compatibility of having guaranteed.
The bsp driver that CMMB coverage test system adopts Cypress company to provide comes and hardware carries out alternately, and makes modification as required, and the hardware driving class is encapsulated.Fig. 3 drives the level schematic diagram for USB.
The transmission direction of usb protocol predetermined data has two kinds, IN and OUT.Usb protocol is a kind of master slave relation agreement, has master slave relation between two USB device of mutual communication, so transmission direction is from the angle of main equipment.In simple terms, in usb data communication, transfer of data is to main equipment, and current transmission direction is IN; If data spread out of from main equipment, so current transmission direction then is OUT.
USB interface is the bus protocol based on the token package, does not take interrupt vector, DMA or any input and output resource of any PC.Therefore, must could reach the purpose of communicating by letter with ancillary equipment by rigorous agreement.In usb protocol, the type of data packets for transmission defines with the particular code that is referred to as PacketIDs (PID).Have four kinds of PID types in the USB bag, comprise token, data, shake hands and four kinds of package signs of specific type identifier PID.Table 1 has been listed the type of data packet of USB2.0.
Table 1
The PID type The PID title
Token IN,OUT,SOF,SETUP
Data DATA0,DATA1,DATA2,MDATA
Shake hands ACK,NAK,STALL,NYET
Specific type PRE,ERR,SPLIT,PING
When the full speed pattern, each OUT transmission sends data OUT bag, does not consider whether peripheral hardware is in " doing " state and can not receives data.At the situation of this waste bandwidth, when fast mode, recommend to use new PID type " PING ".Main frame sends short " PING " token to the OUT end points earlier, inquires whether current peripheral hardware has data space to come the store data bag, and only when external equipment was answered " ARK ", main frame just sent than the long data bag.
The SETUP token only is used for control transmission.It is preceding 8 bytes in the packet.By these 8 bytes, peripheral hardware is deciphered the device request of main frame.
The SOF token is represented the beginning of a USB frame.
ARK (Acknowledge) represents that successfully, Data Receiving is errorless.
NAK (Negative Acknowledge) expression is busy, retransmits.This is not to make mistakes, and the USB peripheral hardware does not have answer list that mistake is shown.
STALL represents unknown error, and peripheral hardware fails to understand the device request that main frame sends, and might be that peripheral hardware brings out mistake, or host access and non-existent resource.Usb protocol provides from the method for STALL recovering state.
NYET (Not Yet) is similar to ACK, and the expression Data Receiving is errorless and point out that peripheral hardware also is not ready to receive next packet.Only be used at fast mode.
PRE (Special Preamble) package has PID typonym PRE alone, and it is only applicable to main frame and wants the situation sent out when high-speed transfer becomes low speed transmissions.Before just main frame is sent the low speed package and low-speed device is communicated by letter for the lower end port, the PRE package that must send earlier.
It is the part of partition data transaction (Split Transaction) that the SPILIT package has defined the token package.In order to use bus time best, USB2.0 main frame and hub can be to send low speed and communication data at full speed at a high speed.
The ERR package only uses when partition data is concluded the business.The USB2.0 hub can use this package and repay a mistake with low speed or data trade at full speed and give main frame.
In this test macro, what the usb data interface communication between test receiver and the personal computer adopted is the SlaveFIFOs pattern, and the USB interface of test receiver is subjected to the control of software on the personal computer as slave unit.
In the usb protocol, transmit data by end points.End points be one can unique identification the part of USB device, it is an end point of main frame and communication between devices stream.A series of separate end points have constituted the USB logical device together.Each logical device has a unique address, and this address is when equipment connects main frame, by host assignment, and each end points in the equipment has unique endpoint number at device interior.This endpoint number is given when device design.Each end points all is a simple tie point, supports that perhaps data flow to equipment, perhaps supports its outflow equipment, and both are unable to have both at one and the same time.The characteristic of an end points has determined the type of the transmission that it and client software carry out.An end points has following characteristic: the bus access frequency requirement of end points, the bus delay of end points require, the endpoint number of the bandwidth requirement of end points, end points, be not that 0 end points is in unknown state before being set up to data transmission direction, the endpoint number of transmission type, end points and the main frame of the maximum length of the requirement of fault processing, bag that end points can receive or send, end points, can not be by host access.
The SlaveFIFOs pattern of CY68013A provides five end points, is respectively EP0, EP2, EP4, EP6 and EP8.EP0 can only be used for control transmission, and other end points then can select to be used for bulk transfer or synchronous transmission.EP0 is a two-way end points unique in these end points, both can transmit the data of IN, also can transmit the OUT data.And other end points can only be configured to a kind of transmission direction, IN or OUT.Except EP0, each end points distributes the FIFO that knows clearly, and the size of FIFO and buffering multiple can be provided with by register, and the attribute that each endpoint attribute and each FIFO correctly be set is vital for the firmware development of usb communication control chip.CMMB coverage test system selects for use EP2 as the bulk transfer end points, transmits CMMB multiplex stream data.
USB interface collecting test data need write firmware code.Specifically, on the CY7C68013 chip, the I/O pin that much is used to control the FIFO read-write being arranged, to the correct configuration of these pins with read, is that successfully to develop the usb communication interface necessary.Among above, mentioned test macro USB transmission means of selecting for use and the end points of selecting for use, promptly adopt the mode of bulk transfer, use end points 2 to transmit data, therefore, from the data flow that the CMMB demodulation chip is exported, should be written among the FIFO that end points 2 had.
Firmware program is exactly to be solidificated in the equipment USB controller internal program memory or the program in the program storage of outside expansion, and firmware program is finished required function in order to help hardware.
In the hardware development of test receiver, USB interface-based transfer of data and control are very important parts.The USB process chip of using in the system, the transfer of data of realization two-forty.
Firmware program helps hardware to finish transfer of data.Therefore develop the key of usb communication and control module, be to write efficient, stable firmware program.
Firmware code under the exploitation EZ-USB FX2 framework generally comprises following three processes: one, initialization comprises the initialization of processor and peripheral circuit; Two, principal function comprises and finishes the code that meets the equipment particular requirement; Three, Interrupt Process comprises the program code of handling various interruptions.
The initialization task that the firmware program of usb communication control chip need be finished in the CMMB coverage test system has: the mode of operation that the USB chip is set; Select suitable end points in order to the transmission data; The related register of configuration end points makes data transmission, operation effectively; Simultaneously, all global variables of initialization.
Fig. 4 shows the flow chart of USB firmware program.
1) power-on reset;
2) all global variables of initialization;
3) interruption being set enables;
4) dispose each critical registers;
5) the self-defined state variable of initialization;
6) judge whether to receive data read request;
When judgement receives data read request, submit the data among the FIFO to; Otherwise continue to judge whether to receive data read request.After the data in submitting FIFO to, repeat to judge that both sides do not receive data read request.
Gather field intensity data by gpib interface and/or VISA interface from the portable frequency spectrum instrument.Gpib interface is the interface of at present the most frequently used intelligent instrument, this socket system is proposed by U.S. Hewlett-Packard Corporation at first, the back is also referred to as IEEE-488 interface or IEC-625 interface by the standard interface that U.S. electric and Electronic Engineering Association (IEEE) and International Electrotechnical Commission (IEC) are accepted as programmable instrument and automatic measuring and controlling system.Use gpib interface, the instrument of the various models that different manufacturers can be produced couples together easily with a passive STD bus, forms various Auto-Test Systems.
VISA (Virtual Instrument Software Architecture) is a senior API (API) that is used for carrying out with various instrument bus communication, is I/O interface software standard and the related specifications general name thereof that alliance of VPP system formulates.The VISA built-in function is a cover function that can conveniently call, core function may command all kinds device wherein, and need not consider the interface type of device.
Test macro uses the collection peripheral hardware of Agilent N9340A hand-hold type RF spectrum analysis instrument as the field intensity data, because frequency spectrograph is a USB interface, does not provide gpib interface, so need operate by the VISA built-in function.Test macro adopts the NI-VISA storehouse of NI company, and control information and data output are encapsulated.Wherein, control information comprises and frequency is set, bandwidth, reference level etc.Data output comprises reads the field intensity value.Concrete encapsulation relation is as shown in table 2.
Figure GSA00000093862400081
By the longitude and latitude data of serial ports collection from the GPS receiver.Serial ports is a most frequently used data transmission channel between computer and the external series equipment.When data from CPU through serial ports when sending, byte data is converted to the position of serial; When receiving data, the position of serial is converted into byte data.Serial communication has in the industrial automation field very to be used widely, in some industrial control systems, requires system to have real-time computing usually, the needs that serial ports can satisfy efficient Interrupt Process, multitask and communicate by letter.
Though the GPS receiver on the market has various interface to be connected to the PC end now, portion communicates by serial ports and computer within it.The serial communication flow process comprises:
1) opens serial ports, the serial communication parameter is set.Communications parameter comprises communication terminal slogan and communication format;
2) read/write serial ports, incident and fault processing;
3) close serial ports.
In CMMB coverage test system, the GPS receiver of employing is a HOLUX GR-213 type satellite positioning receiver, need change serial port drive by USB it is operated.
S103: will preserve and playback from the test data of USB interface, gpib interface, VISA interface and serial ports.
The preservation of test data and playback function also are the indispensable functions of general test system.To preserve and playback from the test data of above-mentioned USB interface, gpib interface, VISA interface and serial ports.CMMB coverage test system uses the Access database to preserve data, and manages and operating database by the oledb technology.Test macro can carry out playback operation and test data done to analyze gathering by database to test process.
In conjunction with shown in Figure 2, after finishing above-mentioned data acquisition, test data is carried out analyzing and processing by data analysis module, shows the field intensity and the error code of current location in the GIS module, shows the field intensity of current time and the real-time statistics information of error code in data analysis module.
Data acquisition and storage means that the embodiment of the invention proposes, by collecting test data such as USB interface, tester in conjunction with other writes down the accurate signal parameter again, as frequency spectrograph etc., and with the test data storage and the playback that obtain, carry out the analysis and the reprocessing of data, test job is simple, and is easy to operate.
The embodiment of the invention also discloses a kind of data acquisition and storage device, Fig. 5 shows the structured flowchart of this device.This device 500 comprises receiver module 510, acquisition module 511 and memory module 512.
Receiver module 510 is used to receive the test data from antenna.In conjunction with shown in Figure 2, receiver module 510 comprises CMMB test dash receiver, portable frequency spectrum instrument and GPS receiver.Specifically, CMMB test dash receiver is used for the video information and the mistake package informatin of the test signal of reception antenna emission.The portable frequency spectrum instrument is used for the field intensity information of acceptance test signal.The GPS receiver is used for the latitude and longitude information of acceptance test signal.
Acquisition module 520 is used for test data is gathered by USB interface, gpib interface, VISA interface and serial ports.Acquisition module 520 comprises usb communication unit 521, GPIB/VISA communication unit 522 and serial communication unit 523.Specifically, usb communication unit 521 comprises the USB serial ports, is used to gather video data and wraps data by mistake.
Traditional data-interface generally adopts pci bus or RS-232 universal serial bus.Pci bus has higher transmission rate, can reach 132Mbit/s, also can plug and play, but their expansion slot is limited and the plug inconvenient.The RS-232 universal serial bus connects more convenient, but transmission rate is too slow, is not easy for high-speed transferring data and transmits mass data.USB is a kind of computer interface, is widely used between main frame and various peripheral hardware to carry out transfer of data.USB2.0 is the 3rd version of usb bus agreement, and in issue in 1999, its theoretical maximum speed reached 480Mbps.Except transmission speed was fast, USB2.0 also had numerous advantages, as had unified the connector of various interface equipment and used the joint model of single special use, can connect a plurality of interface equipments etc.The most outstanding advantage is the characteristic with " hot plug ", can plug and play, and can detect resource, dispense with outer connecting power with configuration-system automatically, this has just concentrated the advantage of PCI and RS-232 universal serial bus, therefore, it is fit closely the USB interface technology being applied to data acquisition.
In the present embodiment, USB interface adopts the CY7C68013A in the Cypress EZ-USB FX2 of the company series.This chip comprises a FIFO memory and the general programmable interface (GPIF) of RAM, 512 byte Scratch RAM, 4kB on one 8051 processor, a serial interface engine (SIE), USB transceiver, the 8kB sheet.Intelligent SIE among the EZ-USB FX2 can handle most of USB2.0 agreement, make microcontroller can be absorbed in application function, thereby reduced the development time, the compatibility of having guaranteed.
The bsp driver that CMMB coverage test system adopts Cypress company to provide comes and hardware carries out alternately, and makes modification as required, and the hardware driving class is encapsulated.Fig. 3 drives the level schematic diagram for USB.
The transmission direction of usb protocol predetermined data has two kinds, IN and OUT.Usb protocol is a kind of master slave relation agreement, has master slave relation between two USB device of mutual communication, so transmission direction is from the angle of main equipment.In simple terms, in usb data communication, transfer of data is to main equipment, and current transmission direction is IN; If data spread out of from main equipment, so current transmission direction then is OUT.
USB interface is the bus protocol based on the token package, does not take interrupt vector, DMA or any input and output resource of any PC.Therefore, must could reach the purpose of communicating by letter with ancillary equipment by rigorous agreement.In usb protocol, the type of data packets for transmission defines with the particular code that is referred to as PacketIDs (PID).Have four kinds of PID types in the USB bag, comprise token, data, shake hands and four kinds of package signs of specific type identifier PID.Table 1 has been listed the type of data packet of USB2.0.
When the full speed pattern, each OUT transmission sends data OUT bag, does not consider whether peripheral hardware is in " doing " state and can not receives data.At the situation of this waste bandwidth, when fast mode, recommend to use new PID type " PING ".Main frame sends short " PING " token to the OUT end points earlier, inquires whether current peripheral hardware has data space to come the store data bag, and only when external equipment was answered " ARK ", main frame just sent than the long data bag.
The SETUP token only is used for control transmission.It is preceding 8 bytes in the packet.By these 8 bytes, peripheral hardware is deciphered the device request of main frame.
The SOF token is represented the beginning of a USB frame.
ARK (Acknowledge) represents that successfully, Data Receiving is errorless.
NAK (Negative Acknowledge) expression is busy, retransmits.This is not to make mistakes, and the USB peripheral hardware does not have answer list that mistake is shown.
STALL represents unknown error, and peripheral hardware fails to understand the device request that main frame sends, and might be that peripheral hardware brings out mistake, or host access and non-existent resource.Usb protocol provides from the method for STALL recovering state.
NYET (Not Yet) is similar to ACK, and the expression Data Receiving is errorless and point out that peripheral hardware also is not ready to receive next packet.Only be used at fast mode.
PRE (Special Preamble) package has PID typonym PRE alone, and it is only applicable to main frame and wants the situation sent out when high-speed transfer becomes low speed transmissions.Before just main frame is sent the low speed package and low-speed device is communicated by letter for the lower end port, the PRE package that must send earlier.
It is the part of partition data transaction (Split Transaction) that the SPILIT package has defined the token package.In order to use bus time best, USB2.0 main frame and hub can be to send low speed and communication data at full speed at a high speed.
The ERR package only uses when partition data is concluded the business.The USB2.0 hub can use this package and repay a mistake with low speed or data trade at full speed and give main frame.
In this test macro, what the usb data interface communication between test receiver and the personal computer adopted is the SlaveFIFOs pattern, and the USB interface of test receiver is subjected to the control of software on the personal computer as slave unit.
In the usb protocol, transmit data by end points.End points be one can unique identification the part of USB device, it is an end point of main frame and communication between devices stream.A series of separate end points have constituted the USB logical device together.Each logical device has a unique address, and this address is when equipment connects main frame, by host assignment, and each end points in the equipment has unique endpoint number at device interior.This endpoint number is given when device design.Each end points all is a simple tie point, supports that perhaps data flow to equipment, perhaps supports its outflow equipment, and both are unable to have both at one and the same time.The characteristic of an end points has determined the type of the transmission that it and client software carry out.An end points has following characteristic: the bus access frequency requirement of end points, the bus delay of end points require, the endpoint number of the bandwidth requirement of end points, end points, be not that 0 end points is in unknown state before being set up to data transmission direction, the endpoint number of transmission type, end points and the main frame of the maximum length of the requirement of fault processing, bag that end points can receive or send, end points, can not be by host access.
The SlaveFIFOs pattern of CY68013A provides five end points, is respectively EP0, EP2, EP4, EP6 and EP8.EP0 can only be used for control transmission, and other end points then can select to be used for bulk transfer or synchronous transmission.EP0 is a two-way end points unique in these end points, both can transmit the data of IN, also can transmit the OUT data.And other end points can only be configured to a kind of transmission direction, IN or OUT.Except EP0, each end points distributes the FIFO that knows clearly, and the size of FIFO and buffering multiple can be provided with by register, and the attribute that each endpoint attribute and each FIFO correctly be set is vital for the firmware development of usb communication control chip.CMMB coverage test system selects for use EP2 as the bulk transfer end points, transmits CMMB multiplex stream data.
USB interface collecting test data need write firmware code.Specifically, on the CY7C68013 chip, the I/O pin that much is used to control the FIFO read-write being arranged, to the correct configuration of these pins with read, is that successfully to develop the usb communication interface necessary.Among above, mentioned test macro USB transmission means of selecting for use and the end points of selecting for use, promptly adopt the mode of bulk transfer, use end points 2 to transmit data, therefore, from the data flow that the CMMB demodulation chip is exported, should be written among the FIFO that end points 2 had.
Firmware program is exactly to be solidificated in the equipment USB controller internal program memory or the program in the program storage of outside expansion, and firmware program is finished required function in order to help hardware.
In the hardware development of test receiver, USB interface-based transfer of data and control are very important parts.The USB process chip of using in the system, the transfer of data of realization two-forty.
Firmware program helps hardware to finish transfer of data.Therefore develop the key of usb communication and control module, be to write efficient, stable firmware program.
Firmware code under the exploitation EZ-USB FX2 framework generally comprises following three processes: one, initialization comprises the initialization of processor and peripheral circuit; Two, principal function comprises and finishes the code that meets the equipment particular requirement; Three, Interrupt Process comprises the program code of handling various interruptions.
The initialization task that the firmware program of usb communication control chip need be finished in the CMMB coverage test system has: the mode of operation that the USB chip is set; Select suitable end points in order to the transmission data; The related register of configuration end points makes data transmission, operation effectively; Simultaneously, all global variables of initialization.
Fig. 4 shows the flow chart of USB firmware program.
7) power-on reset;
8) all global variables of initialization;
9) interruption being set enables;
10) dispose each critical registers;
11) the self-defined state variable of initialization;
12) judge whether to receive data read request;
When judgement receives data read request, submit the data among the FIFO to; Otherwise continue to judge whether to receive data read request.After the data in submitting FIFO to, repeat to judge that both sides do not receive data read request.
GPIB/VISA communication unit 522 comprises gpib interface and/or VISA interface, is used to gather the field intensity data.
By the field intensity data of GPIB/VISA communication unit 522 collections from the portable frequency spectrum instrument.Gpib interface is the interface of at present the most frequently used intelligent instrument, this socket system is proposed by U.S. Hewlett-Packard Corporation at first, the back is also referred to as IEEE-488 interface or IEC-625 interface by the standard interface that U.S. electric and Electronic Engineering Association (IEEE) and International Electrotechnical Commission (IEC) are accepted as programmable instrument and automatic measuring and controlling system.Use gpib interface, the instrument of the various models that different manufacturers can be produced couples together easily with a passive STD bus, forms various Auto-Test Systems.
VISA (Virtual Instrument Software Architecture) is a senior API (API) that is used for carrying out with various instrument bus communication, is I/O interface software standard and the related specifications general name thereof that alliance of VPP system formulates.The VISA built-in function is a cover function that can conveniently call, core function may command all kinds device wherein, and need not consider the interface type of device.
Test macro uses the collection peripheral hardware of Agilent N9340A hand-hold type RF spectrum analysis instrument as the field intensity data, because frequency spectrograph is a USB interface, does not provide gpib interface, so need operate by the VISA built-in function.Test macro adopts the NI-VISA storehouse of NI company, and control information and data output are encapsulated.Wherein, control information comprises and frequency is set, bandwidth, reference level etc.Data output comprises reads the field intensity value.Table 2 shows concrete encapsulation relation.
Serial communication unit 523 comprises serial ports, is used to gather the longitude and latitude data.By the longitude and latitude data of serial ports collection from the GPS receiver.Serial ports is a most frequently used data transmission channel between computer and the external series equipment.When data from CPU through serial ports when sending, byte data is converted to the position of serial; When receiving data, the position of serial is converted into byte data.Serial communication has in the industrial automation field very to be used widely, in some industrial control systems, requires system to have real-time computing usually, the needs that serial ports can satisfy efficient Interrupt Process, multitask and communicate by letter.
Though the GPS receiver on the market has various interface to be connected to the PC end now, portion communicates by serial ports and computer within it.The serial communication flow process comprises:
4) open serial ports, the serial communication parameter is set.Communications parameter comprises communication terminal slogan and communication format;
5) read/write serial ports, incident and fault processing;
6) close serial ports.
In CMMB coverage test system, the GPS receiver of employing is a HOLUX GR-213 type satellite positioning receiver, need change serial port drive by USB it is operated.
Memory module 530 will be preserved and playback from the test data of USB interface, gpib interface, VISA interface and serial ports.
The preservation of test data and playback function also are the indispensable functions of general test system.To preserve and playback from the test data of above-mentioned usb communication unit 521, GPIB/VISA communication unit 522 and serial communication unit 523.CMMB coverage test system uses the Access database to preserve data, and manages and operating database by the oledb technology.Test macro can carry out playback operation and test data done to analyze gathering by database to test process.
In conjunction with shown in Figure 2, after finishing above-mentioned data acquisition, test data is carried out analyzing and processing by data analysis module, shows the field intensity and the error code of current location in the GIS module, shows the field intensity of current time and the real-time statistics information of error code in data analysis module.
Data acquisition and storage device that the embodiment of the invention proposes, by collecting test data such as USB interface, tester in conjunction with other writes down the accurate signal parameter again, as frequency spectrograph etc., and with the test data storage and the playback that obtain, carry out the analysis and the reprocessing of data, test job is simple, and is easy to operate.
The such scheme that the present invention proposes can be monitored the difference variation of radio-frequency channel in real time by the calibration error parameter, and reflects the precision of calibration in real time by the calibration error parameter that reports.In addition, the such scheme that the present invention proposes can be adjusted the cycle of calibrating in real time according to the calibration error parameter, changes shortening calibration cycle when very fast in the radio-frequency channel, elongate calibration cycle when gradual relatively in the radio-frequency channel, in time carry out rational antenna calibration according to the calibration accuracy situation.The such scheme that the present invention proposes, very little to the change of existing system, can not influence the compatibility of system, and realize simple, efficient.
One of ordinary skill in the art will appreciate that and realize that all or part of step that the foregoing description method is carried is to instruct relevant hardware to finish by program, described program can be stored in a kind of computer-readable recording medium, this program comprises one of step or its combination of method embodiment when carrying out.
In addition, each functional unit in each embodiment of the present invention can be integrated in the processing module, also can be that the independent physics in each unit exists, and also can be integrated in the module two or more unit.Above-mentioned integrated module both can adopt the form of hardware to realize, also can adopt the form of software function module to realize.If described integrated module realizes with the form of software function module and during as independently production marketing or use, also can be stored in the computer read/write memory medium.
The above-mentioned storage medium of mentioning can be a read-only memory, disk or CD etc.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (17)

1. the method for data acquisition and storage is characterized in that described method comprises the steps:
Reception is from the test data of antenna;
Described test data is gathered by USB interface, gpib interface, VISA interface and serial ports;
To preserve and playback from the test data of described USB interface, gpib interface, VISA interface and serial ports.
2. the method for data acquisition as claimed in claim 1 and storage is characterized in that, described test data comprises video data, misses and wrap data, field intensity data and longitude and latitude data
3. method as claimed in claim 2 is characterized in that, described test data comprises by USB interface, gpib interface, VISA interface and serial ports collection:
Gather described video data and wrap data by mistake by described USB interface;
Gather described field intensity data by described gpib interface and/or VISA interface;
Gather described longitude and latitude data by described serial ports.
4. the method for claim 1 is characterized in that, described USB interface is gathered described test data, comprises the steps:
The mode of operation of USB interface is set;
Select end points to gather described test data;
Dispose the register of described end points.
5. the method for claim 1 is characterized in that, gathers described test data by described VISA interface, comprises the steps: described test data is encapsulated.
6. the method for claim 1 is characterized in that, gathers described test data by described serial ports, comprises the steps:
Open serial ports, the communications parameter of serial ports is set;
Gather described test data by serial ports;
Carry out event handling and fault processing.
7. the method for claim 1 is characterized in that, described test data is preserved with playback comprise the steps: to adopt database that described test data is preserved.
8. method as claimed in claim 7 is characterized in that, to described test data preserve with playback be real-time.
9. the device of data acquisition and storage is characterized in that described device comprises receiver module, acquisition module and memory module,
Described receiver module is used to receive the test data from antenna;
Described acquisition module is used for described test data is gathered by USB interface, gpib interface, VISA interface and serial ports;
Described memory module will be preserved and playback from the test data of described USB interface, gpib interface, VISA interface and serial ports.
10. device as claimed in claim 9 is characterized in that, described acquisition module comprises usb communication unit, GPIB/VISA communication unit and serial communication unit,
Described usb communication unit comprises the USB serial ports,
Described GPIB/VISA communication unit comprises gpib interface and/or VISA interface,
Described serial communication unit comprises serial ports.
11. device as claimed in claim 10 is characterized in that, the test data that described acquisition module collects comprises video data, misses and wrap data, field intensity data and longitude and latitude data.
12. device as claimed in claim 11 is characterized in that,
Described usb communication unit is used to gather described video data and mistake is wrapped data;
Described GPIB/VISA communication unit is used to gather described field intensity data;
Described serial communication unit is used to gather described longitude and latitude data.
13. device as claimed in claim 10 is characterized in that, described test data is gathered in described usb communication unit, comprising:
The mode of operation of described USB interface is set;
Select end points to gather described test data;
Dispose the register of described end points.
14. device as claimed in claim 10 is characterized in that, described GPIB/VISA communication unit is gathered described test data by described VISA interface, comprising: described test data is encapsulated.
15. device as claimed in claim 10 is characterized in that, described test data is gathered in described serial communication unit, comprising:
Open serial ports, the communications parameter of serial ports is set;
Gather described test data by serial ports;
Carry out event handling and fault processing.
16. device as claimed in claim 10 is characterized in that, described memory module is preserved with playback described test data and is comprised: adopt database that described test data is preserved.
17. device as claimed in claim 16 is characterized in that, described memory module to described test data preserve with playback be real-time.
CN2010101511576A 2010-04-16 2010-04-16 Method and device for collecting and storing data Pending CN102223259A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101511576A CN102223259A (en) 2010-04-16 2010-04-16 Method and device for collecting and storing data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101511576A CN102223259A (en) 2010-04-16 2010-04-16 Method and device for collecting and storing data

Publications (1)

Publication Number Publication Date
CN102223259A true CN102223259A (en) 2011-10-19

Family

ID=44779692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101511576A Pending CN102223259A (en) 2010-04-16 2010-04-16 Method and device for collecting and storing data

Country Status (1)

Country Link
CN (1) CN102223259A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103209040A (en) * 2013-04-19 2013-07-17 西北工业大学 Radio frequency signal envelope index testing method based on virtual instrument
CN107015057A (en) * 2017-04-07 2017-08-04 南京邮电大学 2.4GHz frequency spectrum monitoring systems based on PC serial communication
CN107198860A (en) * 2017-07-18 2017-09-26 义乌畅为智能科技有限公司 The Intelligentized Information system of for building body platform adapter
CN107918136A (en) * 2016-08-31 2018-04-17 北京华力创通科技股份有限公司 Satellite navigation signals record and playback reproducer based on PCI E buses
CN110636124A (en) * 2019-09-17 2019-12-31 平安科技(深圳)有限公司 VPP cluster management method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6681284B1 (en) * 2000-11-27 2004-01-20 National Instruments Corporation System and method for providing a serial bus interface using distributed driver execution
CN1964545A (en) * 2006-11-28 2007-05-16 青岛海信移动通信技术股份有限公司 A test system for multiple mode mobile terminal and its test method
CN200979741Y (en) * 2006-12-11 2007-11-21 中华人民共和国厦门出入境检验检疫局 A distributed real-time on-line monitoring device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6681284B1 (en) * 2000-11-27 2004-01-20 National Instruments Corporation System and method for providing a serial bus interface using distributed driver execution
CN1964545A (en) * 2006-11-28 2007-05-16 青岛海信移动通信技术股份有限公司 A test system for multiple mode mobile terminal and its test method
CN200979741Y (en) * 2006-12-11 2007-11-21 中华人民共和国厦门出入境检验检疫局 A distributed real-time on-line monitoring device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
《中国优秀硕士学位论文全文数据库 信息科技辑》 20100315 常江 移动多媒体广播(CMMB)覆盖测试系统的研究与实现 , 第3期 *
常江: "移动多媒体广播(CMMB)覆盖测试系统的研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 3, 15 March 2010 (2010-03-15) *
郑斯佳等: "移动多媒体广播覆盖测试系统开发", 《广播与电视技术》, no. 3, 31 March 2009 (2009-03-31) *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103209040A (en) * 2013-04-19 2013-07-17 西北工业大学 Radio frequency signal envelope index testing method based on virtual instrument
CN103209040B (en) * 2013-04-19 2015-02-18 西北工业大学 Radio frequency signal envelope index testing method based on virtual instrument
CN107918136A (en) * 2016-08-31 2018-04-17 北京华力创通科技股份有限公司 Satellite navigation signals record and playback reproducer based on PCI E buses
CN107918136B (en) * 2016-08-31 2020-02-04 北京华力创通科技股份有限公司 Satellite navigation signal recording and playback device based on PCI-E bus
CN107015057A (en) * 2017-04-07 2017-08-04 南京邮电大学 2.4GHz frequency spectrum monitoring systems based on PC serial communication
CN107198860A (en) * 2017-07-18 2017-09-26 义乌畅为智能科技有限公司 The Intelligentized Information system of for building body platform adapter
CN110636124A (en) * 2019-09-17 2019-12-31 平安科技(深圳)有限公司 VPP cluster management method and device, electronic equipment and storage medium
CN110636124B (en) * 2019-09-17 2022-07-08 平安科技(深圳)有限公司 VPP cluster management method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110213143B (en) 1553B bus IP core and monitoring system
CN103714029B (en) Novel two-line synchronous communication protocol and application
CN108132897B (en) SRIO controller based on ZYNQ platform soft core
US9684583B2 (en) Trace data export to remote memory using memory mapped write transactions
CN102223259A (en) Method and device for collecting and storing data
CN108255776B (en) I3C master device compatible with APB bus, master-slave system and communication method
CN103178872B (en) Method and the device of USB system transfers distance is extended by Ethernet
CN101977275B (en) Method for obtaining on-board computer data by mobile communication terminal and mobile terminal thereof
CN103781088A (en) Two point four gigahertz full-channel data collection and protocol analysis instrument based on IEEE802.15.4
CN107592250B (en) Multi-rate self-adaptive test equipment based on aviation FC bus
CN105117319A (en) Method for realizing real-time monitoring of multi-channel MDIO (Management Data Input Output) devices based on FPGA
CN101764794B (en) Programmable IEEE1394 bus monitoring system and monitoring method thereof
US8626963B2 (en) Packet based data transfer system and method for host-slave interface
CN103019990B (en) A kind of collection terminal starts the method for PCI-E bus DMA uploading data
CN101937413A (en) Communication method of I2C bus
CN103152115B (en) Full-channel data acquirer
CN203772429U (en) Single-bus temperature monitoring device
CN103092800B (en) A kind of data conversion experimental platform
Li et al. UART Controller with FIFO Buffer Function Based on APB Bus
CN105939238A (en) SOC isolation Memory-based 10Gbps Ethernet real-time data acquisition method
CN202067397U (en) Local parking place detection processor
CN100462952C (en) Interface configurable universal series bus controller
CN104572515A (en) Tracking module, method, system and SOC (System-On-Chip)
CN208862847U (en) Analog BBU baseband signal generator and collector
CN103200248B (en) Based on the communication means of the power param eter supervision of embedded system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 100045 Beijing city Xicheng District zhenwumiao two No. 9 layer 10 audio archive

Applicant after: Beijing Tidycast Co., Ltd.

Address before: 100045 Beijing city Xicheng District zhenwumiao two No. 9 layer 10 audio archive

Applicant before: Beijing Guangdiantiandi Information Consultation Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: BEIJING GUANGDIAN TIANDI INFORMATION CONSULTATION CO., LTD. TO: BEIJING GUANGDIAN TIANDI TECHNOLOGY CO., LTD.

C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20111019