CN104914745B - Control the method and system of oscillograph - Google Patents

Control the method and system of oscillograph Download PDF

Info

Publication number
CN104914745B
CN104914745B CN201510171740.6A CN201510171740A CN104914745B CN 104914745 B CN104914745 B CN 104914745B CN 201510171740 A CN201510171740 A CN 201510171740A CN 104914745 B CN104914745 B CN 104914745B
Authority
CN
China
Prior art keywords
oscillograph
interchanger
network interface
controller
built
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.)
Active
Application number
CN201510171740.6A
Other languages
Chinese (zh)
Other versions
CN104914745A (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.)
Hisense Broadband Multimedia Technology Co Ltd
Original Assignee
Hisense Broadband Multimedia Technology 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 Hisense Broadband Multimedia Technology Co Ltd filed Critical Hisense Broadband Multimedia Technology Co Ltd
Priority to CN201510171740.6A priority Critical patent/CN104914745B/en
Publication of CN104914745A publication Critical patent/CN104914745A/en
Application granted granted Critical
Publication of CN104914745B publication Critical patent/CN104914745B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Computer And Data Communications (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)

Abstract

The invention discloses a kind of method and system for controlling oscillograph.This method includes:Controller, interchanger and oscillograph are formed into LAN beforehand through netting twine, and LAN IP address is respectively configured for controller and oscillograph;Target oscillograph IP address information is obtained, is encapsulated in the matching order of address using ICP/IP protocol, by built-in network interface, is exported using netting twine;The address matching command response that oscillograph returns is received, host number querying command is encapsulated using ICP/IP protocol and exported;The host number querying command response that oscillograph returns is received, the host number information of target oscillograph of the host number information for determining to carry in the response of host number querying command with obtaining in advance is consistent, encapsulates control command using ICP/IP protocol and exports;The control command response that oscillograph returns is received, bus state register is updated, receives the data message that oscillograph returns, handled.Using the present invention, the oscillograph number of access system can be lifted, improve traffic rate.

Description

Control the method and system of oscillograph
The application is the China of entitled " method and system of control oscillograph " that propose on October 24th, 2012 The divisional application of application for a patent for invention 201210409953.4.
Technical field
The present invention relates to instrument and equipment control technology, more particularly to a kind of method and system for controlling oscillograph.
Background technology
With the rapid development of Fibre Optical Communication Technology, performance to the optical module of one of fiber optic communication important component and The requirement of parameters index also more and more higher, it is ensured that the high performance index of optical module, test link are particularly important.And Test link need to rely on the accurate, test equipment of reliability again.In most optical module production firms, oscillograph is extensive For testing the test equipment of link, for example, 86100 serial oscillograph of wide variety of Agilent (Agilent), due to Multiple functions, for example, automatic eye diagram measurement analytic function, available for impedance analysis Full Featured domain reflectometer (TDR, Time Domain Reflector) function, the function more than 80GHz bandwidth and the shake for being accurately used for electricity and optical signal Analytic function, therefore, it is possible to precision, reliably test optical module optical signal property index.
It is existing in order to reduce the flow of test and realize automatic test in the research and development and production process of optical module Technology generally respectively will be used to measure the oscillograph and controller of optical module, for example, personal computer (PC, Personal Computer) connect, instead of artificial, oscillograph is carried out frequently, repeatability by installing computer program in the controller Operation, the test jobs such as parameter measurement, data acquisition, data record are realized, so as to greatly improve operating efficiency and survey Measure the accuracy of data.
The method of existing control oscillograph, by controller end install special general purpose interface bus (GPIB, General Purpose Interface Bus) control card and related GPIB control cards driver, using GPIB agreements Gpib interface connects oscillograph, so as to by gpib interface, realize control of the controller to oscillograph.
Fig. 1 is the existing method flow schematic diagram using gpib bus protocol integrated test system oscillograph.Referring to Fig. 1, the flow bag Include:
Step 101, connect oscillograph using gpib bus cable and the controller of GPIB control cards is installed;
GPIB control cards are built-in with this step, in controller, GPIB controls are driven by the driver of GPIB control cards Fabrication, so that controller is in running status.
In the embodiment of the present invention, in advance in each oscillograph, the GPIB addresses of mark oscillograph are set, in controller In, the GPIB addresses for identifying controller are set.
Step 102, controller uses gpib bus agreement, and the life for being matched with oscillograph address is sent to oscillograph Order;
In this step, controller uses gpib bus agreement, is sent and ordered to oscillograph by gpib bus, and the order is used Matched in oscillograph address, that is, the oscillograph address information obtained in advance is carried in ordering, in order to control and the address The oscillograph of information match.
Step 103, judge the command response that oscillograph returns whether is received within the time pre-set, if it is, Step 104 is performed, otherwise, is not dealt with;
In this step, controller judges that oscillograph to be visited whether there is according to whether gpib bus responds.
Step 104, controller sends oscillograph host number querying command;
In this step, because different oscillographs is configured with same address information, in order to determine specific oscillograph, Host number querying command is sent to oscillograph corresponding to the address information.
Step 105, judge in the host number querying command response that oscillograph returns the host number that includes whether with needs Host number is consistent, if it is, performing step 106, otherwise, does not deal with;
In this step, if within the time pre-set, controller receives the host number inquiry life of oscillograph return Order response, if comprising host number with needs host number it is consistent, show that proper communication connection can be carried out, otherwise, no Deal with.
Step 106, controller is sent control command to oscillograph using gpib bus agreement, received by gpib bus The control command response for the carrying result that oscillograph returns;
In this step, controller sends control command, to control oscillograph by gpib bus using gpib bus agreement It is acquired, tests, after oscillograph receives control command, responds and return to result to controller.
Step 107, controller inquiry gpib bus status register, judges whether control or inquiry operation succeed.
In this step, gpib bus status register is set, for storing the mode of operation of control command, example in controller Such as, after the control command response of oscillograph return is received, the control command that will be stored in gpib bus status register State is arranged to success.
From above-mentioned, in the method for existing control oscillograph, using GPIB agreements, control command control oscillography is sent Device, there is ease for use, more firm cable interface and higher reliability;But because GPIB agreements are set to each son in system Standby quantity and the length of interconnection bus have strict demand, thus, distance, the sub- number of devices of access to gpib bus interconnection Amount causes considerable restraint, such as, it is desirable to the number of system neutron equipment is no more than 15, interconnection bus it is of length no more than 20m so that the oscillograph number of access system is less, can not meet large-scale test system requirement;Further, assisted using GPIB View, traffic rate is relatively low, can not meet high speed, efficient data transportation requirements;In addition, it is desirable to install in the controller special GPIB control cards and related driver programs, versatility and compatibility are relatively low.
The content of the invention
Embodiments of the invention provide a kind of method for controlling oscillograph, lift the oscillograph number of access system, improve and lead to Believe speed.
Embodiments of the invention also provide a kind of system for controlling oscillograph, lift the oscillograph number of access system, improve Traffic rate.
To reach above-mentioned purpose, a kind of method for controlling oscillograph provided in an embodiment of the present invention, including:
Controller, interchanger and oscillograph are formed into LAN beforehand through netting twine, and are controller and oscillograph LAN IP address is respectively configured;
Controller obtains target oscillograph IP address information, by target oscillograph IP address information and controller IP address Information, using ICP/IP protocol, it is encapsulated in the matching order of address, by built-in network interface, best friend is exported using netting twine Change planes and exported via interchanger to oscillograph;
The address returned by the built-in network interface reception oscillograph by interchanger matches command response, uses ICP/IP protocol encapsulates host number querying command, by the built-in network interface, is exported to interchanger and is passed through using netting twine Exported by interchanger to oscillograph;
The host number querying command returned by the built-in network interface reception oscillograph by interchanger responds, really Determine the host number information and the host number information phase one of the target oscillograph obtained in advance carried in the response of host number querying command Cause, control command is encapsulated using ICP/IP protocol, by the built-in network interface, exports to interchanger and passes through using netting twine Exported by interchanger to oscillograph;
The control command returned by the built-in network interface reception oscillograph by interchanger responds, and updates bus Status register, the data message returned by the built-in network interface reception oscillograph by interchanger, is handled.
Wherein, the acquisition target oscillograph IP address information includes:
Request is established in the connection for receiving user's input, and link information input frame is shown to user;
Target oscillograph IP address information and host number information that user is inputted by link information input frame are received, is entered Row storage.
Wherein, methods described further comprises:
If it is not received by the address matching order that oscillograph is returned by interchanger within the time pre-set to ring Should, terminate flow.
Wherein, before or after address matching order is received, methods described further comprises oscillograph:
Determine whether oscillograph uses firmware A.08.00 above version, if it is not, triggering from the server pre-set Latest firmware is downloaded in address, and is upgraded.
Wherein, the host number querying command uses Formatting Output iprintf functions.
Wherein, the host number querying command response that the reception oscillograph is returned by interchanger includes:
The host number querying command that oscillograph is transmitted by built-in network interface desampler, obtains the main frame of itself Number information;
Host number information is packaged using ICP/IP protocol, generation host number querying command response, by built-in Network interface, utilize network cable transmission to interchanger.
Wherein, the host number querying command response formats function reading using iscanf.
In order to reach another object of the present invention, it is proposed that a kind of system for controlling oscillograph, the system include:Control Device, interchanger and oscillograph, wherein,
Controller, interchanger and oscillograph composition LAN, and be the local of controller configuration identifier controller in advance Net IP address, it is the LAN IP address of oscillograph configuration identifier oscillograph;
Controller, for obtaining target oscillograph IP address information, by target oscillograph IP address information and controller IP address information, using ICP/IP protocol, it is encapsulated in the matching order of address, it is defeated using netting twine by built-in network interface Go out to interchanger;
The address returned by the built-in network interface desampler matches command response, using ICP/IP protocol Host number querying command is encapsulated, by the built-in network interface, is exported using netting twine to interchanger;
The host number querying command returned by the built-in network interface desampler responds, and determines that host number is looked into It is consistent to ask the host number information of target oscillograph of the host number information carried in command response with obtaining in advance, using TCP/ IP agreement encapsulates control command, by the built-in network interface, is exported using netting twine to interchanger;
The control command returned by the built-in network interface desampler responds, renewal bus state deposit Device, the data message returned by the built-in network interface desampler, is handled;
Interchanger, for receiving the information of controller output, and the network for passing through the other end by the network interface of one end Interface is by the information transfer of reception to oscillograph;The information of oscillograph output is received by the network interface of the other end, passes through one The network interface at end is exported to controller;
Oscillograph, for receiving address matching order by built-in network interface, returned to interchanger and use TCP/IP The address matching command response of protocol encapsulation;
Receiving Host querying command, the host number information of itself is obtained, return to interchanger and sealed using ICP/IP protocol The host number querying command response of dress, carry the host number information of acquisition;
Control command is received, returns to interchanger and is responded using the control command of ICP/IP protocol encapsulation, ordered according to control Order carries out data acquisition, test and processing, and the data message of processing is encapsulated using ICP/IP protocol, connect by built-in network Mouthful, sent to interchanger.
It is preferred that the controller controls one or more oscillographs.
It is preferred that the controller is one or more, the oscillograph received to come from the LAN in the same time The control of any controller.
As seen from the above technical solution, a kind of method and system for controlling oscillograph provided in an embodiment of the present invention, in advance Controller, interchanger and oscillograph are formed by LAN by netting twine, and local is respectively configured for controller and oscillograph Net IP address;Controller obtains target oscillograph IP address information, by target oscillograph IP address information and controller IP Location information, using ICP/IP protocol, be encapsulated in the matching order of address, by built-in network interface, using netting twine export to Interchanger is simultaneously exported to oscillograph via interchanger;Oscillograph is received by the built-in network interface to return by interchanger Address matching command response, using ICP/IP protocol encapsulate host number querying command, pass through the built-in network interface, profit Exported to interchanger with netting twine and exported via interchanger to oscillograph;Oscillograph is received by the built-in network interface to lead to Cross the host number querying command response of interchanger return, determine in the response of host number querying command the host number information that carries with it is pre- The host number information of the target oscillograph first obtained is consistent, control command is encapsulated using ICP/IP protocol, by described built-in Network interface, exported to interchanger using netting twine and exported via interchanger to oscillograph;Connect by the built-in network The control command that mouth reception oscillograph is returned by interchanger responds, and updates bus state register, passes through the built-in net The data message that network interface oscillograph is returned by interchanger, is handled.So, controlled using network interface, effectively Improve the oscillograph number of access system;Data are carried out using ICP/IP protocol and order is transmitted, traffic rate greatly improves.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described.It should be evident that the accompanying drawing in following description is only this Some embodiments of invention, for those of ordinary skills, can also be obtained according to these accompanying drawing illustrated embodiments Other embodiments and its accompanying drawing.
Fig. 1 is the existing method flow schematic diagram using gpib bus protocol integrated test system oscillograph.
Fig. 2 is the system structure diagram that the embodiment of the present invention controls oscillograph.
Fig. 3 is the method flow schematic diagram that the embodiment of the present invention controls oscillograph.
Fig. 4 is the method idiographic flow schematic diagram that the embodiment of the present invention controls oscillograph.
Fig. 5 is to carry out the flow signal that gathered data is handled after oscillograph of the embodiment of the present invention receives control command Figure.
Embodiment
Clear, complete description is carried out to the technical scheme of various embodiments of the present invention below with reference to accompanying drawing, it is clear that retouched The embodiment stated is only the part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, Those of ordinary skill in the art's all other embodiment resulting on the premise of creative work is not made, belongs to this The protected scope of invention.
The method of existing control oscillograph, using GPIB protocol integrated test system oscillographs, although GPIB agreements accurately define control The communication mode of device and oscillograph processed, and there is preferable ease for use, very firm cable and interface, and it is higher can By property, there is long history in field of industrial automation control.But because GPIB agreements are to the number of each sub- equipment in system Amount and the length of interconnection bus have strict demand, have necessarily for the number of devices in system, communication distance and transmission rate Limitation so that the oscillograph number of access system is less;Further, the traffic rate using GPIB agreements is relatively low;Moreover, Need that special GPIB control cards and related driver programs are installed in the controller, versatility and compatibility are relatively low.
Existing oscillograph, for example, Agilent86100 series oscillographs, are to meet the standard digital interfaces of IEEE 488.2 And standard commands for programmable instruments (SCPI, Standard Commands for Programmable Instruments) rule The programmable instrument instrument of model.Wherein, SCPI is that one kind is established on the basis of existing standard IEEE488.1 and IEEE 488.2, And 7 rule of the floating-point operation in IEEE754 standards, ISO646 information exchange coded identifications are have followed (equivalent to ASCll volumes Journey) etc. multiple standards standardized equipment programming language, SCPI use tree hierarchy command set, a kind of tool can be built There is all purpose instrument model of generality;Meanwhile SCPI uses the measurement of signal-oriented, the order specification of character formula, control are defined System order uses the order specification in SCPI command sets, wherein the memonic symbol generation rule included is relatively simple, clear and definite, and is easy to Memory.
Transmission control protocol/internet protocol (TCP/IP, Transmission Control Protocol/Internet Protocol) it is the most basic agreement in internet (Internet), by the IP agreement of Internet and the Transmission Control Protocol group of transport layer Into.All communication equipments in TCP/IP specifications network, define electronic equipment and how to be connected into internet, and data how The standard transmitted between them, and the standard method of a kind of packing of computer data and addressing, for ensureing Data are free of errors transmitted in Internet.Wherein, the problem of TCP is responsible for finding data transfer, if data transfer is asked Topic, it is desirable to transmit again, until all data safeties are properly transferred to destination;And IP is set to each electronics of internet One globally unique IP address of standby regulation, is used for into row data communication.And for user, not it should be understood that procotol Total, it is only necessary to understand the form of IP address, you can with network each equipment carry out network service.
In the embodiment of the present invention, it is contemplated that ICP/IP protocol can compatible SCPI orders, will be ordered in controller by SCPI Order collection generation control command, and gpib bus agreement is followed, it is improved, adopts by way of gpib bus transmits control command Controller and oscillograph are connected with network interface, the control command generated using ICP/IP protocol encapsulation by SCPI command sets, is led to Cross network interface to export to network-bus, transmitted by network-bus to oscillograph, so as to pass through procotol (ICP/IP protocol) The communication function of controller and oscillograph is realized, and is acquired, tested by controller control oscillograph.So, due to TCP/ The extensive compatible and good autgmentability of IP agreement, the method controlled by network, it can be very good solve access system The technical problem such as number of devices, communication distance and transmission rate.
Fig. 2 is the system structure diagram that the embodiment of the present invention controls oscillograph.Referring to Fig. 2, the system includes:Control Device, interchanger and oscillograph, wherein,
The number of controller is one or more, and the number of oscillograph is one or more, and the number of interchanger is one It is or multiple.It is preferred that the number of controller is one, the number of oscillograph is one or more, and the number of interchanger is one. In the embodiment of the present invention, controller includes:First controller, second controller and the 3rd controller;Oscillograph includes:First Oscillograph, the second oscillograph and the 3rd oscillograph.
Controller, interchanger and oscillograph composition LAN, and be the local of controller configuration identifier controller in advance Net IP address, it is the LAN IP address of oscillograph configuration identifier oscillograph;
Controller is connected by netting twine with one end of interchanger, and the other end of interchanger is connected by netting twine with oscillograph;
Controller, for obtaining target oscillograph IP address information, by target oscillograph IP address information and controller IP address information, using ICP/IP protocol, it is encapsulated in the matching order of address, it is defeated using netting twine by built-in network interface Go out to interchanger;
The address returned by the built-in network interface desampler matches command response, using ICP/IP protocol Host number querying command is encapsulated, by the built-in network interface, is exported using netting twine to interchanger;
The host number querying command returned by the built-in network interface desampler responds, and determines that host number is looked into It is consistent to ask the host number information of target oscillograph of the host number information carried in command response with obtaining in advance, using TCP/ IP agreement encapsulates control command, by the built-in network interface, is exported using netting twine to interchanger;
The control command returned by the built-in network interface desampler responds, renewal bus state deposit Device, the data message returned by the built-in network interface desampler, is handled;
In the embodiment of the present invention, by interchanger, controller and oscillograph are connected in same LAN, for example, logical Cross respective network interface card to connect with netting twine, and the IP address of controller and oscillograph in LAN is set respectively, connect by network Mouth and netting twine carry out command interaction, establish the connection of controller and oscillograph, and by running control program in controller end, So as to be controlled to oscillograph.Wherein, control program is based on the application program developed on the basis of the network control method.
It is preferred that controller and oscillograph can use the Windows operating system for supporting basic ICP/IP protocol.
In practical application, target oscillograph IP address information can be by tester in the display interface of controller it is defeated The IP address of the oscillograph of control obtains needed for entering, and the host number information of target oscillograph can also be set in advance by tester Put.
Interchanger, for receiving the information of controller output, and the network for passing through the other end by the network interface of one end Interface is by the information transfer of reception to oscillograph;The information of oscillograph output is received by the network interface of the other end, passes through one The network interface at end is exported to controller;
In the embodiment of the present invention, each controller and oscillograph are passed through net by interchanger as the connection equipment in LAN Network interface is connected in a LAN.
Interchanger is after address matching order is received, according to the target oscillograph IP address included in the matching order of address Information, sent by netting twine to corresponding oscillograph.
Oscillograph, for receiving address matching order by built-in network interface, returned to interchanger and use TCP/IP The address matching command response of protocol encapsulation;
Receiving Host querying command, the host number information of itself is obtained, return to interchanger and sealed using ICP/IP protocol The host number querying command response of dress, carry the host number information of acquisition;
Control command is received, returns to interchanger and is responded using the control command of ICP/IP protocol encapsulation, ordered according to control Order carries out data acquisition, test and processing, and the data message of processing is encapsulated using ICP/IP protocol, connect by built-in network Mouthful, sent to interchanger.
In the embodiment of the present invention, in address matching command response and control command response, any information can not included.
In the embodiment of the present invention, controller can individually or simultaneously control one or more oscillographs, for example, the first control Device can control the first oscillograph, the second oscillograph and the 3rd oscillograph simultaneously, only can also individually control the first oscillograph Or second oscillograph, each oscillograph can only at most receive the control of a controller in the same time, i.e. the first oscillograph, Second oscillograph and the 3rd oscillograph etc. can receive the control from any controller in the LAN.
In the embodiment of the present invention, the IP address configured in controller and oscillograph is different, i.e., sets respectively different LAN IP address, to avoid IP address conflict.
By LAN and ICP/IP protocol between controller and oscillograph, network cable transmission order and data are utilized.
In practical application, in Agilent Standard Instrument Control Library (SICL, the Agilent Standard that Agilent is provided Instrument Control Library) in storehouse, SCPI orders are encapsulated, i.e., packaged most of transmission And receive capabilities, can directly it quote.Wherein, SICL be one by Agilent exploitation can be in multiple I/O interfaces and system Between the I/O storehouses transplanted, and modular a variety of Computer Architectures, I/O interfaces and the operating system of being operable with Communication pool, application program generally is write with C/C++ or Visual Basic language, can so reduce the change to storehouse as far as possible With rewriting work.SICL provides the interface enriched using standard, conventional function, for communication, windows 2000 support with On, Windows32 positions Edition operating system, main C, C++ and Visual the Basic programming languages for supporting version of window. By installing Agilent Connection Expert 15.0 and above version, SICL storehouses can be obtained, i.e., are installed in program Under catalogue, it can inquire about to obtain the library file for including tri- documents of sicl.h, bcsicl32.lib, sicl32.dll, by library text Part is added under the engineering catalogue of control program, is loaded into the built-in function that SICL can be called to provide in engineering.
SICL has provided the user order transmission and the function reading of multiple difference in functionalitys, and it is defeated using formatting to send order Go out iprintf functions.
Such as:iprintf(Dev,“:MODelFRAMe\n”,15);
The function of the order is to read the Hostname (host number) of oscillograph, during function call, before first parameter is The controller of foundation connection and the session id of oscillograph stated, are ordered for representing to send to which equipment (oscillograph);Second Individual parameter is the order to be sent, and the order meets SCPI standards, and oscillograph can be parsed correctly;3rd parameter is transmission The byte number of order.In practical application, in order to meet the command format of SICL built-in functions, order on the basis of SCPI, can be with Increase a carriage return character.So, controller is communicated by network interface and netting twine with oscillograph, directly invokes SICL.
When controller is received, iscanf can be used to format function reading.
Such as:Iscanf (Dev, " %s ", buff);
The function is used for the returning result for obtaining oscillograph;First parameter is establishes the oscillograph ID number of connection (IP Location);Second parameter is to format the form inputted, in the embodiment of the present invention, to read string format;3rd is reception The caching array pointer of character string.
Table 1 is part of embodiment of the present invention SCPI commonly used command table.
Table 1
So, by using SCPI standard command sets, it is possible to achieve controller is sent to oscillograph by network interface and ordered Make, execution of command operations inside oscillograph, return to the function of result.
In the embodiment of the present invention, by writing program code in advance, SCPI orders are packaged, for example, specifically to connect The data that sending and receiving are sent write code, are coded and decoded, and are then sent to oscillograph by ICP/IP protocol;Oscillograph connects SCPI orders are received, after oscillograph has performed SCPI orders, by ICP/IP protocol, implementing result, control are returned to controller Device is decoded to implementing result, and the data of decoding are handled, the test result data needed.Practical application In, it can also realize fully functional by writing code, be easy to program portable and functional module to extend.
It is preferred that oscillograph uses firmware A.08.00 above version, so, network control function can be supported.
, can be from Agilent's if detecting that the firmware version of oscillograph is less than A.08.00 version in practical application Latest firmware upgrading is downloaded on official website, upgrade method is as follows:
A1, the upgrade file of firmware copied under system of Oscillograph catalogue;
A2, in the File menu of oscillograph device, click " exiting ", then click "Yes" and exit application program;
A3, selection upgrade file start to install, and click " next step " Setup Wizard twice, automatic to unload current version and peace The newer version of dress;
If A4, system prompt firewall application prevent Agilent remote I/O Portmapper utilities and Agilent remote I/O servers, selection unblock;
A5, in Windows system desktops, double-click program icon, start oscillograph.
From above-mentioned, the system of the control oscillograph of the embodiment of the present invention, by controller, interchanger and oscillography Network interface is set in device, controller and interchanger are connected using netting twine, and, interchanger and oscillograph, and set controller, Interchanger and oscillograph are based on ICP/IP protocol and carry out data and order transmission.So, it is right with existing GPIB control modes The number of device is required in system, no more than 15, and of length no more than 20m of GPIB interconnection bus is compared, the present invention Embodiment, controlled using network, the quantity of equipment there is no strict limitation, and (equipment of the same IP address network segment all can be mutual Connection), effectively improve the oscillograph number of access system;For transmission range, if using netting twine, it can at least reach 100 meters, It is if then unrestricted using optical fiber, transmission range;Further, existing gpib bus, peak transfer rate are no more than 1,000,000 Bytes-per-second, and the network transmission of the embodiment of the present invention, according to the rank of equipment network interface card, it can reach more than 100 MBPSs, Even 1000 MBPSs, traffic rate greatly improve;Moreover, existing GPIB controls, it is necessary to install special in the controller GPIB control cards, and during the present invention is implemented, network control only needs to be built-in with network interface card (PC electricity in controller and oscillograph Brain typically carries), lower for equipment connection request, the cost of constructing system is relatively low, and compatibility is good, and application is more wide It is general.
Fig. 3 is the method flow schematic diagram that the embodiment of the present invention controls oscillograph.Referring to Fig. 3, the flow includes:
Step 301, beforehand through netting twine by controller, interchanger and oscillograph form LAN, and for controller with And LAN IP address is respectively configured in oscillograph;
In this step, form LAN and configure the detailed process of LAN IP address, for details, reference can be made to correlation technique Document, it will not be repeated here.
Step 302, controller obtains target oscillograph IP address information, by target oscillograph IP address information and control Device IP address information, using ICP/IP protocol, it is encapsulated in the matching order of address, by built-in network interface, utilizes netting twine Output is exported to oscillograph to interchanger and via interchanger;
In this step, obtaining target oscillograph IP address information includes:
Request is established in A31, the connection for receiving user's input, and link information input frame is shown to user;
In this step, if user needs to control a certain oscillograph by controller, in the controller, operation control journey Sequence (connects equivalent to input and establishes request), the link information input frame for controlling oscillograph is shown to user, so as to user Input corresponding information.
A32, receive target oscillograph IP address information and host number letter that user is inputted by link information input frame Breath, is stored.
In practical application, because the target oscillograph IP address information of user's input may not be the IP in the LAN Address, or, the target oscillograph IP address information of input does not meet IP address format, thus, in the embodiment of the present invention, exchange Machine, according to the target oscillograph IP address information included in the matching order of address, passes through net after address matching order is received Line is sent to corresponding oscillograph, to verify that whether oscillograph is at this corresponding to the target oscillograph IP address information of user's input In LAN.
Step 303, the address returned by the built-in network interface reception oscillograph by interchanger matches order Response, host number querying command is encapsulated using ICP/IP protocol, by the built-in network interface, best friend is exported using netting twine Change planes and exported via interchanger to oscillograph;
In this step, if the matching order of the address comprising target oscillograph IP address information can reach in LAN Oscillograph, show that user needs the oscillograph that controls in the LAN.
In practical application, this method can further include:
If it is not received by the address matching order that oscillograph is returned by interchanger within the time pre-set to ring Should, terminate flow.
In the embodiment of the present invention, oscillograph further comprises before or after address matching order is received:
Determine whether oscillograph uses firmware A.08.00 above version, if it is not, triggering from the server pre-set Latest firmware is downloaded in address, and is upgraded.
It is preferred that host number querying command uses Formatting Output iprintf functions, for example, iprintf (Dev, ": MODelFRAMe\n”,15).In the embodiment of the present invention, it is assumed that the oscillograph IP address pre-set is:192.168.1.7, control Device IP address processed is in same IP sections with oscillograph IP address, for example, it is 192.168.1.8 to set controller IP address.Control When device establishes connection with oscillograph, SICL requires that oscillograph address format is:lan192.168.1.7:Inst0, practical application In, controller can be connected by calling iopen functions to attempt to establish with oscillograph.Such as:Call function Dev=iopen (“lan192.168.1.7:inst0”);
When function return value is more than 0, then illustrate that the control program in controller establishes network connection with oscillograph;When When function return value is equal to 0, show the connection failure of controller and oscillograph.
In the whole life cycle of control program, return value Dev is using as the session identification of the oscillograph and controller (ID), the oscillograph in the LAN is marked as unique mark.If other serial oscillographys are parallel with the LAN Device is, it is necessary to distribute different IP address, and now, control program distinguishes the different oscillographs connected by Dev.It is for example, right Match and order in address, iopen orders can be used to send oscillograph address (lan192.168.1.7:inst0).
Step 304, the host number returned by the built-in network interface reception oscillograph by interchanger inquires about life Order response, determine the host number of the host number information carried and the target oscillograph obtained in advance in the response of host number querying command Information is consistent, and control command is encapsulated using ICP/IP protocol, and by the built-in network interface, best friend is exported using netting twine Change planes and exported via interchanger to oscillograph;
In this step, receiving the host number querying command response that oscillograph is returned by interchanger includes:
A41, the host number querying command that oscillograph is transmitted by built-in network interface desampler, obtains itself Host number information;
In this step, for same IP address, different oscillographs may be corresponded to (for example, user is in configuration oscillograph IP During address, multiple oscillographs or distinct device configure same IP address), in order to determine that the oscillograph for control is wrong By mistake, it is necessary to obtain the host number information of oscillograph, with compared with the host number information stored in step 301, so that it is determined that Whether it is the oscillograph controlled needed for user.
A42, host number information is packaged using ICP/IP protocol, generation host number querying command response, by interior The network interface put, utilize network cable transmission to interchanger.
In this step, the network interface built in interchanger receives the host number querying command response from netting twine, by another Network interface built in one end, utilize network cable transmission to controller.
It is preferred that the response of host number querying command formats function reading using iscanf.For example, iscanf (Dev, " % s",buff)。
Step 305, the control command returned by the built-in network interface reception oscillograph by interchanger responds, Bus state register is updated, the data message returned by the built-in network interface reception oscillograph by interchanger, Handled.
Below by taking the control of oscillograph screenshotss as an example, the method for the control oscillograph to the embodiment of the present invention is made furtherly It is bright.
Fig. 4 is the method idiographic flow schematic diagram that the embodiment of the present invention controls oscillograph.Referring to Fig. 4, pass through procotol (ICP/IP protocol), SCPI orders are sent to oscillograph, the flow includes:
Step 401, the connection of controller and oscillograph is established;
In this step, connect controller, interchanger and oscillograph respectively using netting twine, and controller, interchanger with And ICP/IP protocol is configured in oscillograph.
Step 402, controller sends screenshotss instruction to oscillograph;
, it is necessary to intercept the screen of oscillograph in this step, obtaining the waveform of oscillograph reality, then controller is by netting twine, By the way of ICP/IP protocol encapsulation, screenshotss instruction is sent to oscillograph.
Step 403, oscillograph receives screenshotss instruction, carries out screen picture screenshotss and is handled;
In this step, after oscillograph receives screenshotss instruction, screen picture is read, binary data stream is converted into and is saved in hair Send in caching.
Step 404, oscillograph uses network interface, and the screen image data of processing is passed through into network cable transmission to controller;
In this step, after oscillograph is handled binary data stream, encapsulated using ICP/IP protocol, connect using network Mouthful, by the data in caching by network cable transmission to controller.
Step 405, controller receives screen image data from network interface, is stored;
In this step, the screen image data received from network interface is saved in temporal cache by controller.
Step 406, controller decodes to the screen image data of storage, and shows the oscillograph figure that decoding obtains Picture.
In this step, the screen image data in temporal cache, foundation coding format are decoded into and can known by controller Other image file, and the oscillograph image being truncated in control program interface display.
In the embodiment of the present invention, the data transfer between controller and oscillograph uses network interface and ICP/IP protocol.
Fig. 5 is to carry out the flow signal that gathered data is handled after oscillograph of the embodiment of the present invention receives control command Figure.Referring to Fig. 5, the flow includes:
Step 501, sampled data is obtained, if it is determined that needs average processing, perform step 502, otherwise, perform Step 503;
Step 502, processing is averaged to sampled data, is exported to channel memory;
Step 503, by the data output of real-time sampling to channel memory;
Step 504, by the data Cun Chudao wave memorizers of each channel memory;
Step 505, the data output in wave memorizer to mathematical operation unit, or output are made to measuring unit Further analyzing and processing;
Step 506, mathematical operation unit feedback mathematics result;
Step 507, measuring unit exports measurement result to display or next tie point;
Step 508, display display waveform and data.
Obviously, those skilled in the art can carry out the spirit of various changes and modification without departing from the present invention to the present invention And scope.So, if belonging to the scope of the claims in the present invention and its equivalent technologies to these modifications and variations of the present invention Within, then the present invention also comprising these change and modification including.

Claims (6)

1. a kind of method for controlling oscillograph, including:
Controller, interchanger and oscillograph are formed into LAN beforehand through netting twine, and distinguished for controller and oscillograph Configure LAN IP address;
The controller obtains target oscillograph IP address information, by target oscillograph IP address information and controller IP address Information, using ICP/IP protocol, it is encapsulated in the matching order of address, by built-in network interface, best friend is exported using netting twine Change planes and exported via interchanger to oscillograph;
The address returned by the built-in network interface reception oscillograph by interchanger matches command response, using TCP/ IP agreement encapsulates host number querying command, by the built-in network interface, is exported using netting twine to interchanger and via friendship Change planes and export to oscillograph;
The host number querying command returned by the built-in network interface reception oscillograph by interchanger responds, it is determined that main The host number information of target oscillograph of the host number information carried in the response of machine querying command with obtaining in advance is consistent, adopts Control command is encapsulated with ICP/IP protocol, by the built-in network interface, is exported using netting twine to interchanger and via friendship Change planes and export to oscillograph;
The control command returned by the built-in network interface reception oscillograph by interchanger responds, and updates bus state Register, the data message returned by the built-in network interface reception oscillograph by interchanger, is handled.
2. according to the method for claim 1, wherein, the host number that the reception oscillograph is returned by interchanger inquires about life Response is made to include:
The host number querying command that oscillograph is transmitted by built-in network interface desampler, obtain the host number letter of itself Breath;
Host number information is packaged using ICP/IP protocol, the querying command response of generation host number, passes through built-in network Interface, utilize network cable transmission to interchanger.
Progress gathered data is handled after 3. according to the method for claim 1, the oscillograph receives control command Step includes:
Step 501, sampled data is obtained, if it is determined that needs average processing, perform step 502, otherwise, perform step 503;
Step 502, processing is averaged to sampled data, is exported to channel memory;
Step 503, by the data output of real-time sampling to channel memory;
Step 504, by the data Cun Chudao wave memorizers of each channel memory;
Step 505, the data output in wave memorizer to mathematical operation unit, or output are made into one to measuring unit Step analyzing and processing;
Step 506, mathematical operation unit feedback mathematics result;
Step 507, measuring unit exports measurement result to display or next tie point;
Step 508, display display waveform and data.
4. a kind of system for controlling oscillograph, it is characterised in that the system includes:Controller, interchanger and oscillograph, its In,
Controller, interchanger and oscillograph composition LAN, and be the LAN IP of controller configuration identifier controller in advance Address, it is the LAN IP address of oscillograph configuration identifier oscillograph;
Controller, for obtaining target oscillograph IP address information, by target oscillograph IP address information and controller IP Location information, using ICP/IP protocol, be encapsulated in the matching order of address, by built-in network interface, using netting twine export to Interchanger;
The address returned by the built-in network interface desampler matches command response, is encapsulated using ICP/IP protocol Host number querying command, by the built-in network interface, exported using netting twine to interchanger;
The host number querying command returned by the built-in network interface desampler responds, and determines host number inquiry life The host number information of target oscillograph of the host number information carried in order response with obtaining in advance is consistent, is assisted using TCP/IP View encapsulation control command, by the built-in network interface, is exported to interchanger using netting twine;
The control command returned by the built-in network interface desampler responds, and updates bus state register, leads to The data message that the built-in network interface desampler returns is crossed, is handled;
Interchanger, for receiving the information of controller output, and the network interface for passing through the other end by the network interface of one end By the information transfer of reception to oscillograph;The information of oscillograph output is received by the network interface of the other end, passes through one end Network interface is exported to controller;
Oscillograph, for receiving address matching order by built-in network interface, returned to interchanger and use ICP/IP protocol The address matching command response of encapsulation;
Receiving Host querying command, the host number information of itself is obtained, returned to interchanger using ICP/IP protocol encapsulation Host number querying command responds, and carries the host number information of acquisition;
Control command is received, returns to interchanger and is responded using the control command of ICP/IP protocol encapsulation, entered according to control command Row data acquisition, test and processing, the data message of processing is encapsulated using ICP/IP protocol, by built-in network interface, Sent to interchanger.
5. system according to claim 4, it is characterised in that the controller controls one or more oscillographs.
6. the system according to claim 4 or 5, it is characterised in that the controller is one or more, the oscillograph In the same time, receive the control from any controller in the LAN.
CN201510171740.6A 2012-10-24 2012-10-24 Control the method and system of oscillograph Active CN104914745B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510171740.6A CN104914745B (en) 2012-10-24 2012-10-24 Control the method and system of oscillograph

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210409953.4A CN102945026B (en) 2012-10-24 2012-10-24 Method and system for controlling oscilloscope
CN201510171740.6A CN104914745B (en) 2012-10-24 2012-10-24 Control the method and system of oscillograph

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201210409953.4A Division CN102945026B (en) 2012-10-24 2012-10-24 Method and system for controlling oscilloscope

Publications (2)

Publication Number Publication Date
CN104914745A CN104914745A (en) 2015-09-16
CN104914745B true CN104914745B (en) 2017-12-05

Family

ID=47727977

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201210409953.4A Active CN102945026B (en) 2012-10-24 2012-10-24 Method and system for controlling oscilloscope
CN201510171740.6A Active CN104914745B (en) 2012-10-24 2012-10-24 Control the method and system of oscillograph

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201210409953.4A Active CN102945026B (en) 2012-10-24 2012-10-24 Method and system for controlling oscilloscope

Country Status (1)

Country Link
CN (2) CN102945026B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914226A (en) * 2014-03-26 2014-07-09 深圳麦科信仪器有限公司 Device and method for quick screen capture of touch oscilloscope
CN104849524A (en) * 2015-05-19 2015-08-19 重庆大学 Data acquisition system orienting high-power pulse signal and method thereof
CN106933711A (en) * 2017-03-13 2017-07-07 郑州云海信息技术有限公司 A kind of PCIe3.0 Tx signal method for automatic measurement
CN108226681A (en) * 2018-01-15 2018-06-29 郑州云海信息技术有限公司 The method and system that a kind of remote control oscillograph is measured into row clock signal electrical characteristic
CN110618846A (en) * 2018-06-20 2019-12-27 中车株洲电力机车研究所有限公司 Screenshot device, screenshot method, screenshot system, computer-readable storage medium and computer
CN109165273B (en) * 2018-08-24 2021-10-26 安徽讯飞智能科技有限公司 General Chinese address matching method facing big data environment
CN111323627B (en) * 2020-02-27 2021-10-12 京东方科技集团股份有限公司 Digital oscilloscope and oscillogram generation system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN200956040Y (en) * 2006-08-22 2007-10-03 王悦 Digital oscillograph
CN101202746B (en) * 2006-12-15 2011-04-20 华为技术有限公司 Method for generating node identifier and method and device of load balancing
CN101272351B (en) * 2008-05-14 2011-08-17 杭州华三通信技术有限公司 Packet processing method and switchboard
CN101527734A (en) * 2009-04-16 2009-09-09 广州市易票联电子商务有限公司 Method for obtaining target address as well as method, device and system for controlling user privilege
CN201909804U (en) * 2010-11-26 2011-07-27 北京工业大学 Network virtual digital oscilloscope

Also Published As

Publication number Publication date
CN102945026A (en) 2013-02-27
CN104914745A (en) 2015-09-16
CN102945026B (en) 2015-04-22

Similar Documents

Publication Publication Date Title
CN104914745B (en) Control the method and system of oscillograph
CN104699616B (en) The method of a kind of application test, Apparatus and system
CN110502467B (en) Universal acquisition interface software system based on serial port modbus communication protocol
CN106054058B (en) One kind can be to multiple sigma-delta ADC chip testings and temperature controlled system and method
CN101431809B (en) OBEX protocol bug excavation method and system
CN101227345B (en) Automatic testing method based on application program interface
CN106020092B (en) Welding machine remote monitoring system
CN109101381A (en) Configuration file update method, system, electronic equipment and storage medium
CN105259834B (en) A kind of data in mobile phone acquisition controller of firmware restructural
CN101651683B (en) Method for generating analysis source code of signaling message
CN101963910A (en) General USB (Universal Serial Bus) based equipment firmware updating method
CN104965808B (en) It is used to implement the method for the device and serial port of serial port
CN104469501B (en) A kind of set-top box automatic setting method based on serial communication protocol
WO2013165180A1 (en) Log monitoring method, server therefor and recording medium
CN110972096A (en) Internet of things data acquisition software with configurable communication protocol and design method
Hillar Internet of things with python
CN113722340A (en) Processing method and system for remote automatic point table updating based on power distribution device
CN109889481B (en) Data acquisition and fusion method and device based on multi-sensor equipment
CN105242603B (en) A kind of electric power acquisition terminal and its debugging upgrade method with USB OTG interfaces
CN106776171A (en) A kind of automatization test system and method
CN110780630A (en) Protocol library docking execution system suitable for Internet of things and working method
CN204188189U (en) A kind of flexible embedded equipment under test simulator
CN101887391A (en) Automatic testing device for mobile phone software and testing method thereof
CN111736924B (en) Method, device, equipment and medium for accessing data acquisition instrument based on Lua script
CN113673640A (en) Correlation system and method of light path information

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