CN104317755A - Wireless program control method applied to signal generator - Google Patents

Wireless program control method applied to signal generator Download PDF

Info

Publication number
CN104317755A
CN104317755A CN201410561922.XA CN201410561922A CN104317755A CN 104317755 A CN104317755 A CN 104317755A CN 201410561922 A CN201410561922 A CN 201410561922A CN 104317755 A CN104317755 A CN 104317755A
Authority
CN
China
Prior art keywords
data
signal generator
wireless
wireless program
interface
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
CN201410561922.XA
Other languages
Chinese (zh)
Other versions
CN104317755B (en
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.)
CETC 41 Institute
Original Assignee
CETC 41 Institute
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 CETC 41 Institute filed Critical CETC 41 Institute
Priority to CN201410561922.XA priority Critical patent/CN104317755B/en
Publication of CN104317755A publication Critical patent/CN104317755A/en
Application granted granted Critical
Publication of CN104317755B publication Critical patent/CN104317755B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a wireless program control method applied to a signal generator. The wireless program control method is based on a wireless module chip of a USB (universal serial bus) interface which is embedded in the signal generator. The wireless program control method includes steps of firstly, initializing data structures; secondly, detecting and judging whether data are available in communication channels or not; thirdly, parsing control instructions transmitted by an upper computer if the data are available, transmitting the data into a data execution component after the control instructions are successfully parsed, mapping the data to command execution functions, judging whether operation types of data information are correct or not, transmitting correctly parsed parameters into an instrument via an integral interface if the operation types of the data information are correct, completing a control operation procedure, or completing communication at the moment if the data are not available; fourthly, transmitting the data information to the upper computer by the aid of TCP/IP (transmission control protocol/internet protocol)-standard library functions if feedback information which is transmitted to the upper computer by the signal generator is detected after control operation is completed, and completing communication at the moment after the data information is completely transmitted to the upper computer.

Description

A kind of wireless program-controlled method being applied to signal generator
Technical field
The present invention relates to computer application field, particularly a kind of wireless program-controlled method being applied to signal generator.
Background technology
Along with the development of computer hardware technique, the Auto-Test System based on network is ripe day by day and be applied in industrial practice.Modern test theory requires that realizing instrument resource shares and Long-distance Control, and rely on existing network technology, people can effectively control remote instruments equipment, carry out anywhere gathering, analyze and show the various data from instrument.
At present, conventional communication means is nearly all adopt wired transmissions medium, such as twisted-pair feeder, optical fiber etc., also the problems such as test site network layout, network line maintenance are brought thus, need the occasion of movement in a big way in sudden, the provisional process of some needs and message exchange equipment, more bring some difficulties in application.
The wireless channel serving as transmission medium with electromagnetic wave or light wave overcomes the shortcoming in above-mentioned networking, obtains in recent years and studies widely, but rare application in the test macro relevant to surveying instrument.At present, the mode of existing instrument wireless program-controlled mainly: surveying instrument is connected with switch by netting twine, and it is mutual that host computer passes through wireless routing or wireless bridge and switch again, as shown in Figure 1.
The major defect of said method is:
(1) for automatic test site, surveying instrument may quite sporadically be distributed in a larger scope, wiring is comparatively complicated, and need to need rewiring when expanding and increase new equipment at test macro, need a large amount of manpower and materials even consumption of financial resources in some yard credit union.
(2) for the network switch, its power consumption is larger, equipment may have larger power consumption, the larger switch volume simultaneously had carries inconvenience more greatly, bother very much in transport, simultaneously owing to using switch architecture complexity not easily to set up, bring labile factor to test macro sometimes.
The communication means of traditional Auto-Test System can not meet information transmission requirement far away.In order to realize the test node of people in any dispersion, get the hope of measurement data at any time, the function that modern intelligent instrument possesses wireless program-controlled just becomes the deficiency making up cable network, reaches the best solution of Network stretch effect.
Summary of the invention
The test environment that the technical matters that the present invention solves is for circumstance complication, when cannot use cable network because of geographical, cost factor, provides a kind of wireless program-controlled method being applied to signal generator, is convenient to the Auto-Test System of building network.
Technical scheme of the present invention is achieved in that
Be applied to a wireless program-controlled method for signal generator, based on the wireless module chip of a USB interface embedded in signal generator, comprise the following steps:
Step one, data structure initialization;
Step 2, whether detect communication port has data;
Step 3, there are data, then the steering order of host computer transmission is resolved, data after successfully resolved are sent into data execution unit and mapped and performs function to order, if judge, the action type of this data message is correct, then the parameter after correctly resolving is sent in instrument by complete machine interface, complete a control operation; If countless certificate, then terminate this time communication;
Step 4, after above-mentioned control operation completes, if detect, signal generator is to host computer feedback information, then utilize the built-in function of TCP/IP standard to send data message to host computer, transmits and terminates rear end this time communication.
Alternatively, in described step 3, when having data, the process that parsing steering order, control instrument are arranged specifically comprises:
First, to USB interface initialization;
After initialization, USB interface with the form of descriptor by the information reporting of each interface to instrument end, instrument end carries out reading and writing data by this USB interface after receiving interface report.
Alternatively, described USB interface read-write is that layering realizes, instrument end application program is applied to kernel mode manager by system service interface, after manager carries out necessary inspection, create a packet and pass to driver module, driver module is by calling hardware abstraction layer to realize the access to USB hardware.
Alternatively, the access process of described driver module to USB hardware specifically comprises the following steps:
Step a, data in data buffer are sent into I/O manager by application layer;
Step b, I/O manager sends data interchange request to USB layer;
Step c, judges that whether driver is normal;
Steps d, normally, then hardware abstraction layer realizes, to USB hardware access, carrying out step e; Abnormal, then terminate access;
Step e, calls application layer call back function, completes data communication, terminates access.
Alternatively, the wireless program-controlled method being applied to signal generator of the present invention, also comprise the step being monitored wireless module chip by clocked flip module within certain cycle in real time, if trigger pip do not detected in official hour, then system can send alarm signal to instrument end, then takes corresponding measure.
Alternatively, the execution of described clocked flip module comprises the following steps:
First, timer is started;
Whether then, detect and have software and hardware abnormal: be without exception, then timing terminates, and restarts timing; There is exception, then keep the scene intact;
Next, present instruction re-executes or reset chip;
Timing terminates, and restarts timing.
The invention has the beneficial effects as follows:
Based on method of the present invention, automatic test environment based on signal generator conveniently can be set up by the user of environmental restraint and other Special use environment without steady job place, cable network erection, thus improve the system availability of signal generator, shorten system deployment time and the use cost of lowering apparatus.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is existing wireless program-controlled equipment control block diagram;
Fig. 2 is a kind of process flow diagram being applied to the wireless program-controlled method of signal generator of the present invention;
Fig. 3 is a kind of process flow diagram being applied to the step 3 of the wireless program-controlled method of signal generator of the present invention;
Fig. 4 is a kind of flowchart being applied to the clocked flip module of the wireless program-controlled method of signal generator of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The invention provides a kind of wireless program-controlled method being applied to signal generator, based on the wireless module chip of a USB interface embedded in signal generator, signal generator carries out radio communication by this wireless module chip and host computer, signal generator is possessed and accepts the program control function of computer radio, the program control useful supplement of cable network can be become at the scene of test environment complexity, and work complicated, trifling in a large number automatically completed by software, thus save valuable test resource as far as possible.
The present invention needs to carry out two-way communication, needs to detect two communication ports simultaneously, and as shown in Figure 2, the wireless program-controlled method being applied to signal generator of the present invention comprises the following steps:
Step one, data structure initialization;
Step 2, whether detect communication port has data;
Step 3, there are data, then the steering order of host computer transmission is resolved, data after successfully resolved are sent into data execution unit and mapped and performs function to order, if judge, the action type of this data message is correct, then the parameter after correctly resolving is sent in instrument by complete machine interface, complete a control operation; If countless certificate, then terminate this time communication;
Step 4, after above-mentioned control operation completes, if detect, signal generator is to host computer feedback information, then utilize the built-in function of TCP/IP standard to send data message to host computer, transmits and terminates rear end this time communication.
In above-mentioned steps three, when having data, need to resolve steering order, control instrument is arranged, and specifically comprises:
First, to USB interface initialization;
After initialization, USB interface with the form of descriptor by the information reporting of each interface to instrument end, instrument end carries out reading and writing data by this interface after receiving interface report.
USB interface read-write of the present invention is that layering realizes, instrument end application program is applied to kernel mode manager by system service interface, after manager carries out necessary inspection, create a packet and pass to driver module, driver module by calling hardware abstraction layer to realize the access to USB hardware, the software interface that above-mentioned hardware abstraction layer provides operator for hardware operating system.
As shown in Figure 3, the access of driver module to USB hardware specifically comprises the following steps:
Step a, data in data buffer are sent into I/O manager by application layer;
Step b, I/O manager sends data interchange request to USB layer;
Step c, judges that whether driver is normal;
Steps d, normally, then hardware abstraction layer realizes, to USB hardware access, carrying out step e; Abnormal, then terminate access;
Step e, calls application layer call back function, completes data communication, terminates access.
In order to increase the reliability of wireless program-controlled method of the present invention, within certain cycle, wireless module chip is monitored in real time by clocked flip module, if trigger pip do not detected in official hour, then system can send alarm signal to instrument end, take corresponding measure again, ensure that wireless module chip can normally work.The flowchart of clocked flip module as shown in Figure 4, comprises the following steps:
First, timer is started;
Whether then, detect and have software and hardware abnormal: be without exception, then timing terminates, and restarts timing; There is exception, then keep the scene intact;
Next, present instruction re-executes or reset chip;
Timing terminates, and restarts timing.
Wireless program-controlled method based on signal generator of the present invention, first, testing requirement that can be different according to user, provides a kind of wireless program-controlled method to cable network programmable signal generator, extends the usable range of signal generator; Secondly, this wireless program-controlled method, environment that can be different according to test site, reduces the testing cost of user; In addition, user uses method of the present invention, and user without the need to change, directly can be used for wireless program-controlled at wired program control the completed control program of use; Finally, compared with existing wireless program-controlled method, efficiency and convenience improve a lot.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. be applied to a wireless program-controlled method for signal generator, it is characterized in that, based on the wireless module chip of a USB interface embedded in signal generator, comprise the following steps:
Step one, data structure initialization;
Step 2, whether detect communication port has data;
Step 3, there are data, then the steering order of host computer transmission is resolved, data after successfully resolved are sent into data execution unit and mapped and performs function to order, if judge, the action type of this data message is correct, then the parameter after correctly resolving is sent in instrument by complete machine interface, complete a control operation; If countless certificate, then terminate this time communication;
Step 4, after above-mentioned control operation completes, if detect, signal generator is to host computer feedback information, then utilize the built-in function of TCP/IP standard to send data message to host computer, transmits and terminates rear end this time communication.
2. be applied to the wireless program-controlled method of signal generator as claimed in claim 1, it is characterized in that, in described step 3, when having data, the process that parsing steering order, control instrument are arranged specifically comprises:
First, to USB interface initialization;
After initialization, USB interface with the form of descriptor by the information reporting of each interface to instrument end, instrument end carries out reading and writing data by this USB interface after receiving interface report.
3. be applied to the wireless program-controlled method of signal generator as claimed in claim 2, it is characterized in that, described USB interface read-write is that layering realizes, instrument end application program is applied to kernel mode manager by system service interface, after manager carries out necessary inspection, create a packet and pass to driver module, driver module is by calling hardware abstraction layer to realize the access to USB hardware.
4. be applied to the wireless program-controlled method of signal generator as claimed in claim 3, it is characterized in that, the access process of described driver module to USB hardware specifically comprises the following steps:
Step (a), data in data buffer are sent into I/O manager by application layer;
Step (b), I/O manager sends data interchange request to USB layer;
Step (c), judges that whether driver is normal;
Step (d), normally, then hardware abstraction layer realizes, to USB hardware access, carrying out step (e); Abnormal, then terminate access;
Step (e), calls application layer call back function, completes data communication, terminates access.
5. the wireless program-controlled method being applied to signal generator as described in any one of Claims 1-4, it is characterized in that, also comprise the step being monitored wireless module chip by clocked flip module within certain cycle in real time, if trigger pip do not detected in official hour, then system can send alarm signal to instrument end, then takes corresponding measure.
6. be applied to the wireless program-controlled method of signal generator as claimed in claim 5, it is characterized in that, the execution of described clocked flip module comprises the following steps:
First, timer is started;
Whether then, detect and have software and hardware abnormal: be without exception, then timing terminates, and restarts timing; There is exception, then keep the scene intact;
Next, present instruction re-executes or reset chip;
Timing terminates, and restarts timing.
CN201410561922.XA 2014-10-13 2014-10-13 A kind of wireless program-controlled method applied to signal generator Active CN104317755B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410561922.XA CN104317755B (en) 2014-10-13 2014-10-13 A kind of wireless program-controlled method applied to signal generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410561922.XA CN104317755B (en) 2014-10-13 2014-10-13 A kind of wireless program-controlled method applied to signal generator

Publications (2)

Publication Number Publication Date
CN104317755A true CN104317755A (en) 2015-01-28
CN104317755B CN104317755B (en) 2018-02-16

Family

ID=52372990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410561922.XA Active CN104317755B (en) 2014-10-13 2014-10-13 A kind of wireless program-controlled method applied to signal generator

Country Status (1)

Country Link
CN (1) CN104317755B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106448098A (en) * 2016-08-17 2017-02-22 中国电子科技集团公司第四十研究所 Wireless program-control testing system and method using electronic measuring instruments

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001018662A1 (en) * 1999-09-10 2001-03-15 Logitech Europe S.A. Wireless peripheral interface with universal serial bus port
WO2003019396A1 (en) * 2001-08-22 2003-03-06 General Atomics Wireless device attachment and detachment system, apparatus and method
US6725302B1 (en) * 1999-09-23 2004-04-20 International Business Machines Corporation Universal serial bus (USB) with wireless communication hubs
US20040203415A1 (en) * 2002-10-25 2004-10-14 Wen-Jen Wu Wireless transmission USB hub and method
CN2746455Y (en) * 2004-11-03 2005-12-14 赫立讯科技(北京)有限公司 USB expansion wireless transceiver
CN200944111Y (en) * 2006-06-23 2007-09-05 边东福 Water quality analyzer with wireless communication function
CN101788966A (en) * 2010-03-04 2010-07-28 浙江大学 Dynamic electronic tag system with low power consumption and wireless transmission
CN102098803A (en) * 2010-12-07 2011-06-15 武汉市天虹仪表有限责任公司 Wireless communication technology-based smoke dust/gas monitoring network and realization method thereof
CN103426287A (en) * 2012-05-23 2013-12-04 殷绪成 Novel communication control method and device based on mobile device and embedded device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001018662A1 (en) * 1999-09-10 2001-03-15 Logitech Europe S.A. Wireless peripheral interface with universal serial bus port
US6725302B1 (en) * 1999-09-23 2004-04-20 International Business Machines Corporation Universal serial bus (USB) with wireless communication hubs
WO2003019396A1 (en) * 2001-08-22 2003-03-06 General Atomics Wireless device attachment and detachment system, apparatus and method
US20040203415A1 (en) * 2002-10-25 2004-10-14 Wen-Jen Wu Wireless transmission USB hub and method
CN2746455Y (en) * 2004-11-03 2005-12-14 赫立讯科技(北京)有限公司 USB expansion wireless transceiver
CN200944111Y (en) * 2006-06-23 2007-09-05 边东福 Water quality analyzer with wireless communication function
CN101788966A (en) * 2010-03-04 2010-07-28 浙江大学 Dynamic electronic tag system with low power consumption and wireless transmission
CN102098803A (en) * 2010-12-07 2011-06-15 武汉市天虹仪表有限责任公司 Wireless communication technology-based smoke dust/gas monitoring network and realization method thereof
CN103426287A (en) * 2012-05-23 2013-12-04 殷绪成 Novel communication control method and device based on mobile device and embedded device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
吴奕明等: "一种对USB通信异常的自动恢复方法设计", 《计算机应用与软件》 *
李文东: "USB接口监控技术研究", 《中国科技信息》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106448098A (en) * 2016-08-17 2017-02-22 中国电子科技集团公司第四十研究所 Wireless program-control testing system and method using electronic measuring instruments

Also Published As

Publication number Publication date
CN104317755B (en) 2018-02-16

Similar Documents

Publication Publication Date Title
CN104602404B (en) LED lighting apparatus, wireless mesh network and control method thereof
CN107704346B (en) SOC chip debugging method and system
US20140343915A1 (en) Test environment configuration apparatus and method of operating network simulation apparatus using same
CN102421112B (en) Testing method of mobile terminal, mobile terminal simulator, testing equipment and testing system
CN113064780A (en) Automatic test system and method based on router product
CN103138988B (en) Positioning treatment method and positioning treatment device of network faults
CN102967815B (en) Chip testing method, automated testing equipment and system
CN104598513A (en) Data flow control method and system based on webpage frame
CN103731663B (en) The testing method of a kind of intelligent television and device
CN103530211A (en) PCIE loop back self-test method based on UVM platform
CN106568168A (en) Debugging method, debugger and system
CN109344075A (en) Configuration method, test method, configuration server and service node device
CN108345533A (en) A kind of application program adjustment method, equipment and server
CN105391601A (en) Network management equipment performance testing method and system
CN105141484A (en) Android equipment remote debugging method based on cloud server
CN102315981B (en) Equipment and method for testing evolved packet core network equipment
CN101895441B (en) Service debugging device and method for JAVA application of terminal of Internet of things
CN104317755A (en) Wireless program control method applied to signal generator
CN104991848A (en) Method and system for implementing Key code burning on basis of MSComm control
CN103149909A (en) Field programmable gate array (FPGA)-based controller area network (CAN) simulation node system
CN209441385U (en) The communication detection system of train network control system
CN103259697A (en) Method using UWB equipment to carry out ADB debugging on android platform
CN102843690A (en) Wireless access point-based penetration test system and test method thereof
CN110753363A (en) Intelligent device wireless debugging system and method
CN103269293B (en) Android platform utilize microwave telecommunication devices carry out the method for debugging acid ADB debugging

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant