CN113703836B - SCPI instruction management method for spacecraft power system evaluation - Google Patents

SCPI instruction management method for spacecraft power system evaluation Download PDF

Info

Publication number
CN113703836B
CN113703836B CN202110959600.0A CN202110959600A CN113703836B CN 113703836 B CN113703836 B CN 113703836B CN 202110959600 A CN202110959600 A CN 202110959600A CN 113703836 B CN113703836 B CN 113703836B
Authority
CN
China
Prior art keywords
instruction
identification
control command
scpi
test instrument
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
CN202110959600.0A
Other languages
Chinese (zh)
Other versions
CN113703836A (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.)
Beijing Zhongke Qixin Software Technology Co ltd
Beijing Institute of Spacecraft System Engineering
Original Assignee
Beijing Zhongke Qixin Software Technology Co ltd
Beijing Institute of Spacecraft System Engineering
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 Beijing Zhongke Qixin Software Technology Co ltd, Beijing Institute of Spacecraft System Engineering filed Critical Beijing Zhongke Qixin Software Technology Co ltd
Priority to CN202110959600.0A priority Critical patent/CN113703836B/en
Publication of CN113703836A publication Critical patent/CN113703836A/en
Application granted granted Critical
Publication of CN113703836B publication Critical patent/CN113703836B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30145Instruction analysis, e.g. decoding, instruction word fields

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Remote Monitoring And Control Of Power-Distribution Networks (AREA)

Abstract

The disclosure relates to an SCPI instruction management method for spacecraft power system evaluation, comprising the following steps: determining the identification of the instruction type, the identification of the test instrument type, the identification of the node equipment, the identification of the test instrument, the identification of the SCPI instruction and the instruction content of the SCPI instruction; generating a control command, wherein the information carried by the control command comprises: the foregoing identification and instruction content of the SCPI instruction. The node equipment acquires the control command and judges whether the control command corresponds to the node equipment according to the identification of the node equipment in the control command; under the condition that the control command corresponds to the node equipment, determining a test instrument corresponding to the control command according to the identification of the test instrument in the control command; and sending the instruction content of the SCPI instruction in the control command to the determined test instrument. According to various identifications in the control command, the SCPI instruction is sent to a plurality of test instruments of various types and distinguished.

Description

SCPI instruction management method for spacecraft power system evaluation
Technical Field
The disclosure relates to the field of spacecraft power system evaluation, in particular to an SCPI instruction management method for spacecraft power system evaluation.
Background
In the test of a spacecraft power supply and distribution system, the test range is wide, and the test range comprises a system level, a subsystem level, an equipment level, a module level, a component level and the like; the testing dimension is more, including electromechanical interface, electrical property, reliability, life, software engineering, technical maturity, etc. Therefore, the assistance of a computer is introduced, so that automation in the test process is realized to a certain extent, time resources and human resources occupied by the test work are reduced, and meanwhile, the accuracy and the confidence of the test work are further enhanced.
In testing, instructions (including but not limited to SCPI instructions) need to be sent to multiple, multiple test instruments in order to perform data collection or remote control of the test instruments. However, the contrast in the related art has not yet proposed an efficient solution.
Disclosure of Invention
To solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an SCPI instruction management method for spacecraft power system evaluation.
In a first aspect, the present disclosure provides an SCPI instruction management method for spacecraft power system evaluation, applied to an electronic device, the method comprising: determining the identification of the instruction type, the identification of the test instrument type, the identification of the node equipment, the identification of the test instrument, the identification of the SCPI instruction and the instruction content of the SCPI instruction; generating a control command, wherein the information carried by the control command comprises: identification of instruction type, identification of test instrument type, identification of node device, identification of test instrument, identification of SCPI instruction, and instruction content of SCPI instruction.
In some embodiments, the SCPI instruction management method further comprises: and determining time sequence control information of the SCPI instruction, wherein the information carried by the control command also comprises the time sequence control information.
In some embodiments, the SCPI instruction management method further comprises: sending a control command; receiving a data packet sent by corresponding node equipment in response to a control command, wherein the information carried by the data packet comprises: identification of instruction type, identification of test instrument type, identification of node equipment, identification of test instrument, identification of SCPI instruction, and data obtained by corresponding test instrument in response to instruction content of the SCPI instruction; and storing the data packet.
In some embodiments, sending the control command includes: and sending the control command to the real-time database so that the node equipment obtains the control command from the real-time database.
In a second aspect, the present disclosure provides an SCPI instruction management method for spacecraft power system evaluation, applied to a node device, where the node device is associated with one or more test instruments, the SCPI instruction management method includes: the node equipment acquires a control command, wherein the information carried by the control command comprises: identification of instruction type, identification of test instrument type, identification of node equipment, identification of test instrument, identification of SCPI instruction, and instruction content of the SCPI instruction; the node equipment judges whether the control command corresponds to the node equipment according to the identification of the node equipment in the control command; under the condition that the control command corresponds to the node equipment, the node equipment determines a test instrument corresponding to the control command according to the identification of the test instrument in the control command; the node device sends the instruction content of the SCPI instruction in the control command to the determined test instrument.
In some embodiments, the information carried by the control command further includes: the time sequence control information of the SCPI instruction, wherein the node equipment sends the instruction content of the SCPI instruction in the control command to the determined test instrument, and the time sequence control information comprises the following steps: and the node equipment sends the instruction content of the SCPI instruction in the control command to the determined test instrument according to the time sequence control information.
In some embodiments, the SCPI instruction management method further comprises: the node equipment receives the determined data sent by the test instrument in response to the instruction content of the SCPI instruction; the node equipment generates a data packet, wherein the information carried by the data packet comprises: identification of instruction type, identification of test instrument type, identification of node device, identification of test instrument, identification of SCPI instruction, and the data; the node device transmits the data packet.
In some embodiments, the node device obtains the control command, including: the node device obtains the control command from the real-time database.
In a third aspect, the present disclosure provides an apparatus comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor; which when executed by a processor, performs the steps of any of the methods of the present disclosure.
In a fourth aspect, the present disclosure provides a computer readable storage medium having stored thereon an SCPI instruction management program for spacecraft power system evaluation, the SCPI instruction management program when executed by a processor, the steps of any of the SCPI instruction management methods of the present disclosure.
Compared with the related art, the technical scheme provided by the embodiment of the disclosure has the following advantages: the embodiment of the disclosure provides the method.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic structural diagram of one implementation of a system for spacecraft power system evaluation provided by an embodiment of the disclosure;
FIG. 2 is a flow chart of one implementation of a SCPI command management method for spacecraft power system evaluation provided by an embodiment of the disclosure;
FIG. 3 is a flowchart of another implementation of a SCPI command management method for spacecraft power system evaluation provided by an embodiment of the disclosure;
FIG. 4 is a flow chart of one implementation of a method of testing a spacecraft power system provided by an embodiment of the disclosure;
FIG. 5 is a block diagram of a control command processing apparatus according to an embodiment of the present disclosure;
FIG. 6 is a block diagram illustrating another embodiment of a control command processing apparatus according to an embodiment of the present disclosure;
Fig. 7 is a hardware schematic of an electronic device according to an embodiment of the disclosure.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present disclosure and are not intended to limit the present disclosure.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present disclosure, and are not of specific significance per se. Thus, "module," "component," or "unit" may be used in combination.
Fig. 1 is a schematic structural diagram of an implementation manner of a system for evaluating a power supply system of a spacecraft according to an embodiment of the disclosure, and as shown in fig. 1, the system includes: test equipment 10, node device 20, server 30, and client 50. Wherein the test instrument 10 may be connected directly to the node device 20 or through the switch 40. The test instrument 10 may be connected to the server 30, in which case the server 30 has the function of a node device. The node device 20 and the server 30 may be connected through a switch 40. The server 30 and the client 50 may be connected through the switch 40. In the following, node devices and servers are in some cases collectively referred to as nodes. At least a portion of the test instrument 10 is a single-threaded device, but is not limited thereto.
In the embodiment of the present disclosure, the node device 20 may include an electronic device such as a personal computer, for example, a computer running Windows, macOS, or may be a portable electronic device such as a smart phone, which is not limited in the embodiment of the present disclosure.
In the embodiment of the present disclosure, the server 30 may be a personal computer, or a server device, which is not limited in the embodiment of the present disclosure.
In the disclosed embodiment, the client 50 is used to initiate a test, display various test data, and set various test parameters. Server 30 acts as an intermediary for communication between node device 20 and client 50. The node device 20 is used for collecting data from the test instrument 10 and performing setting operations on the test instrument 10.
In the disclosed embodiment, the client 50 initiates a test, periodically collecting parameters (e.g., voltage, current, etc.) from the test instrument 10, and the test instrument 10 tests parameters of the spacecraft power system. The client 50 initiates a status setting that changes the status of the test instrument 10. The node apparatus 20 receives the state setting instruction and performs state setting on the test instrument 10.
In an embodiment of the present disclosure, the test instrument 10 may include: and the solar array simulator is used for checking the shunt regulating function of the evaluated object. Illustratively, the solar array simulator may include: one or more cabinets, computers, and programmable dc power supplies, each having one or more channels.
In an embodiment of the present disclosure, the test instrument 10 may include: and the storage battery simulator is used for checking the charge control function and the discharge control function of the evaluated object. By way of example, the battery simulator may include one or more cabinets, computers, programmable dc power supplies, and programmable dc electronic loads, each having one or more channels.
In an embodiment of the present disclosure, the test instrument 10 may include: the program-controlled direct-current power supply is used for providing power for the tested object. Illustratively, each programmable dc power supply includes one or more channels.
In an embodiment of the present disclosure, the test instrument 10 may include: the program control direct current electronic load is used for consuming the power output by the tested object. Exemplary, the programmed dc electronic load includes: one or more cabinets, computers, and programmable dc electronic loads each having a plurality of channels.
In an embodiment of the present disclosure, the test instrument 10 may include: and the power analyzer is used for measuring voltage and current. Illustratively, each power analyzer includes a plurality of voltage measurement channels, a plurality of current measurement channels.
In an embodiment of the present disclosure, the test instrument 10 may include: and the frequency analyzer is used for analyzing the frequency domain impedance and the loop stability. Illustratively, each frequency analyzer includes one or more frequency output channels, one or more voltage measurement channels.
In an embodiment of the present disclosure, the test instrument 10 may include: and the oscilloscope is used for measuring time domain voltage and current waveforms. Each oscilloscope contains one or more voltage measurement channels.
In an embodiment of the present disclosure, the test instrument 10 may include: the universal meter is used for measuring voltage and current. Each multimeter includes one or more voltage measurement channels and a current measurement channel.
In an embodiment of the present disclosure, the test instrument 10 may include: and the function generator is used for outputting a specific signal.
In an embodiment of the present disclosure, the test instrument 10 may include: and a power amplifier for amplifying the power of the signal.
In an embodiment of the present disclosure, the test instrument 10 may include: and the LCR tester is used for measuring reactance.
In an embodiment of the present disclosure, the test instrument 10 may include: milliohmmeters are used to measure small resistances.
In an embodiment of the present disclosure, the test instrument 10 may include: and the data recorder is used for recording data.
In embodiments of the present disclosure, node device 20 may be associated with one or more test instruments 10. The node device 20 is configured to communicate with its associated test instrument 10 to collect data from the test instrument 10 or to perform setup operations on the test instrument 10.
In the disclosed embodiment, each node device 20 is assigned an identification, each test instrument is assigned an identification of the test instrument type, and each test instrument 10 is classified with an identification of the test instrument. The identity of node device 20 may be associated with attribute information of node device 20, such as associating the identity of node device 20 with an IP address, MAC address, etc. of node device 20. The identification of the test instrument 10 may be associated with attribute information of the test instrument 10, such as associating the identification of the test instrument 10 with an IP address of the test instrument 10, or the like. The identification of the type of test instrument may be associated with attribute information of the corresponding type of test instrument, e.g., the identification of the type of test instrument is associated with information such as what communication interface is supported by such test instrument.
In the embodiment of the present disclosure, remote control is implemented between the test instrument 10 and the node apparatus 20 using a programmable instrument (programmable instrument) standard command Set (SCPI), but is not limited thereto. SCPI is a standardized instrument programming language based on existing standards IEEE488.1 and IEEE 488.2 and conforming to various standards such as floating point arithmetic rules in the IEEE754 standard, exchange of 7-bit code symbols (corresponding to ASCll programming) for ISO646 information, and the like. The method adopts a set of command sets with tree-like layered structures, is a universal instrument model with universality, and adopts signal-oriented measurement.
The instructions in the standard command set of the programmable instrument (programmable instrument) correspond to a key on the device panel, and in the remote operation mode, one or more SCPI commands can be used to complete the same. The plurality of instructions constitutes an instruction set.
In the presently disclosed implementations, the SCPI instruction includes, but is not limited to, two functions (instruction types):
1) A set operation, i.e., a set operation, for changing the running state of the test instrument, for example, turning on/off the power supply output, etc.;
2) Query instructions for querying the state of the test instrument, i.e. query operations, e.g. reading the output voltage value, etc.
Query instructions are generally given a question mark "? "end, some instructions can be used either to set up or to query the instrument.
In general, each test instrument has its own manual of developers, in which the SCPI instructions supported by it are described in detail and are embodied in the form of a syntax tree, which cannot be used directly, but can be used after parsing into individual SCPI instructions.
An exemplary syntax tree of SCPI instructions is shown below:
[SOURce:]
PULSe
TRANsition [: LEADing ] < Time > [ Unit ] set up/down Time
TRANsition [: LEADing ]? < Time > [ Unit ] query rise/fall Time
:WIDTh
HIGH < Time > [ Unit ] pulse width is set LevelA (higher level)
HIGH? < Time > [ Unit ] query LevelA (higher level) pulse width
:WIDTh
Low < Time > [ Unit ] pulse width is set LevelB (lower level)
LOW? < Time > [ Unit ] query LevelB (lower level) pulse width
After the grammar tree is analyzed, the following instructions can be obtained:
PULSe: TRANsition set up rise/fall time
PULSe: TRANsition? Query rise/fall time
PULSe: WIDTh HIGH setting LevelA (higher level) pulse width
PULSe: WIDTh: HIGH? Query LevelA (higher level) pulse width
PULSe: WIDTh Low setting LevelB (lower level) pulse width
PULSe: WIDTh: low? Query LevelB (lower level) pulse width
In the disclosed embodiment, SCIP instructions are assigned identities, which can distinguish between different SCPI instructions, e.g., SCIP instruction "PULSe: WIDTh:HIGH" is identified as "0001", SCIP instruction "PULSe: TRANsition" is identified as "0002".
In the embodiment of the disclosure, the local nonstandard SCPI instruction expansion can be provided, the functions of the evaluation equipment can be conveniently, effectively and completely exerted, a more perfect means is provided for the evaluation process, and therefore a more accurate evaluation result can be obtained.
In the disclosed embodiments, the SCPI instructions for all test instrument types involved in the test may be obtained, forming a SCPI instruction set for each type of test instrument. The identification of the SCPI instructions is used to distinguish between different SCPI instructions. In some cases, the SCPI instructions of the same type of test instrument are the same, i.e., each test instrument of the same type has the same SCPI instruction set. The instruction content of the SCPI instruction includes keywords and parameters (parameters are optional, have parameters for the set instruction, and do not include parameters for the query instruction). In this disclosure, the identification of the SCPI instruction refers to the identification corresponding to the key.
It should be understood that the system for spacecraft power system evaluation shown in fig. 1 is merely an exemplary illustration of an embodiment of the disclosure and is not intended to be limiting of the system for spacecraft power system evaluation.
Embodiments of the present disclosure are described below on the basis of the system shown in fig. 1.
In some embodiments of the present disclosure, the information carried by the control command includes: identification of instruction type, identification of test instrument type, identification of node device, identification of test instrument, identification of SCPI instruction, and instruction content of SCPI instruction. The information carried by the data packet in response to the control command includes: identification of instruction type, identification of test instrument type, identification of node equipment, identification of test instrument, identification of SCPI instruction, and acquired data in the corresponding control command. In this disclosure, various types of identification information are collectively referred to as "instruction codes".
In some embodiments of the present disclosure, the information carried by the control command further includes: timing control information, which may include delay information or time of day information, is not limited in this disclosure.
In the present disclosure, the SCPI instructions may be sent to multiple test instruments of multiple types and distinguished according to various types of identifications in the control commands; according to various identifications in the data packet, information such as an instruction, a testing instrument, node equipment and the like for acquiring the data can be determined without complex searching. And based on the identification information, the writing or automatic generation of the control command is facilitated, and the readability of the control command is improved.
Embodiments of the present disclosure provide a SCPI instruction management method for spacecraft power system evaluation that is applicable to a client 50 or server 30 for generating control commands to a test instrument 10. The plurality of control commands constitute a control command sequence, and execution of the control commands in the control command sequence effects a series of operations including collecting data from the test instrument 10, setting the state of the test instrument 10.
As shown in fig. 2, the method includes steps S202 to S204.
Step S202, determining an identification of an instruction type, an identification of a test instrument type, an identification of a node device, an identification of a test instrument, an identification of an SCPI instruction, and an instruction content of the SCPI instruction.
Step S204, a control command is generated, wherein the information carried by the control command comprises: identification of instruction type, identification of test instrument type, identification of node device, identification of test instrument, identification of SCPI instruction, and instruction content of SCPI instruction.
In the embodiment of the present disclosure, the fields included in the generation control command are shown in table 1.
Table 1 field table of control commands
In the embodiment of the present disclosure, the identification of the instruction type, the identification of the test instrument type, the identification of the node device, the identification of the test instrument, and the identification of the SCPI instruction in the control command are collectively referred to as an instruction code number. The control command comprises two parts of an instruction code number and an instruction content of the SCPI instruction, wherein the instruction code number comprises an identification of an instruction type, an identification of a test instrument type, an identification of node equipment, an identification of the test instrument and an identification of the SCPI instruction.
Illustratively, the identification of instruction types is represented by a 1-bit 10-ary number, e.g., "1", "2", "3", "4" each representing a different instruction type; the identification of the test instrument type is represented by a 2-bit 10-level number, for example, "01", "11" and "15" respectively represent different test instrument types; the identification of the node devices is represented by a 2-bit 10-system number, for example, "02", "20" and "80" respectively represent different node devices; the identification of the test instrument is represented by a 2-bit 10-system number, for example, "01", "20" and "51" respectively represent different test instruments; the identity of the SCPI instruction is represented by a 4-bit 10-ary number, e.g., "0001" and "0100" represent different SCPI instructions.
Illustratively, the above-mentioned identifications are combined together in a predetermined order to form an instruction code, e.g., in the order of identification of the instruction type, identification of the test instrument type, identification of the node device, identification of the test instrument, and identification of the SCPI instruction, the instruction code may be expressed as: ABBCCDDEEEE. Wherein, "a" represents an identification of an instruction type, "BB" represents an identification of a test instrument type, "CC" represents an identification of a node device, "DD" represents an identification of a test instrument, and "EEEE" represents an identification of an SCPI instruction. For example, "30101020111" indicates an instruction of the instruction type "3", the test instrument type "01", the node device "01", the test instrument "02", and the SCIP instruction "0111".
It should be understood that the above identification of control commands and their data structures are merely exemplary, and embodiments of the present disclosure are not limited thereto, and may be implemented in the form of json or the like.
Illustratively, the instruction content of the SCPI instruction includes keywords and parameters (parameters are optional, have parameters for the set instruction, and do not include parameters for the query instruction). For example, the instruction of the SCPI instruction is "SOURce 1:VOLTage:PROTection 110 (set protection voltage, target value is 110)", where "SOURce 1:volume:process" is a part (key) corresponding to the identification of the SCPI instruction, and "110" is a parameter of the SCPI instruction. The SCPI instruction has an instruction of "SOURce 1:VOLTage:PROTection? (inquiry protection voltage) ", wherein" SOURce 1:volume:procedure? "is the part (key) of the SCPI instruction corresponding to the identification, and the instruction of the SCPI instruction does not contain parameters.
Illustratively, the "instruction code" portion of the control command is separated from the "instruction" portion of the SCPI instruction by "|", but is not limited thereto. For example, the control command may be expressed as "30101020111|SOURce 1:VOLTage:PROTection? ".
In some embodiments, to control the timing of the SCPI instruction, further comprising: and determining the time sequence control information of the SCPI instruction, wherein the information carried by the control command also comprises the time sequence control information. The control commands including the timing control information are shown in table 2.
Table 2 control commands containing timing control information
Part 1 Part 2 Part 3
Code of instruction Timing control information Instruction content of SCPI instruction
For example, the timing control information may be set as delay information indicating that the SCPI instruction is to be executed with delay according to the delay information; or the timing control information may be set to time information indicating that the SCPI instruction is executed at that time.
In the control command representation described above, a control command containing timing control information may be represented as an "instruction code |timing control information|instruction of SCPI instruction", in which the respective parts are separated by "|", and an exemplary control command is represented as "30101020111|50|source 1:volume: process? ", which means that the delay 50 (in units of milliseconds, etc., depending on the protocol) is performed.
In some embodiments, this may be the case for the parameter value returned by the query instruction, "0.05,0.14,0.45,1.23". Thus, the control command may also include an identification of the value. The identification of the value may be represented by 2-bit 10-ary data, referred to as "FF", for example, for "0.05,0.14,0.45,1.23", when ff=04, it represents that the 4 th value, i.e. 1.23, is extracted, and other parameter values are negligible.
In some embodiments, generating the plurality of control commands forms a control command sequence. An exemplary control command sequence is as follows:
# - - -select channel 2
32048010576|0|SELect:ch2 1
Setting a horizontal scale
32048010282|0|HORizontal:SCAle 10.0
Setting trigger mode
32048010634|0|TRIGger:A:MODe AUTO
Zero position setting of channel 2 (V)
32048010057|0|CH2:POSition-3.0
Offset arrangement of channel 2 (V)
32048010055|0|CH2:OFFSet 0.00
Vertical scale arrangement of channel 2 (V)
32048010063|0|CH2:VOLts 1.0
In some embodiments, after the control command is generated, the control command or sequence of control commands is sent. For example, a control command or sequence of control commands is broadcast to node device 20. The node device 20 receives the control command or the control command sequence, and executes its own control command.
In some embodiments, the control commands or sequences of control commands are processed using a real-time database. After generating the control commands or control command sequences, the control commands or control command sequences are sent to the real database, from which node device 20 may be configured to read the control commands or control command sequences in real time. In some embodiments, a real-time database is provided at server 30, and node device 20 communicates with server 30 to read control commands or control command sequences in real-time from the real-time database provided thereon.
In some embodiments, after sending the control command, further comprising: receiving a data packet sent by corresponding node equipment in response to a control command, wherein the information carried by the data packet comprises: identification of instruction type, identification of test instrument type, identification of node equipment, identification of test instrument, identification of SCPI instruction, and data obtained by corresponding test instrument in response to instruction content of the SCPI instruction; and storing the data packet. It should be appreciated that the data packet may also include other information, such as start and end time stamps of the SCPI instructions, etc., which are not described in detail in the embodiments of the present disclosure.
Illustratively, the control command sent is "30101020111|50|SOURce1:VOLTage:PROTection? The received data packet carries "30101020111" (i.e., the instruction code number formed by the above-mentioned multiple identifiers) and the queried data.
In some embodiments, the query command enables data collection, and node device 20 may be configured to periodically send instructions of the SCPI instruction to its associated test instrument 10, periodically collecting data from the test instrument 10.
In the disclosed embodiment, the stored data packet includes the various identifiers (i.e., instruction codes) described above, so that the source of the data, the instructions used to collect the data, etc. are determined according to the identifiers.
The embodiment of the disclosure also provides an SCPI instruction management method for spacecraft power system evaluation, which is applied to node equipment, wherein the node equipment is associated with one or more test instruments. The node equipment acquires own control command according to the control command or the identification information in the control command.
As shown in fig. 3, the method includes steps S302 to S308.
In step S302, the node device acquires a control command.
The information carried by the control command comprises: identification of instruction type, identification of test instrument type, identification of node device, identification of test instrument, identification of SCPI instruction, and instruction content of SCPI instruction.
In embodiments of the present disclosure, as described in the foregoing portions of the present disclosure, various types of identifiers in control commands are collectively referred to as instruction codes, and in some embodiments, the identifiers are organized together in a predetermined order, each of the identifiers is set as desired to a corresponding number of bits, and the instruction codes are partitioned from the instruction content of the SCPI instruction using a separator "|".
In embodiments of the present disclosure, the node device may listen for a control command or sequence of control commands, which in some embodiments are sent into a real-time database, where the node device may be configured to read the control command or sequence of control commands in real-time.
In step S304, the node device determines whether the control command corresponds to the node device according to the identifier of the node device in the control command.
In the embodiment of the disclosure, the control command or the control command sequence is broadcast, the node device can acquire the control commands sent to all the node devices, and the node device uses the identification of the node device in the control commands to screen the control commands sent to the node device from the broadcast control commands.
In the embodiment of the disclosure, the node device reads the identifier of the node device in the control command, compares the read identifier with the identifier of the node device, and if the read identifier is consistent with the identifier of the node device, the control command is sent to the node device. Illustratively, as previously described in this disclosure, the identity of the node device is set at a preset location ("CC" in ABBCCDDEEEEE "), and the node device reads the value of the" CC "location to obtain the identity of the node device indicated by the control command.
In step S306, in the case that the control command corresponds to the node device, the node device determines the test instrument corresponding to the control command according to the identifier of the test instrument in the control command.
In an embodiment of the present disclosure, as in the foregoing examples of the present disclosure, the identification of the test instrument is set at a preset location ("DD" in ABBCCDDEEEEE "), and the node device reads the value of the" DD "location to obtain the identification of the test instrument indicated by the control command.
In step S308, the node device sends the instruction content of the SCPI instruction in the control command to the determined test instrument.
In an embodiment of the present disclosure, as in the foregoing examples of the present disclosure, the instruction content of the SCPI instruction is set at a preset location, and the node device reads the value of the location, to obtain the instruction content of the SCPI instruction.
In the present embodiment, the instruction content of the SCPI instruction includes a key and parameters (the parameters are optional, have parameters for the set instruction, and do not include parameters for the query instruction). For example, the instruction of the SCPI instruction is "SOURce 1:VOLTage:PROTection 110 (set protection voltage, target value is 110)", where "SOURce 1:volume:process" is a part (key) corresponding to the identification of the SCPI instruction, and "110" is a parameter of the SCPI instruction. The SCPI instruction has an instruction of "SOURce 1:VOLTage:PROTection? (inquiry protection voltage) ", wherein" SOURce 1:volume:procedure? "is the part (key) of the SCPI instruction corresponding to the identification, and the instruction of the SCPI instruction does not contain parameters.
In some embodiments, to control the execution timing of the control name command, the information carried by the control command further includes: timing control information for SCPI instructions. For example, the timing control information may be set as delay information indicating that the SCPI instruction is to be executed with delay according to the delay information; or the timing control information may be set to time information indicating that the SCPI instruction is executed at that time.
In the method, the node equipment sends the instruction content of the SCPI instruction in the control command to the determined test instrument according to the time sequence control information. In the control command representation described above, a control command containing timing control information may be represented as "instruction code |timing control information|instruction of SCPI instruction", in which the respective parts are separated by "|", and an exemplary control command is represented as "30101020111|50|SOURce 1:VOLTage:PROTection? ", which means that the delay 50 (in units of milliseconds, etc., depending on the protocol) is performed. After obtaining the instruction content of the SCPI instruction, the node equipment sets a 50-unit timer according to the rule, and sends the instruction content of the SCPI instruction to the corresponding test instrument when the timer times out.
In some embodiments, further comprising: the node equipment receives the determined data sent by the test instrument in response to the instruction content of the SCPI instruction; the node equipment generates a data packet, wherein the information carried by the data packet comprises: identification of instruction type, identification of test instrument type, identification of node device, identification of test instrument, identification of SCPI instruction, and the data.
In some examples, the node device transmits the data packet, which, as previously described, includes various types of identification (i.e., instruction code) and data in the corresponding control instruction. In some embodiments, the data packet further includes start and end time stamps of the control command, etc., which are not limited and described in detail in the embodiments of the disclosure.
In some embodiments, for each control command, the node device may send data packets generated in response to the control command separately. In other embodiments, the node device packages and transmits a data packet corresponding to a plurality of control commands (for example, but not limited to, a certain period of time), where the packaged data includes a plurality of the foregoing data packets, and each data packet includes an instruction guiding portion and a data portion.
In some embodiments, this may be the case for the parameter value returned by the query instruction, "0.05,0.14,0.45,1.23". Thus, the control command may also include an identification of the value. The identification of the value may be represented by 2-bit 10-ary data, referred to as "FF", for example, for "0.05,0.14,0.45,1.23", when ff=04, it represents that the 4 th value, i.e. 1.23, is extracted, and other parameter values are negligible. Thus, the node device, upon receiving the data, reads the identification of the value in the control command, determines the data value to be acquired, for example, in the foregoing example, when ff=04, represents extracting the 4 th value, i.e. 1.23, in "0.05,0.14,0.45,1.23".
In some embodiments, the node device sends the data packet to the server, the server stores the data packet in the real-time database, and the client obtains corresponding data in real time according to the subscription configuration in the real-time database. In some embodiments, the node device may store the data packets directly into a real-time database, which is not limited by embodiments of the present disclosure.
The embodiment of the disclosure also provides a method for testing a spacecraft power system, as shown in fig. 4, which comprises steps S401 to S413.
In step S401, the client initiates a test task.
In step S402, the server generates a control command or a control command sequence according to the test task.
In some examples, the test task includes a configuration file that generates a control command or sequence of control commands from which the server generates the control command or sequence of control commands.
In some examples, the test tasks of the client include control commands or sequences of control commands.
In step S403, the server stores the generated control command or control command sequence in the real-time database for the node device to read.
In step S404, the node device reads the control command in the real-time database.
In the embodiment of the disclosure, after the control commands or the control command sequences are stored in the real-time database, the control commands or the control command sequences can be read by a plurality of node devices, and the node devices can access the real-time database in real time to acquire the control commands or the control command sequences in real time.
Step S405, for the control command read by the node device, the node device determines whether the control command corresponds to the node device according to the identifier of the node device in the control command.
In step S406, in the case that the control command corresponds to the node device, the node device determines the test instrument corresponding to the control command according to the identifier of the test instrument in the control command.
In step S407, the node device sends the instruction content of the SCPI instruction in the control command to the determined test instrument.
In step S408, in the case that the test instrument has feedback data, the node device receives the determined data sent by the test instrument in response to the instruction content of the SCPI instruction.
In step S409, the node apparatus generates a data packet.
The information carried by the data packet comprises: identification of instruction type, identification of test instrument type, identification of node device, identification of test instrument, identification of SCPI instruction in the corresponding control command, and the data.
In step S410, the node device transmits the data packet to be received by the server.
In some embodiments, for each control command, the node device may send data packets generated in response to the control command separately. In other embodiments, the node device packages and transmits a data packet corresponding to a plurality of control commands (for example, but not limited to, a certain period of time), where the packaged data includes a plurality of the foregoing data packets, and each data packet includes an instruction guiding portion and a data portion.
In step S411, the server receives the data packet sent by the node device.
In step S412, the server stores the data packet in the real-time database.
In the embodiment of the disclosure, the stored information is information carried by the data packet, including various identifiers in the control command corresponding to the data packet, and data acquired in response to the control command.
In step S413, the client obtains data from the real-time database according to the subscription configuration and displays the data.
In the embodiment of the present disclosure, the client may display data through the image user interface, and the display of the data may refer to known techniques, which are not described in detail in the embodiment of the present disclosure.
For the control commands and data packets, refer to the foregoing descriptions of the present disclosure, and are not described herein.
The present disclosure also provides a control command processing apparatus, as shown in fig. 5, including: a determining module 510, configured to determine an identification of an instruction type, an identification of a test instrument type, an identification of a node device, an identification of a test instrument, an identification of an SCPI instruction, and an instruction content of the SCPI instruction. The generating module 520 is connected to the determining module 510, and is configured to generate a control command, where information carried by the control command includes: identification of instruction type, identification of test instrument type, identification of node device, identification of test instrument, identification of SCPI instruction, and instruction content of SCPI instruction.
In some embodiments, the determining module 510 is further configured to determine timing control information of the SCPI instruction, where the information carried by the control command generated by the generating module 520 further includes the timing control information.
In some embodiments, the apparatus further comprises: a sending module 530, connected to the generating module 520, for sending a control command; and the receiving module 540 is connected with the sending module 530 and is used for receiving the data packet sent by the corresponding node device in response to the control command. The information carried by the data packet comprises: identification of instruction type, identification of test instrument type, identification of node device, identification of test instrument, identification of SCPI instruction, and data obtained by the corresponding test instrument in response to instruction content of the SCPI instruction. The storage module 550 is connected to the receiving module 540, and is used for storing the data packet.
In some embodiments, the sending module 530 is configured to send the control command to the real-time database, so that the node device obtains the control command from the real-time database.
The embodiment of the disclosure also provides another control command processing apparatus applied to a node device, where the node device is associated with one or more test instruments, as shown in fig. 6, and the apparatus includes: the obtaining module 610 is configured to obtain a control command, where information carried by the control command includes: identification of instruction type, identification of test instrument type, identification of node device, identification of test instrument, identification of SCPI instruction, and instruction content of SCPI instruction. The judging module 620 is connected to the acquiring module 610, and is configured to judge whether the control command corresponds to the node device according to the identifier of the node device in the control command. The determining module 630 is connected to the judging module 620, and is configured to determine, when the control command corresponds to the node device, a test instrument corresponding to the control command according to the identifier of the test instrument in the control command. And the sending module 640 is connected with the determining module 630 and is used for sending the instruction content of the SCPI instruction in the control command to the determined test instrument.
In some embodiments, the information carried by the control command further includes: and the sending module 640 is configured to send, according to the timing control information, instruction contents of the SCPI instruction in the control command to the determined test instrument.
In some embodiments, the apparatus further comprises: a receiving module 650, configured to receive data sent by the determined test instrument in response to the instruction content of the SCPI instruction. The generating module 660 is connected to the receiving module 650, and configured to generate a data packet, where information carried by the data packet includes: identification of instruction type, identification of test instrument type, identification of node device, identification of test instrument, identification of SCPI instruction, and the data; the node device transmits the data packet.
In some embodiments, the acquisition module 610 is configured to acquire control commands from a real-time database.
The embodiment of the disclosure also provides electronic equipment. Fig. 7 is a schematic hardware structure of an implementation manner of an electronic device provided by an embodiment of the present disclosure, as shown in fig. 7, an electronic device 710 of an embodiment of the present disclosure includes: including at least but not limited to: the memory 711 and the processor 712 may be communicatively connected to each other through a system bus. It is noted that FIG. 7 shows only electronic device 710 with components 711-712, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead.
In this embodiment, the memory 711 (i.e., readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory 711 may be an internal storage unit of the electronic device 710, such as a hard disk or memory of the electronic device 710. In other embodiments, the memory 711 may also be an external storage device of the electronic device 710, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), etc. that are provided on the electronic device 710. Of course, the memory 711 may also include both internal storage units of the electronic device 710 and external storage devices. In this embodiment, the memory 711 is typically used to store an operating system and various types of software installed on the electronic device 710. Further, the memory 711 can also be used to temporarily store various types of data that have been output or are to be output.
The processor 712 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 712 is generally used to control the overall operation of the electronic device 710. In this embodiment, the processor 712 is configured to execute program code or process data stored in the memory 711, such as any one or more methods of embodiments of the present disclosure.
The present embodiment also provides a computer-readable storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, which when executed by a processor, performs the corresponding functions. The computer readable storage medium of the present embodiment is for storing program code of any one or more of the embodiments of the present disclosure, which when executed by a processor, performs the method of any one or more of the embodiments of the present disclosure.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present disclosure are merely for description and do not represent advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present disclosure may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk), including several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present disclosure.
The embodiments of the present disclosure have been described above with reference to the accompanying drawings, but the present disclosure is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the disclosure and the scope of the claims, which are all within the protection of the present disclosure.

Claims (6)

1. An SCPI instruction management method for spacecraft power system evaluation, applied to electronic equipment, is characterized by comprising:
Determining the identification of the instruction type, the identification of the test instrument type, the identification of the node equipment, the identification of the test instrument, the identification of the SCPI instruction and the instruction content of the SCPI instruction;
Generating a control command, wherein the information carried by the control command comprises: the identification of the instruction type, the identification of the test instrument type, the identification of the node device, the identification of the test instrument, the identification of the SCPI instruction, and the instruction content of the SCPI instruction;
further comprises: determining time sequence control information of an SCPI instruction, wherein the information carried by the control command also comprises the time sequence control information;
Further comprises:
Sending the control command;
Receiving a data packet sent by corresponding node equipment in response to the control command, wherein the information carried by the data packet comprises: the identification of the instruction type, the identification of the test instrument type, the identification of the node equipment, the identification of the test instrument, the identification of the SCPI instruction, and data obtained by the corresponding test instrument in response to the instruction content of the SCPI instruction; and
And storing the data packet.
2. The SCPI instruction management method according to claim 1, wherein transmitting the control command comprises: and sending the control command to a real-time database so that the node equipment acquires the control command from the real-time database.
3. An SCPI instruction management method for spacecraft power system evaluation, applied to a node device, wherein the node device is associated with one or more test instruments, the SCPI instruction management method comprising:
the node equipment acquires a control command, wherein the information carried by the control command comprises: identification of instruction type, identification of test instrument type, identification of node equipment, identification of test instrument, identification of SCPI instruction, and instruction content of the SCPI instruction;
The node equipment judges whether the control command corresponds to the node equipment according to the identification of the node equipment in the control command;
under the condition that the control command corresponds to the node equipment, the node equipment determines a test instrument corresponding to the control command according to the identification of the test instrument in the control command;
the node equipment sends the instruction content of the SCPI instruction in the control command to the determined test instrument;
the information carried by the control command further comprises: timing control information for the SCPI instruction,
The node device sends the instruction content of the SCPI instruction in the control command to the determined test instrument, and the method comprises the following steps:
The node equipment sends the instruction content of the SCPI instruction in the control command to the determined test instrument according to the time sequence control information;
Further comprises:
the node equipment receives data sent by the determined testing instrument in response to the instruction content of the SCPI instruction;
The node equipment generates a data packet, wherein the information carried by the data packet comprises: an identification of the instruction type, an identification of the test instrument type, an identification of the node device, an identification of the test instrument, an identification of the SCPI instruction, and the data;
and the node equipment transmits the data packet.
4. The SCPI instruction management method according to claim 3, wherein the node apparatus acquiring the control command comprises: the node device obtains the control command from the real-time database.
5. An apparatus, the apparatus comprising:
a memory, a processor, and a computer program stored on the memory and executable on the processor;
the computer program implementing the steps of the method according to any one of claims 1 to 4 when executed by the processor.
6. A computer readable storage medium, characterized in that it has stored thereon an SCPI instruction management program for spacecraft power system evaluation, which when executed by a processor implements the steps of the SCPI instruction management method according to any of claims 1 to 4.
CN202110959600.0A 2021-08-20 2021-08-20 SCPI instruction management method for spacecraft power system evaluation Active CN113703836B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110959600.0A CN113703836B (en) 2021-08-20 2021-08-20 SCPI instruction management method for spacecraft power system evaluation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110959600.0A CN113703836B (en) 2021-08-20 2021-08-20 SCPI instruction management method for spacecraft power system evaluation

Publications (2)

Publication Number Publication Date
CN113703836A CN113703836A (en) 2021-11-26
CN113703836B true CN113703836B (en) 2024-07-02

Family

ID=78653943

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110959600.0A Active CN113703836B (en) 2021-08-20 2021-08-20 SCPI instruction management method for spacecraft power system evaluation

Country Status (1)

Country Link
CN (1) CN113703836B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114401032B (en) * 2021-12-24 2023-10-27 中科南京移动通信与计算创新研究院 Testing method and system for satellite communication comprehensive tester
CN118192959A (en) * 2024-05-15 2024-06-14 深圳市万里眼技术有限公司 Method for realizing control of measuring instrument, electronic equipment and measuring instrument

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506670A (en) * 2021-02-02 2021-03-16 上海有孚智数云创数字科技有限公司 Multi-node automatic operation and maintenance task processing method, system and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100050104A1 (en) * 2008-08-20 2010-02-25 Franco Stellari System and Method for Automatic Instrument Address Recognition
US8572589B2 (en) * 2009-06-30 2013-10-29 Agilent Technologies, Inc. Programming language translator and enabling translation of machine-centric commands for controlling instrument
CN102004952B (en) * 2010-11-03 2014-04-09 北京普源精电科技有限公司 Measuring resource control system and measuring resource control method
CN103559296A (en) * 2013-11-04 2014-02-05 中国电子科技集团公司第四十一研究所 XML-based parsing method for SCPI (The Standard Commands for Programmable Instruments)
CN107885675B (en) * 2017-11-23 2019-12-27 中国电子科技集团公司第四十一研究所 Multifunctional measuring instrument program control command processing method
CN110928575B (en) * 2018-09-20 2022-04-29 上海登临科技有限公司 Multi-device synchronous control system and control method
CN111079916B (en) * 2018-10-19 2021-01-15 安徽寒武纪信息科技有限公司 Operation method, system and related product
CN110531653A (en) * 2019-08-01 2019-12-03 北京搜狗科技发展有限公司 A kind of control method, device and the device for control
CN111782509B (en) * 2020-06-15 2022-11-29 西北工业大学 Space flight automatic test method based on virtual instrument pseudo-instruction mechanism

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506670A (en) * 2021-02-02 2021-03-16 上海有孚智数云创数字科技有限公司 Multi-node automatic operation and maintenance task processing method, system and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
航天器多路射频频谱自动监测***设计;李宏亮等;《计算机测量与控制》;第25卷(第12期);1-5 *

Also Published As

Publication number Publication date
CN113703836A (en) 2021-11-26

Similar Documents

Publication Publication Date Title
CN113703836B (en) SCPI instruction management method for spacecraft power system evaluation
CN111459794B (en) Communication network testing method, device, computer equipment and storage medium
US20180120384A1 (en) Tester for equipment, apparatus or component with distributed processing function
CN106888060B (en) Anti-interference test method and system for wireless communication module
CN114328566A (en) Relationship graph updating method, device, medium, equipment and generating method
CN110795817A (en) Laboratory data processing method and processing system
CN108990035A (en) Bluetooth function detection method, device, equipment and storage medium
CN111459616A (en) Test method, device, equipment and storage medium
CN107576864B (en) Self-learning type relay protection automatic test method and system
CN114679396A (en) Method, device and system for testing routing performance of gateway
CN111782507A (en) Data testing method and device, storage medium and electronic equipment
CN111563037A (en) Test optimization method and device based on test questions, storage medium and terminal
CN109360618A (en) A kind of management method and system of electronization test report
CN107015954A (en) Equipment mainboard dial setting method and system
CN111812445B (en) Intelligent capacitor error correction method and device, computer equipment and storage medium
CN113702860A (en) Oscilloscope waveform data analysis method for spacecraft power supply system evaluation
CN114720884A (en) System for rapidly processing battery test data
CN114448848B (en) Switch testing method and device, electronic equipment and storage medium
CN113704099A (en) Test script generation method and equipment for spacecraft power system evaluation
CN111400147B (en) Service quality testing method, device and system
CN113468237B (en) Business data processing model generation method, system construction method and device
CN117268594B (en) Intelligent terminal NTC function test method, system and medium
CN117517792B (en) Automatic capacity detection device and detection method for new energy capacitor
CN112345999B (en) Electric energy meter, load record generation method thereof and computer readable storage medium
CN115623501A (en) Method, device and system for testing complete machine consistency of communication terminal

Legal Events

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