CN103593223B - Measuring instrument program control language compatibility system and processing method - Google Patents

Measuring instrument program control language compatibility system and processing method Download PDF

Info

Publication number
CN103593223B
CN103593223B CN201310563352.3A CN201310563352A CN103593223B CN 103593223 B CN103593223 B CN 103593223B CN 201310563352 A CN201310563352 A CN 201310563352A CN 103593223 B CN103593223 B CN 103593223B
Authority
CN
China
Prior art keywords
command
processor
language
order
transducer
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
CN201310563352.3A
Other languages
Chinese (zh)
Other versions
CN103593223A (en
Inventor
刘宝东
马风军
邓旭亮
白轶荣
李伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CETC 41 Institute
Original Assignee
CETC 41 Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CETC 41 Institute filed Critical CETC 41 Institute
Priority to CN201310563352.3A priority Critical patent/CN103593223B/en
Publication of CN103593223A publication Critical patent/CN103593223A/en
Application granted granted Critical
Publication of CN103593223B publication Critical patent/CN103593223B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a measuring instrument program control language compatibility system and processing method. The measuring instrument program control language compatibility system comprises a command parser, a converter, a standard command processor and a specific command processor, wherein the command parser comprises a standard command parser and a traditional command parser and used for receiving input commands from a test system and parsing the input commands, and which parser is selected depends on a compatibility language selected by users; the converter is used for converting parsed identification codes into command internal codes and converting processed response data into response messages which can be recognized by the test system; the standard command processor is used for processing the command internal codes converted by the converter; the specific command processor is used for processing the identification codes which can not converted by the converter. By the conversion from the identification codes into the command internal codes and customization processing of the commands which can not be converted, seamless compatibility with an existing test system is achieved, the life cycle of the test system is prolonged, and test efficiency is improved.

Description

A kind of measuring instrument program control language compatibility system and processing method
Technical field
The present invention relates to a kind of measuring instrument program control language compatibility system and processing method.
Background technology
In the front scpi order epoch, measuring instrument program control speech uses traditional commands language, different instrument manufacturers The traditional commands language using is entirely different so that some instruments in test system cannot adopt it after producing device stopping production The same quasi-instrument of its production firm is substituted, and causes these test system life cycle to be forced to terminate.For this reason, the life of these instruments Business men combines standard commands scpi (the standard commands for having formulated a set of program control speech Programmable instruments: program control instrument standard commands) order, its objective is to make identical function between same quasi-instrument product Order accomplish completely the same, to meet existing test system compatibility requirement.However, due to reasons such as commercial interest drivings, Different instrument manufacturers cannot accomplish completely compatible on program control command set defines.
At present the compatibility of substituted instrument command set is typically employed in and between test system and instrument general switching software, inserts one Realizing, its target is with minimum cost to the application software of individual referred to as " Language Simulation pattern ", meets existing test as far as possible System requirements.After the application software of insertion " Language Simulation pattern ", not only can realize order used in test system Language can recognize that the conversion of command lanuage to instrument internal, and can realize instrument internal response data and (survey to response message The receivable data of test system) conversion.
Taking agilent x series of signals analyser compatibility scheme as a example, as shown in Figure 1, agilent x series of signals Analyser standard scpi order compatibility scheme: the program is in r&s fsu (instrument of a certain model) test program and x series of signals Between analyser general switching software in machine, the software of insertion one referred to as " emulator ", can realize test system after inserting this software Middle scpi order to the conversion of the discernible internal scpi order of x series of signals analyser, and inside x series of signals analyser Response data is to the conversion of response message (test system can recognize that form).
As shown in Figure 2, agilent x series of signals analyser traditional commands compatibility scheme: the program is tested in 859x The software of insertion one referred to as " emulator " between program and x series of signals analyser general switching software in machine, it is possible to achieve test system In system, traditional commands (859x order) arrive the conversion of the discernible internal scpi order of x series of signals analyser, and x series letter Number analyser response data is to the conversion of response message (test system can recognize that form).
But because the command forms of test system input are more versatile and flexible in prior art, realize from test system order The conversion of input form to the discernible command forms of instrument internal is complex, especially when order to be converted and instrument internal life When there is one-to-many, many-to-one relationship between order, get up more difficult, conversion efficiency of conversion is relatively low, is difficult to meet test system high Efficiency test demand;Also the conversion no between the order of corresponding relation between order to be converted and instrument internal order cannot be realized, and It is order mistake can only to be reported by order error log, thus being difficult to meet to existing test system seamless compatibility.
Content of the invention
A kind of in view of above-mentioned the deficiencies in the prior art, it is an object of the invention to provide measuring instrument program control language compatibility System and processing method, seamless compatible with existing test system to realize, extend the life cycle of test system, improve Testing efficiency.
For solving above-mentioned technical problem, the present invention program includes:
A kind of measuring instrument program control language compatibility system, including the parsing mould for parsing test system input order Block, the transducer for identification code and order code comversion, the standard commands processor processing standard commands and process are specific The particular command processor of order.Wherein, command analysis device carrys out self-testing system input order for reception, and is selected according to system The compatible language selected calls corresponding command analysis device to enter the parsing of line command;Transducer is carried out to the identification code after command analysis Code comversion;Standard commands processor is used for the order ISN after processing transducer conversion, and response data is sent into transducer; Particular command processor be used for processing cannot the conversion of converted device identification code, and response data is sent into transducer;Transducer Again the response data after the process of standard commands processor and particular command processor is converted into after response message returning to Test system.Described transducer respectively with described command analysis device, described standard commands processor, described particular command processor Connect, described command analysis device is connected with described particular command processor.
Described measuring instrument program control language compatibility system, wherein, described command analysis device includes standard commands parsing Device and traditional commands resolver, described transducer had both enabled the conversion of the identification code intersymbol in order after parsing, and can be real Show response data to the conversion of response message, described particular command processor includes specific standard commands processor or specific Traditional commands processor.
A kind of processing method of described measuring instrument program control language compatibility system, it comprises the following steps:
A, described command analysis device determine whether program control speech compatibility mode;
B is if it has, then judge whether the language of selection is standard commands compatible language;
C is if it has, then call this compatible language command set and standard commands resolver to be parsed;
D, transducer is called to carry out code comversion to identification code;
E, judge identification code to the whether success of order code comversion;
F is if it has, then call standard commands processor that the order ISN after conversion is processed;
G, judge whether response data;
H is if it is, be converted into after response message returning to test system by response data.
Described processing method, wherein, described step a specifically also includes: if not program control speech compatibility mode, then directly Connect and call instrument internal command set and standard commands resolver to be parsed, call standard commands processor to be processed afterwards, If there is response data, then response data is converted into after response message returning test system, so far, whole message exchange mistake Journey completes.
Described processing method, wherein, described step b specifically also includes: the language of selection is traditional commands compatibility language Speech, then call this compatible language command set and traditional commands resolver to be parsed, and the identification code after parsing is sent into conversion Device enters line command code comversion.
Described processing method, wherein, described step e specifically also includes: if identification code cannot be converted into order ISN, Then call this particular command processor that the identification code that cannot change is processed.
Described processing method, wherein it is characterised in that described step g specifically also includes: if there is not number of responses According to then not needing to carry out the conversion of response data, so far, whole message exchange procedure completes.
The invention provides a kind of measuring instrument program control language compatibility system and processing method, using command analysis device, The technology type of transducer, standard commands processor and particular command processor, excavates scpi order and traditional commands abundant A command analysis device is configured, this resolver can parse all scpi order and traditional commands grammers of meeting will on the basis of feature The program control order asked, has stronger versatility;Using the program control language compatibility mode of dynamic and configurable, add a kind of new Program control compatible language does not need to do any variation, less needs " patch installing " and treats it is only necessary to read when general switching software initializes The command set of compatible language, and compatible language identification code and the mapping relations of instrument order ISN are treated in interpolation in code comversion table Can achieve to this new compatibility adding program control speech, " change " form and special life in particular by efficient order ISN Make processing means, be customized by the conversion idea of simply interior intersymbol and to the order that cannot change process it is achieved that Seamless compatible with existing test system, extend test system life cycle, improve testing efficiency.
Brief description
Fig. 1 is the structural representation of agilent x series of signals analyser standard scpi order compatible system in prior art Figure;
Fig. 2 is the structural representation of agilent x series of signals analyser traditional commands compatible system in prior art;
Fig. 3 is the structural representation of program control speech compatible system in the present invention;
Fig. 4 is the schematic flow sheet of processing method in the present invention;
Fig. 5 is the idiographic flow schematic diagram of processing method application implementation example in the present invention.
Specific embodiment
The invention provides a kind of program control language compatibility system and processing method, for making the purpose of the present invention, technical side Case and effect are clearer, clear and definite, and the present invention is described in more detail below.It should be appreciated that concrete reality described herein Apply example only in order to explain the present invention, be not intended to limit the present invention.
The invention provides a kind of measuring instrument program control language compatibility system, as shown in Figure 3, including for test The command analysis device of system communication, the transducer for identification code and order code comversion, the standard commands of process standard commands Processor and the particular command processor processing particular command, wherein, it is defeated that command analysis device carrys out self-testing system for reception The order entering, and call corresponding command analysis device to enter the parsing of line command according to the compatible language selecting;Transducer is used for will The carrying out of the identification code after parsing to order ISN is changed;Standard commands processor is used for processing in the order after transducer is changed Code, and result is sent in the form of response data transducer;Particular command processor cannot converted device for process The identification code of conversion, and result is sent in the form of response data transducer;Transducer is again by standard commands processor And the response data of particular command processor is converted into the discernible response message of test system and returns to test system.Described Transducer is connected with described command analysis device, described standard commands processor, described particular command processor respectively, described order Resolver is connected with described particular command processor.By the conversion idea of simply interior intersymbol and to the order that cannot change It is customized processing it is achieved that seamless compatible with existing test system, extend test system life cycle, improve test Efficiency.
Present invention also offers a kind of processing method using described measuring instrument program control language compatibility system, such as Fig. 4 Shown, it comprises the following steps:
Step 101: whether described command analysis device is program control speech compatibility mode;
Step 102: if it has, then judging whether the language of selection is standard commands compatible language;
Step 103: if it has, then calling this compatible language command set and standard commands resolver to be parsed;
Step 104: call transducer to carry out code comversion to identification code;
Step 105: judge whether identification code is successful to order code comversion;
Step 106: if it has, then calling standard commands processor that the order ISN after conversion is processed;
Step 107: judge whether response data;
Step 108: if it is, response data is converted into after response message returning test system.
Further, described step 101 specifically also includes: if not program control speech compatibility mode, then directly invokes Instrument internal command set and standard commands resolver are parsed, and then call standard commands processor to be processed, if deposited In response data, then response message response data being converted into user's identification returns to test system, and so far, whole message is handed over The process of changing completes.
Further, described step 102 specifically also includes: the language of selection is traditional commands compatible language, then adjust Parsed with this compatible language command set and traditional commands resolver, and the identification code after parsing is sent into transducer and ordered Make code comversion.
Further, described step 105 specifically also includes: if identification code cannot be converted into order ISN, calls This language particular command processor is processed to the identification code that cannot change.
Further, described step 107 specifically also includes: if there is not response data, does not need to be responded The conversion of data, so far, whole message exchange procedure completes.
In order to the processing method of the present invention is further described, it is exemplified below more detailed embodiment and illustrates, such as Fig. 5 Shown.
1) receive the input order of test system;
2) determine whether program control speech compatibility mode;
3) if being non-program control speech compatibility mode, directly reading instrument internal command set, calling standard commands to parse Device parses to input order, and obtains order ISN;
4) the order ISN after parsing and parameter are sent into standard commands processor to be processed, then judge whether Response data;
If there is response data, converted for response data device is converted into after response message returning to test system, turns To step 8);
If there is no response data, go to step 8);
5) if program control speech compatibility mode, judge that the compatible language of selection is standard commands compatible language or tradition Order compatible language;
If the compatible language selecting is standard commands compatible language, reads this standard command set, call standard commands Resolver parses to input order;
If the compatible language selecting is traditional commands compatible language, reads this traditional commands collection, call traditional commands Resolver parses to input order;
6) call transducer that the identification code after parsing is changed, judge whether identification code becomes to order code comversion Work(;
If translated into work(, then standard commands processor is called to be processed;
If convert failed, directly invoke this language particular command processor and processed;
7) judge whether response data after the completion of processing;
If there is response data, then response data is converted into after response message returning to test system, goes to step 8);
If there is no response data, go to step 8);
8) whole message exchange procedure completes, terminates.
Certainly, the presently preferred embodiments of the present invention that is only described above is sub, and the present invention is not limited to enumerate above-described embodiment It should be noted that any those of ordinary skill in the art are under the teaching of this specification, that is made all equivalent replaces son Generation, obvious variant, all fall within the essential scope of this specification, ought to be protected by the present invention.

Claims (6)

1. a kind of measuring instrument program control language compatibility system, including the command analysis for parsing test system input order Device, the transducer for identification code and order code comversion, the standard commands processor processing standard commands and process are specific The particular command processor of order;It is characterized in that, command analysis device is used for receiving the input order of self-testing system, and root Call corresponding command analysis device that input order is parsed according to the compatible language of Systematic selection;After transducer is to command analysis Identification code carry out code comversion;Standard commands processor is used for the order ISN after processing transducer conversion, and by number of responses According to feeding transducer;Particular command processor be used for processing cannot the conversion of converted device identification code, and response data is sent into Transducer;It is converted into after response message returning to test system by transducer again if there is response data;Described transducer divides Be not connected with described command analysis device, described standard commands processor, described particular command processor, described command analysis device with Described particular command processor connects;
Described command analysis device includes standard commands resolver and traditional commands resolver, after described transducer had both enabled parsing Identification code intersymbol in order conversion, enable response data again and arrive the conversion of response message, the process of described particular command Device includes specific standard commands processor or certain conventional command processor;
Compatible language is standard commands compatible language or traditional commands compatible language.
2. a kind of processing method using measuring instrument program control language compatibility system as claimed in claim 1, it includes following Step:
A, described command analysis device determine whether program control speech compatibility mode;
B is if it has, then judge whether the language of selection is standard commands compatible language;
C is if it has, then call this compatible language command set and standard commands resolver that test system input order is solved Analysis;
D, transducer is called to carry out code comversion to identification code;
E, judge identification code to the whether success of order code comversion;
F is if it has, then call standard commands processor that the order ISN after conversion is processed;
G, judge whether response data;
H is if it is, be converted into after response message returning test system by response data.
3. processing method according to claim 2 is it is characterised in that described step a specifically also includes: if command analysis It is not program control speech compatibility mode that device judges, then directly invoke instrument internal command set and standard commands resolver is parsed, Call standard commands processor to be processed afterwards, if there is response data, then response data is converted into after response message Return to test system, so far, whole message exchange procedure completes.
4. processing method according to claim 2 is it is characterised in that described step b specifically also includes: the language of selection For traditional commands compatible language, then this compatible language command set and traditional commands resolver is called to be parsed, and after parsing Identification code send into transducer enter line command code comversion.
5. processing method according to claim 2 is it is characterised in that described step e specifically also includes: if identification code is no Method is converted into order ISN, then call this particular command processor that the identification code that cannot change is processed.
6. processing method according to claim 2 is it is characterised in that described step g specifically also includes: if there is not sound Answer data, then do not need to carry out the conversion of response data, so far, whole message exchange procedure completes.
CN201310563352.3A 2013-11-14 2013-11-14 Measuring instrument program control language compatibility system and processing method Active CN103593223B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310563352.3A CN103593223B (en) 2013-11-14 2013-11-14 Measuring instrument program control language compatibility system and processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310563352.3A CN103593223B (en) 2013-11-14 2013-11-14 Measuring instrument program control language compatibility system and processing method

Publications (2)

Publication Number Publication Date
CN103593223A CN103593223A (en) 2014-02-19
CN103593223B true CN103593223B (en) 2017-02-01

Family

ID=50083379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310563352.3A Active CN103593223B (en) 2013-11-14 2013-11-14 Measuring instrument program control language compatibility system and processing method

Country Status (1)

Country Link
CN (1) CN103593223B (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6975957B2 (en) * 2004-04-15 2005-12-13 Agilent Technologies, Inc. Dynamic runtime modification of SCPI grammar
CN102004952B (en) * 2010-11-03 2014-04-09 北京普源精电科技有限公司 Measuring resource control system and measuring resource control method

Also Published As

Publication number Publication date
CN103593223A (en) 2014-02-19

Similar Documents

Publication Publication Date Title
US8204497B2 (en) Method for testing a mobile radio device
CN102023922B (en) System and method for testing automotive electronic diagnostic software
CN109561104A (en) A kind of communication protocol conversion method and device
CN104052633B (en) Intelligent station 61850 and the stipulations integration test method of telemechanical 104
CN102421112B (en) Testing method of mobile terminal, mobile terminal simulator, testing equipment and testing system
CN107239398B (en) Postman-based automatic interface test case generation system and method
US9864346B2 (en) Method for connecting a substation automation device according to IEC61850 to any industry automation field bus
CN105072130B (en) A kind of ASN.1 decoders code automatic generation method
CN112988495B (en) Multifunctional test method, device and system for SOC chip multiplex pin
CN103023708B (en) The method of testing of communication protocol interface and system
CN106407108B (en) A kind of test method and system of train network logout software
CN104483959A (en) Fault simulation and test system
CN103248440A (en) Terminal test system and method
CN102967815A (en) Chip testing method, automated testing equipment and system
CN101093521A (en) FPGA emulation device and method
JP2018010638A5 (en)
CN103701664A (en) Method for testing runtime of equipment and testing server
CN111427321A (en) Multi-protocol-compatible MES data acquisition system and method thereof
CN112631937A (en) Automatic CAN operation testing method and device for T-Box
CN103378994A (en) Method and terminal for testing communication equipment
CN103780455A (en) TETRA digit cluster protocol test method and system based on TTCN-3
CN107885675B (en) Multifunctional measuring instrument program control command processing method
WO2017113848A1 (en) Testing method, testing platform and simulated testing device for test case
CN106878570A (en) A kind of speech business method of testing and system
CN103593223B (en) Measuring instrument program control language compatibility system and processing method

Legal Events

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