Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a method and a system for testing instrument connectivity, aiming at the technical problems that a test platform of an oscilloscope in the prior art depends on a client to set communication characters in a specific test process, the setting of the client needs to be modified for different series of devices to be tested, the setting of the client is effective for four layers of devices simultaneously, the condition that four layers can only be simultaneously communicated with the same series of devices to be tested is limited, and in addition, when an operator does not input a correct and complete serial number to a corresponding layer, the device and the layer corresponding errors are caused by manual operation errors.
Fig. 1 is a detailed flowchart of a first embodiment of a method for testing instrument connectivity according to the present invention, and as can be seen from fig. 1, the method includes:
s101: and acquiring the current IP address.
In a specific embodiment, the current IP address is any IP address of the X-th tested instrument.
S102: and acquiring a test signal corresponding to the tested instrument. In a specific embodiment, the test signal may be output by a signal source, such as the radio frequency signal source DSG3000 of the layer X, and the output test signal may be a standard frequency signal FreqX, a fixed amplitude value signal AmplX, or a fixed rise time signal RiseTimeX.
S103: and when the tested instrument is communicated at the current IP address, reading the signal frequency of the tested instrument according to the current IP address. In a particular embodiment, the signal frequency of the instrument under test may be read by a multimeter, such as a digital multimeter DM 3068.
S104: and comparing the signal frequency with the test signal, and outputting a comparison result.
As mentioned above, in the first embodiment of the method for testing instrument connectivity provided by the present invention, a test signal is output to an X-th layer tested instrument, and when the tested instrument is connected to the current IP address, the signal frequency of the tested instrument is obtained, and the tested instrument is accurately connected to the fixed layer by comparing the signal frequency with the standard signal frequency.
Fig. 2 is a flowchart of a second implementation manner of a method for testing instrument connectivity according to an embodiment of the present invention, and as can be seen from fig. 2, the method specifically includes, in the second implementation manner:
s201: and acquiring the serial number. In a specific embodiment, the serial number may be input by the client, and then obtained by the upper computer.
S202: the IP address range of the routing setup is determined. In particular embodiments, the IP address range may be determined based on the number of devices testing the system.
S203: and determining an IP address from the IP address range as the current IP address. That is, the current IP address is an IP address arbitrarily selected from the IP address range.
S204: and acquiring the current IP address. The current IP address is any one of IP addresses of the tested instrument of the X layer in the IP address range.
S205: and acquiring a test signal corresponding to the tested instrument. In a specific embodiment, the test signal may be output by a signal source, and the output test signal may be a standard frequency signal FreqX, a fixed amplitude value signal AmplX, or a fixed rise time signal RiseTimeX.
S206: and when the tested instrument is communicated at the current IP address, reading the signal frequency of the tested instrument according to the current IP address. In particular embodiments, the signal frequency of the instrument under test may be read by a multimeter.
S207: and comparing the signal frequency with the test signal, and outputting a comparison result.
As described above, in the second embodiment of the method for testing instrument connectivity provided by the present invention, in this embodiment, the IP address range is determined according to the serial number input by the client, a test signal is output to the X-th layer device under test, when the device under test is connected at the current IP address, the signal frequency of the device under test is obtained, and the device under test is accurately connected to the fixed layer by comparing with the standard signal frequency.
Fig. 3 is a flowchart of a third implementation manner of a method for testing instrument connectivity according to an embodiment of the present invention, and as can be seen from fig. 3, the method specifically includes, in the third implementation manner:
s301: and acquiring a pre-stored IP address range. In particular embodiments, previously saved, i.e., pre-stored, IP address ranges may be retrieved from a database.
S302: and determining an IP address from the IP address range as the current IP address. That is, the current IP address is an IP address arbitrarily selected from the IP address range.
S303: and acquiring the current IP address. The current IP address is any one of IP addresses of the tested instrument of the X layer in the IP address range.
S304: and acquiring a test signal corresponding to the tested instrument. In a specific embodiment, the test signal may be output by a signal source, and the output test signal may be a standard frequency signal FreqX, a fixed amplitude value signal AmplX, or a fixed rise time signal RiseTimeX.
S305: and when the tested instrument is communicated at the current IP address, reading the signal frequency of the tested instrument according to the current IP address. In particular embodiments, the signal frequency of the instrument under test may be read by a multimeter.
S306: and comparing the signal frequency with the test signal, and outputting a comparison result.
As described above, in the third embodiment of the method for testing instrument connectivity according to the present invention, in this embodiment, the IP address range is obtained from the database and stored previously, and by outputting the test signal to the X-th layer device under test, when the device under test is connected at the current IP address, the signal frequency is obtained, and the device under test is accurately connected to the fixed layer by comparing with the standard signal frequency.
Fig. 4 is a flowchart of a fourth implementation manner of the method for testing instrument connectivity according to the embodiment of the present invention, and as can be seen from fig. 4, the method specifically includes, in the fourth implementation manner:
s401: and acquiring the allocated IP address. In a specific embodiment, the router may set an IP address of each layer of the to-be-tested instrument, that is, the router allocates a fixed IP address to the to-be-tested instrument, so that the process of traversing in an IP address range may be omitted in subsequent steps.
S402: and taking the IP address as the current IP address. That is, the current IP address is fixedly assigned to one IP address.
S403: and acquiring the current IP address. The current IP address is an IP address fixedly allocated by the tested instrument of the X layer.
S404: and acquiring a test signal corresponding to the tested instrument. In a specific embodiment, the test signal may be output by a signal source, and the output test signal may be a standard frequency signal FreqX, a fixed amplitude value signal AmplX, or a fixed rise time signal RiseTimeX.
S405: and when the tested instrument is communicated at the current IP address, reading the signal frequency of the tested instrument according to the current IP address. In particular embodiments, the signal frequency of the instrument under test may be read by a multimeter.
S406: and comparing the signal frequency with the test signal, and outputting a comparison result.
As mentioned above, in the fourth embodiment of the method for testing instrument connectivity provided by the present invention, in this embodiment, the router sets the IP address of each layer of the instrument to be tested, that is, the router allocates a fixed IP address to the instrument to be tested, so that the process of traversing in the IP address range can be omitted in the subsequent steps.
Fig. 5 is a detailed flowchart of a fifth embodiment of a method for testing instrument connectivity according to the present invention, and as can be seen from fig. 5, the method includes:
s501: and acquiring the current IP address.
In a specific embodiment, the current IP address is any IP address of the layer X device under test in the IP address range.
S502: and acquiring a test signal corresponding to the tested instrument. In a specific embodiment, the test signal may be output by a signal source, such as the radio frequency signal source DSG3000 of the layer X, and the output test signal may be a standard frequency signal FreqX, a fixed amplitude value signal AmplX, or a fixed rise time signal RiseTimeX.
S503: and judging whether the tested instrument is communicated at the current IP address. In a specific embodiment, the current IP address is taken for ping. PING, Packet Internet Groper, is an Internet Packet explorer, and is a program for testing the amount of network connections.
S504: and traversing in the IP address range when the judgment is negative, namely when the tested instrument is not communicated at the current IP address. Specifically, if the ping is not successful, the traversal is continued, and the rest of the IP addresses are selected from the range of the IP addresses as the current IP address.
S505: and when the current IP address is judged to be the same as the current IP address, reading the signal frequency of the tested instrument according to the current IP address. In a particular embodiment, the signal frequency of the instrument under test may be read by a multimeter, such as a digital multimeter DM 3068.
S506: and comparing the signal frequency with the test signal, and outputting a comparison result.
As described above, in the fifth embodiment of the method for testing instrument connectivity provided by the present invention, a test signal is output to the X-th layer tested instrument, when the tested instrument is connected to the current IP address, the signal frequency of the tested instrument is obtained, the tested instrument is accurately connected to the fixed layer by comparing with the standard signal frequency, and if the tested instrument is not connected, the next IP is continuously traversed.
Fig. 6 is a flowchart of a first embodiment of step S506 in fig. 5, and as can be seen from fig. 6, the step S506 includes:
s601: comparing the signal frequency with the test signal;
s602: traversing in the IP address range when the comparison fails;
s603: and outputting a comparison result of communication failure after traversing all IP addresses and failing to compare.
That is, if the obtained signal frequency does not correspond to the frequency of the test signal, the tested instrument of the current IP address is not located on the X-th layer, that is, the X-th layer is not connected with the tested instrument, other IP addresses are continuously traversed, and when all IP addresses are traversed and comparison fails, a comparison result of connection failure is output.
Fig. 7 is a flowchart of a second embodiment of step S506 in fig. 5, and as can be seen from fig. 7, the step S506 includes:
s701: comparing the signal frequency with the test signal;
s702: traversing in the IP address range when the comparison fails;
s703: and outputting a comparison result of communication failure after traversing all IP addresses and failing to compare.
S704: when the comparison is successful, outputting a comparison result which is successfully communicated;
s705: and storing the connection information of the instrument to be tested.
That is, if the acquired signal frequency corresponds to the frequency of the test signal, the tested instrument of the current IP address is in the X-th layer, otherwise, other IPs are continuously traversed.
As described above, the method for testing instrument connectivity provided by the present invention outputs a test signal to an instrument to be tested, and by sequentially connecting devices and acquiring signal frequency thereof, the test signal is accurately connected to the instrument to be tested on the fixed layer by comparing with the standard signal frequency, so that the test system can automatically match and connect the instruments to be tested on the corresponding layer for different series of instruments to be tested under the condition that hardware connection is normal, thereby avoiding the setting modification of the client and avoiding the problem that the serial number does not correspond to the layer of the connected instrument due to the operation of personnel.
Fig. 8 is a block diagram of a first structure of an implementation manner of a system for testing instrument connectivity according to an embodiment of the present invention, and as can be seen from fig. 8, the system includes a signal source 400, a multimeter 200, a tested instrument 300, an upper computer 100, and a tool 500, where the upper computer is connected to the signal source, the multimeter, the tested instrument, and the tool, respectively; the tested instrument is respectively connected with the signal source and the universal meter through the tool.
Fig. 9 is a block diagram of a first implementation manner of an upper computer in a test system for instrument connectivity according to an embodiment of the present invention, and it can be known from fig. 8 and 9 that:
the signal source 400 is configured to output a standard frequency signal of a connection process of the device under test and a test signal required by the device under test. In a specific embodiment, the signal source is, for example, a radio frequency signal source DSG3000 of the layer X, and the output test signal may be a standard frequency signal FreqX, a fixed amplitude value signal AmplX, or a fixed rise time signal RiseTimeX.
The upper computer 100 includes:
a current IP address obtaining module 101, configured to obtain a current IP address. In a specific embodiment, the current IP address is any IP address of the X-th tested instrument.
The test signal acquiring module 102 is configured to acquire a test signal corresponding to the tested instrument.
The multimeter 200 is used for reading the signal frequency of the tested instrument. In a particular embodiment, a multimeter, such as a digital multimeter DM3068, reads the signal frequency, amplitude, etc. of the instrument under test.
The host computer still include:
and the signal frequency receiving module 103 is used for receiving the signal frequency of the tested instrument.
And the signal comparison module 104 is configured to compare the signal frequency with the test signal and output a comparison result.
As mentioned above, in the first embodiment of the system for testing instrument connectivity provided by the present invention, a signal source outputs a test signal to an X-th layer instrument to be tested, when the instrument to be tested is connected to the current IP address, a multimeter reads a signal frequency of the instrument to be tested, and an upper computer compares the signal frequency with the test signal to accurately connect to the instrument to be tested on the fixed layer.
Fig. 10 is a block diagram of a second embodiment of an upper computer in a system for testing instrument connectivity according to an embodiment of the present invention, and as can be seen from fig. 10, the upper computer further includes:
a serial number obtaining module 105, configured to obtain a serial number. In a specific implementation mode, the serial number can be input through the client, and then the serial number is acquired by a serial number acquisition module of the upper computer.
An IP address range determining module 106, configured to determine an IP address range of the routing setting. In particular embodiments, the IP address range may be determined based on the number of test system devices.
A current IP address determining module 107, configured to determine an IP address from the IP address range as a current IP address. That is, the current IP address is an IP address arbitrarily selected from the IP address range.
In the second embodiment, the IP address range is determined according to the serial number input by the client, the signal source outputs the test signal to the tested instrument on the X-th layer, when the tested instrument is connected to the current IP address, the multimeter reads the signal frequency, and the upper computer compares the signal frequency with the test signal to accurately connect to the to-be-tested instrument on the fixed layer.
Fig. 11 is a structural block diagram of a third implementation manner of an upper computer in the test system for instrument connectivity according to the embodiment of the present invention, and as can be seen from fig. 11, the upper computer further includes in the third implementation manner:
an IP address range obtaining module 108, configured to obtain a pre-stored IP address range. In particular embodiments, previously saved, i.e., pre-stored, IP address ranges may be retrieved from a database.
A current IP address determining module 107, configured to determine an IP address from the IP address range as a current IP address. That is, the current IP address is an IP address arbitrarily selected from the IP address range.
In the third embodiment, the IP address range is previously stored and obtained from the database, a test signal is output to the X-th layer device under test by the signal source, when the device under test is connected at the current IP address, the signal frequency is read by the multimeter, and the signal frequency is compared with the test signal by the upper computer and accurately connected to the device under test at the fixed layer.
Fig. 12 is a block diagram of a second implementation of a system for testing instrument connectivity according to an embodiment of the present invention, and as shown in fig. 12, the system further includes:
the router 600 is connected to the device under test for assigning an IP address to the device under test. In a specific implementation manner, the router sets an IP address of each layer of the to-be-tested instrument, that is, the router allocates a fixed IP address to the to-be-tested instrument, so that the process of traversing in an IP address range can be omitted subsequently.
Fig. 13 is a block diagram of a fourth embodiment of an upper computer in the test system for instrument connectivity according to the embodiment of the present invention, and as can be seen from fig. 13, in the fourth embodiment, the upper computer further includes:
and an IP address obtaining module 109, configured to obtain the allocated IP address, where the IP address is used as the current IP address. That is, the current IP address is fixedly assigned to one IP address.
As mentioned above, the fourth embodiment of the upper computer in the system for testing instrument connectivity provided by the present invention is that, in this embodiment, the router sets the IP address of each layer of the instrument to be tested, that is, the router allocates a fixed IP address to the instrument to be tested, so that the process of traversing in the IP address range can be omitted in the subsequent steps.
Fig. 14 is a block diagram of a fifth implementation manner of an upper computer in the test system for instrument connectivity according to the embodiment of the present invention, and as can be seen from fig. 14, the fifth implementation manner of the upper computer further includes:
and the judging module 110 is configured to judge whether the tested instrument is connected to the current IP address. In a specific embodiment, the current IP address is taken for ping. PING, Packet Internet Groper, is an Internet Packet explorer, and is a program for testing the amount of network connections.
And the first traversal module 111 is configured to perform traversal within the IP address range when the determination module determines that the IP address range is not the IP address range. Specifically, if the ping is not successful, the traversal is continued, and the rest of the IP addresses are selected from the range of the IP addresses as the current IP address.
In the fifth embodiment of the upper computer in the test system for instrument connectivity provided by the present invention, by outputting the test signal to the X-th layer tested instrument, when the tested instrument is connected to the current IP address, the signal frequency of the tested instrument is obtained, the tested instrument is accurately connected to the fixed layer to be tested by comparing the signal frequency with the standard signal frequency, and if the tested instrument is not connected, the next IP is continuously traversed.
Fig. 15 is a structural block diagram of a first implementation manner of a signal comparison module in an upper computer in a test system for instrument connectivity according to an embodiment of the present invention, and as can be seen from fig. 15, the signal comparison module 104 includes, in the first implementation manner:
a comparison unit 1041, configured to compare the signal frequency with the test signal;
a second traversal unit 1042, configured to perform traversal within the IP address range when the comparison fails;
and a first comparison result output unit 1043, configured to output a comparison result of failed connectivity after all the IP addresses are traversed and the comparison fails.
That is, if the obtained signal frequency does not correspond to the frequency of the test signal, the tested instrument of the current IP address is not located in the X-th layer, that is, the X-th layer is not connected to the tested instrument, and other IP addresses continue to be traversed.
Fig. 16 is a structural block diagram of a second implementation manner of a signal comparison module in an upper computer in a test system for instrument connectivity according to an embodiment of the present invention, and as can be seen from fig. 16, the signal comparison module 104 further includes, in the second implementation manner:
a second comparison result output unit 1044, configured to output a comparison result that is successfully communicated when the comparison is successful;
the saving unit 1045 is configured to save the connection information of the instrument to be tested.
That is, if the acquired signal frequency corresponds to the frequency of the test signal, the tested instrument of the current IP address is in the X-th layer, otherwise, other IPs are continuously traversed.
As described above, the system for testing instrument connectivity provided by the present invention outputs a fixed frequency signal FreqX to the X-th layer of equipment, sequentially connects the equipment by traversing the IP pool address, acquires the signal frequency, and accurately connects to the to-be-tested instrument on the fixed layer by comparing the signal frequency with the standard signal frequency, so that for different series of to-be-tested instruments, the test system can automatically match and connect to the to-be-tested instrument on the corresponding layer under the condition that the hardware connection is normal, thereby avoiding the setting modification of the client and avoiding the problem that the serial number does not correspond to the layer of the connected instrument due to the operation of personnel.
The technical solution of the present invention will be described in detail with reference to specific examples. Fig. 17 is a schematic structural diagram of a test system for instrument connectivity in the embodiment of the present invention, and as can be seen from fig. 17, in the embodiment, LAN communication is used, and an upper computer controls an oscilloscope, a signal source DSG3000, a multimeter DM3068, and a test fixture through network connection. The output of the DSG3000 and the input of the DM3068 are respectively connected to a tool, and the tool is directly connected with an oscilloscope through an active probe.
In the test system, the upper computer is a unified control platform of the whole test system, and the upper computer is connected with the test system through a network and adopts a Visa communication interface to realize access control on other equipment in the test system. The oscilloscope is the device to be tested, and the test system can integrally calibrate/check the performance index of the oscilloscope. The DSG3000 provides various low frequency, high frequency sinusoidal and square wave signals during testing. DM3068 is used to test the output signal performance of the oscilloscope. The tool is directly connected with the oscilloscope, realizes the function of signal transmission single-path/multi-path change-over switch, can output direct current signals and fast edge signals at the same time, and is used for frequency testing.
The process of the oscilloscope test platform detecting the connectivity of the instrument to be tested is shown in fig. 18. The client inputs the serial number, the upper computer obtains the IP address range set by the route, the upper computer controls the DSG of the corresponding layer to generate an alternating current signal with standard frequency FreqX (wherein the FreqX frequency signal is a signal which cannot appear under any other using state of the test system), the alternating current signal traverses in the IP address range, and the traversing is finished, and then the method is finished. Otherwise, the current traversal IP address is taken for ping, if the ping is not successful, traversal is continued, if the ping is successful, the corresponding equipment is opened according to the IP address, basic information is obtained from the equipment, the signal frequency is read and compared with the standard frequency, if the comparison is failed, traversal is continued, if the comparison is successful, the connection information of the X-th layer to-be-tested instrument is stored, the equipment is successfully connected, and the process is ended. Before judging whether the current IP is ping-on or not, the current IP can be confirmed to be not the IP of any test instrument or the tested equipment to be tested, and then ping is carried out.
In summary, the method and system for testing instrument connectivity provided by the present invention output a test signal to the tested instrument, and accurately communicate with the to-be-tested instrument on the fixed layer by sequentially communicating the devices and acquiring the signal frequency thereof and comparing the signal frequency with the standard signal frequency, so that the test system can automatically match and communicate with the to-be-tested instrument on the corresponding layer for different series of to-be-tested instruments under the condition that the hardware connection is normal, thereby avoiding the setting modification of the client and avoiding the problem that the serial number does not correspond to the layer communicating the instrument due to the operation of personnel.
The core technical idea of the invention is as follows:
a. the signal source generates a test signal corresponding to the X layer instrument;
b. sequentially detecting whether the IP of each instrument is communicated; if not, continuously traversing the next IP; if the IP is communicated with the network, the IP instrument is opened for configuration, and the signal frequency of the IP instrument is read;
c. if the acquired signal frequency corresponds to the frequency of the test signal, the IP instrument is in the X layer, otherwise, other IPs are continuously traversed.
d. And finally, if the frequency value corresponding to the frequency of the test signal is not obtained, judging that the X layer is not connected with the instrument.
The invention has the beneficial effects that:
1. the client does not modify any setting aiming at different series of instruments to be tested;
2. the four layers of instruments to be tested can be different in series;
3. the correct connection between the instrument to be tested and the corresponding layer is ensured;
4. and the operation error of personnel is reduced.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which can be stored in a general computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Those skilled in the art will also appreciate that the various functions performed in the exemplary embodiments of the present invention are implemented as hardware or software, depending upon the particular application and design requirements of the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.