CN115643160A - Data acquisition method, device, equipment and medium based on daisy chain communication - Google Patents

Data acquisition method, device, equipment and medium based on daisy chain communication Download PDF

Info

Publication number
CN115643160A
CN115643160A CN202211262119.7A CN202211262119A CN115643160A CN 115643160 A CN115643160 A CN 115643160A CN 202211262119 A CN202211262119 A CN 202211262119A CN 115643160 A CN115643160 A CN 115643160A
Authority
CN
China
Prior art keywords
reading
single sampling
data
chip
communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211262119.7A
Other languages
Chinese (zh)
Inventor
刘海洋
王小玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Changan New Energy Automobile Technology Co Ltd
Original Assignee
Chongqing Changan New Energy Automobile Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Changan New Energy Automobile Technology Co Ltd filed Critical Chongqing Changan New Energy Automobile Technology Co Ltd
Priority to CN202211262119.7A priority Critical patent/CN115643160A/en
Publication of CN115643160A publication Critical patent/CN115643160A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention discloses a data acquisition method based on daisy chain communication, which comprises the following steps: executing an initialization process on the single sampling chip in a first communication direction; reading data of the single sampling chip; acquiring a reading mode for reading the data of the single sampling chip at the current reading times every set data reading period; if the reading mode is unidirectional reading, the chip coded data is continuously and periodically read in the first communication direction; if the reading mode is bidirectional reading, performing identity identification reading operation on the single sampling chip in the first communication direction once in the last period of the set data reading period; resetting all the single sampling chips, and executing an initialization process on the single sampling chips in a first communication direction; and reading the data of the single sampling chip to finish the data acquisition. The method can be finished under the condition that the user does not sense, improves the stability and robustness of daisy chain communication, and simultaneously improves the accuracy of data acquisition and the experience of the user.

Description

Data acquisition method, device, equipment and medium based on daisy chain communication
Technical Field
The invention belongs to the technical field of battery management system controllers (BMS), and particularly relates to a data acquisition method, a data acquisition device, data acquisition equipment and a data acquisition medium based on daisy chain communication.
Background
With the development of BMS (Battery Management System) technology, it has become a trend that communication between cell sampling chips of a Battery Management System BMS is developed from CAN (Controller Area Network) communication to daisy chain communication, which has a great advantage in cost compared to CAN communication, but since the communication mode of the daisy chain communication is cascade communication, unlike broadcast communication of the CAN communication, after a failure occurs in a certain node of the daisy chain communication, the node and all data in the future cannot be obtained.
Patent application No. 2021102072841 provides a fault handling method for ring-shaped daisy chain communication of BMS, mainly providing a fault handling method for switching from one-way communication to ring-shaped communication after a fault occurs in daisy chain communication, which solves the problem of communication after daisy chain harness is disconnected from connection, but does not solve the problem of data collection in which daisy chain communication is restored from ring-shaped communication to one-way communication.
Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, the present invention provides a data acquisition method, apparatus, device and medium based on daisy chain communication, so as to solve the above technical problems.
The invention provides a data acquisition method based on daisy chain communication, which comprises the following steps:
performing an initialization process on single sampling chips in the daisy chain in a first communication direction;
after the initialization process is executed, periodically reading the data of the single sampling chip;
acquiring a reading mode for reading the data by the current reading times every other set data reading period, wherein the reading mode comprises one-way reading and two-way reading;
if the reading mode is unidirectional reading, the data is continuously and periodically read in the first communication direction;
if the reading mode is bidirectional reading, performing data reading operation on the single sampling chip in a first communication direction once in the last period of a set data reading period;
resetting all the single sampling chips, and executing an initialization process on the single sampling chips in the first communication direction;
and after the initialization process is executed, periodically reading the data of the single sampling chip to finish the data acquisition.
In an embodiment of the present invention, before resetting all the single sampling chips, a read operation is performed on the chip codes of the single sampling chips in the first communication direction, and when the read operation is normal, all the single sampling chips are reset.
In an embodiment of the present invention, the initialization process includes:
configuring chip codes of the single sampling chips;
and initializing a register of the single sampling chip.
In an embodiment of the present invention, the periodically reading the data of the single sampling chip includes:
configuring a register of the single sampling chip;
and reading the data of the single sampling chip.
In an embodiment of the present invention, the method further includes:
acquiring a first configuration frequency for configuring the chip codes of the single sampling chips or/and a communication state of the single sampling chips when the chip codes of the single sampling chips are subjected to one-time reading operation in a first communication direction;
and if the first configuration times exceed the second set value or the communication state of the single sampling chip is in a fault state, executing a communication fault handling process on the single sampling chip.
In an embodiment of the present invention, the communication failure handling process includes:
reconfiguring the registers of the single sampling chips, and acquiring second configuration times of successful configuration of the registers of the single sampling chips;
comparing the second configuration times with a third set value, and initializing bidirectional daisy chain configuration when the second configuration times exceed the third set value;
acquiring the chip codes of the single sampling chips, judging whether the chip codes of the single sampling chips are normal or not, and periodically reading the data of the single sampling chips if the chip codes are normal; if the chip code is abnormal, the initialization process is executed;
judging whether the initialization process is successfully executed or not, and if the initialization process is successfully executed, periodically reading the data of the monomer sampling chip; and if the execution fails, executing the initialization process for the single sampling chip again at least once.
In an embodiment of the present invention, when the second configuration time does not exceed the third set value or the number of times of executing the initialization procedure on the single sampling chip in the communication fault handling procedure does not exceed a fourth set value, the voltage information of the single sampling chip is an effective value of the last acquired voltage.
The invention provides a data acquisition device based on daisy chain communication, which comprises:
the first initialization module is used for executing an initialization process on the single sampling chips in the daisy chain in a first communication direction;
the first data acquisition module is used for periodically reading the data of the single sampling chip after the initialization process is executed;
the reading mode acquisition module is used for acquiring the reading mode of reading the data at the current reading times every set data reading period, and the reading mode comprises one-way reading and two-way reading;
the second data acquisition module is used for continuously and periodically reading the data in the first communication direction when the reading mode is unidirectional reading;
the third data acquisition module is used for performing data reading operation on the single sampling chip in the first communication direction once in the last period of the set data reading period when the reading mode is bidirectional reading;
the second initialization module is used for resetting all the single sampling chips and executing an initialization process on the single sampling chips in the first communication direction;
and the fourth data acquisition module is used for periodically reading the data of the single sampling chip after the initialization process is executed so as to complete the acquisition of the data.
The invention provides an electronic device, comprising:
one or more processors;
a storage device for storing one or more programs which, when executed by the one or more processors, cause the electronic device to implement the steps of the daisy chain communication based data collection method described above.
The present invention provides a computer-readable storage medium having stored thereon a computer program, which, when executed by a processor of a computer, causes the computer to perform the steps of the above-mentioned daisy chain communication based data acquisition method.
The invention has the beneficial effects that: the invention relates to a data acquisition method, a data acquisition device, data acquisition equipment and a data acquisition medium based on daisy chain communication, wherein the method comprises the following steps of: executing an initialization process on a single sampling chip in the daisy chain in a first communication direction; after the initialization process is executed, periodically reading the data of the single sampling chip; acquiring a reading mode for reading the data by the current reading times every other set data reading period, wherein the reading mode comprises one-way reading and two-way reading; if the reading mode is unidirectional reading, the data is continuously and periodically read in the first communication direction; if the reading mode is bidirectional reading, performing identity identification reading operation on the single sampling chip in a first communication direction once in the last period of a set data reading period; resetting all the single sampling chips, and executing an initialization process on the single sampling chips in the first communication direction; and after the initialization process is executed, periodically reading the data of the single sampling chip to finish the data acquisition. The invention provides a data acquisition method for daisy chain communication after problems occur in the power-on process and the operation process, which can be finished under the condition that a user does not sense, and improves the data acquisition accuracy and the user experience while improving the stability and the robustness of the daisy chain communication.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 is a schematic diagram of an implementation environment of a data acquisition method based on daisy chain communication according to an exemplary embodiment of the present application;
FIG. 2 is a flow chart illustrating a daisy chain communication based data collection method according to an exemplary embodiment of the present application;
FIG. 3 is a flow chart illustrating a communication failure handling flow in accordance with an exemplary embodiment of the present application;
FIG. 4 is a flow diagram illustrating a daisy chain communication based data collection device according to an exemplary embodiment of the present application;
FIG. 5 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the disclosure herein, wherein the embodiments of the present invention are described in detail with reference to the accompanying drawings and preferred embodiments. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, and are not intended to limit the scope of the present invention.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the drawings only show the components related to the present invention rather than being drawn according to the number, shape and size of the components in actual implementation, and the type, amount and proportion of each component in actual implementation can be changed freely, and the layout of the components can be more complicated.
In the following description, numerous details are set forth to provide a more thorough explanation of embodiments of the present invention, however, it will be apparent to one skilled in the art that embodiments of the present invention may be practiced without these specific details, and in other embodiments, well-known structures and devices are shown in block diagram form, rather than in detail, to avoid obscuring embodiments of the present invention.
Fig. 1 is a schematic diagram of an exemplary daisy chain communication-based data collection method implementation environment according to the present application. Referring to fig. 1, the embodiment environment includes a main controller MCU110, a first daisy chain communication conversion chip 120, a second daisy chain communication conversion chip 130, and a plurality of single sampling chips 140, wherein the main controller MCU110 and the single sampling chips 140 communicate with each other in a daisy chain manner.
The main controller MCU110 is used for operation processing of the battery management system BMS, and has functions of operation initialization, single sampling chip configuration, single sampling chip data reading, communication fault diagnosis, and the like;
the first daisy chain communication conversion chip 120 and the second daisy chain communication conversion chip 130 complete the conversion between Serial Peripheral Interface (SPI) communication and a daisy chain communication protocol, convert the SPI communication of the main controller MCU110 into the daisy chain communication that can be recognized by the single sampling chip 140, and convert the daisy chain communication of the single sampling chip 140 into the SPI communication that can be recognized by the main controller MCU 110; the single sampling chip 140 performs data acquisition and message reply functions according to instructions of the main controller MCU 110.
The n single sampling chips 140 are used for performing data acquisition and message reply according to the instruction of the main controller MCU 110; the N monomer sampling chips are respectively a monomer sampling chip 1, a monomer sampling chip 2, · · · · · · · · · · · ·, a monomer sampling chip N-1 and a monomer sampling chip N;
the main controller MCU110, the first daisy chain communication conversion chip 120, the single sampling chip 1, the single sampling chip 2, the single sampling chip N-1, the single sampling chip N and the second daisy chain communication conversion chip 130 are connected in sequence and end to form an annular daisy chain communication circuit, and the annular daisy chain communication circuit can realize bidirectional daisy chain communication and unidirectional daisy chain communication; during the unidirectional daisy chain communication, the first daisy chain communication conversion chip 120 or the second daisy chain communication conversion chip 130 is started, and the main controller MCU110 and the first daisy chain communication conversion chip/the second daisy chain communication conversion chip are used to periodically read the data of the single sampling chip. During bidirectional daisy chain communication, the first daisy chain communication conversion chip 120 and the second daisy chain communication conversion chip 130 are both started, and periodic reading is realized through the main controller MCU110, the first daisy chain communication conversion chip 120 and the second daisy chain communication conversion chip 130 to realize periodic reading of the data of the single sampling chip.
It should be noted that the one-way daisy-chain communication of the ring daisy-chain communication circuit includes a first communication direction and a second communication direction, the first communication direction may be defined as a forward communication direction, and the second communication direction may be defined as a reverse communication direction.
As shown in fig. 1, the forward communication direction is the main controller MCU → the second daisy chain communication conversion chip → the single sampling chip N-1 → 8230 \ 8230; → the single sampling chip 2 → the single sampling chip 1; the reverse communication direction is the main controller MCU → the first daisy chain communication conversion chip → the single sampling chip 1 → the single sampling chip 2 → the single sampling chip N-1 → the single sampling chip N.
In fig. 1, the main controller MCU110 executes an initialization procedure on the single sampling chips in the daisy chain in a first communication direction; after the initialization process is executed, periodically reading the data of the single sampling chip; acquiring a reading mode for reading the data by the current reading times every set data reading period, wherein the reading mode comprises one-way reading and two-way reading; if the reading mode is unidirectional reading, the data is continuously and periodically read in the first communication direction; if the reading mode is bidirectional reading, performing identity identification reading operation on the single sampling chip in a first communication direction once in the last period of a set data reading period; resetting all the single sampling chips, and executing an initialization process on the single sampling chips in a first communication direction; and after the initialization process is executed, periodically reading the data of the single sampling chip to finish the data acquisition. The invention provides a data acquisition method for daisy chain communication after problems occur in the power-on process and the operation process, which can be finished under the condition that a user does not sense, and improves the data acquisition accuracy and the user experience while improving the stability and the robustness of the daisy chain communication.
The daisy chain communication faults in the power-on process comprise chip coding faults for initializing and configuring the single sampling chips and register faults for initializing all the single sampling chips.
The daisy chain communication fault in the operation process refers to a fault which occurs when the initialization is successful but the data of the single sampling chip is periodically read.
The daisy chain communication fault diagnosis comprises chip coding fault diagnosis of the single sampling chip and register fault diagnosis of the single sampling chip. The chip coding fault diagnosis of the single sampling chip is to inquire the chip coding value after writing the chip coding value, and if the chip coding value is abnormal, the chip coding value is in fault; the failure diagnosis of the register of the sampling chip refers to inquiring a return value of a write state after the register value is written, and if the return fails, a failure occurs.
The daisy chain communication fault recovery refers to chip coding fault recovery of the single sampling chip and register fault recovery of the single sampling chip. The chip coding fault recovery of the single sampling chip refers to that a normal chip coding value can be inquired after the chip coding value is written in, and the register fault recovery of the single sampling chip refers to that the writing state is inquired successfully after the register value is written in.
It should be understood that the number of single sampling chips in fig. 1 is merely illustrative. Any number of single sampling chips may be provided according to actual needs.
Embodiments of the present application respectively provide a data acquisition method based on daisy chain communication, a data acquisition apparatus based on daisy chain communication, an electronic device, and a computer readable storage medium, and will be described in detail below.
Referring to fig. 2, fig. 2 is a flowchart illustrating a data collection method based on daisy chain communication according to an exemplary embodiment of the present application. The method may be applied to the implementation environment shown in fig. 1 and specifically executed by the terminal device 101 in the implementation environment. It should be understood that the method may be applied to other exemplary implementation environments and is specifically executed by devices in other implementation environments, and the embodiment does not limit the implementation environment to which the method is applied.
Referring to fig. 2, fig. 2 is a flowchart illustrating an exemplary data collection method based on daisy chain communication according to the present application, where the data collection method based on daisy chain communication at least includes steps S210 to S270, and the following steps are described in detail:
step S210, executing an initialization process on the single sampling chips in the daisy chain in a first communication direction;
step S220, after the initialization process is executed, periodically reading the data of the single sampling chip;
step S230, acquiring a reading mode for reading the data at the current reading times every set data reading period, wherein the reading mode comprises one-way reading and two-way reading;
step S240, if the reading mode is unidirectional reading, continuing to periodically read the data in the first communication direction;
step S250, if the reading mode is bidirectional reading, performing a data reading operation on the single sampling chip in a first communication direction in a last period of a set data reading period;
step S260, resetting all the monomer sampling chips, and executing an initialization process on the monomer sampling chips in the first communication direction to finish the data acquisition;
step S270, after the initialization process is executed, periodically reading the data of the single sampling chip to complete data acquisition.
The invention provides a data acquisition method after a problem occurs in the power-on process and the operation process of daisy chain communication, which can be finished under the condition that a user does not sense the problem, and improves the stability and robustness of the daisy chain communication, and meanwhile, the accuracy of data acquisition and the experience of the user are improved.
The following describes each step of the data collection method based on daisy chain communication according to the present embodiment in detail.
In step S210, an initialization procedure is performed on the single sampling chips in the daisy chain in the first communication direction.
The normal working mode flow of the daisy chain communication is as follows: after the BMS is powered on, firstly, chip Codes (CIDs) of all the single sampling chips are configured, then, registers of all the single sampling chips are initialized, and the initialization is completed.
In one embodiment, the initialization procedure includes:
configuring chip codes of the single sampling chips; and initializing a register of the single sampling chip.
It should be noted that after the chip codes of the single sampling chips are configured, it is required to detect whether the chip codes of all the single sampling chips are successfully configured, if all the chip codes are successfully configured, initialize the registers of the single sampling chips, and judge that the registers of the single sampling chips are successfully initialized.
In an embodiment, the method further comprises:
acquiring a first configuration frequency of chip codes for configuring the single sampling chip;
comparing the first configuration times with a second set value;
and when the first configuration times exceed the second set value, executing a communication fault handling process on the single sampling chip.
The second setting value may be 3 times, that is, when the initialization of the register of the single sampling chip fails, the chip code of the single sampling chip is reconfigured, if the first configuration is unsuccessful, the 2 nd configuration is performed, if the 2 nd configuration is unsuccessful, the 3 rd configuration is performed on the register of the single sampling chip, and if the 3 rd configuration is still unsuccessful, the communication fault handling procedure is performed on the single sampling chip. In this embodiment, the second setting value is not limited to 3 times, and those skilled in the art can flexibly set the second setting value according to actual needs, which is not further limited herein.
Step S220, after the initialization process is executed, periodically reading the data of the single sampling chip;
it should be noted that after the registers of all the single sampling chips are initialized successfully, data of the single sampling chips need to be acquired once, whether the acquisition is successful or not is judged, if the acquisition is successful, a subsequent acquisition task of periodically reading the data of the single sampling chips is executed, if the acquisition is failed, it is indicated that the communication state of the single sampling chips is in a fault state, and at this time, a communication fault handling process needs to be executed on the single sampling chips.
In one embodiment, the periodically reading the data of the single sampling chip includes:
configuring a register of the single sampling chip; and reading the data of the single sampling chip.
The task of periodically reading the data of the single sampling chip is completed by continuously and sequentially configuring the single sampling chip register and reading the data of the single sampling chip.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating the communication failure handling process according to an exemplary embodiment of the present application. In fig. 3, the communication failure processing flow includes:
step S310, reconfiguring a register of a single sampling chip, and acquiring a second configuration frequency for configuring the register of the single sampling chip;
step S320, comparing the second configuration frequency with a third setting value, and initializing bidirectional daisy chain configuration when the second configuration frequency exceeds the third setting value;
step S330, acquiring the chip code of the single sampling chip, judging whether the chip code of the single sampling chip is normal, and periodically reading the data of the single sampling chip if the chip code is normal; if the chip code is abnormal, the initialization process is executed;
step S340, judging whether the initialization process is successfully executed, and if the initialization process is successfully executed, periodically reading the data of the monomer sampling chip; and if the execution fails, executing the initialization process for the single sampling chip again at least once.
Specifically, when the first configuration number exceeds the second set value, or the communication state of the single sampling chip is in a fault state, the following steps are executed:
reconfiguring a register of a single sampling chip for at least one time; and when the configuration is completed, judging whether the configuration of the register of the single sampling chip is successful, if not, considering that a communication fault occurs, then continuously reconfiguring the register of the single sampling chip, and if so, periodically reading the data of the single sampling chip, wherein the data of the single sampling chip is the effective value of the single voltage information. However, if the number of times of reconfiguring the registers of the single sampling chip exceeds a third set value, the bidirectional daisy chain configuration is initialized, where the third set value may be 10 times, that is, if the number of times of reconfiguring the registers of the single sampling chip exceeds 10 times, the bidirectional daisy chain configuration is initialized. It should be noted that, in this embodiment, the third setting value is not limited to 10 times, and those skilled in the art can flexibly set the third setting value according to actual needs, and the third setting value is not further limited herein.
After initialization of bidirectional daisy chain configuration is completed, whether chip codes exist in the current single sampling chips or not is detected, if the chip codes exist, whether the chip codes of all the single sampling chips are normal or not is judged, if the chip codes are normal, the number of communication faults is eliminated, and then a flow of periodically reading the data of the single sampling chips is entered; if the identity identification is abnormal, adding 1 to a reinitialization counter, then awakening a single sampling chip through a daisy chain, resetting the single sampling chip through software, then executing an initialization process on the single sampling chip, if the initialization is successful, setting the initialization state to be 1, resetting the reinitialization counter, and resetting a communication overtime fault counter; if the initialization is unsuccessful, exiting the initialization and carrying out a new round of initialization operation; and if the reinitialization times exceed a fourth set value, confirming that the single sampling chip has a communication fault, and closing the data acquisition task of the single sampling chip at the moment. The fourth setting value is 30, that is, if the initialization is still unsuccessful for 30 times, it is determined that a communication fault occurs in the single sampling chip. It should be noted that, in this embodiment, the fourth setting value is not limited to 30 times, and those skilled in the art can flexibly set the fourth setting value according to actual needs, which is not further limited herein.
It should be further noted that, in the time period that the communication failure counter does not exceed 10 trials, the cell voltage information sent to the application layer maintains the effective value acquired at the last time; and initializing the bidirectional daisy chain configuration when the communication failure counter is more than 10 times. 30 times of initialization of bidirectional daisy chain configuration can be tried totally, when the number of times exceeds 30 times, the single sampling chip is confirmed to have communication fault, the data acquisition task of the single sampling chip is closed, after the communication fault is reported, the application layer carries out 1 minute power limiting processing, and high voltage is applied after 1 minute, so that the occurrence of overcharge and overdischarge of the battery is prevented; and in 30 times of reinitialization time, maintaining the effective value of the last acquisition of the cell voltage information sent to the application layer.
Step S230, acquiring a reading mode for reading the data at the current reading times every set data reading period, wherein the reading mode comprises one-way reading and two-way reading; step S240, if the reading mode is unidirectional reading, continuing to periodically read the data in the first communication direction; step S250, if the reading mode is bidirectional reading, performing a data reading operation on the single sampling chip in a first communication direction in a last period of a set data reading period; step S260, resetting all the monomer sampling chips, and executing an initialization process on the monomer sampling chips in the first communication direction; step S270, after the initialization process is executed, periodically reading the data of the single sampling chip to complete data acquisition.
After entering a data flow of periodically reading the single sampling chip, judging whether a current reading mode is a bidirectional reading mode every 20 periods, if so, not processing, and continuously and periodically reading the data of the single sampling chip;
if the single sampling chips are judged to be in the bidirectional reading mode, the operation of reading the identity marks of the single sampling chips in a forward direction is carried out once in 20 periods, if the identity marks of all the single sampling chips can be read normally, all the single sampling chips are reset in a bidirectional mode, and a unidirectional initialization process is started;
after all the single sampling chips are reset in a two-way mode, identity identification of the single sampling chips is configured in a forward direction, then a register of the single sampling chips is initialized, and data of the single sampling chips are read in the forward direction once; and if the data of the single sampling chip can be read normally, the data of the single sampling chip is read periodically to finish the data acquisition of the single sampling chip.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by functions and internal logic of the process, and should not limit the implementation process of the embodiments of the present invention in any way.
Fig. 4 is a block diagram illustrating a data acquisition device based on daisy chain communication according to an exemplary embodiment of the present application. The device can be applied to the implementation environment shown in fig. 1 and is specifically configured in the terminal equipment. The apparatus may also be applied to other exemplary implementation environments and specifically configured in other devices, and the embodiment does not limit the implementation environment to which the apparatus is applied.
As shown in fig. 4, the present application provides a data acquisition device based on daisy chain communication, the device comprising:
a first initialization module 410, configured to perform an initialization procedure on single sampling chips in the daisy chain in a first communication direction;
the first data acquisition module 420 is configured to periodically read data of the single sampling chip after the initialization process is executed;
a reading mode obtaining module 430, configured to obtain, every set data reading period, a reading mode in which the data is read for the current reading times, where the reading mode includes one-way reading and two-way reading;
the second data acquisition module 440 is configured to continue to periodically read the data in the first communication direction when the reading mode is unidirectional reading;
a third data acquisition module 450, configured to, when the reading mode is bidirectional reading, perform a data reading operation on the single sampling chip in the first communication direction in a last period of a set data reading period;
the second initialization module 460 is configured to reset all the single sampling chips, and execute an initialization procedure on the single sampling chips in the first communication direction;
the fourth data acquisition module 470 is configured to periodically read the data of the single sampling chip after the initialization process is executed, so as to complete data acquisition.
It should be noted that the data acquisition device based on daisy chain communication provided in the foregoing embodiment and the data acquisition method based on daisy chain communication provided in the foregoing embodiment belong to the same concept, and specific ways of each module and unit to perform operations have been described in detail in the method embodiment, and are not described again here. In practical applications, the data acquisition device based on daisy chain communication provided in the above embodiment may distribute the above functions to different functional modules according to needs, that is, divide the internal structure of the device into different functional modules to complete all or part of the above described functions, which is not limited herein.
An embodiment of the present application further provides an electronic device, including: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, enable the electronic device to implement the data collection method based on daisy chain communication provided in the above embodiments.
FIG. 5 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application. It should be noted that the computer system of the electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 5, the computer system includes a Central Processing Unit (CPU), which can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) or a program loaded from a storage portion into a Random Access Memory (RAM). In the RAM, various programs and data necessary for system operation are also stored. The CPU, ROM, and RAM are connected to each other via a bus. An Input/Output (I/O) interface is also connected to the bus.
The following components are connected to the I/O interface: an input section including a keyboard, a mouse, and the like; an output section including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section including a hard disk and the like; and a communication section including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section performs communication processing via a network such as the internet. The drive is also connected to the I/O interface as needed. A removable medium such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive as needed, so that the computer program read out therefrom is mounted into the storage section as needed.
In particular, according to embodiments of the present application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated in flowchart 2. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section, and/or installed from a removable medium. The computer program, when executed by a Central Processing Unit (CPU), performs various functions defined in the system of the present application.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer-readable signal medium may include a propagated data signal with a computer program embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
Another aspect of the present application also provides a computer-readable storage medium having stored thereon a computer program, which, when executed by a processor of a computer, causes the computer to execute the data acquisition method based on daisy chain communication as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist separately without being incorporated in the electronic device.
Another aspect of the application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data acquisition method based on daisy chain communication provided in the above embodiments.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Those skilled in the art can modify or change the above-described embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention are covered by the claims of the present invention.

Claims (10)

1. A data collection method based on daisy chain communication, the method comprising:
performing an initialization process on single sampling chips in the daisy chain in a first communication direction;
after the initialization process is executed, periodically reading the data of the single sampling chip;
acquiring a reading mode for reading the data by the current reading times every set data reading period, wherein the reading mode comprises one-way reading and two-way reading;
if the reading mode is unidirectional reading, the data is continuously and periodically read in the first communication direction;
if the reading mode is bidirectional reading, performing identity identification reading operation on the single sampling chip in a first communication direction once in the last period of a set data reading period;
resetting all the single sampling chips, and executing an initialization process on the single sampling chips in a first communication direction;
and after the initialization process is executed, periodically reading the data of the single sampling chip to finish the data acquisition.
2. The data acquisition method based on daisy chain communication according to claim 1, wherein a read operation is performed on the chip codes of the single sampling chips in the first communication direction before all the single sampling chips are reset, and all the single sampling chips are reset when the read operation is normal.
3. The daisy chain communication based data collection method of claim 1, wherein the initialization procedure comprises:
configuring chip codes of the single sampling chips;
and initializing a register of the single sampling chip.
4. The daisy chain communication based data collection method of claim 1, wherein the periodically reading the data of the single sampling chips comprises:
configuring a register of the single sampling chip;
and reading the data of the single sampling chip.
5. The daisy chain communication based data collection method of claim 2 further comprising:
acquiring a first configuration frequency for configuring the chip codes of the single sampling chips or/and a communication state of the single sampling chips when the chip codes of the single sampling chips are read once in a first communication direction before the data of the single sampling chips are periodically read;
and if the first configuration times exceed the second set value or the communication state of the single sampling chip is in a fault state, executing a communication fault handling process on the single sampling chip.
6. The daisy-chain communication based data collection method of claim 5, wherein the communication failure handling procedure comprises:
reconfiguring the register of the single sampling chip at least once again, and recording the configuration times of the reconfiguration at least once as second configuration times;
comparing the second configuration times with a third set value, and initializing bidirectional daisy chain configuration when the second configuration times exceed the third set value;
acquiring the chip codes of the single sampling chips, judging whether the chip codes of the single sampling chips are normal or not, and periodically reading the data of the single sampling chips if the chip codes are normal; if the chip code is abnormal, executing the initialization process;
judging whether the initialization process is successfully executed or not, and if the initialization process is successfully executed, periodically reading the data of the single sampling chip; and if the execution fails, executing the initialization process for the single sampling chip again at least once.
7. The daisy-chain communication based data collection method according to claim 6, wherein when the second configuration time does not exceed the third set value or the number of times of performing the initialization procedure on the single sampling chips in the communication fault handling procedure does not exceed a fourth set value, the voltage information of the single sampling chips is a valid value of the last collected voltage.
8. A data acquisition device based on daisy chain communication, the device comprising:
the first initialization module is used for executing an initialization process on the monomer sampling chips in the daisy chain in a first communication direction;
the first data acquisition module is used for periodically reading the data of the single sampling chip after the initialization process is executed;
the reading mode acquisition module is used for acquiring the reading mode of reading the data at the current reading times every set data reading period, and the reading mode comprises one-way reading and two-way reading;
the second data acquisition module is used for continuously and periodically reading the data in the first communication direction when the reading mode is unidirectional reading;
the third data acquisition module is used for performing data reading operation on the single sampling chip in the first communication direction once in the last period of the set data reading period when the reading mode is bidirectional reading;
the second initialization module is used for resetting all the single sampling chips and executing an initialization process on the single sampling chips in the first communication direction;
and the fourth data acquisition module is used for periodically reading the data of the single sampling chip after the initialization process is executed so as to complete the acquisition of the data.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device to store one or more programs that, when executed by the one or more processors, cause the electronic device to implement the steps of the daisy chain communication based data collection method of claim 8.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor of a computer, causes the computer to carry out the steps of the daisy chain communication based data acquisition method according to claim 8.
CN202211262119.7A 2022-10-14 2022-10-14 Data acquisition method, device, equipment and medium based on daisy chain communication Pending CN115643160A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211262119.7A CN115643160A (en) 2022-10-14 2022-10-14 Data acquisition method, device, equipment and medium based on daisy chain communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211262119.7A CN115643160A (en) 2022-10-14 2022-10-14 Data acquisition method, device, equipment and medium based on daisy chain communication

Publications (1)

Publication Number Publication Date
CN115643160A true CN115643160A (en) 2023-01-24

Family

ID=84944056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211262119.7A Pending CN115643160A (en) 2022-10-14 2022-10-14 Data acquisition method, device, equipment and medium based on daisy chain communication

Country Status (1)

Country Link
CN (1) CN115643160A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117319126A (en) * 2023-11-29 2023-12-29 宁德时代新能源科技股份有限公司 Chip power consumption control method, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117319126A (en) * 2023-11-29 2023-12-29 宁德时代新能源科技股份有限公司 Chip power consumption control method, device, computer equipment and storage medium
CN117319126B (en) * 2023-11-29 2024-04-02 宁德时代新能源科技股份有限公司 Chip power consumption control method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN101297256A (en) Data processing arrangement comprising a reset facility
CN110941218B (en) CAN bus controller test method
CN112953773B (en) Ring daisy chain communication fault processing method of BMS
CN115643160A (en) Data acquisition method, device, equipment and medium based on daisy chain communication
CN108923957B (en) Distribution network terminal DTU fault elimination method and device and terminal equipment
CN112996020A (en) Bluetooth-based automatic testing method and device and Bluetooth testing terminal
CN114089713A (en) Communication method based on UDS, ECU and upper computer
US20240045787A1 (en) Code inspection method under weak memory ordering architecture and corresponding device
CN109857190A (en) A kind of clock signal processing method, device, equipment and readable storage medium storing program for executing
CN110134598B (en) Batch processing method, device and system
CN111638871A (en) Equipment information processing method, device, equipment and medium
CN114548028B (en) Method for performing low-power design, electronic device and storage medium
CN115202949A (en) Chip signal monitoring device and method, computer equipment and storage medium
CN115476795A (en) Power management method and device and computer readable storage medium
CN112948013B (en) Application probe configuration method and device, terminal equipment and storage medium
CN105791514A (en) Application starting monitoring method and device
CN110147379B (en) Information acquisition method and device based on data lock and computer equipment
CN108805741B (en) Fusion method, device and system of power quality data
CN113190881B (en) Method and device for determining machine number of charging module and terminal equipment
CN100437495C (en) System and method for solving conflicts of locking up resources repeatedly
WO2014147446A1 (en) Data processing device, method of reporting predicate values, and data carrier
CN113103903B (en) Method for switching sequencing modes of charging modules and terminal equipment
CN215773156U (en) Ethernet development device
CN109597813B (en) Vehicle data processing method and device
CN115543378A (en) Data updating method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination