A method, system, storage medium and terminal for converting oscilloscope files into MDA file format

By converting oscilloscope files to the MDA file format, the problem of oscilloscope data being unable to be analyzed in conjunction with other test data is solved, unified analysis and display within the existing tool chain is achieved, and costs are reduced.

CN115422143BActive Publication Date: 2025-09-26CHONGQING MEIFENG QINAN AUTOMOBILE DRIVING SYST CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211160138.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-22
Publication Date
2025-09-26
Estimated Expiration
2042-09-22

AI Technical Summary

Technical Problem

The existing oscilloscope data format cannot be analyzed in conjunction with other test data, resulting in high analysis costs and difficulty in implementing a unified test tool chain within the existing measurement and analysis system.

Method used

A method for converting oscilloscope files to the MDA file format is provided. The method includes reading the oscilloscope .csv format file, identifying parameters, optimizing and replacing the MDA-ascll parameter template file, and outputting it to the .ascll format for easy display and analysis in the MDA measurement data analysis tool.

Benefits of technology

The display and analysis of oscilloscope data within the existing MDA measurement data analysis tool is realized, which reduces costs and enables linkage analysis with other test data, achieving the goal of unifying the test tool chain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115422143B_ABST
    Figure CN115422143B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system, storage medium, and terminal for converting oscilloscope files into the MDA file format, belonging to the field of automotive communications technology. The method includes reading an oscilloscope's .csv format file, identifying parameters in the .csv format file, including channel information parameters and test data parameters; reading a pre-written MDA-ascll parameter template file, writing the identified oscilloscope parameters into and replacing the relevant parameters in the MDA-ascll parameter template file; and outputting the replaced file in .ascll format and opening it using MDA. The present invention can convert oscilloscope files into the MDA file format, enabling linked analysis and display of oscilloscope files and other test data within the existing MDA measurement data analysis tool chain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automobile communication technology, and in particular to a method, system, storage medium and terminal for converting an oscilloscope file into an MDA file format. Background Art

[0002] When processing and analyzing data in the automotive industry, data collected by different tools must be integrated into a single recording tool for reading. This ensures consistent timing of the measured data, facilitates analysis of signal relationships, avoids test errors caused by different software, and reduces the costs associated with using different software. For example, data such as CAN, LIN, and digital / analog (voltage / current) signals measured by ETAS, VECTORA, and other test tools are all read using the MDA measurement data analysis tool.

[0003] However, for oscilloscope data acquisition in the automotive industry, the oscilloscope's data acquisition software can usually only record oscilloscope data. The oscilloscope's waveform data can be saved in .wfm and .csv formats. .wfm is a hexadecimal encrypted format file that is not processed. The .csv format is a common format that can be opened by office software such as Excel. However, the amount of oscilloscope data is too large, and the sampling data may exceed 1 million. Using software such as Excel to save the file separately may cause the data itself to be lost, making it difficult to perform trend analysis, waveform viewing, and signal calculations on the data.

[0004] To achieve the same record as the PC software, using the oscilloscope as the synchronization terminal for recording various data, one would need to purchase a bus decoding module, add more oscilloscope acquisition channels, increase the oscilloscope's sampling depth, resolve the serial / parallel data format conversion issues of the measurement tools, and break the existing analysis system. This was prohibitively expensive, necessitating the use of oscilloscope-specific format analysis software. The existing measurement and analysis system could not be used to analyze oscilloscope data in conjunction with other test data. Therefore, a solution was urgently needed to convert the oscilloscope's waveform data into a format that could be displayed and analyzed by existing MDA measurement data analysis tools. Summary of the Invention

[0005] The purpose of the present invention is to avoid the problem of using oscilloscope-specific format analysis software, being unable to conduct linked analysis with other test data, and being unable to achieve a unified test tool chain. At the same time, it facilitates offline analysis, comparison and related calculations of oscilloscope data and provides a method, system, storage medium and terminal for converting oscilloscope files into MDA file format.

[0006] The object of the present invention is achieved through the following technical solutions:

[0007] In one aspect, a method for converting an oscilloscope file into an MDA file format is provided, the method comprising the following steps:

[0008] Read the .csv format file from the oscilloscope, including reading the file name and file location;

[0009] Identify parameters of the .csv format file, the parameters including channel information parameters and test data parameters;

[0010] Reading a pre-written MDA-ascll parameter template file, writing the identified oscilloscope parameters into and replacing the relevant parameters in the MDA-ascll parameter template file;

[0011] Export the replaced file in .ascll format and open it with MDA.

[0012] As a preferred option, a method for converting an oscilloscope file into an MDA file format further includes:

[0013] Optimize the parameters of the identified .csv format files, including renaming and changing the sampling rate.

[0014] As a preferred option, a method for converting an oscilloscope file into an MDA file format performs one-dimensional interpolation on the channel data after renaming and changing the sampling rate.

[0015] As a preferred option, a method for converting an oscilloscope file into an MDA file format, wherein the method of reading the .csv format file of the oscilloscope includes:

[0016] Use the readtable function to read the .csv format file of the oscilloscope, save different .csv format files in cell format, and use a for loop to read the file name and file location.

[0017] As a preferred option, a method for converting an oscilloscope file into an MDA file format, wherein the identifying parameters of the .csv format file include:

[0018] Use the height function to identify the number of channels in the .csv format file;

[0019] Different parameter calculation methods are selected based on the number of channels. If the number of channels is greater than 1, some channel information parameters are obtained through test data parameter calculation. If the number of channels is equal to 1, the .csv file is read through fopen and the row reading function fgetl is used to read the required rows of data in sequence. The parameter values ​​to be obtained in this row of data are read and stored in the variable space. The channel information parameters include the total number of channels, the channel sampling rate, and the number of sampling points of the channel.

[0020] As a preferred option, a method for converting an oscilloscope file into an MDA file format, wherein the method reads a pre-written MDA-ascll parameter template file, comprising:

[0021] Use the fopen function to open the MDA-ascll parameter template file, and read the template file parameters line by line with ~feof as the condition.

[0022] In another aspect, a system for converting an oscilloscope file into an MDA file format is provided, the system comprising:

[0023] Oscilloscope file reading module, used to read the .csv format file of the oscilloscope, including the file name and file location;

[0024] A parameter identification module, configured to identify parameters of the .csv format file, wherein the parameters include channel information parameters and test data parameters;

[0025] The template replacement module is used to read the pre-written MDA-ascll parameter template file, write the identified oscilloscope parameters into and replace the relevant parameters in the MDA-ascll parameter template file;

[0026] MDA file output module is used to output the replaced file in .ascll format and open it using MDA.

[0027] In another embodiment, a storage medium is provided, on which computer instructions are stored, wherein the computer instructions, when executed, execute the method for converting an oscilloscope file into an MDA file format.

[0028] In another embodiment, a terminal is provided, including a memory and a processor. The memory stores computer instructions that can be executed on the processor. When the processor executes the computer instructions, the method of converting the oscilloscope file into the MDA file format is performed.

[0029] It should be further explained that the technical features corresponding to the above options can be combined or replaced with each other to form a new technical solution if there is no conflict.

[0030] Compared with the prior art, the present invention has the following beneficial effects:

[0031] (1) The present invention converts the oscilloscope file into the MDA file format, thereby realizing the display and analysis of the oscilloscope file within the existing MDA measurement data analysis tool chain, avoiding the use of oscilloscope-specific format analysis software, saving costs, and at the same time, the converted oscilloscope file can be linked with other test data for analysis and display, thereby achieving the purpose of a unified test tool chain.

[0032] (2) The present invention optimizes the parameters of the identified .csv format file, including renaming and changing the sampling rate. Renaming can make the meaning of the data clear when analyzing the data in MDA, and changing the sampling rate can prevent the oscilloscope's resolution from being too high, resulting in excessively bloated data and slow data loading. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A flow chart of a method for converting an oscilloscope file into an MDA file format according to the present invention;

[0034] Figure 2 The .csv format file structure shown in the present invention;

[0035] Figure 3 The ascII format file structure shown in the present invention;

[0036] Figure 4 This is a schematic diagram of the specific conversion process of the oscilloscope file shown in the present invention;

[0037] Figure 5 This is a schematic diagram of a program interface of an executable file (APP) shown in the present invention;

[0038] Figure 6 This is a schematic diagram of using an APP to load multiple oscilloscope files according to the present invention;

[0039] Figure 7 A schematic diagram of reading a single file shown in the present invention;

[0040] Figure 8 A schematic diagram of a multi-channel file shown in the present invention;

[0041] Figure 9 This is a schematic diagram of reading template file parameters shown in the present invention;

[0042] Figure 10 The present invention shows a schematic diagram of writing the identified oscilloscope parameters into and replacing the relevant parameters in the MDA-ascll parameter template file. DETAILED DESCRIPTION

[0043] The technical solution of the present invention is described clearly and completely below with reference to the accompanying drawings. It is apparent that the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are intended to fall within the scope of protection of the present invention.

[0044] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0045] The present invention mainly converts oscilloscope files into the MDA file format, thereby realizing the display and analysis of oscilloscope files within the existing MDA measurement data analysis tool chain, avoiding the use of oscilloscope-specific format analysis software and saving costs. At the same time, the converted oscilloscope files can be analyzed and displayed in conjunction with other test data, achieving the purpose of a unified test tool chain.

[0046] Example 1

[0047] In an exemplary embodiment, a method for converting an oscilloscope file into an MDA file format is provided. Figure 1 As shown, the method includes the following contents:

[0048] Read the .csv format file from the oscilloscope, including the file name and file location;

[0049] Identify parameters of the .csv format file, the parameters including channel information parameters and test data parameters;

[0050] Reading a pre-written MDA-ascll parameter template file, writing the identified oscilloscope parameters into and replacing the relevant parameters in the MDA-ascll parameter template file;

[0051] Export the replaced file in .ascll format and open it with MDA.

[0052] Specifically, if Figure 2 、 Figure 3 As shown, the .csv format file contains two parts: test signal and test data. The channel information of the .csv file includes:

[0053] Model: refers to the oscilloscope model. Channel: refers to the recorded channel, such as the data of ch3, ch5, ch6, and ch8 of the oscilloscope in the figure above. Label: refers to the mark made on the channel data on the oscilloscope. Horizontal Units: refers to the horizontal axis unit of the oscilloscope. Wavefrom: refers to the format of the recorded signal, which is divided into ANALIG (analog) and digital (DIGITAL). Sample Interval: The sampling step of the oscilloscope signal, as shown in the figure, it is currently 6.4e-10. Record Length: The number of points recorded by the oscilloscope, Sample Interval*Record Length is the total sampling time. Vertical Units: Channel signal unit. ANALOG_Thumbnail: The information on the current oscilloscope screen, including yOffset: the data offset on the vertical axis and. yPosition: the position on the vertical axis.

[0054] The test data information in the .csv file includes: TIME: time. CHx: channel data (usually voltage data). MATH: mathematical calculation channel output data.

[0055] The .ascll format file also consists of two parts, among which the information data of the ascII file includes: the first line is the standard beginning format of ascII; the second line, SampleCounter is the number of signal sampling points; the third line, time is the time unit of the MDA file, CHx_data is the signal name, which will be replaced by the signal name of the oscilloscope target channel later; the fourth line is the signal unit f8, the data is float8 type; the fifth line is the signal unit.

[0056] Based on the similarity between the two file formats, the oscilloscope data can be converted into MDA data by converting according to certain rules.

[0057] Example 2

[0058] Based on Example 1, refer to Figures 4-10 , specifically provides a method for converting an oscilloscope file into an MDA file format, wherein the method of reading the .csv format file of the oscilloscope includes:

[0059] like Figure 5-Figure 8 As shown, the readtable function is used to read the .csv format file of the oscilloscope. The file is read in table format. If there are multiple files, different .csv format files are saved in cell format, and the file name and file location are read in a loop through a for loop.

[0060] Furthermore, the parameters for identifying the .csv format file include:

[0061] Use the height function to identify the number of channels in the .csv format file;

[0062] Different parameter calculation methods are selected based on the number of channels. If the number of channels is greater than 1, some channel information parameters are obtained through test data parameter calculation. If the number of channels is equal to 1, the .csv file is read through fopen and the row reading function fgetl is used to read the required rows of data in sequence. The parameter values ​​to be obtained in this row of data are read and stored in the variable space. The channel information parameters include the total number of channels, the channel sampling rate, and the number of sampling points of the channel.

[0063] Furthermore, the method further comprises:

[0064] Optimize the parameters of the identified .csv files, including renaming and changing the sampling rate. Specifically, after reading the "channel information" and "test data," two functions are designed to facilitate subsequent software analysis: renaming and changing the sampling rate. Renaming ensures that the data is clearly defined when analyzing it in MDA, rather than being labeled "ch1" or "ch2." Changing the sampling rate is due to the oscilloscope's high resolution, resulting in excessive data size and slow data loading. The renamed and sampled data is output using the one-dimensional interpolation function interp1 to obtain the time data values ​​at the new sampling time.

[0065] Furthermore, after optimization, the pre-written MDA-ascll parameter template file is read, such as Figure 9 As shown in the figure, according to the modified values ​​of the parameters in the oscilloscope, the MDA-ascll parameter template file is opened through the fopen function, and the template file parameters are read line by line with ~feof as the condition. Figure 10 As shown in the figure, write and replace the relevant parameters read from the oscilloscope file.

[0066] Finally, the file is exported in .ascII format and opened with MDA, thus converting the oscilloscope file into an MDA file. If a program error occurs, the step where the error occurred will be displayed on the APP.

[0067] Example 3

[0068] Based on the same inventive concept as that of Example 1, a system for converting an oscilloscope file into an MDA file format is provided, the system comprising:

[0069] Oscilloscope file reading module, used to read the .csv format file of the oscilloscope, including the file name and file location;

[0070] A parameter identification module, configured to identify parameters of the .csv format file, wherein the parameters include channel information parameters and test data parameters;

[0071] The template replacement module is used to read the pre-written MDA-ascll parameter template file, write the identified oscilloscope parameters into and replace the relevant parameters in the MDA-ascll parameter template file;

[0072] MDA file output module is used to output the replaced file in .ascll format and open it using MDA.

[0073] Example 4

[0074] This embodiment has the same inventive concept as that of the first embodiment. On the basis of the first embodiment, a storage medium is provided, on which computer instructions are stored. When the computer instructions are executed, the step of converting the oscilloscope file into the MDA file format is executed.

[0075] Based on this understanding, the technical solution of this embodiment, or the portion that contributes to the prior art, or the portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0076] Example 5

[0077] This embodiment has the same inventive concept as that of Embodiment 1, and provides a terminal including a memory and a processor. The memory stores computer instructions that can be executed on the processor. When the processor executes the computer instructions, it executes the step of converting the oscilloscope file into the MDA file format.

[0078] The processor may be a single-core or multi-core central processing unit or a specific integrated circuit, or one or more integrated circuits configured to implement the present invention.

[0079] Embodiments of the subject matter and functional operations described in this specification may be implemented in: tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or a combination of one or more thereof. Embodiments of the subject matter described in this specification may be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by a data processing apparatus or to control the operation of the data processing apparatus. Alternatively or in addition, the program instructions may be encoded on an artificially generated propagated signal, such as a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode and transmit information to a suitable receiver apparatus for execution by the data processing apparatus.

[0080] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform the corresponding functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can be implemented as, special purpose logic circuitry, such as an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).

[0081] Processors suitable for executing computer programs include, for example, general-purpose and / or special-purpose microprocessors, or any other type of central processing unit. Typically, a central processing unit will receive instructions and data from a read-only memory and / or random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or the computer will be operably coupled to such a mass storage device to receive data from it or to transmit data to it, or both. However, a computer does not necessarily have such a device. In addition, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.

[0082] Although this specification includes many specific implementation details, these should not be interpreted as limiting the scope of any invention or the scope of protection claimed, but are mainly used to describe the features of specific embodiments of specific inventions. Certain features described in multiple embodiments within this specification may also be implemented in combination in a single embodiment. On the other hand, the various features described in a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although features may work in certain combinations as described above and even initially claimed as such, one or more features from the claimed combination may be removed from the combination in some cases, and the claimed combination may point to a sub-combination or a variation of the sub-combination.

[0083] Similarly, although operations are depicted in a particular order in the accompanying drawings, this should not be understood as requiring that these operations be performed in the particular order shown or performed sequentially, or that all illustrated operations be performed to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product, or packaged into multiple software products.

[0084] The above specific implementation methods are detailed descriptions of the present invention. It cannot be considered that the specific implementation methods of the present invention are limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, they can make several simple deductions and substitutions without departing from the concept of the present invention, which should be regarded as falling within the scope of protection of the present invention.

Claims

1. A method for converting an oscilloscope file into an MDA file format, characterized in that: The method includes the following: Reading a .csv format file from an oscilloscope includes reading the file name and file location; the reading of a .csv format file from an oscilloscope includes: Use the readtable function to read the .csv format file of the oscilloscope, save different .csv format files in cell format, and use a for loop to read the file name and file location; Identify the parameters of the .csv format file, the parameters including channel information parameters and test data parameters; the identifying parameters of the .csv format file includes: Use the height function to identify the number of channels in the .csv format file; Different parameter calculation methods are selected according to the number of channels. If the number of channels is greater than 1, some channel information parameters are obtained through test data parameter calculation. If the number of channels is equal to 1, the .csv file is read through fopen, and the data of the required rows is read in sequence through the read row function fgetl function. The parameter values ​​to be obtained in this row of data are read and stored in the variable space; the channel information parameters include the total number of channels, the sampling rate of the channel, and the number of sampling points of the channel; Optimize the parameters of the identified .csv file, including renaming and changing the sampling rate. Renaming clarifies the data meaning, changing the sampling rate to adapt to the oscilloscope's resolution, and outputting the renamed and sampled channel data through the one-dimensional interpolation function interp1 to obtain the data value at the new sampling time. Reading a pre-written MDA-ascll parameter template file, writing the identified oscilloscope parameters into and replacing the relevant parameters in the MDA-ascll parameter template file; Export the replaced file in .ascll format and open it with MDA.

2. A method for converting an oscilloscope file into an MDA file format according to claim 1, characterized in that: The reading of the pre-written MDA-ascll parameter template file includes: Use the fopen function to open the MDA-ascll parameter template file, and use ~feof as the condition to read the template file parameters line by line.

3. A system for converting oscilloscope files into MDA file format, characterized in that: The system comprises: An oscilloscope file reading module is used to read the .csv format file of the oscilloscope, wherein the file name and file location are read; the reading of the .csv format file of the oscilloscope includes: Use the readtable function to read the .csv format file of the oscilloscope, save different .csv format files in cell format, and use a for loop to read the file name and file location; A parameter identification module is used to identify the parameters of the .csv format file, wherein the parameters include channel information parameters and test data parameters; the identification of the parameters of the .csv format file includes: Use the height function to identify the number of channels in the .csv format file; Different parameter calculation methods are selected according to the number of channels. If the number of channels is greater than 1, some channel information parameters are obtained through test data parameter calculation. If the number of channels is equal to 1, the .csv file is read through fopen, and the data of the required rows is read in sequence through the read row function fgetl function. The parameter values ​​to be obtained in this row of data are read and stored in the variable space; the channel information parameters include the total number of channels, the sampling rate of the channel, and the number of sampling points of the channel; Optimize the parameters of the identified .csv file, including renaming and changing the sampling rate. Renaming clarifies the data meaning, changing the sampling rate to adapt to the oscilloscope's resolution, and outputting the renamed and sampled channel data through the one-dimensional interpolation function interp1 to obtain the data value at the new sampling time. The template replacement module is used to read the pre-written MDA-ascll parameter template file, write the identified oscilloscope parameters into and replace the relevant parameters in the MDA-ascll parameter template file; MDA file output module is used to output the replaced file in .ascll format and open it using MDA.

4. A storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed, the method for converting an oscilloscope file into an MDA file format according to any one of claims 1 to 2 is executed.

5. A terminal comprising a memory and a processor, wherein the memory stores computer instructions that can be executed on the processor, characterized in that: When the processor runs the computer instructions, the method for converting an oscilloscope file into an MDA file format as described in any one of claims 1 to 2 is performed.

Citation Information

Patent Citations

  • Neural network hyper-parameter extracting and converting method, system and device and storage medium

    CN107992299A