Data acquisition method, system and equipment for automatically identifying sensor module, medium and product
By automatically identifying the sensor module and sending synchronous trigger pulses for data acquisition, the problem of manual reconfiguration of sensor module replacement or layout adjustment in the prior art is solved, and the plug-and-play and automatic configuration of the data acquisition system is realized, which improves the flexibility of the system and the synchronization and reliability of the data.
Patent Information
- Application Number
- CN202411610726.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-25
AI Technical Summary
When the sensor module is replaced or layout adjustment, existing industrial data acquisition systems need to be manually reconfigured, which is time-consuming and labor-intensive and prone to configuration errors. The fixed polling method leads to inconsistent sampling moments, affecting the synchronization and accuracy of data.
The data acquisition method of the automatic identification sensor module is adopted. By detecting the acquisition identification ID message of the sensor module, the identification ID is sent to the target sensor module and the communication connection is performed, and then the synchronization trigger pulse is sent for data acquisition, and the data source is determined through the identification ID to obtain the collected data.
Automatic identification, connection and synchronous data acquisition of sensor modules are realized, tedious steps in manual configuration, improve system flexibility and maintainability, ensure data synchronization and reliability, and reduce maintenance costs and manual operation intensity.
Smart Images

Figure CN119689991A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of sensor control technology, and in particular to a data acquisition method, system, device, medium and product for automatically identifying a sensor module. Background Art
[0002] With the rapid development of industrial automation and intelligent manufacturing, higher requirements are placed on real-time data collection and monitoring in the production process. In modern industrial production, a large number of sensor modules are needed to monitor the equipment operation status, process parameters, etc. in real time to ensure the stability of the production process and the controllability of product quality.
[0003] At present, the data acquisition systems commonly used in industrial sites usually use a pre-configured method to identify sensor modules and collect data. When the system is initialized, the address information and acquisition parameters of each sensor module need to be manually set. The system accesses the sensor modules one by one according to a fixed polling sequence and collects data at preset time intervals. This data acquisition method has been widely used in industrial sites.
[0004] However, with the increasing flexibility of production lines, equipment layout and production processes often need to be adjusted, which requires the data acquisition system to be able to adapt to frequent sensor module replacement and layout changes. In the prior art, each time the sensor module layout is replaced or adjusted, the system configuration and parameter settings need to be re-performed. This process is not only time-consuming and labor-intensive, but also prone to configuration errors. At the same time, since data is collected in a fixed polling manner, when multiple sensor modules collect data at the same time, inconsistent sampling times may occur, affecting the synchronization and accuracy of the data. Summary of the invention
[0005] The main purpose of the present application is to provide a data acquisition method, system, device, medium and product for automatically identifying sensor modules, aiming to solve the technical problem of how to automatically configure multiple sensors for data acquisition.
[0006] To achieve the above-mentioned purpose, the present application proposes a data collection method for automatically identifying a sensor module, the data collection method for automatically identifying a sensor module comprising:
[0007] Detecting the acquisition identification ID message of the sensor module, the number of the sensor modules is several;
[0008] When the identification ID acquisition message is detected, the identification ID is sent to the target sensor module so that the target sensor module can be connected for communication;
[0009] Sending a synchronous trigger pulse to the target sensor module to collect data;
[0010] The data message carrying the identification ID is detected, the sensor module for collecting data is determined according to the message data, and the collected data is acquired.
[0011] In one embodiment, the step of detecting a data message carrying the identification ID, determining a sensor module for collecting data according to the message data, and obtaining the collected data, then includes:
[0012] Based on the identification ID, the online sensor module is controlled to be disabled, thereby stopping data collection.
[0013] In one embodiment, when the identification ID acquisition message is detected, the identification ID is sent to the target sensor module so that the target sensor module performs a communication connection step, specifically including:
[0014] According to the chip unique identifier in the identification ID message, a corresponding identification ID is selected from the identification ID library;
[0015] Generate an identification ID response message based on the preset CAN ID and the corresponding identification ID;
[0016] The identification ID response message is sent to the target sensor module, so that the target sensor module obtains the corresponding identification ID.
[0017] In one embodiment, the step of sending a synchronous trigger pulse to the target sensor module to collect data includes:
[0018] Generate a confirmation message based on the CAN ID, and send the confirmation message to all the target sensor modules;
[0019] The reply confirmation messages of all the target sensor modules are detected, and the target sensor module sending the reply confirmation message is confirmed as an online sensor module.
[0020] In one embodiment, the step of sending a synchronous trigger pulse to the target sensor module to perform data acquisition specifically includes:
[0021] Detecting the total number of channels of the online sensor module, and calculating a global sampling rate according to the total number of channels;
[0022] According to the global sampling rate, sending the synchronous trigger pulse to all the sensor modules, so that the sensor modules perform sampling according to the synchronous trigger pulse;
[0023] The sampling data message generated by the online sensor module according to the CAN ID and the identification ID is detected to obtain sampling data.
[0024] In addition, to achieve the above-mentioned purpose, the present application also proposes a data acquisition system for automatically identifying sensor modules, the data acquisition system for automatically identifying sensor modules comprising: a number of sensor interface modules, a control chip, a CAN level conversion module, and a synchronization signal driving module;
[0025] A plurality of the sensor interface modules are connected in series with each other and connected to the CAN level conversion module and the synchronization signal driving module, and the CAN level conversion module and the synchronization signal driving module are connected to the control chip;
[0026] The sensor interface module is a daisy chain topology, used to connect to several sensor modules;
[0027] The control chip is used to generate different identification IDs according to different sensor modules, send the identification IDs to a number of sensor modules, and control the sensor modules to perform data sampling;
[0028] The CAN level conversion module is used to convert differential signals and logic level signals into each other;
[0029] The synchronization signal driving module is used to improve the driving capability of the synchronization pulse signal.
[0030] In one embodiment, the synchronization signal driving module includes: a MOS tube driving chip, a MOS tube, a first resistor, a second resistor, a third resistor, a fourth resistor, a first capacitor and a TVS diode;
[0031] The input pin of the MOS tube driving chip is connected to the synchronous pulse signal output pin of the control chip, the output pin of the MOS tube driving chip is connected to the gate of the MOS tube, the power pin of the MOS tube driving chip is connected to the power supply, the ground pin of the MOS tube driving chip is connected to the ground, one end of the first resistor is connected to the output pin of the MOS tube driving chip, the other end of the first resistor is connected to the gate of the MOS tube, one end of the first capacitor is connected to the power pin of the MOS tube driving chip, the other end of the first capacitor is grounded, one end of the second resistor is connected to the drain of the MOS tube, the other end of the second resistor is grounded, one end of the three resistors is connected to the gate of the MOS tube, the other end of the third resistor is connected to the source of the MOS tube, the source of the MOS tube is connected to the power supply, one end of the fourth resistor is connected to the input pin of the MOS tube driving chip, the other end of the fourth resistor is connected to the ground pin of the MOS tube driving chip, one end of the TVS diode is connected to the drain of the MOS tube, and the other end of the TVS diode is grounded.
[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes a data acquisition device for automatically identifying a sensor module, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the data acquisition method for automatically identifying a sensor module as described above.
[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the data acquisition method for automatically identifying the sensor module as described above are implemented.
[0034] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the data acquisition method for automatically identifying a sensor module as described above are implemented.
[0035] One or more technical solutions proposed in this application have at least the following technical effects:
[0036] First, the system of this application is in a detection state, and monitors in real time whether there is a sensor module sending a message request for obtaining an identification ID. When a message for obtaining an identification ID sent by a sensor module is detected, the system will assign and send a unique identification ID to the target sensor module, so that the sensor module can establish a communication connection with the system. After the connection is established, the system simultaneously sends a synchronous trigger pulse to the sensor module to trigger it to collect data. During the data collection process, the system continuously detects data messages carrying an identification ID, determines the sensor module of the data source through the identification ID, and obtains the corresponding collected data. The entire process realizes the automatic identification, connection and synchronous data collection of the sensor module.
[0037] In the embodiment of the present application, due to the adoption of an automatic identification mechanism based on obtaining an identification ID message, the sensor module can autonomously initiate an identification request and obtain a unique identifier in a single acquisition task, and realize synchronous sampling of multiple sensor modules through a synchronous trigger pulse, so there is no need to manually pre-configure the address information of the sensor module, and the identification, connection and synchronous data acquisition process of the sensor module can be automatically completed, effectively solving the problem that the traditional data acquisition system needs to manually configure parameters and needs to be reset for sampling when the sensor module is replaced. Then the plug-and-play and automatic configuration of the data acquisition system are realized, which greatly improves the flexibility and maintainability of the system and ensures the synchronization and reliability of the collected data. This automatic identification and synchronous acquisition scheme not only significantly reduces the maintenance cost and manual operation intensity of the system, but also improves the efficiency and accuracy of data acquisition and reduces the possibility of human configuration errors. At the same time, the automatic identification mechanism of the system makes the layout adjustment of the sensor module easier and enhances the scalability of the system, which is particularly suitable for industrial field applications that require frequent adjustment of the sensor layout or sensor replacement. In addition, the consistency of the sampling time of multiple sensor modules is ensured by the synchronous trigger pulse, the timing accuracy of the collected data is improved, and a reliable data basis is provided for subsequent data analysis and processing, further enhancing the practical value of the entire data acquisition system. The technical problem of how to automatically configure multiple sensors for data collection is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] 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 present application.
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0040] Figure 1 A flowchart of a first embodiment of a method for automatically identifying a sensor module in accordance with the present invention;
[0041] Figure 2 A flow chart of the second embodiment of the data collection method for automatically identifying a sensor module of the present application;
[0042] Figure 3 A circuit diagram provided for the third embodiment of the data collection method for automatically identifying a sensor module of the present application;
[0043] Figure 4Another circuit diagram provided for the third embodiment of the data collection method for automatically identifying a sensor module of the present application;
[0044] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the data collection method for automatically identifying sensor modules in the embodiment of the present application.
[0045] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
[0046] Description of Figure Numbers:
[0047] DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0049] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0050] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes the data acquisition system for automatic identification of sensor modules as an example to illustrate this embodiment and the following embodiments.
[0051] Based on this, the present application embodiment provides a data collection method for automatically identifying a sensor module, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the data collection method for automatically identifying a sensor module of the present application.
[0052] Step S10, detecting the acquisition identification ID message of the sensor module, wherein the number of the sensor modules is several;
[0053] Among them, the sensor module refers to the sensing unit used to collect various types of data, which can be a temperature sensor, pressure sensor, vibration sensor and other types. The Get Identification ID message refers to the data packet sent by the sensor module to request to obtain the unique identifier, which contains the chip unique identification code, sensor type, module type and expected identification ID of the sensor module. Several means that the system can access multiple sensor modules at the same time.
[0054] Sensor identification is required when the system is powered on or a new sensor module is connected. Specifically, the system will continuously monitor whether there is a sensor module on the CAN bus that sends a message to obtain the identification ID. When a new sensor module is connected to the system, the sensor module will automatically send a message to the system to obtain the identification ID, which contains its own chip unique identification code, sensor type, module type, and expected identification ID, etc., to request the system to assign a unique identification ID.
[0055] In some embodiments, the detection process of the sensor module can be implemented in a variety of ways:
[0056] Optionally, the controller enters the cyclic detection mode after startup and scans the CAN bus regularly through the timer. First, configure the filter parameters of the CAN controller and set the ID range for receiving the ID message. Then read the CAN receive buffer in each scanning cycle to check whether there is a new message. If a new message is found, parse the message content to determine whether it is an ID message. Finally, notify the upper layer handler of the detection result.
[0057] Optionally, the interrupt trigger mode is used for detection. First, configure the interrupt enable of the CAN controller. When a new message appears on the bus, the receive interrupt is triggered. In the interrupt service program, the message content is read and the type is determined to confirm whether it is an ID acquisition message. If it is the target message type, the chip identification code and other information in the message are extracted and saved, and the detection flag is set to notify the main program to process.
[0058] It is understandable that other methods may be used to implement the detection of sensor module messages, such as a state machine-based detection method or a multi-level buffer detection mechanism, which is not limited here.
[0059] Step S20, when the identification ID acquisition message is detected, the identification ID is sent to the target sensor module to enable the target sensor module to establish a communication connection;
[0060] The target sensor module refers to the specific sensor module that currently sends the identification ID message. The identification ID refers to the unique identifier assigned by the system to each sensor module, which is used to distinguish different sensor modules in subsequent communications. The communication connection refers to the reliable data transmission channel established between the sensor module and the control system.
[0061] When the system detects the acquisition of the identification ID message, it needs to assign an identification ID to the corresponding sensor module and establish a communication connection. Specifically, the system first parses the chip unique identification code, sensor type, module type, and expected identification ID in the identification ID message, and then selects an unoccupied identification ID from the pre-defined identification ID library. The system encapsulates the selected identification ID into a response message and sends it to the target sensor module. It should be noted that the identification ID is only for a single acquisition task. At the beginning of each acquisition task, the identification ID will be reallocated, but the same sensor module identification ID will be kept unchanged. After receiving the identification ID, the sensor module will save the ID and use it for subsequent data communication. When the successfully connected sensor is present on a display device such as a display screen, the obtained identification ID will be displayed on the display screen at the same time, so that the user can identify the source of the collected data according to different identification IDs.
[0062] In some embodiments, the identification ID assignment and connection process can be implemented in a variety of ways:
[0063] Optionally, the system maintains an identification ID usage status table to record the allocation of each available identification ID. When a new identification ID needs to be allocated, first traverse the status table to find an unused identification ID. Then establish a mapping relationship between the identification ID and the chip identification code of the sensor module and save it. Finally, construct a response message containing the identification ID and send it to the target sensor module via the CAN bus.
[0064] Optionally, a dynamic allocation method is used, and the system calculates the currently available identification ID range in real time. First, the number of allocated identification IDs is obtained, and a new identification ID is generated according to the preset rules. Then the validity and uniqueness of the identification ID are verified to ensure that there is no conflict with the allocated ID. Finally, the identification ID is encoded into a response message and sent to the sensor module, and the allocation information is recorded in the local database.
[0065] It is understandable that other methods may be used to implement the allocation of identification IDs and the establishment of connections, such as a priority-based allocation method or a group management connection mechanism, which are not limited here.
[0066] Step S30, sending a synchronous trigger pulse to the target sensor module to collect data;
[0067] The synchronous trigger pulse represents a timing signal used to control multiple sensor modules to start sampling at the same time. Data acquisition refers to the process of obtaining the measurement value of physical quantity according to the set sampling rate by the sensor module.
[0068] After completing the sensor module identification and connection, the system needs to coordinate all online sensor modules for synchronous data acquisition. Specifically, first count the total number of channels of all online sensor modules, and calculate the appropriate global sampling rate based on the system bandwidth and requirements. Then generate a synchronous trigger pulse signal with a fixed period and send it to all online sensor modules simultaneously through the synchronous signal line. After each sensor module receives the synchronous trigger pulse, it will immediately start data acquisition at the set sampling rate.
[0069] In some embodiments, the synchronous data collection process can be achieved in a variety of ways:
[0070] Optionally, a timer-based synchronous triggering method is used. First, the frequency division coefficient and count value of the timer are configured to generate periodic interrupts that meet the sampling rate requirements. In the timer interrupt service program, the synchronous trigger signal line is first set high, and then set low after a preset high-level holding time to form a pulse signal with a fixed width. Finally, the pulse signal is sent to all sensor modules through the synchronous signal driving circuit to achieve sampling synchronization.
[0071] Optionally, a dedicated synchronous controller chip is used to implement the system. First, the calculated sampling rate parameters are configured in the synchronous controller. The phase-locked loop circuit inside the synchronous controller generates a stable clock signal, and the synchronous pulse of the required frequency is obtained through the frequency division circuit. Then, the driving ability of the signal is improved through the driving amplifier circuit, and finally the synchronous signal is transmitted to each sensor module simultaneously through the daisy chain method.
[0072] It is understandable that other methods may be used to achieve synchronous triggering and data collection, such as a synchronization method based on GPS timing or a collection mechanism of multi-level synchronization signal distribution, which is not limited here.
[0073] Step S40, detecting a data message carrying the identification ID, determining a sensor module for collecting data according to the message data, and acquiring the collected data;
[0074] Among them, the data message refers to the data packet sent by the sensor module after collecting data. The message data refers to the sampling data, timestamp and other information contained in the data message. The collected data refers to the physical quantity value measured by the sensor module. The identification ID is used to identify the specific sensor module that sends the data message. The timestamp indicates the specific time of data collection.
[0075] After the sensor module completes data collection, it is necessary to obtain the collection results in a timely manner and determine the source of the data. Specifically, the system continuously monitors the data messages on the CAN bus. When a new data message is received, it first parses the identification ID field in the message to confirm the sensor module of the data source. Then it extracts the sampling data, timestamp and other information in the message, and parses and stores these data in a predetermined format for subsequent data processing and analysis.
[0076] In some embodiments, the detection and processing of data packets can be implemented in a variety of ways:
[0077] Optionally, the data message is processed in a polling manner, and the system periodically checks whether there is new data in the CAN receive buffer. When a new data message is found, the integrity and correctness of the message are first verified. Then the message header is parsed to obtain the identification ID, and the sensor information table is queried to determine the source of the data. Finally, the sampling data and time information are extracted from the message payload, and the parsed data is stored in the corresponding data buffer.
[0078] Optionally, use interrupt mode to process data messages and configure the receive interrupt enable of the CAN controller. When a data message is received, the interrupt handler is triggered. First, the message data is copied to the local buffer. Then, the message format is parsed in the interrupt service program to extract the identification ID and sampled data. Finally, the corresponding sensor module information is found according to the identification ID, and the sampled data is associated with the correct data channel.
[0079] It is understandable that other methods may be used to implement data message detection and processing, such as a DMA-based data transmission method or a multi-level data cache processing mechanism, which are not limited here.
[0080] In general, due to the adoption of the automatic identification mechanism based on obtaining the identification ID message, the sensor module can autonomously initiate an identification request and obtain a unique identifier, and realize the synchronous sampling of multiple sensor modules through the synchronous trigger pulse, so there is no need to manually pre-configure the address information of the sensor module, and the identification, connection and synchronous data acquisition process of the sensor module can be automatically completed, which effectively solves the problem that the traditional data acquisition system needs to manually configure parameters and needs to re-set sampling when the sensor module is replaced. In addition, the plug-and-play and automatic configuration of the data acquisition system are realized, which greatly improves the flexibility and maintainability of the system and ensures the synchronization and reliability of the collected data. This automatic identification and synchronous acquisition scheme not only significantly reduces the maintenance cost and manual operation intensity of the system, but also improves the efficiency and accuracy of data acquisition and reduces the possibility of human configuration errors. At the same time, the automatic identification mechanism of the system makes the layout adjustment of the sensor module easier and enhances the scalability of the system, which is particularly suitable for industrial field applications that require frequent adjustment of the sensor layout or sensor replacement. In addition, the synchronous trigger pulse ensures the consistency of the sampling time of multiple sensor modules, improves the timing accuracy of the collected data, provides a reliable data basis for subsequent data analysis and processing, and further enhances the practical value of the entire data acquisition system. The technical problem of how to automatically configure multiple sensors for data collection is solved.
[0081] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 Based on the first embodiment, this embodiment provides a more specific data collection method for automatically identifying the sensor module, as follows:
[0082] Step S201, detecting a sensor module to obtain an identification ID message, wherein the number of the sensor modules is a plurality;
[0083] This step may refer to step S10 and will not be described in detail here.
[0084] Step S202, selecting a corresponding identification ID from an identification ID library according to the chip unique identifier in the identification ID acquisition message;
[0085] In this embodiment, the following CAN ID provisions are made:
[0086] Use CAN ID 0x000 as the broadcast frame ID, called BROADCAST_FRAME_ID;
[0087] Use CAN ID 0x001 as the confirmation frame ID, called PING_ID;
[0088] Use CAN ID 0x002 as the request identification ID frame ID, called REQUEST_ID;
[0089] Use CAN ID 0x003 as the reply request identification frame ID, called DISTRIBUTE_ID;
[0090] Use CAN ID 0x004 as the reply confirmation frame ID, called RES_PING_ID;
[0091] Use CAN ID 0x100 as the sensor frame ID for sending sensor data, called SENSOR_DATA_ID_OFFSET;
[0092] Use CAN ID 0x200 as the sensor control frame ID to control the sensor, configure parameters and functions, called SENSOR_CONTROL_ID_OFFSET;
[0093] Use CAN ID 0x300 as the multi-channel sensor data frame ID for sending multi-channel sensor data, called MULTI_DATA_ID_OFFSET;
[0094] Regulation: The name _OFFSET suffix indicates this offset regulation, which means CAN ID = this offset + identification ID. For example, when a module with identification ID 0x3B sends sensor data, the CAN ID should be 0x13B; the CAN ID for receiving control messages is 0x23B; when a module with multiple SIDs (channels) sends data, MULTI_DATA_ID_OFFSET should be selected. Assuming the starting identification ID is 0x3B, the CAN ID for sending data is 0x33B.
[0095] In this way, it is possible to control the sensor, enable or disable a specific sensor module in a certain sampling task, or configure its sampling rate individually, or set parameters such as the sensor range and amplification factor.
[0096] When using the interface communication of the present invention, the identification ID is used as the communication object identification instead of the CAN ID in the CAN communication. Before obtaining the identification ID, the sensor module can only use the REQUEST_ID communication, and carry the 96-bit (12-byte) unique identification carried by the chip when it leaves the factory in the content. The RES_PING_ID frame replied by the host uses the chip unique identification in the REQUEST_ID frame to specify the allocation object of the identification ID allocated this time. This can avoid the misallocation of the identification ID.
[0097] It should be noted that the CAN bus can be used for communication in this solution, but during the communication process, some data segments of messages exceeding 8 bytes need to carry a preset CAN ID with a preset sequence identifier to be segmented and sent multiple times. For example, to obtain the identification ID message, the chip unique identifier is 12 bytes long, and CAN ID 0x002 is defined as the request identification ID frame ID, called REQUEST_ID; in the data segment of the message, the first byte is the message data sequence, starting from 0, and this protocol defines a total of 4 sequences, 0, 1, 2, and 3. Each sequence carries 7 bytes of data, for a total of 28 bytes. Of these 28 bytes, the first 12 bytes are the 96-bit (12-byte) unique identifier carried by the chip when it leaves the factory, and the subsequent bytes are information such as module type, sensor type, expected SID, protocol version, etc.
[0098] Preferably, the problem of short single message byte length of the CAN communication bus can also be solved by adopting the FDCAN communication bus.
[0099] When the sensor module is powered on or needs to reacquire the communication identification ID, it will actively send a request identification ID message. The system will execute this step after detecting the message. Specifically, the system first receives the request message with REQUEST_ID as CANID through the CAN bus, verifies the validity of the message, and parses the key information contained in the message, such as the chip unique identifier, sensor type, module type, expected identification ID and number of channels. Then the system will first query the historical allocation record of the identification ID pool according to the chip unique identifier to determine whether the sensor module has been assigned an identification ID. If a historical allocation record is found, the previously assigned identification ID will be reused first to maintain the consistency of the system configuration. If it is a sensor module connected for the first time, the system will comprehensively consider factors such as sensor type, module type, number of channels, etc., combined with the expected identification ID proposed by the sensor module, and select the most suitable idle identification ID from the identification ID pool. During the selection process, the system will ensure that the selected identification ID will not conflict with the identification ID of other sensor modules in the current system, and will meet the expected value of the sensor module as much as possible to optimize the communication efficiency of the system, and also allow users to identify the source of the collected data.
[0100] Step S203, generating an identification ID response message based on the preset CAN ID and the corresponding identification ID;
[0101] The preset CAN ID refers to a communication identifier predefined by the system for identifying the message type and priority. The identification ID response message refers to a response message generated by the system containing the identification ID information assigned to the sensor module. The message format refers to the data frame structure and field definition specified in the CAN communication protocol.
[0102] When the system completes the selection of the identification ID and needs to notify the sensor module of the allocation result, this step is executed. Specifically, the system first sets DISTRIBUTE_ID to the CAN ID of the response message. This specific ID value is used to identify that this is a response message assigned by an identification ID. The system then constructs the data segment according to the predefined message format and places the sensor module's chip unique identifier at the beginning of the data segment, which ensures that the sensor module can recognize the response message for itself. Then the assigned identification ID is placed in the specified position of the data segment, and the correct data length code (DLC) is set according to the requirements of the CAN protocol. The system also calculates the necessary checksum value and adds it to the end of the message to ensure the reliability of data transmission. During the message encapsulation process, the system strictly follows the specifications of the CAN protocol to ensure that the generated message format meets the protocol requirements and can be correctly parsed by the sensor module.
[0103] Step S204, sending the identification ID response message to the target sensor module, so that the target sensor module obtains the corresponding identification ID;
[0104] The target sensor module refers to the sensor module that currently requests to obtain the identification ID. The identification ID response message sending process indicates the process of the system transmitting the message to the sensor module through the communication interface. Obtaining the corresponding identification ID indicates that the sensor module successfully receives and configures the identification ID assigned by the system.
[0105] This step is performed when the identification ID response message is generated and the message needs to be reliably sent to the target sensor module and ensure that it is correctly configured. Specifically, the system first checks the status of the CAN bus to ensure that the communication channel is in normal working condition. Then the system sends the response message carrying the chip unique identifier and the assigned identification ID through the CAN bus. Since the CAN bus is a broadcast communication, all nodes connected to the bus can receive the message, but only the target sensor module with a matching chip unique identifier will process the message. After receiving the message, the sensor module will first verify whether the chip unique identifier in the message is consistent with itself and confirm that this is the configuration information for itself. After the verification is passed, the sensor module extracts the assigned identification ID from the message and writes it to the specified area of the Flash memory. To ensure the reliability of the data, the writing process usually includes a backup and verification mechanism. After the storage is completed, the sensor module will immediately update its communication configuration and use the newly assigned identification ID for subsequent data interaction. The system will monitor the subsequent communication behavior of the sensor module to confirm that the identification ID has been correctly configured and applied.
[0106] Step S205, generating a confirmation message based on the CAN ID, and sending the confirmation message to all the target sensor modules;
[0107] Among them, the confirmation message refers to the communication message used by the acquisition host to confirm the online status of the sensor module. CANID refers to the communication identifier used to identify the message type and priority. The target sensor module refers to the sensor module to be confirmed that has completed the identification ID allocation. Sending refers to the process of transmitting the message to the target device through the CAN bus. Generating refers to the process of constructing the message content according to the predefined format. The content of the confirmation message is used to indicate the sensor status information that the system wants to confirm. Sending to all target sensor modules means transmitting the message to all sensor modules that have completed the identification ID configuration in a broadcast manner.
[0108] This step is executed when the system needs to confirm the working status of the current online sensor module. Specifically, the system first accesses the identification ID pool to obtain all recorded online sensor module information, including its identification ID, type and other configuration data. Then the system uses the preset PING_ID as the CAN identifier to construct a confirmation message containing the necessary parameters. The data field of the message may contain information such as timestamp and serial number, which is used to uniquely identify this confirmation operation. The system sends the constructed confirmation message through the CAN bus, and all online sensor modules can receive the message. The system monitors the sending process of the confirmation message to ensure that the message is correctly transmitted to the bus.
[0109] Step S206: detecting reply confirmation messages from all the target sensor modules, and confirming the target sensor module that sends the reply confirmation message as an online sensor module.
[0110] Among them, the reply confirmation message refers to the response message sent by the sensor module after receiving the confirmation message. Detection refers to the process of the system monitoring and receiving messages on the CAN bus. The online sensor module refers to the sensor module that is currently working normally and can communicate data with the system. Confirmation refers to the process of the system marking the sensor module as online. The target sensor module that sends the reply confirmation message refers to the sensor module that responds to the confirmation message.
[0111] This step is performed when the system needs to count and confirm the sensor modules that are actually online after sending the confirmation message. Specifically, the system first continuously monitors the CAN bus within the preset response waiting time and receives the response message sent by the sensor module with RES_PING_IDPING as the CAN ID. For each response message received, the system will parse the sensor identification information, response time, and status data contained therein. The system matches the information in the response message with the record in the identification ID pool to confirm the validity of the response source. For sensor modules that successfully respond to the confirmation message, the system will update its status information in the identification ID pool, including parameters such as the last response time and communication quality. If some previously online sensor modules fail to respond to the confirmation message within the expected time, the system will mark them as possibly offline and may initiate additional confirmation mechanisms.
[0112] Step S207, detecting the total number of channels of the online sensor module, and calculating the global sampling rate according to the total number of channels;
[0113] Among them, online sensor modules refer to sensor modules that have been confirmed to be able to communicate normally. The total number of channels refers to the sum of the sampling channels of all online sensor modules. Channels refer to the input ports of sensor modules used to collect physical quantities. Global sampling rate refers to the data collection frequency that is uniformly coordinated by the system. Detection refers to the process of the system acquiring and counting channel information. Calculation refers to the process of determining the appropriate sampling rate based on system resources and the number of channels. Calculation based on the total number of channels refers to the process of optimizing the sampling rate based on the overall collection load of the system.
[0114] This step is performed when the system needs to accurately count the number of currently available acquisition channels after completing the online status confirmation. Specifically, the system first checks the list of all online modules that have responded and reads the channel configuration information of each module. Then the system accumulates the number of channels of all normal response modules to obtain the current total number of channels of the system. The system will save this updated total number of channels in the configuration database as the basis for subsequent sampling parameter calculations. If the number of channels of some modules is found to have changed, the system will record relevant log information for subsequent analysis and maintenance.
[0115] Step S208, sending the synchronous trigger pulse to all the sensor modules according to the global sampling rate, so that the sensor modules perform sampling according to the synchronous trigger pulse;
[0116] Among them, the synchronous trigger pulse represents the timing signal used to coordinate the synchronous sampling of all sensor modules. The global sampling rate refers to the unified data acquisition frequency of the system. Sending represents the process of the system transmitting the trigger signal through the communication bus. According to the global sampling rate, it represents the process of generating the trigger signal according to the calculated sampling frequency. Sampling represents the process of the sensor module obtaining the measurement value of the physical quantity.
[0117] After the system obtains accurate channel statistics, it first calculates the data throughput at different sampling rates based on the total number of channels and the data bit width of each channel, and selects a suitable global sampling rate considering the processing power, storage speed, and communication bandwidth of the hardware platform. The system configures the selected sampling rate to the synchronous pulse signal generator to generate trigger pulses of the corresponding frequency. In this process, the system calculates the total communication bandwidth (bus load) required for the current online sensor module to collect data, and determines the highest global sampling rate under the constraint of not exceeding the preset maximum acceptable load rate of the CAN bus (such as 90%). During the entire sampling process, the system continuously monitors the access of new sensor modules. When a new sensor is detected to send an ID acquisition message, the system will pause the current sampling, rescan and confirm all online sensor modules, and then recalculate the bus load after considering the newly added sensor, and adjust the global sampling rate if necessary to ensure that the bus load does not exceed the threshold. After determining the sampling rate, the system sends a synchronous trigger pulse to all sensor modules according to the global sampling rate, so that all online sensor modules can synchronously sample data, thereby realizing the plug-and-play feature of the system and ensuring the reliability of data acquisition.
[0118] Step S209, detecting the sampling data message generated by the online sensor module according to the CAN ID and the identification ID to obtain sampling data;
[0119] Among them, the sampling data message refers to the communication packet of the sensor module transmitting the collected data. The sampling data refers to the digital value of the physical quantity collected by the sensor. The detection refers to the process of the system receiving and processing the data message. The generation refers to the process of the sensor module encapsulating the data in the specified format.
[0120] This step is performed when the system starts sending synchronous trigger pulses and needs to receive and process the data collected by the sensor. Specifically, the system monitors the data messages sent by the sensor module, which are generated by adding the module's identification ID to the CAN ID SENSOR_DATA_ID_OFFSET. The system can identify the source and type of data through the identification ID. For each data message received, the system will parse the sampling time, channel data and other information contained therein. The system will verify the validity of the data, including checking the timing relationship, data format, etc., to ensure the accuracy of the collected data.
[0121] Step S210, controlling the online sensor module to be disabled based on the identification ID, thereby stopping data collection;
[0122] Among them, disabling means the control operation that stops the sensor module from working. Stopping data collection means terminating the sampling process of the sensor module. Control based on identification ID means the process of selective operation of the system through module identification.
[0123] This step is executed when the system receives an instruction to stop the operation of a specific sensor module, or the system itself needs to terminate data collection of certain modules. Specifically, the system first generates a message for sending a control command based on the identification ID of the target sensor and SENSOR_CONTROL_ID_OFFSET. The system then constructs a control message containing a disabling command, which contains the necessary control parameters and verification information. The system sends this control message to the target sensor module via the CAN bus to stop data collection from the target sensor. The system monitors the response of the module to confirm whether it has successfully received the command and entered a disabled state. If no confirmation response is received from the module within the predetermined time, the system will resend or trigger the exception handling process.
[0124] In general, the present application first detects the acquisition identification ID message sent by each sensor module; after receiving the message, the system selects the corresponding identification ID from the preset identification ID library according to the chip unique identifier contained in the message; then a response message is generated based on the preset CAN ID and the selected identification ID; thereafter, the system generates a confirmation message and broadcasts it to all target sensor modules; the system determines the online sensor module by detecting the reply confirmation message of the sensor module; then the system detects the total number of channels of the online sensor module and calculates the global sampling rate accordingly; based on the calculated global sampling rate, the system sends a synchronous trigger pulse to all online sensor modules for synchronous sampling; the system detects the sampling data message with CAN ID and identification ID and obtains the sampling data; finally, the online sensor module is disabled based on the identification ID to stop data collection.
[0125] Innovation and beneficial effects: In the embodiment of the present application, due to the use of an automatic identification mechanism based on a chip unique identifier, combined with the CAN communication protocol and the global sampling rate dynamic calculation method, the plug-and-play and precise synchronous sampling of the sensor module are realized, which effectively solves the problems of manual configuration parameters, asynchronous sampling timing, and low data acquisition efficiency in the traditional data acquisition system, thereby realizing the automatic configuration and efficient acquisition of the system. The system realizes the automatic identification of the sensor module through the chip unique identifier, avoiding the cumbersome steps of manual configuration; the CAN communication protocol is adopted to improve the reliability of data transmission; the sampling synchronization of multiple sensor modules is ensured by dynamically calculating the global sampling rate and sending synchronous trigger pulses; the disability control mechanism based on the identification ID realizes the precise control of the sensor module. This automated data acquisition scheme not only improves the efficiency of system deployment and maintenance, but also ensures the accuracy and time consistency of the collected data. This scheme is particularly suitable for industrial scenarios where sensors need to be frequently replaced or adjusted, which can significantly reduce the system maintenance cost and improve production efficiency. In addition, the automatic identification and synchronous sampling mechanism of the system provides a reliable data basis for the subsequent processing and analysis of data, which has important application value.
[0126] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those of the above-mentioned first and second embodiments can be referred to the above introduction, and will not be described in detail later. Figure 3 and Figure 4 This embodiment provides a data acquisition system for automatically identifying sensor modules based on a data acquisition method for automatically identifying sensor modules, as follows:
[0127] refer to Figure 3 , Figure 3 Circuit diagram of data acquisition system for automatic identification of sensor modules:
[0128] The data acquisition system for automatically identifying sensor modules includes: a number of sensor interface modules 40, a control chip 10, a CAN level conversion module 20, and a synchronization signal driving module 30;
[0129] A plurality of sensor interface modules 40 are connected in series with each other and connected to the CAN level conversion module 20 and the synchronization signal driving module 30, and the CAN level conversion module 20 and the synchronization signal driving module 30 are connected to the control chip 10;
[0130] The sensor interface module 40 is a daisy chain topology for connecting to a number of sensor modules;
[0131] The control chip 10 is used to generate different identification IDs according to different sensor modules, send the identification IDs to several sensor modules, and control the sensor modules to perform data sampling;
[0132] The CAN level conversion module 20 is used to convert the differential signal and the logic level signal into each other;
[0133] The synchronization signal driving module 30 is used to improve the driving capability of the synchronization pulse signal.
[0134] Among them, since the number of pins is as small as possible to control the cost of connectors and wiring harnesses, and to achieve a longer distance, more module accesses, and faster communication bandwidth, the interface uses CAN as the basic communication bus, and in order to achieve synchronous sampling, this interface also has a synchronous pulse signal line. In addition to the power supply and shielding requirements, the final sensor interface module has 6 pins of 40, which are: 1-power positive, 2-power negative, 3-CAN_H, 4-CAN_L, 5-synchronous signal line, 6-shield ground;
[0135] 1 and 2 are the positive and negative DC power lines; 3 and 4 are the differential buses of CAN, which are twisted together, and in order to reduce the complexity of configuration, the terminal matching resistor is located inside the system; 5 and 6 are synchronization signal lines. When the acquisition starts, there will be a synchronization pulse with a frequency equal to the global sampling rate. When the unshielded connector interface is selected, the shielding layer can be connected from 6. When the connector is a shielded connector, 5 and 6 can be twisted together; the wiring harness needs to be shielded throughout.
[0136] In this embodiment, a daisy chain topology is adopted, with multiple sensor interface modules 40, which facilitates the serial connection of sensor modules. This simplifies the wiring work, reduces the possibility of wiring errors, and improves the flexibility and scalability of the system. Users can easily add or remove sensor modules, and the system can automatically identify and configure the newly connected modules, further improving the ease of use of the system.
[0137] Specifically, the synchronization signal driving module 30 represents a functional unit for processing and enhancing synchronization signals. The synchronization pulse signal refers to a timing signal for coordinating the synchronous sampling of multiple sensor modules. The driving capability represents the ability of the circuit to provide sufficient current and voltage to the load. Improvement represents the process of enhancing the electrical characteristics of the signal. Drive represents the process of providing the required electrical energy to the load. Signal represents an electrical waveform carrying timing information. Module represents an independent circuit unit with a specific function.
[0138] This module is needed when the system needs to synchronously control multiple sensor modules and the directly output synchronization signal cannot meet the driving requirements. Specifically, the synchronization signal driving module 30 receives the original synchronization pulse signal from the controller, and improves the current output capability of the signal through the power amplifier circuit, while keeping the timing characteristics of the signal unchanged. The module also needs to ensure that the rising and falling edges of the signal are steep enough to ensure the timing accuracy of the sampling. The module has overcurrent protection and short-circuit protection functions to prevent load abnormalities from causing damage to the drive circuit. During the driving process, the module will monitor the electrical parameters of the output signal in real time to ensure that the signal quality meets the system requirements. At the same time, the system can detect the total current output by the interface, turn off the power output when necessary, and prompt the user.
[0139] In some embodiments, the driving enhancement of the synchronization signal can be achieved in multiple ways:
[0140] Optionally, the system can adopt a multi-stage amplification method: first, the input signal is amplified by an operational amplifier to ensure that the signal amplitude meets the requirements; then the power amplifier stage is used to increase the current output capability of the signal while maintaining the integrity of the signal waveform; finally, the output buffer stage is used to achieve impedance matching and provide overload protection. This method can provide greater driving capability while ensuring signal quality.
[0141] Optionally, the system can also adopt a switch drive mode: first use the signal conditioning circuit to process the input synchronization pulse to ensure that the logic level meets the requirements; then use the high-speed switch tube to achieve high current drive, and use the optimized drive circuit to reduce the switching loss; finally add the feedback control circuit to dynamically adjust the drive strength to adapt to different load conditions. This method has higher efficiency and reliability.
[0142] It is understandable that other methods may be used to achieve drive enhancement of the synchronization signal, such as differential drive, photoelectric isolation drive, programmable drive, etc., which are not limited here.
[0143] Specifically, the present application adopts the CAN communication protocol, and needs to perform signal conversion between the CAN bus interface and the internal logic level of the processor, and uses a CAN level conversion module 20. When the FDCAN communication protocol is adopted, the CAN level conversion module 20 here should adopt an FDCAN level conversion chip to adapt to the FDCAN communication protocol. When sending data, the module converts the single-ended logic level signal output by the controller into the differential signal format required by the CAN bus. When receiving data, the differential signal on the bus is converted back to a single-ended logic level signal for processing by the controller. The module needs to ensure the timing integrity and signal quality during the signal conversion process, and have the ability to suppress common mode interference. At the same time, the module also provides electrostatic protection and surge protection functions to enhance the anti-interference ability and reliability of the system.
[0144] Specifically, the control chip 10 represents the core processing unit of the system, which is used to execute control logic and data processing.
[0145] This control process is executed when the system starts initialization or needs to reconfigure the sensor network. The control chip 10 first scans the sensor modules connected in the system to obtain their type information and functional characteristics. Then, according to the preset numbering rules, a unique identification ID is assigned to each sensor module. These identification IDs need to consider factors such as module type, physical location, and functional importance. The control chip 10 sends the assigned identification ID to the corresponding sensor module via the communication bus. After confirming that all modules have correctly received the identification ID, the control chip 10 starts sending sampling control commands to coordinate each module to collect data according to system requirements. The control chip 10 also needs to monitor the sampling process and handle possible abnormal situations.
[0146] refer to Figure 4 , Figure 4 : is a specific circuit diagram of the synchronization signal driving module 30, the synchronization signal driving module 30 includes: a MOS tube driving chip 301, a MOS tube Q1, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, a first capacitor C1 and a TVS diode D1;
[0147] An input pin of the MOS tube driving chip is connected to a synchronous pulse signal output pin of the control chip, an output pin of the MOS tube driving chip is connected to a gate of the MOS tube, a power pin of the MOS tube driving chip is connected to a power supply, a ground pin of the MOS tube driving chip is connected to a ground, one end of a first resistor is connected to an output pin of the MOS tube driving chip, the other end of the first resistor is connected to the gate of the MOS tube, one end of a first capacitor is connected to a power pin of the MOS tube driving chip, the other end of the first capacitor is grounded, one end of a second resistor is connected to a drain of the MOS tube, the other end of the second resistor is grounded, one end of three resistors is connected to the gate of the MOS tube, the other end of the third resistor is connected to a source of the MOS tube, the source of the MOS tube is connected to a power supply, one end of a fourth resistor is connected to an input pin of the MOS tube driving chip, the other end of the fourth resistor is connected to a ground pin of the MOS tube driving chip, one end of a TVS diode is connected to a drain of the MOS tube, and the other end of the TVS diode is grounded.
[0148] Specifically, this circuit realizes accurate replication and power amplification of the synchronization signal, which is optional. When the driving capability of the control chip 10 is sufficient, this module can be omitted. When the control chip 10 generates a synchronization signal pulse according to a preset timing, the pulse signal will be completely transmitted to the synchronization signal output port, keeping the original timing characteristics unchanged, but increasing the driving capability. The specific signal transmission process is as follows:
[0149] When the control chip 10 outputs a low level, the synchronous signal output port of the control chip 10 is 0V, the MOS driver chip outputs a high level after receiving the low level, the gate of the MOS tube Q1 receives the high level and enters the cut-off state, and the R2 resistor pulls the synchronous signal port to a low level. At this time, the synchronous signal port outputs a low level, which is consistent with the output state of the control chip 10.
[0150] When the control chip 10 outputs a high level, the synchronous signal output port of the control chip 10 is 3.3V / 5V, the MOS driver chip outputs a low level after receiving the high level, the gate of the MOS tube Q1 receives the low level and enters the on state, and the MOS tube Q1 pulls the synchronous signal port to a high level. At this time, the synchronous signal port outputs a high level, which is consistent with the output state of the control chip 10.
[0151] In this way, no matter how the synchronization signal pulse output by the control chip 10 changes (conversion of high level and low level), the synchronization signal port will output exactly the same waveform. The only difference is that the output signal has a stronger driving ability, the signal edge is steeper, the level is more stable, and the load resistance is stronger. The accuracy of system synchronization is ensured, so that all receiving modules can perform synchronous sampling according to the precise timing preset by the control chip 10. In general, in the embodiment of the present application, due to the hardware structure design of the daisy chain topology and the communication architecture based on CAN, and combined with the synchronization signal module with high driving ability, the series expansion, reliable communication and accurate synchronous sampling of the sensor module are realized, which effectively solves the problems of difficult sensor expansion, unstable communication and poor sampling synchronization in the traditional system, and thus realizes the modular design and flexible expansion of the system. Specifically: the daisy chain topology supports the series cascading of sensor modules, which is convenient for the horizontal expansion of the system; the CAN level conversion module improves the anti-interference ability and communication reliability through differential signal transmission; the synchronous signal drive module uses the MOS tube drive circuit to provide sufficient drive capability to ensure that multiple sensor modules can receive stable trigger signals at the same time and ensure the synchronization of sampling; the entire hardware system has a simple structure, unified interface, and easy maintenance, which greatly improves the practicality and reliability of the system. This system architecture based on hardware innovation not only reduces the complexity of system implementation, but also improves the accuracy and reliability of data acquisition. It is particularly suitable for application scenarios that require large-scale sensor deployment in industrial sites. At the same time, the modular design of the system also facilitates subsequent function expansion and performance optimization, and has good technical scalability.
[0152] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the data collection method of the present application for automatically identifying the sensor module. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0153] The present application provides a data acquisition device for automatically identifying a sensor module, and the data acquisition device for automatically identifying a sensor module includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data acquisition method for automatically identifying a sensor module in the above-mentioned embodiment one.
[0154] Reference below Figure 5, which shows a schematic diagram of the structure of a data acquisition device suitable for implementing the automatic identification sensor module of the embodiment of the present application. The data acquisition device for the automatic identification sensor module in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The data acquisition device for automatically identifying the sensor module shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0155] like Figure 5 As shown, the data acquisition device for automatically identifying the sensor module may include a processing system 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage system 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the data acquisition device for automatically identifying the sensor module are also stored in RAM1004. The processing system 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: an input system 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output system 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage system 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication system 1009. The communication system 1009 can allow the data acquisition device of the automatic identification sensor module to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a data acquisition device of the automatic identification sensor module with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0156] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication system, or installed from a storage system 1003, or installed from a ROM 1002. When the computer program is executed by the processing system 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0157] The data acquisition device for automatically identifying sensor modules provided by the present application adopts the data acquisition method for automatically identifying sensor modules in the above-mentioned embodiment, which can solve the technical problem of how to automatically configure multiple sensors for data acquisition. Compared with the prior art, the beneficial effects of the data acquisition device for automatically identifying sensor modules provided by the present application are the same as the beneficial effects of the data acquisition method for automatically identifying sensor modules provided by the above-mentioned embodiment, and other technical features in the data acquisition device for automatically identifying sensor modules are the same as the features disclosed in the method of the previous embodiment, which will not be described in detail here.
[0158] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0159] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0160] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the data collection method for automatically identifying a sensor module in the above-mentioned embodiment.
[0161] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0162] The computer-readable storage medium may be included in the data acquisition device for automatically identifying the sensor module; or may exist independently without being assembled into the data acquisition device for automatically identifying the sensor module.
[0163] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0164] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data acquisition method for automatically identifying sensor modules, and can solve the technical problem of how to automatically configure multiple sensors for data acquisition. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the data acquisition method for automatically identifying sensor modules provided by the above-mentioned embodiments, and will not be repeated here.
[0165] The present application also provides a computer program product, including a computer program, which implements the steps of the data collection method for automatically identifying a sensor module as described above when the computer program is executed by a processor.
[0166] The computer program product provided by the present application can solve the technical problem of how to automatically configure multiple sensors for data collection. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the data collection method for automatically identifying sensor modules provided by the above embodiment, and will not be repeated here.
[0167] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A data collection method for automatically identifying a sensor module, characterized in that: The data acquisition method of the automatic identification sensor module comprises: Detecting the acquisition identification ID message of the sensor module, the number of the sensor modules is several; When the identification ID acquisition message is detected, the identification ID is sent to the target sensor module so that the target sensor module can be connected for communication; Sending a synchronous trigger pulse to the target sensor module to collect data; The data message carrying the identification ID is detected, the sensor module for collecting data is determined according to the message data, and the collected data is acquired.
2. The method according to claim 1, characterized in that The step of detecting the data message carrying the identification ID, determining the sensor module for collecting data according to the message data, and obtaining the collected data, then includes: Based on the identification ID, the online sensor module is controlled to be disabled, thereby stopping data collection.
3. The method according to claim 1, characterized in that When the identification ID acquisition message is detected, the identification ID is sent to the target sensor module so that the target sensor module can perform communication connection, which specifically includes: According to the chip unique identifier in the identification ID message, a corresponding identification ID is selected from the identification ID library; Generate an identification ID response message based on the preset CAN ID and the corresponding identification ID; The identification ID response message is sent to the target sensor module, so that the target sensor module obtains the corresponding identification ID.
4. The method according to claim 1, characterized in that The step of sending a synchronous trigger pulse to the target sensor module to collect data includes: Generate a confirmation message based on the CAN ID, and send the confirmation message to all the target sensor modules; The reply confirmation messages of all the target sensor modules are detected, and the target sensor module sending the reply confirmation message is confirmed as an online sensor module.
5. The method according to claim 4, characterized in that The step of sending a synchronous trigger pulse to the target sensor module to collect data specifically includes: Detecting the total number of channels of the online sensor module, and calculating a global sampling rate according to the total number of channels; According to the global sampling rate, sending the synchronous trigger pulse to all the sensor modules, so that the sensor modules perform sampling according to the synchronous trigger pulse; The sampling data message generated by the online sensor module according to the CAN ID and the identification ID is detected to obtain sampling data.
6. A data acquisition system for automatically identifying sensor modules, characterized in that: The data acquisition system for automatic identification of sensor modules includes: a number of sensor interface modules, a control chip, an FDCANCAN level conversion module, and a synchronization signal driving module; A plurality of the sensor interface modules are connected in series with each other and connected to the CAN level conversion module and the synchronization signal driving module, and the CAN level conversion module and the synchronization signal driving module are connected to the control chip; The sensor interface module is a daisy chain topology, used to connect to several sensor modules; The control chip is used to generate different identification IDs according to different sensor modules, send the identification IDs to a number of the sensor modules, and control the sensor modules to perform data sampling; The CAN level conversion module is used to convert differential signals and logic level signals into each other; The synchronization signal driving module is used to improve the driving capability of the synchronization pulse signal.
7. The data acquisition system for automatically identifying sensor modules according to claim 6, characterized in that: The synchronization signal driving module includes: a MOS tube driving chip, a MOS tube, a first resistor, a second resistor, a third resistor, a fourth resistor, a first capacitor and a TVS diode; The input pin of the MOS tube driving chip is connected to the synchronous pulse signal output pin of the control chip, the output pin of the MOS tube driving chip is connected to the gate of the MOS tube, the power pin of the MOS tube driving chip is connected to the power supply, the ground pin of the MOS tube driving chip is connected to the ground, one end of the first resistor is connected to the output pin of the MOS tube driving chip, the other end of the first resistor is connected to the gate of the MOS tube, one end of the first capacitor is connected to the power pin of the MOS tube driving chip, the other end of the first capacitor is grounded, one end of the second resistor is connected to the drain of the MOS tube, the other end of the second resistor is grounded, one end of the three resistors is connected to the gate of the MOS tube, the other end of the third resistor is connected to the source of the MOS tube, the source of the MOS tube is connected to the power supply, one end of the fourth resistor is connected to the input pin of the MOS tube driving chip, the other end of the fourth resistor is connected to the ground pin of the MOS tube driving chip, one end of the TVS diode is connected to the drain of the MOS tube, and the other end of the TVS diode is grounded.
8. A data acquisition method and device for automatically identifying a sensor module, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data collection method for automatic identification of a sensor module according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data acquisition method for automatically identifying a sensor module according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the data collection method for automatic identification of a sensor module according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Communication system for artificial intelligence education
CN120602510A
Fish passing monitoring data transmission device and method
CN120812097A