CN113552497B - Method for acquiring parameters from instrument and equipment for testing spacecraft power supply system - Google Patents
Method for acquiring parameters from instrument and equipment for testing spacecraft power supply system Download PDFInfo
- Publication number
- CN113552497B CN113552497B CN202110652801.6A CN202110652801A CN113552497B CN 113552497 B CN113552497 B CN 113552497B CN 202110652801 A CN202110652801 A CN 202110652801A CN 113552497 B CN113552497 B CN 113552497B
- Authority
- CN
- China
- Prior art keywords
- acquisition
- parameters
- lifting
- parameter
- time
- 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
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
- G01R31/40—Testing power supplies
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Testing And Monitoring For Control Systems (AREA)
Abstract
The application relates to a method for acquiring parameters from instrument equipment for testing a spacecraft power system, which comprises the following steps: the control machine acquires data acquisition instruction information of the associated instrument equipment; when the data acquisition starting time arrives, the controller generates lifting moment according to lifting period, wherein the acquisition period of the parameters is configured to be integral multiple of the lifting period; the controller sends SCPI commands corresponding to the parameters to the instrument equipment according to the acquisition period of the parameters between two adjacent rod lifting moments, and generates a parameter acquisition start time stamp; receiving parameter values returned by the instrument and equipment, and generating a parameter acquisition ending time stamp; and the control machine sends the data acquired in the lifting period to the server. The acquisition of parameters from the instrument and device is realized through the SCPI command, and the time sequence control and the data forwarding are realized.
Description
Technical Field
The application relates to the field of spacecraft power system evaluation, in particular to a method for acquiring parameters from instrument equipment for testing a spacecraft power system.
Background
The operation of the existing spacecraft power system evaluation equipment is manually interfered, the defects of large workload, low efficiency and the like exist, and due to the limitation of manual operation, some high-precision measurements can only be performed with reduced precision.
Disclosure of Invention
To solve the above technical problems or at least partially solve the above technical problems, the present application provides a method for acquiring parameters from an instrument device for testing a spacecraft power system.
In a first aspect, the present application provides a method of collecting parameters from an instrument device for testing a spacecraft power system, the instrument device being a single-threaded device, the method comprising: the control machine obtains data acquisition instruction information of the associated instrument equipment, wherein the data acquisition instruction information comprises: parameters and collection period of parameters; when the data acquisition starting time arrives, the controller generates lifting moment according to lifting period, wherein the acquisition period of the parameters is configured to be integral multiple of the lifting period; the control machine sends a programmable instrument standard command (Standard Commands for Programmable Instruments, abbreviated as SCPI) command corresponding to the parameters to the instrument equipment according to the acquisition period of the parameters between two adjacent lifting rod moments, and generates a parameter acquisition start time stamp; receiving parameter values returned by the instrument and equipment, and generating a parameter acquisition ending time stamp; the control machine sends data acquired in a lifting period to the server, wherein the data comprise: instrument equipment identification, parameter identification of parameters, parameter values, parameter acquisition start time stamps and parameter acquisition end time stamps.
In some embodiments, before the lifting moment is generated according to the lifting cycle, the method further comprises: the controller receives a data acquisition initiation timestamp, wherein the data acquisition initiation timestamp is generated in response to a user initiating data acquisition; and the controller determines the data acquisition starting time according to the data acquisition initiating time stamp and the preset delay time.
In certain embodiments, the above method further comprises: the controller receives a state setting instruction of the instrument equipment; after each parameter acquisition is finished, the controller judges whether a first time interval between the acquisition finishing time of the parameter and the next rod lifting time is smaller than a first preset duration; and when the first time interval is greater than or equal to a first preset duration, the controller sends an SCPI command corresponding to the state setting instruction to the instrument equipment.
In certain embodiments, the above method further comprises: when the execution of the state setting instruction is finished, the control machine judges whether a second time interval between the execution finishing time of the state setting instruction and the next rod lifting time is longer than a second preset time length; and when the second time interval is greater than or equal to the second preset time length, the controller sends an SCPI command corresponding to the next state setting command to the instrument equipment if the next state setting command exists.
In certain embodiments, the above method further comprises: and when the second time interval is smaller than the second preset time length, entering a waiting state.
In certain embodiments, the above method further comprises: judging whether the next lifting moment arrives or not in the process of executing the state setting instruction by the control machine; and if the next lifting rod moment arrives, the control machine enables the instrument equipment to stop executing the state setting instruction.
In some embodiments, the controller receives status setting instructions for the instrument device, comprising: the control machine receives an instruction packet; the controller parses the state setting instructions of its associated instrument device from the instruction packet.
In a second aspect, the present application provides an apparatus for acquiring parameters from an instrument device for testing a spacecraft power system, the instrument device being a single-threaded device, the apparatus comprising: the acquisition module is used for acquiring data acquisition instruction information of the instrument equipment, wherein the data acquisition instruction information comprises: parameters and collection period of parameters; the lifting rod module is used for generating lifting rod time according to lifting rod period when the data acquisition starting time is reached, wherein the acquisition period of the parameters is configured to be integral multiple of the lifting rod period; the acquisition module is used for sending SCPI commands corresponding to the parameters to the instrument equipment according to the acquisition period of the parameters and generating parameter acquisition start time stamps between two adjacent rod lifting moments, and receiving parameter values of the parameters returned by the instrument equipment and generating parameter acquisition end time stamps; the sending module is used for sending data items corresponding to the lifting period to the server, wherein the data items comprise: instrument equipment identification, parameter identification of a parameter, parameter value of the parameter, parameter acquisition start time stamp and parameter acquisition end time stamp.
In a third aspect, the present application provides a computer device, characterized in that the computer device comprises: a memory, a processor, and a computer program stored on the memory and executable on the processor; the computer program, when executed by a processor, carries out the steps of the above-described method of collecting parameters from an instrument device for testing a spacecraft power system.
In a fourth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a program for acquiring parameters from an instrument device of a power supply system of a test spacecraft, and the program for acquiring parameters from the instrument device of the power supply system of the test spacecraft implements the steps of the method for acquiring parameters from the instrument device of the power supply system of the test spacecraft.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the method provided by the embodiment of the application, the acquisition of parameters from instrument equipment is realized through the SCPI command, and the time sequence control and the data forwarding are realized.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a schematic structural diagram of an implementation manner of a test system of a spacecraft power system according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for controlling data acquisition timing according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an embodiment of a lifting moment and a timing sequence according to an embodiment of the present application;
FIG. 4 is a flow chart of one implementation of a method for collecting parameters from instrumentation of a power supply system for a test spacecraft provided by an embodiment of the application;
FIG. 5 is a block diagram of an embodiment of an apparatus for acquiring parameters from instrumentation of a power supply system for a spacecraft according to the present application;
FIG. 6 is a flowchart of one implementation of a method for processing spacecraft power system test data using a real-time database according to an embodiment of the application;
FIG. 7 is a block diagram of another embodiment of a test system for a spacecraft power system according to an embodiment of the application;
FIG. 8 is a schematic data flow diagram of an embodiment of a testing system for a spacecraft power system according to an embodiment of the application; and
fig. 9 is a hardware schematic of an implementation manner of a computer device according to an embodiment of the present application.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present application, and have no specific meaning 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 test system of a spacecraft power system according to an embodiment of the application, and as shown in fig. 1, the test system includes: instrument device 10, control machine 20, server 30, and client 50. The instrument device 10 may be directly connected to the controller 20 or may be connected through the switch 40. The instrument 10 may be connected to a server 30, where the server 30 has the function of a control machine. The controller 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, the control machine and the server are in some cases collectively referred to as nodes. At least a portion of the instrumentation 10 is a single threaded device, but is not so limited.
In the embodiment of the present application, the controller 20 may include 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 application.
In the embodiment of the present application, the server 20 may be a personal computer, or a server device, which is not limited in the embodiment of the present application.
In an embodiment of the present application, the client 50 is used to initiate a test, display various test data, and set various test parameters. The server 30 acts as an intermediary for communication between the control machine 20 and the client 50. The controller 20 is used for collecting data from the instrument device 10 and performing setting operations on the instrument device 10.
In an embodiment of the present application, the client 50 initiates a test, periodically collecting parameters (e.g., voltage, current, etc.) from the instrumentation 10, and the instrumentation 10 tests parameters of the spacecraft power system. The client 50 initiates a status setting, changing the status of the instrument device 10. The controller 20 receives the state setting instruction and performs state setting on the instrument device 10.
Timing control
The embodiment of the application provides a method for controlling data acquisition time sequence, which is used for a plurality of nodes to acquire a plurality of parameters from a plurality of instrument devices of a power supply system of a test spacecraft, synchronize the data of the plurality of instrument devices and perform time sequence control on data acquisition and state setting.
Fig. 2 is a flowchart of an embodiment of a method for controlling a data acquisition timing according to the present application, where the method includes steps S202 to S204 as shown in fig. 2.
In step S202, when the data acquisition start time arrives, the plurality of nodes synchronously generate the lifting moment according to the lifting cycle.
In step S204, each node acquires the parameters from the instrument device corresponding to the parameters according to the acquisition period of the parameters between two adjacent lifting moments, wherein the acquisition period of the parameters is configured as an integer multiple of the lifting period.
In the embodiment of the present application, the nodes in the embodiment of the present application include the controller 20 and the server 30 shown in fig. 1, which is not limited in the embodiment of the present application. In some embodiments, the node is a control machine 20, and in other embodiments, the server 20 also has the capability of controlling the machine 20.
Referring to fig. 3, the lifting period is T, when the data acquisition start time is reached, a lifting moment 1 is generated, after T, a lifting moment 2 is generated, and a lifting period is formed between the lifting moment 1 and the lifting moment 2, and the duration of the lifting period is T and the number of the lifting period is T1. Further, after the lifting rod time 2 passes through T, a lifting rod time 3 is generated, and a lifting rod period is formed between the lifting rod time 2 and the lifting rod time 3, and the duration of the lifting rod period is T and the number of the lifting rod period is T2.
In the embodiment of the present application, the collection period of the parameter is configured as an integer multiple of the lifting period T, denoted as m×t, where m is a natural number. Wherein, different parameters may set different acquisition periods, for example, one parameter is set to acquire every lifting period, another parameter is set to acquire every two lifting periods (i.e., the acquisition period is 2T), and another parameter is set to acquire every three lifting periods (i.e., the acquisition period is 3T).
In the embodiment of the application, the acquired parameters comprise all parameters which can be transmitted by all instruments and equipment through a data interface, such as electrical parameters, state parameters, alarm information and the like. The acquisition period of each parameter can be set to be an integer multiple of T, i.e., m×t (m∈n; if m=0, the parameter is not acquired), and the acquisition from Ti (i∈n, and 1.ltoreq.i.ltoreq.m) lifting periods can be set respectively.
In some embodiments, information such as a parameter acquisition period, a lifter period for starting acquisition, and the like is set in a configuration file, which is not limited in the embodiment of the present application.
In the embodiment of the application, the state data of various instruments and equipment are periodically collected, and the data and the exact moment of generating the data are recorded. In the step S204, when parameter collection starts, a collection start time stamp is generated; at the end of parameter acquisition, an acquisition end timestamp is generated. And associating and recording the parameter value, the acquisition start time stamp and the acquisition end time stamp of the parameter.
In the embodiment of the application, if the instrument equipment is set to be in an enabling state, the data acquisition function is enabled; if the data acquisition function is set to the prohibition state, the data acquisition function is prohibited.
In some embodiments, the lift bar period is initialized, and the initialized lift bar period is continuously adjusted to obtain the lift bar period used by the system. For example, for one liftoff cycle, after the liftoff time begins, data acquisition is performed and a data acquisition end timestamp is determined. Judging whether the duration between the data acquisition end time and the next lifting time is greater than a preset value according to the data acquisition end time stamp, and if so, increasing the duration of the lifting period. At least part of data acquisition can be completed in the lifting period through multiple times of adjustment.
In some cases, the status of the instrument device is also set. The state of the instrument device is set to be randomly initiated at any time during the test. In some embodiments, the state setting is performed after the data acquisition, but cannot affect the performance of the next data acquisition. Thus, the above method further comprises: after each parameter acquisition is finished, each node judges whether a first time interval between the acquisition finishing time of the parameter and the next lifting moment is smaller than a first preset duration; and when the first time interval is greater than or equal to a first preset time length, if a state setting instruction of the instrument equipment corresponding to the parameter exists, executing the state setting instruction.
In some cases, there are multiple state setting instructions for the instrument device. The method further comprises the following steps: each node judges whether a second time interval between the execution ending time of the state setting instruction and the next rod lifting moment is longer than a second preset duration or not when the execution of the state setting instruction is ended; and executing the next strip setting instruction when the second time interval is greater than or equal to the second preset time length. In some embodiments, the waiting state is entered when the second time interval is less than a second preset duration.
In certain embodiments, the above method further comprises: judging whether the next rod lifting moment arrives or not in the process of executing the state setting instruction; and stopping executing the state setting instruction if the next lifting rod moment arrives.
In some embodiments, for synchronization of data acquisition start times among the plurality of nodes, before the plurality of nodes synchronize to generate the lift moment according to the lift cycle, the method further comprises: the plurality of nodes receive a data acquisition initiation timestamp, wherein the data acquisition initiation timestamp is generated in response to a user initiating data acquisition; and the nodes determine the data acquisition starting time according to the data acquisition initiating time stamp and the preset delay time. As one example, in response to a user generating a data acquisition initiation timestamp at a client motor "start test button", the data acquisition initiation timestamp is sent to each node, which determines a data acquisition start time based on the data acquisition initiation timestamp and a preset delay time.
In some embodiments, all parameters collected by a plurality of nodes in the same lifting period are packaged into a data frame, wherein the data frame comprises lifting period information and data items of each parameter, and the data items of each parameter comprise: instrument device identification, parameter identification of a parameter, parameter value of the parameter, acquisition start time stamp and acquisition end time stamp. As an example, the end time of the lift lever cycle is taken as part of the lift lever cycle information.
Referring to the system shown in fig. 1, the plurality of nodes include a plurality of controllers and servers, and package all parameters collected by the plurality of nodes in the same lifting period into one data frame, including: each of the plurality of control machines packages the parameters acquired in the lifting period into data items of the parameters, and sends the data items of the parameters to the server; the server packages the data entries of the parameters of the same lifting cycle into one data frame.
In some embodiments, the server packages data entries for parameters of the same lift-off cycle into one data frame, comprising: for each lift cycle, the server packages data entries of parameters received a predetermined number of lift cycles (e.g., one lift cycle, two lift cycles, etc.) after the lift cycle into one data frame.
In some embodiments, a portion of the plurality of nodes are associated with a plurality of instrumentation, the nodes of the plurality of instrumentation being associated, and parameters acquired from the plurality of instrumentation during a same lift lever cycle being packaged into one data entry.
In some embodiments, the method further comprises performing time synchronization of the control machine, the server, and the client. By way of example, the control machines, servers and clients within the local area network are time-synchronized using a high precision time synchronization protocol (Precision Time Protocol, abbreviated as PTP). Optionally, on the operation interface of the client, the operator starts the time setting, and after the action is transferred to the server, the time setting is formally initiated. The server time stamp is obtained and used as a time setting standard, and is transmitted to a control machine and a client to set time according to the algorithm requirement in IEEE 1588. In the time setting process, the time stamp of the server is acquired again once when the time setting of one device is completed, and the influence of the time consumed by the previous device on the precision is eliminated. After the time setting is finished, a mark is sent to the client to indicate that the time setting is finished. And simultaneously, the device aliases participating in the time synchronization are also sent, and after the client receives the device aliases, the interface display is updated. The operator initiates the pairing, and may select devices to participate in the pairing, in some embodiments according to the operator's rights.
And calibrating each controller clock by taking the server clock as a reference. The data acquisition of the instrument and the equipment which is most sensitive to the time synchronization precision is performed under the condition that a certain time synchronization precision is met, so that time stamp information in an acquired data packet cannot be disordered with the actual generation moment of acquisition parameters, and data among a plurality of nodes cannot be disordered.
Control machine drive
The embodiment of the application also provides a method for collecting parameters from the instrument equipment of the power supply system of the test spacecraft, which drives the communication between the control equipment and the instrument equipment, uses the SCPI command to collect the parameters from the instrument equipment by the control machine, forwards the collected data to the server, and adds the point attribute and the time stamp to the server.
Fig. 4 is a flowchart of an embodiment of a method for collecting parameters from an instrument device for testing a power supply system of a spacecraft according to the application, and as shown in fig. 4, the method includes steps S402 to S408.
Step S402, the controller obtains data acquisition instruction information of the associated instrument device, where the data acquisition instruction information includes: parameters and acquisition periods of parameters.
In step S404, when the data acquisition start time arrives, the controller generates a lifting moment according to a lifting cycle, where the parameter acquisition cycle is configured as an integer multiple of the lifting cycle.
In some embodiments, the data acquisition instruction information is configured in a configuration file, from which the control machine obtains the data acquisition instruction information of its associated instrument device. In some embodiments, the data acquisition instruction information may also include a lift bar period to begin acquisition.
In some embodiments, the data acquisition execution information is obtained from an instruction packet sent by the client.
Step S406, the controller sends SCPI commands corresponding to the parameters to the instrument equipment according to the acquisition period of the parameters between two adjacent rod lifting moments, and generates a parameter acquisition start time stamp; and receiving parameter values returned by the instrument and equipment, and generating a parameter acquisition ending time stamp.
In the embodiment of the application, the corresponding relation between the parameter and the SCPI command is stored, and the controller determines and collects the SCPI command sent by the parameter to the instrument equipment according to the corresponding relation between the parameter and the SCPI command and receives the parameter value returned by the instrument equipment.
Step S408, the controller sends data collected in the lifting period to the server, where the data includes: instrument equipment identification, parameter identification of parameters, parameter values, parameter acquisition start time stamps and parameter acquisition end time stamps.
In certain embodiments, prior to step S404, the controller determines the data acquisition start time as follows: the controller receives a data acquisition initiation timestamp, wherein the data acquisition initiation timestamp is generated in response to a user initiating data acquisition; and the controller determines the data acquisition starting time according to the data acquisition initiating time stamp and the preset delay time. Thus, a plurality of controllers synchronously acquire data.
In certain embodiments, the above method further comprises: the controller receives a state setting instruction of the instrument equipment; after each parameter acquisition is finished, the controller judges whether a first time interval between the acquisition finishing time of the parameter and the next rod lifting time is smaller than a first preset duration; and when the first time interval is greater than or equal to a first preset duration, the controller sends an SCPI command corresponding to the state setting instruction to the instrument equipment.
In certain embodiments, the above method further comprises: when the execution of the state setting instruction is finished, the control machine judges whether a second time interval between the execution finishing time of the state setting instruction and the next rod lifting time is longer than a second preset time length; and when the second time interval is greater than or equal to the second preset time length, the controller sends an SCPI command corresponding to the next state setting command to the instrument equipment if the next state setting command exists.
In certain embodiments, the above method further comprises: and when the second time interval is smaller than a second preset time length, entering a waiting state.
In certain embodiments, the above method further comprises: judging whether the next lifting moment arrives or not in the process of executing the state setting instruction by the control machine; and if the next lifting rod moment arrives, the control machine enables the instrument equipment to stop executing the state setting instruction.
In some embodiments, the controller receiving the status setting instructions of the instrument device comprises: the control machine receives an instruction packet sent by a client; the controller parses the state setting instructions of its associated instrument device from the instruction packet.
In the embodiment of the application, a device for collecting parameters from instrument equipment for testing the spacecraft power supply system is also provided and is positioned in the controller.
FIG. 5 is a block diagram of an embodiment of an apparatus for acquiring parameters from an instrument device for testing a power supply system of a spacecraft according to the present application, where, as shown in FIG. 5, the apparatus includes: the device comprises an acquisition module 502, a lifting rod module 504, an acquisition module 506 and a sending module 508.
The acquiring module 502 is configured to acquire data acquisition instruction information of an instrument device, where the data acquisition instruction information includes: parameters and acquisition periods of parameters.
The lifting module 504 is configured to generate lifting time according to a lifting period when the data acquisition start time arrives, where the acquisition period of the parameter is configured as an integer multiple of the lifting period.
The acquisition module 506 is connected to the acquisition module 502 and the lifting module 504, and is configured to send, between two adjacent lifting moments, an SCPI command corresponding to a parameter to the instrument according to a parameter acquisition period, generate a parameter acquisition start timestamp, and receive a parameter value of the parameter returned by the instrument, and generate a parameter acquisition end timestamp.
The sending module 508 is connected to the collecting module 506, and is configured to send a data entry corresponding to the lifting cycle to the server, where the data entry includes: instrument equipment identification, parameter identification of the parameter, parameter value of the parameter, parameter acquisition start time stamp and parameter acquisition end time stamp.
In some embodiments, referring to fig. 5, the apparatus further includes: the determining module 510 is connected to the lifting rod module 504, and is configured to receive a data acquisition initiation time stamp, and determine a data acquisition start time according to the data acquisition initiation time stamp and a preset delay time length, where the data acquisition initiation time stamp is generated in response to initiation of data acquisition by a user. Thus, a plurality of controllers synchronously acquire data.
In some embodiments, the obtaining module 502 is further configured to receive a status setting instruction of the instrument device. Referring to fig. 5, the apparatus further includes: the judging module 512 judges whether a first time interval between the collection end time of the parameter and the next lifting time is smaller than a first preset duration after the collection of the parameter is ended; the state setting module 514 is configured to send an SCPI command corresponding to the state setting instruction to the instrument device when the first time interval is greater than or equal to a first preset duration.
In some embodiments, the determining module 512 is further configured to determine, when the execution of the state setting instruction ends, whether a second time interval between the execution end time of the state setting instruction and the next lever lifting time is greater than a second preset duration. And the state setting module 514 is configured to send, when the second time interval is greater than or equal to the second preset duration, an SCPI command corresponding to the next state setting instruction to the instrument if the next state setting instruction exists.
In some embodiments, the waiting state is entered when the second time interval is less than a second preset duration.
In some embodiments, the determining module 512 is configured to determine whether the next lever lifting time arrives during the execution of the state setting instruction; and if the next lifting rod moment arrives, stopping the instrument from executing the state setting instruction.
In some embodiments, the obtaining module 502 is configured to receive an instruction packet, and parse a state setting instruction of an associated instrument device from the instruction packet. In some embodiments, the instruction packets are pushed to the controller in real time by a real-time database.
Processing data using a real-time database
The embodiment of the application also provides a method for processing the test data of the spacecraft power supply system by using the real-time database.
Fig. 6 is a flowchart of an implementation manner of a method for processing test data of a spacecraft power system by using a real-time database according to an embodiment of the application, and as shown in fig. 6, the method includes steps S602 to S610.
In step S602, when the data acquisition start time arrives, the plurality of control machines synchronously generate the lifting moment according to the lifting cycle.
In step S604, each control machine acquires the parameters from the instrument device corresponding to the parameters according to the acquisition period of the parameters between two adjacent lifting moments, wherein the acquisition period of the parameters is configured as an integer multiple of the lifting period.
Step S606, each control machine sends data collected in a lifting period to a server, wherein the data comprises: instrument equipment identification, parameter identification of a parameter, parameter value of the parameter, parameter acquisition start time stamp and parameter acquisition end time stamp.
In step S608, the server uses the lift bar period information as an index, and stores the data collected in the lift bar period in the real-time database.
In some embodiments, the end of the lift lever period is timed (labeled ts i ) As one of the lift lever cycle information.
In step S610, the real-time database pushes the stored data to the client according to the preset data pushing rule.
In some embodiments, in the step S610, the preset data pushing rule includes: and at the current moment, if the parameter value of the parameter at the current moment is not equal to the parameter value at the last moment, pushing the parameter value at the current moment.
In some embodiments, the client subscribes to the data from the real-time database, which, upon receipt of the data, sends the data to the client subscribing to the data.
In certain embodiments, the above method further comprises: the real-time database responds to the search formula sent by the client, searches data according to the search formula and pushes the searched data to the client, wherein the key words of the search formula comprise: at least one of lifting rod period information, instrument equipment identification, parameter identification of parameters, parameter values of the parameters, parameter acquisition start time stamps and parameter acquisition end time stamps.
In certain embodiments, the above method further comprises: and the client displays the parameter graph according to the X-axis as time and the Y-axis as parameter values.
In some embodiments, the real-time database receives a package of instructions sent by a user; the real-time database pushes the instruction packet to the controller. The instruction packet comprises: data acquisition instructions or status setting instructions.
By way of example, data stored in a real-time database, in ts i Storing indices, known as generaAt ts i Time p i A data value of the data entry; wherein it belongs to ts i Time p i The data value of a data entry is defined as: any one of which is a certain parameter of a certain node, at ts i-1 Time of day and ts i Actual data values generated between moments in time.
Belonging to ts i Time p i The data entry may involve x nodes (x is greater than or equal to 1 and less than or equal to n), and the x nodes write data values of the data entries to specified positions of the database respectively, and the specific implementation method is as follows: the x nodes will be respectively at ts i-1 Time of day and ts i The data packets generated between the moments are transmitted to the server and should be ts i Time of day and ts i+y And finishing the process between the moments. Generally, y=1; in particular, if a node packet is large, it is found that the node packet is large at ts i+1 Cannot be completed before the moment, and is set in advance at ts i Time of day and ts i+1 If the data packet is not generated between the moments, y can be 2, and so on.
Fig. 7 is a block diagram of another implementation of a testing system for a spacecraft power system according to an embodiment of the application, where, as shown in fig. 7, a client 50 includes a testing unit 51, a display unit 52, and a retrieving unit 53; the server 30 includes: a real-time database unit 31, a relational database unit 32; the controller 20 includes: an I/O driving unit 21 and a device driving unit 22. Referring to fig. 8, the test system includes clients 501, 502 to 50n, i/O driving units 211, 212 to 21n, device driving units 221, 222 to 22x, and instrument devices 101, 102 to 10y; the real-time database unit 31 includes a real-time database 311, a data subscription module 312, and an instruction packet acquisition module 313.
Referring to fig. 7 and 8, clients 501, 502 to 50n set subscription rules to the data subscription module 312. The data subscription module 312 publishes data in real time according to the set subscription rules.
The clients 501, 502 to 50n are configured to display data real-time refresh, mouse click send instructions, data table and curve display, display all sent instructions, data entry secondary processing, data threshold setting alerts, offline data condition queries, execute workflow scripts, etc.
An I/O drive unit 21 configured to communicate with the server; the device driving unit 22 is arranged to communicate with the instrument device.
The real-time database 311 sorts the obtained data packets and instruction packets into data entries according to preset rules and stores the data entries. The relational database unit 32 is configured to store and manage account rights, various profiles.
The embodiment of the application also provides computer equipment. Fig. 9 is a schematic hardware structure of an implementation manner of a computer device provided by an embodiment of the present application, and as shown in fig. 9, the computer device 100 of the embodiment of the present application at least includes, but is not limited to: a memory 101 and a processor 102 that may be communicatively coupled to each other via a system bus. It should be noted that FIG. 9 only shows computer device 100 having components 101-102, 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 101 (i.e., readable storage medium) includes flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 101 may be an internal storage unit of the computer device 100, such as a hard disk or a memory of the computer device 100. In other embodiments, the memory 101 may also be an external storage device of the computer device 100, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the computer device 100. Of course, memory 101 may also include both internal storage units of computer device 100 and external storage devices. In this embodiment, the memory 101 is typically used to store an operating system and various types of software installed on the computer device 100. Further, the memory 101 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 102 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 102 is generally used to control the overall operation of the computer device 100. In this embodiment, the processor 102 is configured to execute the program code stored in the memory 101 or process data, for example, any of the methods described above in the embodiments of the present application.
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 configured to store program code for implementing any of the methods of the embodiments of the present application described above when executed by a processor.
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 application are merely for the purpose of description, and do not represent the 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 application 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) comprising 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 according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.
Claims (8)
1. A method of collecting parameters from an instrument device for testing a spacecraft power system, said instrument device being a single-threaded device, said method comprising:
the control machine obtains data acquisition instruction information of the associated instrument equipment, wherein the data acquisition instruction information comprises: parameters and collection period of parameters;
when the data acquisition starting time arrives, the controller generates a lifting moment according to a lifting period, wherein the acquisition period of the parameters is configured to be an integral multiple of the lifting period;
the controller sends SCPI commands corresponding to the parameters to the instrument equipment according to the acquisition period of the parameters between two adjacent rod lifting moments, and generates a parameter acquisition start time stamp; receiving parameter values returned by the instrument and equipment, and generating a parameter acquisition ending time stamp;
the control machine sends data acquired in a lifting period to a server, wherein the data comprises: an instrument device identifier, a parameter identifier of the parameter, the parameter value, the parameter acquisition start time stamp and the parameter acquisition end time stamp;
before the moment of lifting the rod according to the lifting period, the method further comprises the following steps:
the controller receives a data acquisition initiation timestamp, wherein the data acquisition initiation timestamp is generated in response to a user initiating data acquisition;
the controller determines data acquisition starting time according to the data acquisition initiating time stamp and a preset delay time length;
further comprises:
the controller receives a state setting instruction of the instrument equipment;
after each parameter acquisition is finished, the controller judges whether a first time interval between the acquisition finishing time of the parameter and the next rod lifting time is smaller than a first preset duration or not;
and when the first time interval is greater than or equal to the first preset duration, the controller sends an SCPI command corresponding to the state setting instruction to the instrument equipment.
2. The method as recited in claim 1, further comprising:
when the execution of the state setting instruction is finished, the control machine judges whether a second time interval between the execution finishing time of the state setting instruction and the next rod lifting time is longer than a second preset duration;
and when the second time interval is greater than or equal to the second preset time length, if a next state setting instruction exists, the controller sends an SCPI command corresponding to the next state setting instruction to the instrument equipment.
3. The method as recited in claim 2, further comprising: and when the second time interval is smaller than the second preset time length, entering a waiting state.
4. A method according to any one of claims 3, further comprising:
the control machine judges whether the next lifting moment arrives or not in the process of executing the state setting instruction;
and if the next lifting moment arrives, the controller enables the instrument to stop executing the state setting instruction.
5. A method according to claim 3, wherein the controller receiving a status setting instruction for the instrument device comprises:
the control machine receives an instruction packet;
the control machine analyzes the state setting instruction of the associated instrument equipment from the instruction packet.
6. An apparatus for collecting parameters from an instrument device for testing a spacecraft power system, said instrument device being a single-threaded device, said apparatus comprising:
the acquisition module is used for acquiring data acquisition instruction information of the instrument equipment, wherein the data acquisition instruction information comprises: parameters and collection period of parameters;
the lifting rod module is used for generating lifting rod time according to a lifting rod period when the data acquisition starting time is reached, wherein the acquisition period of the parameters is configured to be an integral multiple of the lifting rod period;
the acquisition module is used for sending SCPI commands corresponding to the parameters to the instrument equipment according to the acquisition period of the parameters and generating a parameter acquisition start time stamp between two adjacent lifting moments, and receiving parameter values of the parameters returned by the instrument equipment and generating a parameter acquisition end time stamp;
the sending module is used for sending data items corresponding to the lifting period to the server, wherein the data items comprise: an instrument device identifier, a parameter identifier of the parameter, a parameter value of the parameter, the parameter acquisition start time stamp and the parameter acquisition end time stamp;
further comprises: the determining module is connected with the lifting rod module and is used for receiving the data acquisition initiation time stamp and determining the data acquisition starting time according to the data acquisition initiation time stamp and the preset delay time length;
the judging module is used for judging whether the first time interval between the acquisition end time of the parameters and the next rod lifting time is smaller than a first preset duration or not after the acquisition of the parameters is finished each time; and the state setting module is used for sending an SCPI command corresponding to the state setting instruction to the instrument equipment when the first time interval is greater than or equal to the first preset duration.
7. A computer device, the computer device comprising:
a memory, a processor, and a computer program stored on the memory and executable on the processor;
the computer program, when executed by the processor, implements the steps of the method of collecting parameters from an instrument device testing a spacecraft power system according to any of claims 1 to 5.
8. A computer readable storage medium, characterized in that it has stored thereon a program for acquiring parameters from an instrument device of a test spacecraft power system, which program, when executed by a processor, implements the steps of the method for acquiring parameters from an instrument device of a test spacecraft power system according to any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110652801.6A CN113552497B (en) | 2021-06-11 | 2021-06-11 | Method for acquiring parameters from instrument and equipment for testing spacecraft power supply system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110652801.6A CN113552497B (en) | 2021-06-11 | 2021-06-11 | Method for acquiring parameters from instrument and equipment for testing spacecraft power supply system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113552497A CN113552497A (en) | 2021-10-26 |
CN113552497B true CN113552497B (en) | 2023-08-25 |
Family
ID=78130567
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110652801.6A Active CN113552497B (en) | 2021-06-11 | 2021-06-11 | Method for acquiring parameters from instrument and equipment for testing spacecraft power supply system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113552497B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116483678B (en) * | 2023-05-16 | 2023-10-13 | 紫光同芯微电子有限公司 | Information processing method and related device |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR960025120A (en) * | 1994-12-23 | 1996-07-20 | 양승택 | Periodic Data Polling Method in Distributed Processing System |
JP2008028499A (en) * | 2006-07-19 | 2008-02-07 | Hitachi Ltd | Remote monitoring communication system |
EP2706701A1 (en) * | 2012-09-07 | 2014-03-12 | Accedian Networks Inc. | Automatic discovery and enforcement of service level agreement settings |
WO2014050040A1 (en) * | 2012-09-28 | 2014-04-03 | パナソニック株式会社 | Data acquisition device, data acquisition system, and program |
CN105893529A (en) * | 2016-03-30 | 2016-08-24 | 乐视控股(北京)有限公司 | Data collecting method and ETL assembly |
WO2016148771A1 (en) * | 2015-03-17 | 2016-09-22 | Sikorsky Aircraft Corporation | Systems and methods for remotely triggered data acquisition |
CN107888456A (en) * | 2017-12-04 | 2018-04-06 | 北京百度网讯科技有限公司 | Method and device for monitoring port data volume |
CN108051850A (en) * | 2017-12-07 | 2018-05-18 | 合肥国为电子有限公司 | A kind of untethered memory-type seismic detector collecting method |
CN108717391A (en) * | 2018-05-16 | 2018-10-30 | 平安科技(深圳)有限公司 | Monitoring device, method and the computer readable storage medium of test process |
JP2018170671A (en) * | 2017-03-30 | 2018-11-01 | コニカミノルタ株式会社 | Image processing apparatus, image processing system, and program |
CN109660258A (en) * | 2018-12-29 | 2019-04-19 | 四川双元智能科技有限公司 | A kind of method, apparatus and system of multichannel synchronousing collection difference sample frequency data |
CN111294112A (en) * | 2018-12-06 | 2020-06-16 | 华为技术有限公司 | Data acquisition method and related equipment |
CN210781101U (en) * | 2019-09-30 | 2020-06-16 | 广州汽车集团股份有限公司 | Data acquisition device and data acquisition system |
CN111930755A (en) * | 2020-09-16 | 2020-11-13 | 蘑菇车联信息科技有限公司 | Driving data processing method and related equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10859611B2 (en) * | 2017-06-06 | 2020-12-08 | Schweitzer Engineering Laboratories, Inc. | Measuring and mitigating channel delay in remote data acquisition |
-
2021
- 2021-06-11 CN CN202110652801.6A patent/CN113552497B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR960025120A (en) * | 1994-12-23 | 1996-07-20 | 양승택 | Periodic Data Polling Method in Distributed Processing System |
JP2008028499A (en) * | 2006-07-19 | 2008-02-07 | Hitachi Ltd | Remote monitoring communication system |
EP2706701A1 (en) * | 2012-09-07 | 2014-03-12 | Accedian Networks Inc. | Automatic discovery and enforcement of service level agreement settings |
WO2014050040A1 (en) * | 2012-09-28 | 2014-04-03 | パナソニック株式会社 | Data acquisition device, data acquisition system, and program |
WO2016148771A1 (en) * | 2015-03-17 | 2016-09-22 | Sikorsky Aircraft Corporation | Systems and methods for remotely triggered data acquisition |
CN105893529A (en) * | 2016-03-30 | 2016-08-24 | 乐视控股(北京)有限公司 | Data collecting method and ETL assembly |
JP2018170671A (en) * | 2017-03-30 | 2018-11-01 | コニカミノルタ株式会社 | Image processing apparatus, image processing system, and program |
CN107888456A (en) * | 2017-12-04 | 2018-04-06 | 北京百度网讯科技有限公司 | Method and device for monitoring port data volume |
CN108051850A (en) * | 2017-12-07 | 2018-05-18 | 合肥国为电子有限公司 | A kind of untethered memory-type seismic detector collecting method |
CN108717391A (en) * | 2018-05-16 | 2018-10-30 | 平安科技(深圳)有限公司 | Monitoring device, method and the computer readable storage medium of test process |
CN111294112A (en) * | 2018-12-06 | 2020-06-16 | 华为技术有限公司 | Data acquisition method and related equipment |
CN109660258A (en) * | 2018-12-29 | 2019-04-19 | 四川双元智能科技有限公司 | A kind of method, apparatus and system of multichannel synchronousing collection difference sample frequency data |
CN210781101U (en) * | 2019-09-30 | 2020-06-16 | 广州汽车集团股份有限公司 | Data acquisition device and data acquisition system |
CN111930755A (en) * | 2020-09-16 | 2020-11-13 | 蘑菇车联信息科技有限公司 | Driving data processing method and related equipment |
Non-Patent Citations (1)
Title |
---|
1090MHz 数据采集传输系统的实现;胡铁乔 等;工业控制计算机;第33卷(第2期);17-19 * |
Also Published As
Publication number | Publication date |
---|---|
CN113552497A (en) | 2021-10-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111835842B (en) | Gateway resource updating method and device and Internet of things control platform | |
CN108287751B (en) | Task execution method and device and distributed system | |
CN113552497B (en) | Method for acquiring parameters from instrument and equipment for testing spacecraft power supply system | |
CN109039518B (en) | The ntp server address intelligent management of Android television system | |
CN112491652B (en) | Network flow sample processing method and device for testing | |
CN103390127B (en) | Application program operation interface exits method, device and terminal | |
CN110196715A (en) | A kind of code generating system and method | |
CN106897219B (en) | Method and device for testing stability of mobile terminal system | |
CN109446493B (en) | Data processing method, data processing apparatus, storage medium, and electronic apparatus | |
CN111063183B (en) | Bluetooth-based electric energy meter statistical method and device and storage medium | |
WO2018192432A1 (en) | Working information processing method and apparatus, computer device, and storage medium | |
CN113359557B (en) | Method for controlling data acquisition time sequence | |
CN115665016A (en) | Heartbeat monitoring method, device, equipment and storage medium | |
CN113486077B (en) | Method for processing spacecraft power system test data by using real-time database | |
CN106982128B (en) | Network-based community construction method | |
CN102236707A (en) | Method, device and system for obtaining update data of database | |
CN108833961B (en) | Method, server and system for acquiring flight record data | |
CN117874033A (en) | Database sub-table method and device, electronic equipment and storage medium | |
CN109462522A (en) | A kind of state monitoring method of external terminal device, terminal and its system | |
CN101534227B (en) | Network management software test method and system | |
CN109800945B (en) | Optimization method, device, equipment and storage medium for shift management | |
CN103957230A (en) | Client user number determination method, server and system, and server | |
KR101736382B1 (en) | Ems server and log data management method thereof | |
CN114422576B (en) | Session cleaning method and device, computer equipment and readable storage medium | |
JP2017215912A (en) | Facility management device |
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 | ||
GR01 | Patent grant |