CN-121995896-A - Processing method, system, equipment and medium for XCP calibration process data
Abstract
The invention provides a processing method of XCP calibration process data, which comprises the steps of S1, configuring a measurement variable and a calibration variable according to an A2L file, configuring a sampling rate, S2, configuring a sampling DAQ according to an XCP protocol, establishing connection between the DAQ and an ECU, collecting real-time data of the measurement variable and the calibration variable, S3, initializing an MF4 file, establishing a writing index in the MF4 file according to the measurement variable and the calibration variable, S4, collecting the real-time data in real time, judging whether the real-time data is changed or not, if not, not reacting, otherwise, writing the real-time data into the MF4 file according to the writing index, and S5, after the real-time data is written, storing and closing the MF4 file. The method solves the problem that the MF4 file can only be used for recording measurement data in the XCP calibration process, and the whole process analysis of the XCP calibration process can not be performed.
Inventors
- ZHANG YU
- LI YONGCONG
- Zhao Ruiteng
- GU YUANYUAN
- YANG YUNSONG
- XIONG XUMIN
Assignees
- 重庆红江机械有限责任公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241106
Claims (10)
- 1.A method for processing XCP calibration process data, comprising: s1, configuring a measurement variable and a calibration variable according to an A2L file, and configuring a sampling rate; S2, configuring sampling DAQ according to XCP protocol, establishing connection between the DAQ and ECU, and collecting real-time data of the measurement variable and the calibration variable; s3, initializing an MF4 file, and establishing a write index in the MF4 file according to the measured variable and the calibration variable; s4, real-time data are collected in real time, whether the real-time data are changed or not is judged, if the real-time data are unchanged, no reaction occurs, and otherwise, the real-time data are written into an MF4 file according to the writing index; And S5, after the real-time data writing is completed, storing and closing the MF4 file.
- 2. A method of processing XCP calibration process data according to claim 1, wherein said real time data of measured and calibration variables comprises: The real-time data of the measurement variable at least comprises a measurement sampling value and a measurement sampling time, and the real-time data of the calibration variable at least comprises a calibration sampling value and a calibration sampling time, a calibration time and a calibration mode.
- 3. The XCP calibration process data processing method of claim 2, wherein initializing the MF4 file and creating a write index in the MF4 file based on the measurement variable and the calibration variable, comprises: Creating an MF4 file, and creating a writing index in the MF4 file according to the configured measurement variable and calibration variable, wherein the writing index comprises a sampling time writing index, a sampling value writing index and a calibration mode writing index; the method comprises the steps of writing a sampling value and a sampling time into an index pair by a measuring variable, writing a calibration sampling value and a calibration sampling time into the index pair by a calibration variable, and writing a calibration time and a calibration mode into the index pair.
- 4. A method for processing XCP calibration process data according to claim 2, wherein said otherwise writing real-time data to an MF4 file according to said write index comprises: When the measurement sampling value or the calibration sampling value changes, the latest written measurement sampling value or calibration sampling value is obtained and displayed in real time through a real-time monitoring device connected with the DAQ.
- 5. The XCP calibration process data processing method of claim 1, wherein after the writing of the data to be real-time is completed, storing and closing the MF4 file includes: after the writing is completed, traversing all the measured variables and the calibration variables, releasing the writing index, and storing and closing the MF4 file.
- 6. A method of processing XCP calibration process data according to claim 3, further comprising: S6, loading an MF4 file, reading an index pair, respectively analyzing the sampled measurement sampling value, the measurement sampling time, the calibration sampling value and the calibration sampling time into sampled output signals, wherein the sampled output signals comprise a sampling time list and a sampling value list which are equal in length, and analyzing the calibration time and the calibration mode into a calibration event list.
- 7. The XCP calibration process data processing method of claim 6, further comprising: s7, calculating start and stop time and constructing a historical time axis according to the sampling time list; And S8, activating a historical time axis, sending out a time control signal, and acquiring a measurement sampling value, a calibration sampling value or a sampling value list of the moment or the time period of the time from the sampling output signal according to the time control signal and using the time control signal for back display.
- 8. A system for processing XCP calibration process data, comprising: The configuration module is used for configuring a measurement variable and a calibration variable according to the A2L file and configuring a sampling rate; The measuring module is used for configuring sampling DAQ according to an XCP protocol, establishing connection between the DAQ and the ECU, and collecting real-time data of a measuring variable and a calibration variable; The initialization module is used for initializing the MF4 file and establishing a writing index in the MF4 file according to the measured variable and the calibration variable; The writing module is used for collecting real-time data in real time, judging whether the real-time data are changed, if the real-time data are not changed, no reaction exists, otherwise, the real-time data are written into the MF4 file according to the writing index; and the storage module is used for storing and closing the MF4 file after the real-time data writing is completed.
- 9. An electronic device comprising a processor, a storage medium and a computer program stored in the storage medium, characterized in that the computer program, when executed by the processor, implements a method of processing XCP calibration process data according to any of claims 1 to 7.
- 10. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a method of processing XCP calibration process data according to any of claims 1 to 7.
Description
Processing method, system, equipment and medium for XCP calibration process data Technical Field The invention relates to the technical field of XCP calibration, in particular to a method, a system, equipment and a medium for processing XCP calibration process data. Background Currently, in the calibration process of an engine for a vehicle or a ship, it is common practice to record measurement data by using an MF4 (Measurement Data Format version 4) file and record calibration data by using a hex file. The real-time sampling recorded in the MF4 file can completely restore the measured data, and the calibration data stored in the hex file can only restore the snapshot of the calibration scheme at a certain moment, so that the snapshot cannot distinguish the sources of the calibration behaviors, cannot restore the process records, and cannot carry out the whole process analysis on the calibration behaviors. Disclosure of Invention Aiming at the problems existing in the prior art, the invention provides a processing method of XCP calibration process data, which aims to solve the technical problems that in the prior art, real-time sampling recorded by an MF4 file can completely restore measured data, and calibration data stored by a hex file can only restore a snapshot of a calibration scheme at a certain moment, so that the calibration scheme cannot distinguish the sources of calibration behaviors and cannot restore the process records, and the whole process analysis of the calibration behaviors cannot be performed. The invention provides a processing method of XCP calibration process data, which comprises the following steps: s1, configuring a measurement variable and a calibration variable according to an A2L file, and configuring a sampling rate; S2, configuring sampling DAQ according to XCP protocol, establishing connection between the DAQ and ECU, and collecting real-time data of the measurement variable and the calibration variable; s3, initializing an MF4 file, and establishing a write index in the MF4 file according to the measured variable and the calibration variable; s4, real-time data are collected in real time, whether the real-time data are changed or not is judged, if the real-time data are unchanged, no reaction occurs, and otherwise, the real-time data are written into an MF4 file according to the writing index; And S5, after the real-time data writing is completed, storing and closing the MF4 file. Optionally, the real-time data of the measured variable and the calibration variable includes: The real-time data of the measurement variable at least comprises a measurement sampling value and a measurement sampling time, and the real-time data of the calibration variable at least comprises a calibration sampling value and a calibration sampling time, a calibration time and a calibration mode. Optionally, initializing the MF4 file, and creating a write index in the MF4 file according to the measured variable and the calibration variable, including: Creating an MF4 file, and creating a writing index in the MF4 file according to the configured measurement variable and calibration variable, wherein the writing index comprises a sampling time writing index, a sampling value writing index and a calibration mode writing index; the method comprises the steps of writing a sampling value and a sampling time into an index pair by a measuring variable, writing a calibration sampling value and a calibration sampling time into the index pair by a calibration variable, and writing a calibration time and a calibration mode into the index pair. Optionally, the writing the real-time data to the MF4 file according to the write index includes: When the measurement sampling value or the calibration sampling value changes, the latest written measurement sampling value or calibration sampling value is obtained and displayed in real time through a real-time monitoring device connected with the DAQ. Optionally, after the writing of the data to be real-time is completed, storing and closing the MF4 file, including: after the writing is completed, traversing all the measured variables and the calibration variables, releasing the writing index, and storing and closing the MF4 file. Optionally, the method further comprises: S6, loading an MF4 file, reading an index pair, respectively analyzing the sampled measurement sampling value, the measurement sampling time, the calibration sampling value and the calibration sampling time into sampled output signals, wherein the sampled output signals comprise a sampling time list and a sampling value list which are equal in length, and analyzing the calibration time and the calibration mode into a calibration event list. Optionally, the method further comprises: s7, calculating start and stop time and constructing a historical time axis according to the sampling time list; And S8, activating a historical time axis, sending out a time control signal, and acquiring a measurement samplin