CN102455384A - State synchronization method and device - Google Patents

State synchronization method and device Download PDF

Info

Publication number
CN102455384A
CN102455384A CN2010105306091A CN201010530609A CN102455384A CN 102455384 A CN102455384 A CN 102455384A CN 2010105306091 A CN2010105306091 A CN 2010105306091A CN 201010530609 A CN201010530609 A CN 201010530609A CN 102455384 A CN102455384 A CN 102455384A
Authority
CN
China
Prior art keywords
spectrum analyzer
state
data
status
reading
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
CN2010105306091A
Other languages
Chinese (zh)
Other versions
CN102455384B (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.)
Rigol Technologies Inc
Original Assignee
Rigol Technologies Inc
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 Rigol Technologies Inc filed Critical Rigol Technologies Inc
Priority to CN201010530609.1A priority Critical patent/CN102455384B/en
Publication of CN102455384A publication Critical patent/CN102455384A/en
Application granted granted Critical
Publication of CN102455384B publication Critical patent/CN102455384B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Maintenance And Management Of Digital Transmission (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the invention provides a state synchronization method and device. The method comprises the steps of: reading state information of a spectrum analyzer while reading frequency spectrum data by a standard command of a programmable instrument; judging whether the state of the spectrum analyzer varies or not according to the state information; and if so, reading the state data of the spectrum analyzer. By the state synchronization method and device, the state of the spectrum analyzer can be updated on a computer in time and is simple to realize; the data communication quantity is low; and in particular, the waste of communication resources can be avoided in the case of the stable state of the spectrum analyzer.

Description

State synchronization method and device
Technical field
The present invention relates to the spectrum analyzer technical field, particularly a kind of state synchronization method of spectrum analyzer and device.
Background technology
From with personal computer (PC; Personal Computer) relation is divided; Spectrum analyzer generally adopts dual mode: a kind of is that spectrum analyzer is built among the PC; Part as PC exists, and the function of spectrum analyzer can realize by the resource (for example, display, keyboard etc.) of PC.
Another kind is an embedded instrumentation, and spectrum analyzer is had a cover system (for example, display screen, keyboard, power supply etc.) by oneself and realized its all functions, realizes the operation of PC to spectrum analyzer through the transmission control command.Its implementation is based on the spectrum analyzer basic function; With programmable instrument standard commands (SCPI; Standard Commands for ProgrammableInstruments) command set and virtual instrument software framework (VISA; Virtual Instrument SoftwareArchitecture) drives to media, carry out spectrum analysis by the resource that PC is powerful.
Can claim that generally this type application tool software on the PC is " host computer ", claims that correspondingly corresponding spectrum analyzer is " slave computer ".The state of slave computer need be synchronous with host computer, thereby make host computer in time obtain the status data of slave computer.
At present, the synchronous technical scheme of various states has appearred.Can on host computer, realize changing consistent state machine, upgrade host computer through state machine simulation slave computer and reach state synchronized with the slave computer parameter; Also can pass through manual triggers, obtain the state of slave computer.
But in realizing process of the present invention; The inventor finds that the defective of prior art is: be employed in the technical scheme that realizes changing with the slave computer parameter consistent state machine on the host computer; It is complicated to cause the state machine of host computer to be realized, its essence is the state of having realized a slave computer at the PC end again, and some slave computer state and hardware are closely related (for example; The switch of spectrum analyzer prime amplifier), be difficult to its state of analogue simulation.
Adopt manual triggers to obtain the technical scheme of the state of slave computer; Though can solve above-mentioned deficiency and simplify the exploitation of host computer; But can not upgrade in time; Can cause the inconvenience used, and also can make through the PC control slave computer not intuitively, unfounded easily, miss some change procedures.
Summary of the invention
The embodiment of the invention provides a kind of state synchronization method and device, when purpose is to upgrade in time the state of spectrum analyzer, reduces traffic, and communication resources especially avoid waste under the in stable condition situation of slave computer.
For achieving the above object, the embodiment of the invention provides a kind of state synchronization method, is applied to spectrum analyzer and the computing machine that is connected with said spectrum analyzer, and said method comprises:
When reading frequency spectrum data, read the status information of said spectrum analyzer through the programmable instrument standard commands;
Whether the state of judging said spectrum analyzer according to said status information changes, if change, then reads the status data of said spectrum analyzer.
The embodiment of the invention also provides a kind of state synchronizing apparatus, is applied to the computing machine that is connected with spectrum analyzer, and said device comprises:
The information reading unit is used for reading when reading frequency spectrum data through the programmable instrument standard commands status information of said spectrum analyzer;
The state judging unit is used for judging according to said status information whether the state of said spectrum analyzer changes;
Data-reading unit is used in the judged result of said state judging unit reading the status data of said spectrum analyzer when changing.
The beneficial effect of the embodiment of the invention is, utilizes the SCPI order when reading frequency spectrum data, to read the status information of spectrum analyzer through computing machine; , reads the state of spectrum analyzer the status data of spectrum analyzer when changing.Can upgrade the state of spectrum analyzer in time on computers, realize simply, and the data communication amount is little, and communication resources especially can avoid waste under the in stable condition situation of spectrum analyzer.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, does not constitute qualification of the present invention.In the accompanying drawings:
Fig. 1 is a process flow diagram of the state synchronization method of the embodiment of the invention;
Fig. 2 is the another process flow diagram of the state synchronization method of the embodiment of the invention;
Fig. 3 is the synoptic diagram that the computing machine of the embodiment of the invention is carried out according to the Content of communciation iteration;
Fig. 4 is the synoptic diagram of communication Cahn-Ingold-Prelog sequence rule of the computing machine of the embodiment of the invention;
Fig. 5 is a formation synoptic diagram of the state synchronizing apparatus of the embodiment of the invention;
Fig. 6 is the another formation synoptic diagram of the state synchronizing apparatus of the embodiment of the invention.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, the embodiment of the invention is done further explain below in conjunction with accompanying drawing.At this, illustrative examples of the present invention and explanation thereof are used to explain the present invention, but not as to qualification of the present invention.
The embodiment of the invention provides a kind of state synchronization method, is applied to spectrum analyzer and the computing machine that is connected with spectrum analyzer, and Fig. 1 is a process flow diagram of the state synchronization method of the embodiment of the invention.
As shown in Figure 1, said method comprises:
Step 101 reads the status information of spectrum analyzer when reading frequency spectrum data through programmable instrument standard commands (SCPI);
Step 102 judges according to status information whether the state of spectrum analyzer changes, if change, then reads the status data of spectrum analyzer.
When step 101 was implemented, computing machine can read the status information of spectrum analyzer through the SCPI order in the communication process of frequency spectrum data.Communication process can be the transmission of computing machine of completion to spectrum analyzer, is carrying out the read process of spectrum analyzer to computing machine.
For example, can send following command sequence to spectrum analyzer:
:GetSpectrumData?;:GetStateChange?
Through the mentioned order sequence, can get access to frequency spectrum data and status information.More than be merely obtaining the schematic illustration of status information, but be not limited thereto, can confirm concrete embodiment according to actual conditions.
When step 101 was implemented, whether the state that status information is used to identify spectrum analyzer changed, and can be bit, for example, adopts 0 expression state not change, and adopts 1 expression state to change; Perhaps can adopt ASCII character.But be not limited thereto, can confirm concrete embodiment according to actual conditions.
When step 102 was implemented, computing machine can judge at first whether the state of spectrum analyzer changes according to status information, if do not change, did not then read the status data of spectrum analyzer.
If change, can judge further that then the current frequency spectrum data that whether reading perhaps sends control data, if the current frequency spectrum data that do not read perhaps sends control data, then directly reads the status data of spectrum analyzer; If currently reading frequency spectrum data or sending control data, then after the current communication process that reads frequency spectrum data or send control data finishes, read the status data of spectrum analyzer again.
When step 102 was implemented, computing machine can also judge at first that the current frequency spectrum data that whether reading perhaps sends control data, if the current frequency spectrum data that do not read perhaps sends control data, judges further then whether the state of spectrum analyzer changes.If state does not change, then do not read the status data of spectrum analyzer; If change, then directly read the status data of spectrum analyzer.
If currently reading frequency spectrum data or sending control data, then after the current communication process that reads frequency spectrum data or send control data finishes, judge further more whether the state of spectrum analyzer changes.
Can know by the foregoing description, utilize the SCPI order when reading frequency spectrum data, to read the status information of spectrum analyzer through computing machine; , reads the state of spectrum analyzer the status data of spectrum analyzer when changing.Can upgrade the state of spectrum analyzer in time on computers, realize simply, and the data communication amount be little, communication resources especially can avoid waste under the in stable condition situation of spectrum analyzer.
Fig. 2 is the another process flow diagram of the state synchronization method of the embodiment of the invention.Below further specify at the basic enterprising row of the foregoing description, repeat part and repeat no more.
As shown in Figure 2, said method comprises:
Step 201, spectrum analyzer generates status information.
Step 202, computing machine read the status information of spectrum analyzer when reading frequency spectrum data through programmable instrument standard commands (SCPI).
Step 203, computing machine judges according to status information whether the state of spectrum analyzer changes, if change, then execution in step 204; Otherwise done state synchronizing process.
Step 204, computing machine read the status data of spectrum analyzer after the current communication process that reads frequency spectrum data or send control data finishes.
Step 205, computing machine upgrades according to status data.
When step 201 was implemented, if the user has changed the state of spectrum analyzer through computing machine, or spectrum analyzer carried out the customer parameter that is provided with, and this moment, spectrum analyzer can generate status information;
Perhaps; In the process that constantly reads frequency spectrum data, spectrum analyzer receives extraneous the triggering and has changed instrument state, for example; Operation on this machine of spectrum analyzer, spectrum analyzer are received outer triggering signal, spectrum analyzer device failure etc., and this moment, spectrum analyzer can generate status information.
When step 201 is implemented, a trigger event (can be relevant with communication process) can be set, relatively whether standing state is consistent with the stored historical state when this incident of generation, if consistent, then do not show to change; If inconsistent, then notify status changes, and new state is stored as historic state for comparing than usefulness next time.
In addition, if the state of spectrum analyzer changes, but the mark instrument state is " change "; After computing machine reads the status data synchronous regime, can this mark be changed to " not changing "; If computing machine does not read this status data synchronously then this value no change.But be not limited thereto, can confirm concrete embodiment according to actual conditions.
When step 204 was implemented, computing machine can read the status data of spectrum analyzer through programmable instrument standard commands (SCPI).
When step 205 was implemented, computing machine can upgrade the parameter of the corresponding host computer of this spectrum analyzer after reading the status data of spectrum analyzer, and the display interface of renewable host computer for example is with the state of timely demonstration spectrum analyzer.
Flow process shown in Figure 2 is the process of a state synchronized; In the specific implementation; Status synchronizing process can be with user's control procedure, read frequency spectrum data process iteration carries out, and upgrade the state of spectrum analyzer in time on computers, and the data communication amount is little.
Fig. 3 is the synoptic diagram that computing machine is carried out according to the Content of communciation iteration.As shown in Figure 3, " state 1 " can be default conditions; " state 2 " sends the state of control data for the user, and this priority of status is the highest.Computing machine is carried out the process of sending control data after receiving user's steering order.
In addition, when computing machine reads frequency spectrum data, read the status information of spectrum analyzer.If status information shows that the state of spectrum analyzer changes, then get the hang of 3, read the status data of spectrum analyzer.
Fig. 4 is the synoptic diagram of the communication Cahn-Ingold-Prelog sequence rule of computing machine.As shown in Figure 4, computing machine can distribute different time slices according to the difference of Content of communciation, and promptly synchronization only carries out a kind of communication process.But be not limited thereto, can confirm concrete embodiment according to actual conditions.
Can know by the foregoing description, utilize the SCPI order when reading frequency spectrum data, to read the status information of spectrum analyzer through computing machine; , reads the state of spectrum analyzer the status data of spectrum analyzer when changing.Can upgrade the state of spectrum analyzer in time on computers, realize simply, and the data communication amount be little, communication resources especially can avoid waste under the in stable condition situation of spectrum analyzer.
The embodiment of the invention also provides a kind of state synchronizing apparatus, is applied to the computing machine that is connected with spectrum analyzer, Fig. 5 be the embodiment of the invention state synchronizing apparatus one constitute synoptic diagram.
As shown in Figure 5, said device comprises: information reading unit 501, state judging unit 502 and data-reading unit 503; Wherein,
Information reading unit 501 is used for reading when reading frequency spectrum data through programmable instrument standard commands (SCPI) status information of spectrum analyzer;
State judging unit 502 is used for judging according to status information whether the state of spectrum analyzer changes;
Data-reading unit 503 is used in the judged result of state judging unit 502 reading the status data of spectrum analyzer when changing.
Fig. 6 is the another formation synoptic diagram of the state synchronizing apparatus of the embodiment of the invention.As shown in Figure 6, on the basis of above-mentioned state synchronizing apparatus, said device also can comprise: state updating unit 604;
State updating unit 604 is used for upgrading according to the status data that data-reading unit 603 reads.
In one embodiment, data-reading unit 603 specifically is used for: the status data that reads spectrum analyzer through programmable instrument standard commands (SCPI).
In one embodiment, data-reading unit 603 specifically can be used for: after the current communication process that reads frequency spectrum data or send control data finishes, read the status data of spectrum analyzer.
In one embodiment, status information can be represented through bit or ASCII character.
Above-mentioned state synchronizing apparatus can be integrated in the computing machine, as the part of computing machine; Also can be connected use with computing machine as a device separately.But be not limited thereto, can confirm concrete embodiment according to actual conditions.
Each ingredient of the device of present embodiment is respectively applied for each step of the method that realizes previous embodiment, owing in method embodiment, each step is specified, repeats no more at this.
Can know by the foregoing description, utilize the SCPI order when reading frequency spectrum data, to read the status information of spectrum analyzer through computing machine; When the state of spectrum analyzer changes, read the status data of spectrum analyzer.Can upgrade the state of spectrum analyzer in time on computers, realize simply, and the data communication amount be little, communication resources especially can avoid waste under the in stable condition situation of spectrum analyzer.
Those of ordinary skills can also further recognize; The unit and the algorithm steps of each example of describing in conjunction with embodiment disclosed herein; Can realize with electronic hardware, computer software or the combination of the two; For the interchangeability of hardware and software clearly is described, the composition and the step of each example described prevailingly according to function in above-mentioned explanation.These functions still are that software mode is carried out with hardware actually, depend on the application-specific and the design constraint of technical scheme.The professional and technical personnel can use distinct methods to realize described function to each certain applications, but this realization should not thought and exceeds scope of the present invention.
The software module that the method for describing in conjunction with embodiment disclosed herein or the step of algorithm can use hardware, processor to carry out, perhaps the combination of the two is implemented.Software module can place the storage medium of any other form known in random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or the technical field.
Above-described embodiment; The object of the invention, technical scheme and beneficial effect have been carried out further explain, and institute it should be understood that the above is merely embodiment of the present invention; And be not used in qualification protection scope of the present invention; All within spirit of the present invention and principle, any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a state synchronization method is applied to spectrum analyzer and the computing machine that is connected with said spectrum analyzer, it is characterized in that said method comprises:
When reading frequency spectrum data, read the status information of said spectrum analyzer through the programmable instrument standard commands;
Whether the state of judging said spectrum analyzer according to said status information changes, if change, then reads the status data of said spectrum analyzer.
2. state synchronization method according to claim 1 is characterized in that, after reading the status data of said spectrum analyzer, said method also comprises: upgrade according to said status data.
3. state synchronization method according to claim 1 is characterized in that, the said status data that reads said spectrum analyzer specifically comprises: the status data that reads said spectrum analyzer through the programmable instrument standard commands.
4. state synchronization method according to claim 1 is characterized in that, the said status data that reads said spectrum analyzer specifically comprises:
After the current communication process that reads frequency spectrum data or send control data finishes, read the status data of said spectrum analyzer.
5. state synchronization method according to claim 1 is characterized in that said status information is represented through bit or ASCII character.
6. state synchronizing apparatus is applied to the computing machine that is connected with spectrum analyzer, it is characterized in that said device comprises:
The information reading unit is used for reading when reading frequency spectrum data through the programmable instrument standard commands status information of said spectrum analyzer;
The state judging unit is used for judging according to said status information whether the state of said spectrum analyzer changes;
Data-reading unit is used in the judged result of said state judging unit reading the status data of said spectrum analyzer when changing.
7. state synchronizing apparatus according to claim 6 is characterized in that, said device also comprises:
State updating unit is used for upgrading according to the said status data that said data-reading unit reads.
8. state synchronizing apparatus according to claim 6 is characterized in that, said data-reading unit specifically is used for: the status data that reads said spectrum analyzer through the programmable instrument standard commands.
9. state synchronizing apparatus according to claim 6 is characterized in that, said data-reading unit specifically is used for: after the current communication process that reads frequency spectrum data or send control data finishes, read the status data of said spectrum analyzer.
10. state synchronizing apparatus according to claim 6 is characterized in that said status information is represented through bit or ASCII character.
CN201010530609.1A 2010-11-03 2010-11-03 State synchronization method and device Active CN102455384B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010530609.1A CN102455384B (en) 2010-11-03 2010-11-03 State synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010530609.1A CN102455384B (en) 2010-11-03 2010-11-03 State synchronization method and device

Publications (2)

Publication Number Publication Date
CN102455384A true CN102455384A (en) 2012-05-16
CN102455384B CN102455384B (en) 2015-10-28

Family

ID=46038799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010530609.1A Active CN102455384B (en) 2010-11-03 2010-11-03 State synchronization method and device

Country Status (1)

Country Link
CN (1) CN102455384B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1737589A (en) * 2004-08-18 2006-02-22 华为技术有限公司 Testing method for radio-frequency product
CN101251573A (en) * 2008-02-29 2008-08-27 东南大学 Automatic testing method for mixer third order inter-modulation distortion of radio-frequency tuner chip
US20100150288A1 (en) * 2008-12-17 2010-06-17 Miao Zhu Synchronization of Low Noise Local Oscillator using Network Connection

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1737589A (en) * 2004-08-18 2006-02-22 华为技术有限公司 Testing method for radio-frequency product
CN101251573A (en) * 2008-02-29 2008-08-27 东南大学 Automatic testing method for mixer third order inter-modulation distortion of radio-frequency tuner chip
US20100150288A1 (en) * 2008-12-17 2010-06-17 Miao Zhu Synchronization of Low Noise Local Oscillator using Network Connection

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
施庆华: "基于GPIB接口总线的分布式自动测试系统开发与应用", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
罗光坤等: "基于GPIB接口的仪器与计算机之间的通讯", 《仪器仪表学报》 *

Also Published As

Publication number Publication date
CN102455384B (en) 2015-10-28

Similar Documents

Publication Publication Date Title
KR101475797B1 (en) Dynamic information adaptation for a computing device having multiple power modes
JP6076501B2 (en) Method, apparatus, facility, system, program, and recording medium for controlling on / off of wireless network
CN103176595B (en) A kind of information cuing method and system
CN105556417A (en) Electronic device for controlling power and method therefor
MX2014009068A (en) Electronic book file processing method, terminal, and electronic device.
CN113407393B (en) Chip verification method, terminal device, verification platform and storage medium
CN107678997B (en) Hot plug method, system, device and readable storage medium of PCIE (peripheral component interface express) card
CN104199767A (en) Test method and device
CN104572822A (en) Method and device for displaying text
CN104699408A (en) Operation method and device of touch screen and touch device
CN108628900B (en) Data format obtaining method and related device
CN102508757A (en) Serial port debugging realization method of Linux system
CN103092609A (en) Method and man-machine interaction device for displaying interaction of configuration software and collector data
CN111444609B (en) Data processing method and simulation system
CN105260266A (en) Snapshot volume writing method and dependent snapshot system
CN102868746B (en) Method for realizing mobile informationization
CN102194402A (en) Programmable device for graph control of light-emitting diode (LED) display screen
CN102455384A (en) State synchronization method and device
CN104699410B (en) A kind of information processing method and electronic equipment
CN102364909A (en) Message synchronization system and method based on mobile equipment and local server
CN103544079B (en) Flash memory chip data recovery achieving system and method based on programmable logic controller
CN101706804A (en) Method for associated management of files in computer
CN105279074A (en) Method and device for displaying log information on terminal through NSLog
CN103838466A (en) Information processing method and system and electronic equipment
CN103309822A (en) Systems and methods involving identification

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant