Energy storage system global variable configurable reading method and host computer system

By introducing a variable metadata layer and a dynamic DAQ configuration engine, the problem of variable address coupling between the host computer and the slave computer in the energy storage system is solved, enabling flexible variable monitoring and rapid adaptation, and improving the maintainability and configuration efficiency of the system.

CN121300807BActive Publication Date: 2026-02-17SHENZHEN INTELLIWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511855668.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-10
Publication Date
2026-02-17
Estimated Expiration
2045-12-10

AI Technical Summary

Technical Problem

In existing technologies, the host computer program and the lower-level variable address of the embedded controller of the energy storage system are tightly coupled, resulting in poor adaptability, inconvenient configuration, lack of unified management and insufficient dynamism, making it difficult to flexibly cope with software iteration and product diversification.

Method used

A configurable variable metadata layer and a dynamic DAQ configuration engine are introduced. By parsing MAP files to generate JSON-formatted variable metadata configuration files, the host computer and the slave computer are decoupled, variable monitoring is dynamically configured, and transparent reading of different controller software versions is supported.

Benefits of technology

It achieves complete decoupling between the host computer and the slave computer software, improves the maintainability and adaptability of the system, supports flexible variable monitoring with on-demand testing, and meets the needs of rapid switching between testing and fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121300807B_ABST
    Figure CN121300807B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of energy storage system global variable configurable reading method and host computer system, it is related to data processing technical field, by analyzing energy storage controller compiling generated MAP file and the Excel file of variable to be observed, generate environment file and JSON format variable meta configuration file;Host computer imports the file after construction global variable mapping table, and establishes CCP communication with energy storage controller, user is checked by graphical interface and is set to monitor variable and set sampling period, host computer dynamically allocates DAQ-ID, and optimizes ODT list arrangement, generates the DAQ configuration in line with CCP agreement and downloads to controller, finally real-time acquisition, analysis data and visual display;Host computer system contains general-purpose computer, CAN / CANFD interface card and multiple software modules, realize upper and lower host computer decoupling, dynamic configuration, multi-version adaptation, improve development and operation efficiency, reduce cost.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to a global variable configurable reading method of an energy storage system and an upper computer system. BACKGROUND

[0002] In the development, testing and operation process of the embedded controller of the energy storage system, it is often necessary to read the global variables (such as battery SOC, voltage, current, temperature, alarm flag, control parameter, etc.) in the controller in real time for monitoring, analysis and fault diagnosis. The current commonly used technical means include:

[0003] Fixed address direct reading: the upper computer program reads the memory directly through CAN / CANFD bus according to the memory address of the variable which is hard coded based on the MAP file generated after the controller is compiled. The disadvantage is that once the controller software version is updated and the variable address or structure is changed, the upper computer program must be modified and recompiled synchronously, and the maintenance cost is extremely high. Different types or versions of energy storage controllers have completely different variable mappings, and independent upper computer code needs to be developed for each controller. Manual management of memory addresses is prone to errors, which may lead to reading of incorrect data or even cause controller failure.

[0004] CCP protocol application: configuration is performed through a unique DAQ-ID or ODT list. However, in the traditional use, this collection list is also relatively fixed or hard coded in the upper computer program or configuration file. When the set of variables to be monitored changes, the collection list still needs to be manually modified and the collection process needs to be restarted, lacking the ability to dynamically configure at runtime.

[0005] The defects of the above-mentioned current technical means are:

[0006] (1) High coupling degree and poor adaptability: the variable address / list of the upper computer and the lower computer (energy storage controller) is tightly coupled, and cannot flexibly cope with the iteration of the lower computer software and the diversification of the product series.

[0007] (2) Inconvenient configuration and low efficiency: each time the variable is changed, the technical personnel needs to deeply understand the MAP file and CCP configuration and manually operate, which is tedious and prone to errors.

[0008] (3) Lack of unified variable management view: variable information is scattered in MAP files, A2L description files, Excel tables and other places, and there is no centralized and readable configuration method.

[0009] (4) Lack of dynamicity: it is difficult to dynamically and on-demand add or delete variables to be read without stopping the current collection task. SUMMARY

[0010] The main purpose of the present application is to provide a global variable configurable reading method of energy storage system and an upper computer system, which aims to realize the transparent reading of the upper computer to the internal variables of the energy storage controller without programming, dynamic configuration and self-adaptation to different controller software versions by introducing a configurable variable meta information layer and a dynamic DAQ configuration engine.

[0011] To achieve the above purpose, the present application provides a global variable configurable reading method of energy storage system, comprising the following steps:

[0012] In the software compilation stage of the energy storage controller, the MAP file generated after the embedded code of the energy storage controller is compiled and linked is parsed, the name and corresponding absolute memory address of the global variable are extracted, and the environment file containing the variable name, absolute memory address, data type and length information is outputted in combination with the Excel file containing the observed variables;

[0013] A variable meta configuration file in JSON format is created based on the environment file, the variable meta configuration file contains the logical name, absolute memory address, data type and grouping information of the variable, and the variable meta configuration file is imported into the upper computer;

[0014] The upper computer parses the variable meta configuration file and loads it into the memory, establishes a CCP communication connection with the energy storage controller, constructs a global variable mapping table in the memory, and associates the logical name of the variable with the physical information and display information required for CCP reading;

[0015] The upper computer displays all monitorable variables in the form of a group list, receives the user-selected monitored variables and the set sampling period;

[0016] The upper computer assigns DAQ-ID according to the absolute memory address and data type of the variable, calculates the arrangement mode of the variable in ODT, generates a DAQ configuration structure conforming to the CCP protocol, and downloads the DAQ configuration structure to the CCP driver of the energy storage controller through the CCP command;

[0017] The upper computer sends the START_STOP command of CCP to start data acquisition, receives the data periodically sent by the energy storage controller through the CAN bus according to the DAQ configuration, parses the data according to the global variable mapping table and displays it in real time.

[0018] Further, the step of parsing the MAP file generated after the embedded code of the energy storage controller is compiled and linked comprises:

[0019] A standard MAP file generated after the embedded code of the energy storage controller is compiled and linked is obtained;

[0020] parsing the standard MAP file, i.e. extracting the names of all defined global variables, corresponding absolute memory addresses, data types and data lengths of each global variable recorded in the standard MAP file;

[0021] An Excel file containing a list of user observation variables is obtained, and the extracted global variable information is matched with the list of observation variables in the Excel file to screen out target global variables belonging to the observation variables and corresponding names, absolute memory addresses, data types and data lengths;

[0022] According to a predetermined format, the names, absolute memory addresses, data types and data lengths of the screened target global variables are recorded in the form of key-value correspondence to generate the environment file.

[0023] Further, the step of creating a variable meta configuration file in JSON format based on the environment file comprises:

[0024] Reading the names, absolute memory addresses and data types of the target global variables in the environment file;

[0025] Supplementing a logical name and grouping information for each target global variable, the logical name corresponding to the name of the variable in the environment file, and the grouping information including a page identifier and a title identifier to which the variable belongs;

[0026] Organizing the logical name, absolute memory address, data type, page identifier and title identifier of each target global variable according to the JSON format specification to generate the variable meta configuration file;

[0027] Loading the generated variable meta configuration file into the host computer through the import function of the host computer.

[0028] Further, the step of the host computer parsing the variable meta configuration file and loading it into the memory and establishing a CCP communication connection with the energy storage controller to build a global variable mapping table in the memory comprises:

[0029] Calling the built-in JSON parsing module to parse the imported variable meta configuration file, extract the logical name, absolute memory address, data type, page identifier and title identifier of each variable, and store the extracted variable meta data in the memory of the host computer;

[0030] Sending a CCP connection request to the energy storage controller through the CAN / CANFD communication interface card configured thereby to establish a CCP communication connection with the energy storage controller;

[0031] A global variable mapping table is created in the memory, and the logical name of each variable is respectively associated with the corresponding absolute memory address, data type and display information, including the page identifier and title identifier of the variable.

[0032] Further, the host computer displays all monitorable variables in the form of a group list, receives the user-selected variables to be monitored and the set sampling period, and the steps include:

[0033] According to the variable page identifier and title identifier recorded in the global variable mapping table in the memory, all monitorable variables are displayed in the form of a group list or tree structure on the graphical user interface.

[0034] The graphical user interface provides a check control and a sampling period input control for the user to select the variables to be monitored and input the sampling period of the corresponding variables.

[0035] Real-time receive user through the check control and the sampling period input control submitted to be monitored variable list and each variable corresponding sampling period, and stored to the designated memory area.

[0036] Further, the host computer assigns DAQ-ID according to the selected variables to be monitored and the sampling period, calculates the arrangement of variables in ODT according to the absolute memory address and data type of the variables, generates DAQ configuration structure conforming to CCP protocol, and downloads the DAQ configuration structure to the CCP driver of the energy storage controller through CCP command.

[0037] Read the stored monitored variable list and the corresponding sampling period of each variable, and allocate available DAQ-ID corresponding to the monitored variable list from the preset DAQ-ID pool.

[0038] According to the absolute memory address and data type of each variable to be monitored, calculate the storage location and byte number of each variable in ODT, arrange the order of each variable in ODT according to the principle of filling the CAN message data field, and form an ODT list.

[0039] Combine the allocated DAQ-ID and the ODT list to generate a DAQ configuration structure conforming to the CCP protocol specification.

[0040] Send the SET_DAQ_PTR command and WRITE_DAQ command of CCP in turn to download the generated DAQ configuration structure into the CCP driver of the energy storage controller, and the CCP driver of the energy storage controller receives and stores the DAQ configuration structure, and the energy storage controller remains in the running state during the process.

[0041] Further, the host computer sends a CCP START_STOP command to start data collection, receives data periodically sent by the energy storage controller through the CAN bus according to the DAQ configuration, and parses the data according to the global variable mapping table and displays the data in real time.

[0042] The host computer sends a CCP START_STOP command to the energy storage controller to instruct the energy storage controller to start data collection; the energy storage controller periodically reads variable data at a specified absolute memory address according to a stored DAQ configuration structure and a sampling period corresponding to each variable, and sends the read variable data to the host computer through the CAN bus.

[0043] After receiving the variable data sent by the energy storage controller, the variable data is restored to the data type according to the variable data type recorded in the global variable mapping table, and the restored data is converted into engineering values according to a preset engineering value conversion formula.

[0044] The values corresponding to each variable are displayed in real time in the form of a curve, a numerical table, or a dashboard on the graphical user interface.

[0045] The application also provides a host computer system that implements the above-mentioned energy storage system global variable configurable reading method, and the host computer system comprises:

[0046] A general-purpose computer is configured with a CAN / CANFD communication interface card for establishing a physical connection with the energy storage controller.

[0047] A software part, an application program running on the operating system of the general-purpose computer, comprises a CCP master protocol stack, a JSON configuration file parsing module, a DAQ configuration generation module, and a graphical user interface module.

[0048] The CCP master protocol stack is used for CCP protocol communication with the CCP slave driver of the energy storage controller.

[0049] The JSON configuration file parsing module is used for parsing variable element configuration files and extracting variable element data; the DAQ configuration generation module is used for generating a DAQ configuration structure according to a list of variables to be monitored and a sampling period.

[0050] The graphical user interface module is used for displaying monitorable variables, receiving user configuration instructions, and displaying variable engineering values in real time.

[0051] Further, the software part further comprises:

[0052] The dynamic configuration core processing module performs operations including: obtaining physical information corresponding to a to-be-monitored variable, the physical information including an absolute memory address, a data type, and a data length of the variable;

[0053] Splitting the to-be-monitored variable;

[0054] Allocating a corresponding ODT entry to each split variable and calculating an offset of the variable in a CAN message;

[0055] Determining whether the current ODT entry is full, if the current ODT entry is full, allocating a new ODT entry and adding the variable to the new ODT entry;

[0056] Arranging all allocated ODT entries into an ODT list.

[0057] Further, the software part further includes:

[0058] A post-download state processing module, the post-download state processing module performing operations including: being in a waiting connection state, receiving a DAQ configuration receiving result fed back by the energy storage controller;

[0059] After receiving the DAQ configuration receiving result, reconstructing a DAQ list;

[0060] According to a configuration attribute corresponding to the reconstructed DAQ list, reading corresponding variable data in the energy storage controller, and uploading the read variable data to the graphical user interface module for display.

[0061] The energy storage system global variable configurable reading method and the upper computer system have the following beneficial effects:

[0062] (1) The upper computer and the lower computer software are completely decoupled, and the current situation is that, in the traditional mode, the upper computer program depends on the specific memory address of the lower computer variable through hard coding or fixed configuration, and once the lower computer software is updated, the address changes, and the upper computer is immediately disabled; in the present application, a "variable element configuration file" is introduced as an abstraction layer, the upper computer only interfaces with the logical name of the variable, the physical address information is obtained through dynamic analysis of the file, and when the lower computer software is upgraded, only a new upper computer configuration file needs to be replaced, and the element configuration and the upper computer program do not need to be changed at all; the maintainability and adaptability of the system are greatly improved, and the compatibility shackles caused by software iteration are broken.

[0063] (2) Realize the dynamic configurable flexible capability effect, the present situation: the traditional CCPDAQ list is usually static, pre-defined, to change the monitoring variable, must modify the configuration, restart the acquisition process, even recompile the host computer; the application: introduce "dynamic DAQ configuration engine", the user selects the variable through the graphical interface as needed, the engine can calculate the optimal DAQ list structure in real time, automatically, and download to the controller online, without stopping the current system or restarting any device; Realize the "point-to-point measurement", meet the urgent needs of the energy storage system in testing, debugging and fault diagnosis to monitor the target for quick, flexible switching. BRIEF DESCRIPTION OF DRAWINGS

[0064] Figure 1 is a flowchart of the configurable reading method of the global variable of the energy storage system in an embodiment of the application;

[0065] Figure 2 is a UI interface diagram of the configurable variable of the host computer system in the configurable reading method of the global variable of the energy storage system in an embodiment of the application;

[0066] Figure 3 is a UI interface diagram of the variable monitoring of the host computer system in the configurable reading method of the global variable of the energy storage system in an embodiment of the application;

[0067] Figure 4 is a code diagram of the DAQ configuration result generated by the host computer system in the configurable reading method of the global variable of the energy storage system in an embodiment of the application;

[0068] Figure 5 is a UI interface diagram of the host computer system in the configurable reading method of the global variable of the energy storage system in an embodiment of the application, and the variable meta configuration file in the JSON format is configured with the environment file EVN;

[0069] Figure 6 is a schematic diagram of the host computer system in the configurable reading method of the global variable of the energy storage system in an embodiment of the application, and the DAQ-ID is allocated according to the variable.

[0070] The implementation, functional features and advantages of the application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0071] In order to make the purpose, technical scheme and advantages of the application more clear and obvious, the application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application, and are not used to limit the application.

[0072] Reference Figure 1 is a flowchart of the configurable reading method of the global variable of the energy storage system, which comprises the following steps:

[0073] Step_A_1, in the software compilation stage of the energy storage controller, parsing the MAP file generated after the embedded code of the energy storage controller is compiled and linked, extracting the names and corresponding absolute memory addresses of global variables, combining the Excel file containing the observed variables, and outputting an environment file containing variable names, absolute memory addresses, data types, and length information;

[0074] Step_A_2, creating a JSON format variable meta configuration file based on the environment file, the variable meta configuration file containing the logical name, absolute memory address, data type, and grouping information of the variable, and importing the variable meta configuration file into the upper computer;

[0075] Step_B_1, the upper computer parses the variable meta configuration file and loads it into memory, establishes a CCP communication connection with the energy storage controller, and constructs a global variable mapping table in memory, which associates the logical name of the variable with the physical information and display information required for CCP reading;

[0076] Step_B_2, the upper computer displays all monitorable variables in the form of a group list, receives the user-selected variables to be monitored and the set sampling period;

[0077] Step_B_3, the upper computer assigns DAQ-ID according to the selected variables to be monitored and the sampling period, calculates the arrangement of variables in ODT according to the absolute memory address and data type of the variable, generates a DAQ configuration structure conforming to the CCP protocol, and downloads the DAQ configuration structure to the CCP driver of the energy storage controller through the CCP command;

[0078] Step_B_4, the upper computer sends the START_STOP command of CCP to start data acquisition, receives the data periodically sent by the energy storage controller through the CAN bus according to the DAQ configuration, and parses the data according to the global variable mapping table and displays it in real time.

[0079] In one embodiment, the step Step_A_1 of parsing the MAP file generated after the embedded code of the energy storage controller is compiled and linked includes:

[0080] obtaining a standard MAP file generated after the embedded code of the energy storage controller is compiled and linked;

[0081] parsing the standard MAP file, i.e. extracting the names, corresponding absolute memory addresses, data types, and data lengths of all defined global variables recorded in the standard MAP file;

[0082] An Excel file containing a list of variables to be observed by a user is obtained, and the extracted global variable information is matched with the list of variables to be observed in the Excel file to screen out target global variables belonging to the variables to be observed and corresponding names, absolute memory addresses, data types and data lengths of the target global variables;

[0083] The names, absolute memory addresses, data types and data lengths of the screened target global variables are recorded in a key-value corresponding form according to a preset format to generate the environment file.

[0084] Specifically, a standard MAP file generated after embedded code in the energy storage controller is compiled and linked is obtained; the energy storage controller adopts a microcontroller with an ARM Cortex-M4 kernel, and after the embedded code is compiled and linked by a Keil MDK compilation tool chain, a standard MAP file containing memory allocation information is generated, which records address ranges of code segments and data segments and associated information of all global variables; the standard MAP file is parsed, that is, a parsing script written by Python traverses a “GlobalSymbols” area in the MAP file to extract names (such as “Batt_SOC” and “Cell_Volt”) of all defined global variables, corresponding absolute memory addresses (such as 0x08002000 and 0x08002002), data types (such as uint16_t and float32_t) of the global variables and data lengths (such as 2 bytes and 4 bytes) in the standard MAP file; an Excel file containing a list of variables to be observed by a user is obtained, the Excel file has entries such as “Batt_SOC” and “Cell_Volt” in a “variable name to be observed” column, and the extracted global variable information is matched with the list of variables to be observed in the Excel file by a script to screen out target global variables belonging to the variables to be observed and corresponding names, absolute memory addresses, data types and data lengths of the target global variables; names, absolute memory addresses, data types and data lengths of the screened target global variables are recorded in a key-value corresponding form according to a preset format (such as CSV format), for example, “variable name: Batt_SOC; absolute memory address: 0x08002000; data type: uint16_t; data length: 2”, to generate the environment file.

[0085] In one embodiment, see Figures 2-5 Step A_2 of creating a variable meta configuration file in JSON format based on the environment file includes:

[0086] The names, absolute memory addresses and data types of the target global variables in the environment file are read;

[0087] complementing a logical name corresponding to the name of the variable in the environment file and group information including a page identifier and a title identifier to which the variable belongs for each target global variable;

[0088] organizing the logical name, the absolute memory address, the data type, the page identifier and the title identifier of each target global variable according to the JSON format specification to generate the variable meta configuration file;

[0089] loading the generated variable meta configuration file into the host computer through the import function of the host computer.

[0090] Specifically, the name, the absolute memory address and the data type of the target global variable in the environment file are read; specifically, the environment file stored in the CSV format is read by a configuration tool written in C#, and the target global variable information is parsed line by line, such as reading the variable name "Pack_Current", the corresponding absolute memory address 0x08002004 and the data type "int16_t"; the variable name "Temp_Max", the corresponding absolute memory address 0x08002006 and the data type "int8_t"; a logical name corresponding to the name of the variable in the environment file is supplemented for each target global variable, that is, the logical name of "Pack_Current" is "Pack_Current", and the logical name of "Temp_Max" is "Temp_Max"; the group information includes a page identifier and a title identifier to which the variable belongs, wherein the page identifier of "Pack_Current" is "running parameter monitoring page", and the title identifier is "battery pack total current"; the page identifier of "Temp_Max" is "running parameter monitoring page", and the title identifier is "maximum single cell temperature"; the logical name, the absolute memory address, the data type, the page identifier and the title identifier of each target global variable are organized according to the JSON format specification to generate the variable meta configuration file content, and the generated variable meta configuration file is loaded into the host computer through the import function of the host computer; in the specific operation, the "configuration file import" button on the monitoring software interface running on the host computer is clicked, the generated JSON format variable meta configuration file is selected, the software automatically verifies the legality of the file format, and then the file content is loaded into the configuration database of the software to complete the import of the variable meta configuration file.

[0091] wherein, Figure 2 The variable configuration interface is shown in the specific figure, the left side is an unused variable, the right side is a pre-display variable, the bottom is a page corresponding to the variable, a title, and a transmission period configuration.

[0092] Figure 3This interface is the interface after the user configuration, sysRun (run) corresponds to Figure 2 Page label, real and flag correspond to sub-label, and the variable displayed is Figure 2 The variable in the left frame of the page.

[0093] Figure 4 The DAQ list and ODT order generated by the host computer system according to the user-configured variables, all information about the variables in this interface is printed out, used for host computer system debugging, including the type of the variable, the variable address, the variable corresponding page title, sub-title, the index of the period, and the order in DAQ and ODT.

[0094] Figure 5 The interface for the entire host computer system at the beginning, including the establishment of communication, the import of configuration file, and the operation of variable configuration.

[0095] Figure 6 is Figure 5 The interface displayed by clicking CAN communication in the interface, this interface is used to configure the ID of CAN communication and the period corresponding to each ID, which is used to control the period of daq message sent by the slave computer, and the host computer system detects whether the daq period corresponds through this period.

[0096] The overall operation steps of the host computer system are to import the configuration file or the configuration of communication first, and there is no sequence between the two configurations, then the user selects the variables to be displayed, and finally connects, which can be monitored in real time, if adjustment is needed, the variable can be directly reconfigured, without additional operation.

[0097] In an embodiment, the host computer parses the variable meta configuration file and loads it into the memory, and after establishing a CCP communication connection with the energy storage controller, the step Step_B_1 of constructing a global variable mapping table in the memory includes:

[0098] Call the built-in JSON parsing module to parse the imported variable meta configuration file, extract the logical name, absolute memory address, data type, page identifier and title identifier of each variable, and store the extracted variable meta data in the memory of the host computer;

[0099] Send a CCP connection request to the energy storage controller through the CAN / CANFD communication interface card configured thereby, and establish a CCP communication connection with the energy storage controller;

[0100] Create a global variable mapping table in the memory, and store the logical name of each variable respectively in association with the corresponding absolute memory address, data type and display information, the display information including the page identifier and title identifier of the variable.

[0101] Wherein, a global variable mapping table is created in the memory; the mapping table is a relational data table generated in the host computer memory, taking the logical name of each variable as the unique index item, binding and associating the corresponding absolute memory address, data type with the index item, and synchronously associating the page identification and title identification of the variable as display information to the corresponding logical name item.

[0102] In one embodiment, the host computer displays all monitorable variables in the form of a group list, receives the user-selected variables to be monitored and the set sampling period in step Step_B_2, which includes:

[0103] According to the variable page identification and title identification recorded in the global variable mapping table in the memory, all monitorable variables are displayed in the form of a group list or a tree structure on the graphical user interface.

[0104] The graphical user interface provides a check control and a sampling period input control for the user to select the variables to be monitored and input the sampling period of the corresponding variables.

[0105] Real-time receiving of the user-submitted list of variables to be monitored and the corresponding sampling period of each variable through the check control and the sampling period input control, and storing them in a designated memory area.

[0106] In one embodiment, see Figure 6 , the host computer assigns DAQ-ID according to the selected variables to be monitored and the sampling period, calculates the arrangement of variables in ODT according to the absolute memory address and data type of the variables, generates a DAQ configuration structure conforming to the CCP protocol, and downloads the DAQ configuration structure to the CCP driver of the energy storage controller through the CCP command in step Step_B_3, which includes:

[0107] Reading the stored list of variables to be monitored and the corresponding sampling period of each variable, and assigning available DAQ-ID corresponding to the list of variables to be monitored from a preset DAQ-ID pool;

[0108] According to the absolute memory address and data type of each variable to be monitored, calculating the storage location and occupied byte number of each variable in ODT, arranging the order of each variable in ODT according to the principle of filling the CAN message data field, and forming an ODT list;

[0109] Combined with the assigned DAQ-ID and the ODT list, a DAQ configuration structure conforming to the CCP protocol specification is generated.

[0110] ​The SET_DAQ_PTR command and the WRITE_DAQ command of the CCP are sent in sequence to download the generated DAQ configuration structure to the CCP driver of the energy storage controller, the CCP driver of the energy storage controller receives and stores the DAQ configuration structure, and the energy storage controller remains in a running state during the process.

[0111] Specifically, the stored list of to-be-monitored variables and the sampling period corresponding to each variable are read, and an available DAQ-ID is allocated from a preset DAQ-ID pool; wherein the DAQ-ID pool preset by the upper computer contains 16 consecutive available identifiers (such as identifiers 0 to 15), if the user checks 3 to-be-monitored variables, 3 consecutive identifiers not occupied (such as identifiers 2, 3, and 4) are selected from the pool as the DAQ-ID corresponding to the group of to-be-monitored variables; according to the absolute memory address and data type of each to-be-monitored variable, the storage position of each variable in the ODT and the number of occupied bytes are calculated, and the order of each variable is arranged according to the principle of filling the data field of the CAN message to form an ODT list; for example, the to-be-monitored variables include “Batt_SOC” (data type uint16_t, occupying 2 bytes), “Pack_Current” (data type int16_t, occupying 2 bytes), “Temp_Max” (data type int8_t, occupying 1 byte), and “Cell_Volt” (data type float32_t, occupying 4 bytes), then “Batt_SOC”, “Pack_Current”, and “Temp_Max” (5 bytes in total) are split and adjusted with “Cell_Volt” (4 bytes) to form an ODT entry of “Batt_SOC”, “Pack_Current”, “Cell_Volt” (8 bytes in total, which exactly fills the 8-byte data field of the CAN message), and “Temp_Max” occupies an ODT entry alone (other variables are supplemented later to fill up), to complete the arrangement of the ODT list; in combination with the allocated DAQ-ID and the ODT list, a DAQ configuration structure conforming to the CCP protocol specification is generated; the structure contains the allocated DAQ-ID, the corresponding ODT list (containing the address, type, and position in the ODT of each variable), and the sampling period information corresponding to each variable, ensuring that the configuration content completely matches the DAQ configuration format requirement of the CCP protocol; the configuration is downloaded by sequentially sending the SET_DAQ_PTR command and the WRITE_DAQ command of the CCP: the SET_DAQ_PTR command is sent first to specify the DAQ-ID corresponding to the to-be-written configuration and the storage area of the ID in the energy storage controller; then the WRITE_DAQ command is sent to transmit the generated DAQ configuration structure in the form of a protocol frame; after receiving the command and the configuration data, the CCP driver of the energy storage controller stores them in its own configuration buffer area, and the energy storage controller remains in a normal running state during the process, and does not need to be shut down to complete the configuration update.

[0112] In one embodiment, the host computer sends a START_STOP command of CCP to start data acquisition, receives data periodically sent by the energy storage controller through the CAN bus according to the DAQ configuration, and the step Step_B_4 of analyzing the data according to the global variable mapping table and displaying the data in real time comprises:

[0113] sending a START_STOP command of CCP to the energy storage controller to instruct the energy storage controller to start data acquisition; the energy storage controller periodically reads variable data at a specified absolute memory address according to a stored DAQ configuration structure and a sampling period corresponding to each variable, and sends the read variable data to the host computer through the CAN bus;

[0114] After receiving the variable data sent by the energy storage controller, the variable data is restored to the data type according to the variable data type recorded in the global variable mapping table, and the restored data is converted into engineering values in combination with a preset engineering value conversion formula;

[0115] The values corresponding to each variable are displayed in real time in the form of a curve, a digital table or a dashboard on a graphical user interface.

[0116] The application provides a host computer system, which implements the above-mentioned configurable reading method of global variables of an energy storage system, and comprises:

[0117] a hardware part, a general-purpose computer, the general-purpose computer being configured with a CAN / CANFD communication interface card, and the CAN / CANFD communication interface card being used to establish a physical connection with an energy storage controller;

[0118] a software part, an application program running on an operating system of the general-purpose computer, the application program comprising a CCP master protocol stack, a JSON configuration file analysis module, a DAQ configuration generation module and a graphical user interface module;

[0119] the CCP master protocol stack is used to perform CCP protocol communication with a CCP slave driver of the energy storage controller;

[0120] the JSON configuration file analysis module is used to analyze a variable element configuration file and extract variable element data; and the DAQ configuration generation module is used to generate a DAQ configuration structure according to a list of variables to be monitored and a sampling period;

[0121] the graphical user interface module is used to display monitorable variables, receive user configuration instructions and display engineering values of variables in real time.

[0122] The software part further comprises:

[0123] The dynamic configuration core processing module performs operations including: obtaining physical information corresponding to a to-be-monitored variable, the physical information including an absolute memory address, a data type, and a data length of the variable;

[0124] Splitting the to-be-monitored variable;

[0125] Allocating a corresponding ODT entry to each split variable and calculating an offset of the variable in a CAN message;

[0126] Determining whether the current ODT entry is full, and if so, allocating a new ODT entry and adding the variable to the new ODT entry;

[0127] Arranging all allocated ODT entries into an ODT list.

[0128] The software part further includes:

[0129] A post-download state processing module that performs operations including: being in a waiting connection state, receiving a DAQ configuration receiving result fed back by the energy storage controller;

[0130] After receiving the DAQ configuration receiving result, reconstructing a DAQ list;

[0131] Reading corresponding variable data in the energy storage controller according to configuration attributes corresponding to the reconstructed DAQ list, and uploading the read variable data to the graphical user interface module for display.

[0132] The specific structure of the host computer system and the working process of each part are as follows:

[0133] I. Hardware part

[0134] The hardware part of the host computer system includes a general-purpose computer and a configured CAN / CANFD communication interface card; wherein the general-purpose computer is an industrial tablet computer, which is equipped with a Windows operating system, has a 4GB memory and a 500GB storage capacity, and meets the application program running and data storage requirements; the CAN / CANFD communication interface card selects a PCAN-USBPro interface card, which realizes physical connection and data transmission with the industrial tablet computer through a USB interface, and at the same time, establishes a hardware connection with a CAN communication interface of the energy storage controller through a standard CAN bus cable, thereby providing physical link support for CCP protocol communication between the host computer and the energy storage controller.

[0135] II. Software part

[0136] The software part is a special monitoring application program running on an industrial tablet computer operating system. The program integrates a CCP master station protocol stack, a JSON configuration file parsing module, a DAQ configuration generation module, a graphical user interface module, a dynamic configuration core processing module, and a download state processing module. The modules work together to complete the variable configurable reading function. The specific working process is as follows:

[0137] The CCP master station protocol stack is specially used for CCP protocol communication with the CCP slave station drive built in the energy storage controller. In the communication process, the protocol stack is responsible for encapsulating CONNECT command frames, SET_DAQ_PTR command frames, WRITE_DAQ command frames, START_STOP command frames, and other types of instructions according to the CCP protocol specification, while receiving connection confirmation frames, DAQ configuration receiving result frames, variable data frames, and other feedbacks from the energy storage controller, ensuring that the instruction transmission and data interaction between the host computer and the energy storage controller meet the protocol requirements and guarantee the communication stability.

[0138] The JSON configuration file parsing module is the core function of parsing imported variable meta configuration files. When the user imports a JSON format variable meta configuration file through the application program, the module first verifies the file format, confirms that the key fields such as logical name, absolute memory address, data type, page identifier, and title identifier are not missing and the format is correct, and then uses the preset parsing rules to extract the complete metadata of each variable one by one, converts it to an internal data format recognizable by the host computer application program, and stores it in the specified data area of the program memory, providing data support for subsequent variable mapping table construction and monitoring configuration.

[0139] The graphical user interface module realizes interaction with the user in a visual form. On the one hand, the module reads the variable meta data stored in the memory, and displays all monitorable variables in a tree structure combined with a grouped list according to the page identifier and title identifier, such as taking “battery status monitoring page” as a first-level node and “battery remaining capacity (Batt_SOC)” and “battery pack total current (Pack_Current)” as second-level nodes, to facilitate user quick search. On the other hand, it provides a check control and a sampling period input box. The user can check the target variable and fill in the sampling period in the input box within the range of 10ms-1000ms, and submit the monitoring configuration instruction. The module receives and stores the user configuration information in real time. At the same time, the analyzed variable engineering values are displayed in the form of real-time curves, digital display tables, and instrument panels during data acquisition. The curve is used to present the variable trend over time, the digital table is used to display the accurate value, and the instrument panel is used to intuitively reflect whether the variable is within the normal range.

[0140] DAQ configuration generation module: receive the list of variables to be monitored and the corresponding sampling period transmitted by the graphical user interface module, and generate the DAQ configuration structure in cooperation with the dynamic configuration core processing module. This module first selects an unoccupied DAQ-ID from the preset DAQ-ID pool (including 0-15, a total of 16 available identifiers), and assigns it to the current monitoring task. Then, it obtains the ODT list arranged by the dynamic configuration core processing module, associates the DAQ-ID with the ODT list, and integrates each variable sampling period. According to the CCP protocol specification, a complete DAQ configuration structure is constructed to ensure that the structure contains all the information required for the energy storage controller to perform data acquisition, including DAQ-ID, ODT entry number, variable address, data type, storage location, and sampling period in each ODT entry.

[0141] Dynamic configuration core processing module: performs splitting of variables to be monitored, ODT entry allocation, and list arrangement operations. First, the physical information corresponding to the variables to be monitored is retrieved from the memory, including the absolute memory address, data type (such as uint16_t, int8_t, float32_t), and data length (2 bytes, 1 byte, and 4 bytes, respectively) of each variable. Then, according to the 8-byte storage limit of the CAN message data field, the variables are split, for example, the variables to be monitored include "Batt_SOC" (2 bytes), "Pack_Current" (2 bytes), "Temp_Max" (1 byte), and "Cell_Volt" (4 bytes). It is determined that the total length of "Batt_SOC+Pack_Current+Cell_Volt" is 8 bytes, which can be combined into one group, and "Temp_Max" is a separate group. Next, each group of split variables is allocated a corresponding ODT entry, and the offset of each variable in the CAN message corresponding to the ODT entry is calculated, such as "Batt_SOC" offset 0, "Pack_Current" offset 2, "Cell_Volt" offset 4, and "Temp_Max" offset 0. During allocation, if the current ODT entry is full (8 bytes), a new ODT entry is automatically allocated, and the unallocated variables are added to the new entry. Finally, all allocated ODT entries are arranged in order to form a complete ODT list, which is transmitted to the DAQ configuration generation module.

[0142] Downloaded state processing module: after the DAQ configuration structure is sent through the CCP command, the module enters a waiting connection state, continuously listens to the DAQ configuration receiving result feedback by the energy storage controller. When the feedback frame of "configuration receiving success" is received, the DAQ list is immediately reconstructed according to the allocated DAQ-ID, ODT list and sampling period information, and the monitoring variable set and acquisition parameters corresponding to each DAQ-ID are determined; subsequently, the data reading instruction is sent to the energy storage controller through the CCP master station protocol stack according to the configuration properties corresponding to the reconstructed DAQ list, the variable raw data periodically uploaded by the energy storage controller is received, and the raw data is transmitted to the graphical user interface module, which is combined with the variable metadata to display after analysis and conversion; if the feedback frame of "configuration receiving failure" is received, the module sends a prompt signal to the upper computer application, and the configuration failure information is displayed to the user through the graphical user interface module, so that the user can reconfigure.

[0143] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent flow transformation using the content of the specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for globally configurable reading of variables in an energy storage system, characterized by, The method comprises the following steps: In the software compiling stage of the energy storage controller, a MAP file generated after compiling and linking the embedded code of the energy storage controller is parsed to extract the names and corresponding absolute memory addresses of global variables, and an environment file containing variable names, absolute memory addresses, data types and length information is output by combining an Excel file containing variables to be observed; A variable meta configuration file in JSON format is created based on the environment file, the variable meta configuration file contains the logical names, absolute memory addresses, data types and grouping information of variables, and the variable meta configuration file is imported into an upper computer; The upper computer parses the variable meta configuration file and loads it into memory, establishes a CCP communication connection with the energy storage controller, constructs a global variable mapping table in memory, and the global variable mapping table associates the logical names of variables with physical information and display information required for CCP reading; The upper computer displays all monitorable variables in the form of a group list, receives user-selected variables to be monitored and a set sampling period; The upper computer assigns DAQ-IDs, calculates the arrangement of variables in ODT according to the absolute memory addresses and data types of the variables, generates a DAQ configuration structure conforming to the CCP protocol, and downloads the DAQ configuration structure to the CCP driver of the energy storage controller through a CCP command; The upper computer sends a START_STOP command of CCP to start data acquisition, receives data periodically sent by the energy storage controller through a CAN bus according to the DAQ configuration, parses the data according to the global variable mapping table and displays the data in real time.

2. The energy storage system global variable configurable reading method of claim 1, wherein, The step of parsing the MAP file generated after compiling and linking the embedded code of the energy storage controller comprises: Obtaining a standard MAP file generated after the embedded code of the energy storage controller is compiled and linked; Parsing the standard MAP file, i.e. extracting the names, corresponding absolute memory addresses, data types and data lengths of all defined global variables recorded in the standard MAP file; Obtaining an Excel file containing a list of user-observed variables, matching the global variable information extracted by parsing with the list of variables to be observed in the Excel file, and screening out target global variables belonging to the variables to be observed and their corresponding names, absolute memory addresses, data types and data lengths; According to a preset format, the names, absolute memory addresses, data types and data lengths of the screened target global variables are recorded in the form of key-value correspondence to generate the environment file.

3. The energy storage system global variable configurable read method of claim 1, wherein, The step of creating a variable meta configuration file in JSON format based on the environment file comprises: Reading the names, absolute memory addresses and data types of the target global variables in the environment file; Supplementing the logical names and grouping information for each target global variable, the logical names correspond to the names of variables in the environment file, and the grouping information includes the page identifier and title identifier to which the variables belong; The logical name, absolute memory address, data type, page identifier and title identifier of each target global variable are organized in JSON format to generate the variable meta configuration file; The variable meta configuration file is loaded into the host computer through the import function of the host computer.

4. The energy storage system global variable configurable reading method of claim 1, wherein, The host computer parses the variable meta configuration file and loads it into the memory, and after establishing a CCP communication connection with the energy storage controller, the steps of constructing a global variable mapping table in the memory include: The built-in JSON parsing module is called to parse the imported variable meta configuration file, extract the logical name, absolute memory address, data type, page identifier and title identifier of each variable, and store the extracted variable meta data in the memory of the host computer; A CCP connection request is sent to the energy storage controller through the configured CAN / CANFD communication interface card, and a CCP communication connection is established with the energy storage controller; A global variable mapping table is created in the memory, and the logical name of each variable is associated with the corresponding absolute memory address, data type and display information, including the page identifier and title identifier of the variable.

5. The energy storage system global variable configurable read method of claim 1, wherein, The host computer displays all monitorable variables in the form of a grouped list, receives the user-selected variables to be monitored and the set sampling period, and the steps include: All monitorable variables are displayed in the form of a grouped list or tree structure on the graphical user interface according to the variable page identifier and title identifier recorded in the global variable mapping table in the memory; The graphical user interface provides a check control and a sampling period input control for the user to select the variables to be monitored and input the sampling period of the corresponding variables; The user-submitted list of variables to be monitored and the corresponding sampling period of each variable are received in real time through the check control and the sampling period input control, and stored in a designated memory area.

6. The energy storage system global variable configurable read method of claim 1, wherein, The host computer assigns DAQ-ID according to the selected variables to be monitored and the sampling period, calculates the arrangement of variables in ODT according to the absolute memory address and data type of the variables, generates a DAQ configuration structure that conforms to the CCP protocol, and downloads the DAQ configuration structure to the CCP driver of the energy storage controller through CCP commands, and the steps include: Read the stored list of variables to be monitored and the corresponding sampling period of each variable, and assign available DAQ-ID corresponding to the list of variables to be monitored from a preset DAQ-ID pool; According to the absolute memory address and data type of each variable to be monitored, calculate the storage location and byte occupation of each variable in ODT, arrange the order of each variable in ODT according to the principle of filling the CAN message data field, and form an ODT list; Combine the assigned DAQ-ID and the ODT list to generate a DAQ configuration structure that conforms to the CCP protocol specification; The SET_DAQ_PTR command and the WRITE_DAQ command of CCP are sent in sequence to download the generated DAQ configuration structure to the CCP driver of the energy storage controller, and the CCP driver of the energy storage controller receives and stores the DAQ configuration structure, and the energy storage controller remains in a running state during this process.

7. The energy storage system global variable configurable read method of claim 1, wherein, The host computer sends a CCP START_STOP command to start data collection, receives data periodically sent by the energy storage controller through the CAN bus according to the DAQ configuration, and parses the data according to the global variable mapping table and displays the data in real time. The host computer sends a CCP START_STOP command to the energy storage controller to instruct the energy storage controller to start data collection; the energy storage controller periodically reads the variable data at the specified absolute memory address according to the stored DAQ configuration structure and the sampling period corresponding to each variable, and sends the read variable data to the host computer through the CAN bus. After receiving the variable data sent by the energy storage controller, the variable data is restored to the data type according to the variable data type recorded in the global variable mapping table, and the restored data is converted into engineering values according to the preset engineering value conversion formula. The values corresponding to each variable are displayed in real time on the graphical user interface in the form of a curve, a numerical table, or a dashboard.

8. A host computer system, characterized by The host computer system implements the global variable configurable reading method of the energy storage system according to any one of claims 1-6, and the host computer system comprises: a general-purpose computer configured with a CAN / CANFD communication interface card for establishing a physical connection with the energy storage controller; a software part, an application program running on the operating system of the general-purpose computer, the application program comprising a CCP master protocol stack, a JSON configuration file parsing module, a DAQ configuration generation module, and a graphical user interface module; the CCP master protocol stack is used for CCP protocol communication with the CCP slave driver of the energy storage controller; the JSON configuration file parsing module is used to parse the variable meta configuration file and extract variable meta data; the DAQ configuration generation module is used to generate a DAQ configuration structure according to a list of variables to be monitored and a sampling period; the graphical user interface module is used to display monitorable variables, receive user configuration instructions, and display variable engineering values in real time.

9. The host computer system of claim 8, wherein, The software part further comprises: a dynamic configuration core processing module, which performs operations including obtaining physical information corresponding to the monitored variables, the physical information including the absolute memory address, data type, and data length of the variables; splitting the monitored variables; allocating corresponding ODT entries to each split variable and calculating the offset of the variable in the CAN message; determining whether the current ODT entry is full, if it is full, allocating a new ODT entry and adding the variable to the new ODT entry; arranging all allocated ODT entries into an ODT list.

10. The host computer system of claim 8, wherein, The software part further comprises: a post-download state processing module, which performs operations including being in a waiting connection state and receiving DAQ configuration reception results fed back by the energy storage controller; after receiving the DAQ configuration reception results, reconstructing the DAQ list; According to the configuration attribute corresponding to the restructured DAQ list, read the corresponding variable data in the energy storage controller, and upload the read variable data to the graphical user interface module for display.

Citation Information

Patent Citations

  • CCP protocol-based ECU driving record acquisition device and method

    CN106292462A

  • Method and system for testing embedded software

    CN108845935A