Method and system for matrix control of external connection equipment
Through matrix configuration simulation data and client software packaging technology, the problem of battery testing equipment in the linkage control of temperature and humidity equipment is solved, efficient equipment linkage and resource optimization are achieved, and users' diverse testing needs are met.
Patent Information
- Application Number
- CN202510844242.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-09-26
AI Technical Summary
Traditional battery testing equipment is unable to achieve coordinated control of temperature and humidity equipment during simulated environmental testing, resulting in low testing efficiency and insufficient utilization of equipment resources.
By configuring analog data in a matrix, flexible control of battery testing equipment and external linkage equipment can be achieved. Client software packaging technology is used to reduce the CPU usage of the intermediate computer and improve load performance. By editing the protocol configuration file, linkage control of the temperature box, water cooler, liquid cooler, and pressure sensor can be achieved.
It realizes flexible linkage control between battery detection equipment and external linkage equipment, meets users' rich simulation data testing needs, improves test efficiency and reduces the CPU usage of the intermediate computer.
Smart Images

Figure CN120703580A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery detection equipment, and in particular to a method and system for matrix control of external connected devices. Background Art
[0002] The rapid development of new energy vehicles has driven innovation in power battery technology. As a core component of new energy vehicles, power batteries' performance directly impacts vehicle range, safety, and service life. Power batteries are temperature-sensitive, significantly impacting not only their overall performance but also posing a direct threat to their service life and safety. To ensure the reliability and stability of power batteries in various complex environments, rigorous environmental testing is essential. High-temperature testing simulates battery operation in high-temperature environments to assess their heat resistance and thermal stability; low-temperature testing simulates battery operation in low-temperature environments to evaluate their low-temperature starting performance and discharge capacity. Temperature testing is crucial for ensuring proper operation of batteries in diverse climates. Humidity testing simulates battery operation in humid environments to assess their moisture resistance and corrosion resistance. High humidity can easily lead to moisture contamination of internal battery components, impacting performance and even causing safety incidents. Much of the temperature and humidity data for these simulated environments is based on actual battery measurements, which are both voluminous and complex. Traditional processing methods include: one is to disassemble the data, edit the corresponding control steps based on the disassembled data in the step test process, and realize the temperature and humidity settings through the control steps. This method requires editing a large number of control steps; another method is to control the temperature and humidity separately by the temperature and humidity control equipment. This method will cause the battery detection equipment and the temperature and humidity control equipment to be unable to work together. A test needs to control both devices at the same time. These problems have a great impact on the simulated environment test. Summary of the Invention
[0003] The present invention aims to solve the above-mentioned technical problems and provides a novel matrix control method and system for external devices. The matrix configures simulation data, which is more intuitive and convenient, and the linkage control with external devices is also more flexible, meeting the user's more diverse simulation data testing needs. The client software package of the battery testing equipment reduces the CPU usage of the intermediate computer and improves the load performance. By editing the protocol configuration file, the linkage control with the temperature box, water cooler, liquid cooler, and pressure sensor can be quickly realized.
[0004] A method for matrix control of external devices, characterized by comprising the following steps: S1: Open the client software on the battery testing device, then open the protocol editor on the client software, open the protocol editor, edit the protocol parameters, and generate a protocol configuration file; S2: The protocol configuration file generated in step S1 is sent to the intermediate computer on the battery testing device and saved to the database. After receiving the protocol configuration file, the intermediate computer establishes communication with the external device according to the protocol configuration parameters; S3: The client software is equipped with a work step editor. Select the channel to be tested, open the work step editor, and automatically import the protocol configuration file sent to the intermediate computer where the channel to be tested is located to edit the work step process parameters and matrix configuration. The work step process parameters include a global variable set and matrix output external parameters. Specifically, when editing the global variables in the matrix configuration, select the target global variables from the global variable set; edit the matrix output external parameters. The matrix output external parameters contain several sub-items, each of which contains a matrix item and a write function item. The matrix item is selected from several matrix items in the matrix configuration, and the write function item selects the target write function item from the write function set module of the protocol configuration file. S4: After editing the work step process in step S3, click Start, and the client software packages the matrix output external parameters in the work step process, traverses the sub-items in the matrix output external parameters in turn, and then packages them accordingly according to the matrix type of the matrix items of the sub-items to obtain the linkage control instructions of each matrix element; specifically, when the matrix type of the matrix item of the sub-item is a one-dimensional matrix, first traverse the matrix elements of the one-dimensional table, and then traverse the several write instructions in the write function item of the sub-item, and package them with the values of the matrix elements; when the matrix type of the matrix item of the sub-item is a two-dimensional matrix, first traverse the matrix elements of the two-dimensional table, and finally traverse the several write instructions in the write function item of the sub-item, and package them with the values of the matrix elements; when the matrix type of the matrix item of the sub-item is a three-dimensional matrix, first traverse the two-dimensional matrix parameters of the three-dimensional table, then traverse the matrix elements of the two-dimensional table of the two-dimensional matrix parameters, and finally traverse the several write instructions in the write function item of the sub-item, and package them with the values of the matrix elements; S5: After the matrix output external parameters in step S4 are packaged, the client software sends the packaged data together with the work step process and the start test parameters to the server. The server forwards it to the intermediate computer, starts the channel, and starts the test. The channel performs charging, discharging, or resting according to the work step process. When executing the matrix output external parameter function, the table lookup step is executed periodically according to the table lookup time interval of the matrix sub-item. Specifically, when the matrix type of the matrix sub-item is a one-dimensional matrix, the one-dimensional matrix table lookup step is executed; when the matrix type of the matrix sub-item is a two-dimensional matrix, the two-dimensional matrix table lookup step is executed; when the matrix type of the matrix sub-item is a three-dimensional matrix, the three-dimensional matrix table lookup step is executed; the matrix elements of the table lookup result are obtained, and the intermediate computer of the battery testing device sends the linkage control instructions of the packaged matrix elements to the external linkage device. The external linkage device executes the corresponding instructions to complete the corresponding linkage control action; S6: The test ends when the working steps of the test channel are completed.
[0005] Furthermore, the matrix configuration includes several matrix items, which include matrix name, matrix type, table lookup time interval, one-dimensional matrix parameters, two-dimensional matrix parameters and three-dimensional matrix parameters; matrix types include one-dimensional matrix, two-dimensional matrix and three-dimensional matrix.
[0006] As a further step, the one-dimensional matrix parameters include table header parameters and a one-dimensional table; the one-dimensional table includes header elements and matrix elements, the structure is ,in For the header element, is a matrix element, and the header element corresponds to the matrix element one by one; the two-dimensional matrix parameters include row header parameters, column header parameters and a two-dimensional table; the two-dimensional table includes row header elements, List header elements and matrix elements, the structure is ,in is the list head element, For the row header element, is a matrix element, a row header element and a column header element correspond to a matrix element; the three-dimensional matrix parameter includes a depth header parameter and a three-dimensional table; the three-dimensional table includes depth header elements and Two-dimensional matrix parameters, the structure is ,in is the depth table header element, It is a two-dimensional matrix parameter, and the depth header elements correspond one-to-one to the two-dimensional matrix parameters; the data structures of the header parameters, row header parameters, column header parameters and depth header parameters are consistent, all of which include table lookup methods and global variables.
[0007] As a further example, the table lookup method includes a larger interval value, a smaller interval value, and a nearest value.
[0008] Furthermore, the global variable set includes N (N is greater than 0) internal fixed variables, M (M is greater than 0) user-defined variables and S (S is greater than or equal to 0) external variables; the N internal fixed variables are variables defined and used by the battery testing equipment itself during the test process, and their values will be updated in real time during the test process, including voltage, current, capacity, energy, cycle number, step number, step time and total test process time; the M user-defined variables are variables set for user use, and their values will only be updated when set for use; the S external variables are variables automatically generated according to the communication protocol configuration of the battery BMS or temperature chamber or water cooler or liquid cooler or pressure sensor, and their values are parsed and updated in real time during the test process.
[0009] As a further step, the one-dimensional matrix table lookup step in step 5 includes the following steps: a) Get the value of the global variable of the header parameter, use express; b) In the header element Look for the value of In the interval, assuming In the interval [ , ]middle, Represents a header element The value of Represents a header element The value of the header element The corresponding matrix elements are , header element The corresponding matrix elements are ; c) Obtain the matrix elements of the table lookup result according to the table lookup method of the header parameter: When the lookup method of the header parameter is a large interval value, assuming and The larger value is , then the matrix elements of the table lookup result are ; When the lookup method of the header parameter is a small interval value, assuming and The smaller value of , then the matrix elements of the table lookup result are ; When the table lookup method of the header parameter is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then the matrix elements of the table lookup result are ,like Greater than , then the matrix elements of the table lookup result are .
[0010] As a further step, the two-dimensional matrix table lookup step in step 5 includes the following steps: 1) Get the value of the global variable of the list header parameter, use Indicates that the value of the global variable of the row header parameter is taken out, and express; 2) In the list header element Look for the value of In the interval, assuming In the interval [ , ]middle, Represents a header element The value of Represents a header element The value of the row header element Look for the value of In the interval, assuming In the interval [ , ]middle, Represents a header element The value of Represents a header element The value of the list head element and row header elements The corresponding matrix elements are , the list head element and row header elements The corresponding matrix elements are , the list head element and row header elements The corresponding matrix elements are , the list head element and row header elements The corresponding matrix elements are ; 3) Obtain the matrix elements of the table lookup result according to the table lookup method: When the table lookup method of the column header parameter is a large interval value, assuming and The larger value is , then the list head element is determined to be ; ① When the lookup method of the row header parameter is a large interval value, assume and The larger value is , then the row header element is determined to be , the matrix elements of the table lookup result are ; ② When the row header parameter lookup method is a small interval value, assume and The smaller value of , then the row header element is determined to be , the matrix elements of the table lookup result are ; ③ When the row header parameter lookup method is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then the row header element is determined to be , the matrix elements of the table lookup result are ,like Greater than , then the row header element is determined to be , the matrix elements of the table lookup result are ; When the lookup table method of the column header parameter is a small interval value, assuming and The smaller value of , then the list head element is determined to be ; ① When the lookup method of the row header parameter is a large interval value, assume and The larger value is , then the row header element is determined to be , the matrix elements of the table lookup result are ; ② When the row header parameter lookup method is a small interval value, assume and The smaller value of , then the row header element is determined to be , the matrix elements of the table lookup result are ; ③ When the row header parameter lookup method is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then the row header element is determined to be , the matrix elements of the table lookup result are ,like Greater than , then the row header element is determined to be , the matrix elements of the table lookup result are ; When the table lookup method of the column header parameter is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then the list head element is determined to be ; ① When the lookup method of the row header parameter is a large interval value, assume and The larger value is , then the row header element is determined to be , the matrix elements of the table lookup result are ; ② When the row header parameter lookup method is a small interval value, assume and The smaller value of , then the row header element is determined to be , the matrix elements of the table lookup result are ; ③ When the row header parameter lookup method is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then the row header element is determined to be , the matrix elements of the table lookup result are ,like Greater than , then the row header element is determined to be , the matrix elements of the table lookup result are ; like Greater than , then the list head element is determined to be ; ① When the lookup method of the row header parameter is a large interval value, assume and The larger value is , then the row header element is determined to be , the matrix elements of the table lookup result are ; ② When the row header parameter lookup method is a small interval value, assume and The smaller value of , then the row header element is determined to be , the matrix elements of the table lookup result are ; ③ When the row header parameter lookup method is to obtain the nearest value, Respectively and If the calculated difference Less than or equal to , then the row header element is determined to be , the matrix elements of the table lookup result are ,like Greater than , then the row header element is determined to be , the matrix elements of the table lookup result are .
[0011] As a further step, the three-dimensional matrix table lookup step in step 5 includes the following steps: 1) Get the value of the global variable of the depth table header parameter and use express; 2) In the depth table header element Look for the value of In the interval, assuming In the interval [ , ]middle, Represents the depth table header element The value of Represents a header element The value of the depth table header element The corresponding two-dimensional matrix parameters are , depth table header element The corresponding two-dimensional matrix parameters are ; 3) Obtain the matrix elements of the lookup result according to the lookup method of the depth table header parameter: When the lookup method of the header parameter is a large interval value, assuming and The larger value is , then Execute the two-dimensional matrix table step to obtain the matrix elements of the table lookup result; when the table header parameter lookup method is a small interval value, assume and The smaller value of , then Execute the two-dimensional matrix table step to obtain the matrix elements of the table lookup result; when the table header parameter lookup method is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then Execute the two-dimensional matrix table step to get the matrix elements of the table lookup result. If Greater than , then Execute the two-dimensional matrix table step to obtain the matrix elements of the table lookup result.
[0012] As a further step, the protocol parameters include a PLC set module and a write function set module. The PLC set module includes at least one PLC module. The PLC module includes basic communication protocol parameters and PLC write; the basic communication protocol parameters include protocol type, UDP / TCP, Client / Server, IP, port number, external device address, remarks, communication interval between adjacent frames, reply timeout time and reply timeout times; the protocol type is divided into custom format and specified protocol. The specified protocols include ModbusTcp protocol, FinsTcp protocol, Mewtocol protocol, Melsec3E protocol, HostLink protocol and PCLinkSum protocol; the PLC write includes several write instruction items. When the PLC protocol type is different, the write instruction item parameters are different. If the PLC protocol type is a specified protocol type, the write instruction item includes name, layer number, etc. , function code, register address, register bit address, number of registers to be written, initial value, N numerical write items (N can be 0); if the PLC protocol type is a custom format type, the write instruction item includes name, data content type, request frame header, initial value, request frame tail, response frame tail, response frame length, check parameters, N numerical write items (N can be 0); the numerical write item parameters include start bit, change ratio, offset, write mode, data type, byte order, number of decimal places, and integer part string length; the check parameters include yes / no check, check type, check data, and check result; the write function set module includes several write function items, and the write function item parameters include function name, unit, and several write instruction items and additional actions; the additional action is to select several PLC write instruction items from the specified PLC and layer number, and synchronously send the instructions in the additional action when executing the function including the additional action.
[0013] As a further feature, the system includes a battery detection device and an external connection device, wherein the battery detection device and the external connection device are connected wirelessly or by Ethernet, RS323, RS485, or CAN bus; the external connection device is at least one of a temperature box, a water cooler, a liquid cooler, and a pressure sensor; the battery detection device includes a client, a server, a database, a middle computer, and a lower computer, wherein each server is connected to several middle computers, each middle computer is connected to several lower computers, and each lower computer has several channels.
[0014] The beneficial effects of the present invention are: configuring simulation data through a matrix is more intuitive and convenient, and the linkage control with external equipment is also more flexible, meeting users' more diverse simulation data testing needs; the client software package of the battery testing equipment reduces the CPU usage of the intermediate machine and improves the load performance; by editing the protocol configuration file, linkage control with the temperature box, water cooler, liquid cooler, and pressure sensor can be quickly achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a flow chart of a method for controlling external devices through a matrix according to the present invention; Figure 2 This is a system diagram of the matrix controlling external connected devices of the present invention. DETAILED DESCRIPTION
[0016] The present invention will be further described below with reference to the accompanying drawings and specific embodiments: Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of the application are only for the purpose of describing specific embodiments and are not intended to limit this application. The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0017] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0018] Refer to Figure 1-Figure 2 As shown, a method for matrix controlling external connected devices is characterized by comprising the following steps: S1: Open the client software on the battery testing device, then open the protocol editor on the client software, open the protocol editor, edit the protocol parameters, and generate a protocol configuration file; S2: The protocol configuration file generated in step S1 is sent to the intermediate computer on the battery testing device and saved to the database. After receiving the protocol configuration file, the intermediate computer establishes communication with the external device according to the protocol configuration parameters; S3: The client software is equipped with a work step editor. Select the channel to be tested, open the work step editor, and automatically import the protocol configuration file sent to the intermediate computer where the channel to be tested is located to edit the work step process parameters and matrix configuration. The work step process parameters include a global variable set and matrix output external parameters. Specifically, when editing the global variables in the matrix configuration, select the target global variables from the global variable set; edit the matrix output external parameters. The matrix output external parameters contain several sub-items, each of which contains a matrix item and a write function item. The matrix item is selected from several matrix items in the matrix configuration, and the write function item selects the target write function item from the write function set module of the protocol configuration file. S4: After editing the work step process in step S3, click Start, and the client software packages the matrix output external parameters in the work step process, traverses the sub-items in the matrix output external parameters in turn, and then packages them accordingly according to the matrix type of the matrix items of the sub-items to obtain the linkage control instructions of each matrix element; specifically, when the matrix type of the matrix item of the sub-item is a one-dimensional matrix, first traverse the matrix elements of the one-dimensional table, and then traverse the several write instructions in the write function item of the sub-item, and package them with the values of the matrix elements; when the matrix type of the matrix item of the sub-item is a two-dimensional matrix, first traverse the matrix elements of the two-dimensional table, and finally traverse the several write instructions in the write function item of the sub-item, and package them with the values of the matrix elements; when the matrix type of the matrix item of the sub-item is a three-dimensional matrix, first traverse the two-dimensional matrix parameters of the three-dimensional table, then traverse the matrix elements of the two-dimensional table of the two-dimensional matrix parameters, and finally traverse the several write instructions in the write function item of the sub-item, and package them with the values of the matrix elements; S5: After the matrix output external parameters in step S4 are packaged, the client software sends the packaged data together with the work step process and the start test parameters to the server. The server forwards it to the intermediate computer, starts the channel, and starts the test. The channel performs charging, discharging, or resting according to the work step process. When executing the matrix output external parameter function, the table lookup step is executed periodically according to the table lookup time interval of the matrix sub-item. Specifically, when the matrix type of the matrix sub-item is a one-dimensional matrix, the one-dimensional matrix table lookup step is executed; when the matrix type of the matrix sub-item is a two-dimensional matrix, the two-dimensional matrix table lookup step is executed; when the matrix type of the matrix sub-item is a three-dimensional matrix, the three-dimensional matrix table lookup step is executed; the matrix elements of the table lookup result are obtained, and the intermediate computer of the battery testing device sends the linkage control instructions of the packaged matrix elements to the external linkage device. The external linkage device executes the corresponding instructions to complete the corresponding linkage control action; S6: The test ends when the working steps of the test channel are completed.
[0019] Preferably, the matrix configuration includes several matrix items, which include matrix name, matrix type, table lookup time interval, one-dimensional matrix parameters, two-dimensional matrix parameters and three-dimensional matrix parameters; matrix types include one-dimensional matrix, two-dimensional matrix and three-dimensional matrix.
[0020] Preferably, the one-dimensional matrix parameters include table header parameters and a one-dimensional table; the one-dimensional table includes header elements and matrix elements, the structure is ,in For the header element, is a matrix element, and the header element corresponds to the matrix element one by one; the two-dimensional matrix parameters include row header parameters, column header parameters and a two-dimensional table; the two-dimensional table includes row header elements, List header elements and matrix elements, the structure is ,in is the list head element, For the row header element, is a matrix element, a row header element and a column header element correspond to a matrix element; the three-dimensional matrix parameter includes a depth header parameter and a three-dimensional table; the three-dimensional table includes depth header elements and Two-dimensional matrix parameters, the structure is ,in is the depth table header element, It is a two-dimensional matrix parameter, and the depth header elements correspond one-to-one to the two-dimensional matrix parameters; the data structures of the header parameters, row header parameters, column header parameters and depth header parameters are consistent, all of which include table lookup methods and global variables.
[0021] Preferably, the table lookup method includes a larger interval value, a smaller interval value and a nearest value.
[0022] Preferably, the global variable set includes N (N is greater than 0) internal fixed variables, M (M is greater than 0) user-defined variables and S (S is greater than or equal to 0) external variables; the N internal fixed variables are variables defined and used by the battery testing equipment itself during the test process, and their values will be updated in real time during the test process, including voltage, current, capacity, energy, cycle number, step number, step time and total test process time; the M user-defined variables are variables set for user use, and their values will only be updated when set for use; the S external variables are variables automatically generated according to the communication protocol configuration of the battery BMS or temperature chamber or water cooler or liquid cooler or pressure sensor, and their values are parsed and updated in real time during the test process.
[0023] Preferably, the one-dimensional matrix table lookup step in step 5 includes the following steps: a) Get the value of the global variable of the header parameter, use express; b) In the header element Look for the value of In the interval, assuming In the interval [ , ]middle, Represents a header element The value of Represents a header element The value of the header element The corresponding matrix elements are , header element The corresponding matrix elements are ; c) Obtain the matrix elements of the table lookup result according to the table lookup method of the header parameter: When the lookup method of the header parameter is a large interval value, assuming and The larger value is , then the matrix elements of the table lookup result are ; When the lookup method of the header parameter is a small interval value, assuming and The smaller value of , then the matrix elements of the table lookup result are ; When the table lookup method of the header parameter is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then the matrix elements of the table lookup result are ,like Greater than , then the matrix elements of the table lookup result are .
[0024] Preferably, the two-dimensional matrix table lookup step in step 5 includes the following steps: 1) Get the value of the global variable of the list header parameter, use Indicates that the value of the global variable of the row header parameter is taken out, and express; 2) In the list header element Look for the value of In the interval, assuming In the interval [ , ]middle, Represents a header element The value of Represents a header element The value of the row header element Look for the value of In the interval, assuming In the interval [ , ]middle, Represents a header element The value of Represents a header element The value of the list head element and row header elements The corresponding matrix elements are , the list head element and row header elements The corresponding matrix elements are , the list head element and row header elements The corresponding matrix elements are , the list head element and row header elements The corresponding matrix elements are ; 3) Obtain the matrix elements of the table lookup result according to the table lookup method: When the table lookup method of the column header parameter is a large interval value, assuming and The larger value is , then the list head element is determined to be ; ① When the lookup method of the row header parameter is a large interval value, assume and The larger value is , then the row header element is determined to be , the matrix elements of the table lookup result are ; ② When the row header parameter lookup method is a small interval value, assume and The smaller value of , then the row header element is determined to be , the matrix elements of the table lookup result are ; ③ When the row header parameter lookup method is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then the row header element is determined to be , the matrix elements of the table lookup result are ,like Greater than , then the row header element is determined to be , the matrix elements of the table lookup result are ; When the lookup table method of the column header parameter is a small interval value, assuming and The smaller value of , then the list head element is determined to be ; ① When the lookup method of the row header parameter is a large interval value, assume and The larger value is , then the row header element is determined to be , the matrix elements of the table lookup result are ; ② When the row header parameter lookup method is a small interval value, assume and The smaller value of , then the row header element is determined to be , the matrix elements of the table lookup result are ; ③ When the row header parameter lookup method is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then the row header element is determined to be , the matrix elements of the table lookup result are ,like Greater than , then the row header element is determined to be , the matrix elements of the table lookup result are ; When the table lookup method of the column header parameter is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then the list head element is determined to be ; ① When the lookup method of the row header parameter is a large interval value, assume and The larger value is , then the row header element is determined to be , the matrix elements of the table lookup result are ; ② When the row header parameter lookup method is a small interval value, assume and The smaller value of , then the row header element is determined to be , the matrix elements of the table lookup result are ; ③ When the row header parameter lookup method is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then the row header element is determined to be , the matrix elements of the table lookup result are ,like Greater than , then the row header element is determined to be , the matrix elements of the table lookup result are ; like Greater than , then the list head element is determined to be ; ① When the lookup method of the row header parameter is a large interval value, assume and The larger value is , then the row header element is determined to be , the matrix elements of the table lookup result are ; ② When the row header parameter lookup method is a small interval value, assume and The smaller value of , then the row header element is determined to be , the matrix elements of the table lookup result are ; ③ When the row header parameter lookup method is to obtain the nearest value, Respectively and If the calculated difference Less than or equal to , then the row header element is determined to be , the matrix elements of the table lookup result are ,like Greater than , then the row header element is determined to be , the matrix elements of the table lookup result are .
[0025] Preferably, the three-dimensional matrix table lookup step in step 5 includes the following steps: 1) Get the value of the global variable of the depth table header parameter and use express; 2) In the depth table header element Look for the value of In the interval, assuming In the interval [ , ]middle, Represents the depth table header element The value of Represents a header element The value of the depth table header element The corresponding two-dimensional matrix parameters are , depth table header element The corresponding two-dimensional matrix parameters are ; 3) Obtain the matrix elements of the lookup result according to the lookup method of the depth table header parameter: When the lookup method of the header parameter is a large interval value, assuming and The larger value is , then Execute the two-dimensional matrix table step to obtain the matrix elements of the table lookup result; when the table header parameter lookup method is a small interval value, assume and The smaller value of , then Execute the two-dimensional matrix table step to obtain the matrix elements of the table lookup result; when the table header parameter lookup method is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then Execute the two-dimensional matrix table step to get the matrix elements of the table lookup result. If Greater than , then Execute the two-dimensional matrix table step to obtain the matrix elements of the table lookup result.
[0026] Preferably, the protocol parameters include a PLC set module and a write function set module. The PLC set module includes at least one PLC module. The PLC module includes basic parameters of the communication protocol and PLC write; the basic parameters of the communication protocol include protocol type, UDP / TCP, Client / Server, IP, port number, external device address, remarks, communication interval between adjacent frames, reply timeout time and number of reply timeouts; the protocol type is divided into custom format and specified protocol. The specified protocol includes ModbusTcp protocol, FinsTcp protocol, Mewtocol protocol, Melsec3E protocol, HostLink protocol and PCLinkSum protocol; the PLC write includes several write instruction items. When the PLC protocol type is different, the write instruction item parameters are different. If the PLC protocol type is a specified protocol type, the write instruction item includes name, layer number, etc. , function code, register address, register bit address, number of registers to be written, initial value, N numerical write items (N can be 0); if the PLC protocol type is a custom format type, the write instruction item includes name, data content type, request frame header, initial value, request frame tail, response frame tail, response frame length, check parameters, N numerical write items (N can be 0); the numerical write item parameters include start bit, change ratio, offset, write mode, data type, byte order, number of decimal places, and integer part string length; the check parameters include yes / no check, check type, check data, and check result; the write function set module includes several write function items, and the write function item parameters include function name, unit, and several write instruction items and additional actions; the additional action is to select several PLC write instruction items from the specified PLC and layer number, and synchronously send the instructions in the additional action when executing the function including the additional action.
[0027] Preferably, the system includes a battery detection device and an external connection device, wherein the battery detection device and the external connection device are connected wirelessly or by Ethernet, RS323, RS485, or CAN bus; the external connection device is at least one of a temperature box, a water cooler, a liquid cooler, and a pressure sensor; the battery detection device includes a client, a server, a database, a middle computer, and a lower computer, wherein each server is connected to several middle computers, each middle computer is connected to several lower computers, and each lower computer has several channels.
[0028] Based on the disclosure and teachings of the above description, those skilled in the art may also make appropriate changes and modifications to the above embodiments. Therefore, the present invention is not limited to the specific embodiments disclosed and described above, and any modifications and variations of the present invention should also fall within the scope of protection of the claims of the present invention. In addition, although certain specific terms are used in this description, these terms are only for convenience of description and do not constitute any limitation to the present invention.
Claims
1. A method for matrix control of external devices, characterized in that: The steps include: S1: Open the client software on the battery testing device, then open the protocol editor on the client software, open the protocol editor, edit the protocol parameters, and generate a protocol configuration file; S2: The protocol configuration file generated in step S1 is sent to the intermediate computer on the battery testing device and saved to the database. After receiving the protocol configuration file, the intermediate computer establishes communication with the external device according to the protocol configuration parameters; S3: The client software is equipped with a work step editor. Select the channel to be tested, open the work step editor, and automatically import the protocol configuration file sent to the intermediate computer where the channel to be tested is located to edit the work step process parameters and matrix configuration. The work step process parameters include a global variable set and matrix output external parameters. Specifically, when editing the global variables in the matrix configuration, select the target global variables from the global variable set; edit the matrix output external parameters. The matrix output external parameters contain several sub-items, each of which contains a matrix item and a write function item. The matrix item is selected from several matrix items in the matrix configuration, and the write function item selects the target write function item from the write function set module of the protocol configuration file. S4: After editing the work step process in step S3, click Start, and the client software packages the matrix output external parameters in the work step process, traverses the sub-items in the matrix output external parameters in turn, and then packages them accordingly according to the matrix type of the matrix items of the sub-items to obtain the linkage control instructions of each matrix element; specifically, when the matrix type of the matrix item of the sub-item is a one-dimensional matrix, first traverse the matrix elements of the one-dimensional table, and then traverse the several write instructions in the write function item of the sub-item, and package them with the values of the matrix elements; when the matrix type of the matrix item of the sub-item is a two-dimensional matrix, first traverse the matrix elements of the two-dimensional table, and finally traverse the several write instructions in the write function item of the sub-item, and package them with the values of the matrix elements; when the matrix type of the matrix item of the sub-item is a three-dimensional matrix, first traverse the two-dimensional matrix parameters of the three-dimensional table, then traverse the matrix elements of the two-dimensional table of the two-dimensional matrix parameters, and finally traverse the several write instructions in the write function item of the sub-item, and package them with the values of the matrix elements; S5: After the matrix output external parameters in step S4 are packaged, the client software sends the packaged data together with the work step process and the start test parameters to the server. The server forwards it to the intermediate computer, starts the channel, and starts the test. The channel performs charging, discharging, or resting according to the work step process. When executing the matrix output external parameter function, the table lookup step is executed periodically according to the table lookup time interval of the matrix sub-item. Specifically, when the matrix type of the matrix sub-item is a one-dimensional matrix, the one-dimensional matrix table lookup step is executed; when the matrix type of the matrix sub-item is a two-dimensional matrix, the two-dimensional matrix table lookup step is executed; when the matrix type of the matrix sub-item is a three-dimensional matrix, the three-dimensional matrix table lookup step is executed; the matrix elements of the table lookup result are obtained, and the intermediate computer of the battery testing device sends the linkage control instructions of the packaged matrix elements to the external linkage device. The external linkage device executes the corresponding instructions to complete the corresponding linkage control action; S6: The test ends when the working steps of the test channel are completed.
2. The method for controlling external devices by a matrix according to claim 1, characterized in that: The matrix configuration includes a plurality of matrix items, each of which includes a matrix name, a matrix type, a table lookup time interval, a one-dimensional matrix parameter, a two-dimensional matrix parameter, and a three-dimensional matrix parameter; Matrix types include one-dimensional matrix, two-dimensional matrix, and three-dimensional matrix.
3. The method for controlling external devices by a matrix according to claim 2, characterized in that: The one-dimensional matrix parameters include table header parameters and a one-dimensional table; the one-dimensional table includes header elements and matrix elements, the structure is ,in For the header element, is a matrix element, and the header element corresponds to the matrix element one by one; the two-dimensional matrix parameters include row header parameters, column header parameters and a two-dimensional table; the two-dimensional table includes row header elements, List header elements and matrix elements, the structure is ,in is the list head element, For the row header element, is a matrix element, a row header element and a column header element correspond to a matrix element; the three-dimensional matrix parameter includes a depth header parameter and a three-dimensional table; the three-dimensional table includes depth header elements and Two-dimensional matrix parameters, the structure is ,in is the depth table header element, It is a two-dimensional matrix parameter, and the depth header elements correspond one-to-one to the two-dimensional matrix parameters; the data structures of the header parameters, row header parameters, column header parameters and depth header parameters are consistent, all of which include table lookup methods and global variables.
4. The method for controlling external devices by a matrix according to claim 3, characterized in that: The table lookup method includes a larger interval value, a smaller interval value and a nearest value.
5. The method for controlling external devices by a matrix according to claim 1, characterized in that: The global variable set includes N (N is greater than 0) internal fixed variables, M (M is greater than 0) user-defined variables and S (S is greater than or equal to 0) external variables; the N internal fixed variables are variables defined and used by the battery testing equipment itself during the test process, and their values will be updated in real time during the test process, including voltage, current, capacity, energy, cycle number, step number, step time and total test process time; the M user-defined variables are variables set for user use, and their values will be updated only when set for use; the S external variables are variables automatically generated according to the communication protocol configuration of the battery BMS or temperature chamber or water cooler or liquid cooler or pressure sensor, and their values are parsed and updated in real time during the test process.
6. The method for controlling external devices by a matrix according to claim 1, characterized in that: The one-dimensional matrix table lookup step in step 5 includes the following steps: a) Get the value of the global variable of the header parameter, use express; b) In the header element Look for the value of In the interval, assuming In the interval [ , ]middle, Represents a header element The value of Represents a header element The value of the header element The corresponding matrix elements are , header element The corresponding matrix elements are ; c) Obtain the matrix elements of the table lookup result according to the table lookup method of the header parameter: When the lookup method of the header parameter is a large interval value, assuming and The larger value is , then the matrix elements of the table lookup result are ; When the lookup method of the header parameter is a small interval value, assuming and The smaller value of , then the matrix elements of the table lookup result are ; When the table lookup method of the header parameter is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then the matrix elements of the table lookup result are ,like Greater than , then the matrix elements of the table lookup result are .
7. The method for controlling external devices by a matrix according to claim 1, characterized in that: The two-dimensional matrix table lookup step in step 5 includes the following steps: 1) Get the value of the global variable of the list header parameter, use Indicates that the value of the global variable of the row header parameter is taken out, and express; 2) In the list header element Look for the value of In the interval, assuming In the interval [ , ]middle, Represents a header element The value of Represents a header element The value of the row header element Look for the value of In the interval, assuming In the interval [ , ]middle, Represents a header element The value of Represents a header element The value of the list head element and row header elements The corresponding matrix elements are , the list head element and row header elements The corresponding matrix elements are , the list head element and row header elements The corresponding matrix elements are , the list head element and row header elements The corresponding matrix elements are ; 3) Obtain the matrix elements of the table lookup result according to the table lookup method: When the table lookup method of the column header parameter is a large interval value, assuming and The larger value is , then the list head element is determined to be ; ① When the lookup method of the row header parameter is a large interval value, assume and The larger value is , then the row header element is determined to be , the matrix elements of the table lookup result are ; ② When the row header parameter lookup method is a small interval value, assume and The smaller value of , then the row header element is determined to be , the matrix elements of the table lookup result are ; ③ When the row header parameter lookup method is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then the row header element is determined to be , the matrix elements of the table lookup result are ,like Greater than , then the row header element is determined to be , the matrix elements of the table lookup result are ; When the lookup table method of the column header parameter is a small interval value, assuming and The smaller value of , then the list head element is determined to be ; ① When the lookup method of the row header parameter is a large interval value, assume and The larger value is , then the row header element is determined to be , the matrix elements of the table lookup result are ; ② When the row header parameter lookup method is a small interval value, assume and The smaller value of , then the row header element is determined to be , the matrix elements of the table lookup result are ; ③ When the row header parameter lookup method is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then the row header element is determined to be , the matrix elements of the table lookup result are ,like Greater than , then the row header element is determined to be , the matrix elements of the table lookup result are ; When the table lookup method of the column header parameter is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then the list head element is determined to be ; ① When the lookup method of the row header parameter is a large interval value, assume and The larger value is , then the row header element is determined to be , the matrix elements of the table lookup result are ; ② When the row header parameter lookup method is a small interval value, assume and The smaller value of , then the row header element is determined to be , the matrix elements of the table lookup result are ; ③ When the row header parameter lookup method is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then the row header element is determined to be , the matrix elements of the table lookup result are ,like Greater than , then the row header element is determined to be , the matrix elements of the table lookup result are ; like Greater than , then the list head element is determined to be ; ① When the lookup method of the row header parameter is a large interval value, assume and The larger value is , then the row header element is determined to be , the matrix elements of the table lookup result are ; ② When the row header parameter lookup method is a small interval value, assume and The smaller value of , then the row header element is determined to be , the matrix elements of the table lookup result are ; ③ When the row header parameter lookup method is to obtain the nearest value, Respectively and If the calculated difference Less than or equal to , then the row header element is determined to be , the matrix elements of the table lookup result are ,like Greater than , then the row header element is determined to be , the matrix elements of the table lookup result are .
8. The method for controlling external devices by a matrix according to claim 1, characterized in that: The three-dimensional matrix table lookup step in step 5 includes the following steps: 1) Get the value of the global variable of the depth table header parameter and use express; 2) In the depth table header element Look for the value of In the interval, assuming In the interval [ , ]middle, Represents the depth table header element The value of Represents a header element The value of the depth table header element The corresponding two-dimensional matrix parameters are , depth table header element The corresponding two-dimensional matrix parameters are ; 3) Obtain the matrix elements of the lookup result according to the lookup method of the depth table header parameter: When the lookup method of the header parameter is a large interval value, assuming and The larger value is , then Execute the two-dimensional matrix table step to obtain the matrix elements of the table lookup result; when the table header parameter lookup method is a small interval value, assume and The smaller value of , then Execute the two-dimensional matrix table step to obtain the matrix elements of the table lookup result; when the table header parameter lookup method is to obtain the nearest value, Respectively and Calculate the difference if Less than or equal to , then Execute the two-dimensional matrix table step to get the matrix elements of the table lookup result. If Greater than , then Execute the two-dimensional matrix table step to obtain the matrix elements of the table lookup result.
9. The method for controlling external devices by a matrix according to claim 1, characterized in that: The protocol parameters include a PLC set module and a write function set module. The PLC set module includes at least one PLC module. The PLC module includes basic communication protocol parameters and PLC write. The basic communication protocol parameters include protocol type, UDP / TCP, Client / Server, IP, port number, external device address, remarks, communication interval between adjacent frames, reply timeout time and reply timeout times. The protocol type is divided into a custom format and a specified protocol. The specified protocols include ModbusTcp protocol, FinsTcp protocol, Mewtocol protocol, Melsec3E protocol, HostLink protocol and PCLinkSum protocol. The PLC write includes several write instruction items. When the PLC protocol type is different, the write instruction item parameters are different. If the PLC protocol type is a specified protocol type, the write instruction item includes name, layer number, function, etc. Code, register address, register bit address, number of registers to be written, initial value, N numerical write items (N can be 0); if the PLC protocol type is a custom format type, the write instruction item includes name, data content type, request frame header, initial value, request frame tail, response frame tail, response frame length, check parameters, N numerical write items (N can be 0); the numerical write item parameters include start bit, change ratio, offset, write mode, data type, byte order, number of decimal places, and integer part string length; the check parameters include yes / no check, check type, check data, and check result; the write function set module includes several write function items, and the write function item parameters include function name, unit, and several write instruction items and additional actions; the additional action is to select several PLC write instruction items from the specified PLC and layer number, and synchronously send the instructions in the additional action when executing the function containing the additional action.
10. The matrix control system for external devices according to claim 1, characterized in that: The system comprises a battery detection device and an external connection device, wherein the battery detection device and the external connection device are connected wirelessly or by Ethernet, RS323, RS485 or CAN bus; the external connection device is at least one of a temperature box, a water cooler, a liquid cooler and a pressure sensor; the battery detection device comprises a client, a server, a database, a middle computer and a lower computer, wherein each server is connected to several middle computers, each middle computer is connected to several lower computers, and each lower computer has several channels.