A data acquisition method and system

By sending commands one by one from the host and collecting data autonomously from the slave, the problem of low data acquisition efficiency in traditional HART instruments is solved, achieving high-speed and stable data acquisition. The host and slave can process tasks in parallel, improving the real-time performance and continuity of the system.

CN123185015APending Publication Date: 2026-11-27NANJING NEW POWER ELECTRIC TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611303366.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-26
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Traditional HART instrument data acquisition methods suffer from low communication efficiency, long acquisition time, and heavy host load, making it difficult to meet the high-speed acquisition needs of real-time data from large-scale instruments.

Method used

The host sends data acquisition commands to each slave device one by one and continues to the next device after receiving a response confirmation. The slave devices autonomously start data acquisition tasks and report their working status information and device data to the host. The host synchronously obtains data from each slave device, realizing parallel task processing between the host and slave devices.

Benefits of technology

It significantly shortened the task interaction time from several seconds to milliseconds, improved the real-time performance and stability of data acquisition, and transformed the host from a dependent role to a management role, ensuring the continuity and stability of the acquisition system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123185015A_ABST
    Figure CN123185015A_ABST
Patent Text Reader

Abstract

The application discloses a data collection method and system, and relates to the technical field of industrial automation. The method comprises the following steps: through a host computer, data collection instructions are sent to each slave computer one by one, and after receiving the response confirmation of the current slave computer, the data collection instruction is continuously sent to the next slave computer; through the slave computer, after returning the response confirmation to the host computer, the data collection task with the connected target equipment is autonomously started, and the working state information and the collected equipment data are reported to the host computer; through the host computer, the working state information and the equipment data reported by each slave computer are acquired. The above technical features solve the problems of low communication efficiency, long collection time and heavy burden of the host computer caused by serial polling and passive waiting of the slave computer in the traditional collection mode, and significantly improve the data collection real-time performance and overall stability of the large-scale HART instrument system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial automation technology, and in particular to a data acquisition method and system. Background Technology

[0002] The Highway Addressable Remote Transducer (HART) protocol, as one of the most mainstream digital communication standards for industrial field instruments, has been widely used in industries such as petroleum, chemical, power, and metallurgy. With the continuous improvement of intelligent manufacturing and factory digitalization, the number of field HART instruments is constantly increasing. It has become common for a single system to connect hundreds or even thousands of HART instruments. Rapid, stable, and efficient data acquisition from these instruments has become a crucial foundation for ensuring industrial process control, equipment status monitoring, and production scheduling optimization.

[0003] Currently, in applications with a large number of HART instruments deployed centrally, one of the mainstream data acquisition architectures is a master-slave HART multiplexer. This involves a master managing multiple slaves, with each master or slave communicating with a certain number of HART instruments through its own channel. The master ultimately aggregates and uploads the data. However, in actual operation, limited by the HART communication transmission rate (1200 baud) and the hardware and software design of the multiplexer, the master can only access one channel of a slave serially to obtain the acquired data before continuing to access the next channel. Simultaneously, the slave only acts as a communication bridge and has no ability to actively perform tasks. This results in significant problems such as low communication efficiency, long acquisition time, and heavy burden on the master. Under full load, the master often takes hundreds or even thousands of seconds to complete one round of instrument polling, making it difficult to meet the high-speed acquisition requirements of large-scale real-time instrument data. Summary of the Invention

[0004] This invention provides a data acquisition method and system that solves the problems of low communication efficiency, long acquisition time, and heavy burden on the host caused by serial polling and passive waiting of slave devices in traditional acquisition methods, and significantly improves the real-time performance and overall stability of data acquisition in large-scale HART instrument systems.

[0005] In a first aspect, embodiments of the present invention provide a data acquisition method applied to a data acquisition system, the data acquisition system comprising at least one host, each host being connected to at least one slave via a high-speed communication bus, including: The host sends data acquisition commands to each of the slave devices one by one, and after receiving the response confirmation from the current slave device, it continues to send the data acquisition command to the next slave device. After returning a confirmation response to the host, the slave device autonomously initiates a data acquisition task with the connected target device and reports its working status information and the acquired device data to the host. The host obtains the working status information and device data reported by each of the slave devices.

[0006] In a second aspect, embodiments of the present invention provide a data acquisition system, including: a host computer, at least one host computer connected to the host computer, and at least one slave computer connected to each host computer; The host is used to send data acquisition instructions to each of the slave devices one by one, and after receiving the response confirmation from the current slave device, continue to send the data acquisition instructions to the next slave device. The slave device is used to autonomously initiate a data acquisition task with the connected target device after returning a response confirmation to the host, and report the working status information and the acquired device data to the host. The host is used to acquire the working status information and device data reported by each of the slave devices.

[0007] The technical solution of this invention involves a host sending data acquisition commands to each slave device one by one, and after receiving a response confirmation from the current slave device, continuing to send the data acquisition command to the next slave device; the slave devices, after returning a response confirmation to the host, autonomously initiate a data acquisition task with the connected target device, and report their working status information and the acquired device data to the host; and the host obtains the working status information and device data reported by each slave device. The above technical solution involves the master sending data acquisition commands to each slave device sequentially and immediately continuing to send commands to the next slave device upon receiving a confirmation response from the current slave device. This eliminates the need to wait for data acquisition, reducing the task interaction time between the master and slave devices from several seconds of traditional serial waiting to millisecond-level command interaction. Each slave device executes its acquisition task synchronously and in parallel upon receiving the command, with the master's command transmission and slave device acquisition completely overlapping in time. The overall acquisition cycle no longer increases linearly with the number of slave devices. Simultaneously, after responding, each slave device autonomously initiates its data acquisition task with the connected target device, no longer relying on the master to send two separate commands sequentially. This gives the slave devices proactive execution capabilities, transforming the master from participating in every instrument communication process to handling all data acquisition tasks independently. The slave unit manages the task distribution and data aggregation roles, with each slave unit independently managing the communication sequence of its connected instruments. Even if some instruments experience communication anomalies, it will not affect the master unit's scheduling or the acquisition process of other slave units. In addition, the slave unit updates its own working status information in real time during the execution of the acquisition operation and reports it when it waits for the master unit to poll it a second time. After the master unit sends the instruction, it synchronously receives the status information reported by the slave unit, realizing one-to-one processing of slave unit task distribution and status reception. The master unit can use this to keep track of the execution progress of each slave unit in real time and intervene in time to handle anomalies, ensuring the continuity and stability of the acquisition system and avoiding the blind spot in traditional solutions where the master unit is unaware of the status of the slave units during long periods of waiting for acquisition results.

[0008] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 This is a flowchart of a data acquisition method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a communication sequence provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a network architecture provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a data acquisition system provided in an embodiment of the present invention. Detailed Implementation

[0011] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0012] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0013] In one embodiment, Figure 1 This is a flowchart illustrating a data acquisition method provided in an embodiment of the present invention. This embodiment is applicable to large-scale industrial data acquisition scenarios, and the method can be executed by a data acquisition system. The data acquisition system includes at least one host, and each host is connected to at least one slave device via a high-speed communication bus. The high-speed communication bus is an RS485 bus.

[0014] The data acquisition system comprises at least one master unit and multiple slave units, connected via a high-speed RS485 bus. The RS485 bus is a dedicated communication line for command issuance, status exchange, and data aggregation between the master and slave units. Its communication speed is significantly higher than that of HART communication, ensuring that the master unit can communicate quickly and continuously with multiple slave units without consuming HART communication link resources at the acquisition end. The master unit is the core scheduling device in the data acquisition system, responsible for receiving task commands from the host computer, managing task allocation and execution progress of each slave unit, aggregating the acquired data reported by each slave unit, and exchanging information with the host computer. The master unit possesses task queue management and scheduling decision-making capabilities, capable of creating different task execution queues based on command type and scheduling execution according to priority. Slave units are acquisition devices connected to the master unit. Each slave unit has several channels, and each channel is used to connect to a HART instrument (target device).

[0015] like Figure 1 As shown, the method includes: S101. The host sends data acquisition commands to each slave device one by one, and after receiving the response confirmation from the current slave device, it continues to send data acquisition commands to the next slave device.

[0016] In this embodiment, the data acquisition command can be understood as a control command issued by the host to the slave device to trigger the slave device to perform instrument data reading operations. This command includes information such as the slave device identifier, target acquisition channel, exception handling rules, and the target device's pending command frame. Upon receiving the command, the slave device can identify the task it needs to perform. The current slave device can be understood as the slave device to which the host is currently sending data acquisition commands at that moment; that is, the target slave device currently selected by the host during the process of issuing commands sequentially according to the slave device's order. The response confirmation can be understood as a response signal returned by the slave device to the host after successfully receiving the data acquisition command, used to inform the host that the current slave device has correctly received the command and is ready to execute it.

[0017] Specifically, unlike traditional serial modes where the host must wait for a single slave to complete its data acquisition before accessing the next slave, this embodiment features flexible slave task scheduling capabilities. After the data acquisition system completes initialization, the host determines the slave order according to a preset strategy. The host first identifies the first slave in the order as the current slave and sends a data acquisition command to it via a high-speed RS485 bus. This command includes a slave device identifier to identify the target slave, a target acquisition channel to specify the HART instrument to be accessed, fault handling rules to define the response strategy in case of failure, and a target device command frame to specify the complete data frame content sent from the target slave to the target acquisition channel. After transmission, the host reserves a fixed interval to wait for the current slave to return a confirmation response. This fixed interval matches the RS485 bus communication rate and is typically on the order of tens of milliseconds, much shorter than the single acquisition time of HART communication. If the first slave device successfully receives the instruction and verifies its accuracy, it sends a confirmation response to the master device. Upon receiving this confirmation, the master device, without waiting for the slave to complete subsequent data acquisition, immediately establishes a communication connection with the next slave device in sequence. This next slave becomes the new current slave, and the master sends it the corresponding data acquisition instruction. Following this process, the master device proceeds sequentially from front to back, until the last slave device completes its confirmation response. Throughout this process, the master device requires only milliseconds of interaction time to complete the task instruction issuance and handshake confirmation for all slave devices. Each slave device, after receiving the instruction and responding, then enters the subsequent autonomous data acquisition process.

[0018] For example, Figure 2 This is a schematic diagram of a communication sequence provided by an embodiment of the present invention, illustrating the instruction issuance and timing relationship between the master and each slave device. For example... Figure 2 As shown, after initialization, the host computer first receives the instruction sent by the host computer via 485 bus 1, and after replying with confirmation, initiates the pipelined task distribution process. The host computer first establishes a communication connection with slave 1 via 485 bus 2, sending it a complete data acquisition task instruction. After sending, a fixed interval is reserved to wait for slave 1's response. Once slave 1 successfully receives the task instruction and correctly replies with a response, the host computer no longer waits for slave 1 to complete subsequent instrument data acquisition, immediately establishing a communication connection with slave 2 via 485 bus 2, sending the corresponding data acquisition instruction, and similarly following the interaction logic of sending an instruction, waiting for a response, and continuing upon receiving a response. Figure 2 As shown, while the host is sending the task to slave 2, slave 1 has already completed sending the target command to the HART instrument and is ready to receive the actual data returned by the instrument.

[0019] Because the host polls and issues tasks to each slave device one by one and waits for a fixed response interval, thanks to the high-speed communication of the 485 bus, the time when adjacent slave devices start data acquisition is only a few tens of milliseconds of micro-delay. The overall process can be considered as multiple slave devices synchronously and in parallel conducting acquisition operations. After the host issues tasks to each slave device one by one, it synchronously listens for, receives, and records the status information uploaded by each slave device, achieving one-to-one processing of task issuance and status reception for each slave device. The host only needs milliseconds of interaction time to complete the issuance of all slave tasks and handshake confirmation, while the slave devices that have already responded synchronously enter the autonomous acquisition state. This allows the host's subsequent polling interaction process and the multi-slave field acquisition process to overlap in time, avoiding the idle waiting time of traditional solutions that require waiting for a single slave device to finish its acquisition process before polling the next one. From the system scheduling perspective, this significantly reduces the overall cycle of multi-slave batch acquisition.

[0020] S102. After returning a confirmation response to the host, the slave device autonomously initiates a data acquisition task with the connected target device and reports the working status information and the acquired device data to the host.

[0021] In this embodiment, the target device can be understood as the terminal device to which the slave device is connected, and in this embodiment, it is a HART instrument. Autonomous startup can be understood as the slave device, after returning a confirmation response to the master device, proactively initiating a communication process with the target device without waiting for a secondary instruction from the master device. The data acquisition task can be understood as the complete data reading operation performed by the slave device on the target device, including establishing communication, issuing read commands, and receiving and parsing the data returned by the target device. Working status information can be understood as status identifiers generated by the slave device during the execution of the data acquisition task, used to reflect the current execution progress of the slave device, including at least the statuses of task start, task in progress, task completed, and task timeout. Device data can be understood as the raw data such as measurement values ​​and diagnostic information collected by the slave device from the target device.

[0022] Specifically, after each slave device sends a confirmation response to the host, it immediately and autonomously initiates the data acquisition process with the connected target device, without needing to wait for secondary instructions from the host, thus avoiding time losses caused by unnecessary interactions. The slave device first parses the data acquisition command issued by the host, extracting information such as the target acquisition channel, exception handling rules, and the target device's pending command frame to determine the target device and acquisition parameters to be accessed. The slave device establishes a communication connection with the target device on the corresponding channel through its configured HART communication link, sends read commands to the target device according to the acquisition parameters, and waits for the target device to return data. During the acquisition operation, the slave device reports its current working status information to the host in real time via the high-speed RS485 bus, including task start, task in progress, task completed, or task timeout, enabling the host to monitor the execution progress of each slave device in real time. After completing the reading of all data from the target device, the slave device first caches the acquired device data in its local storage and then uploads it to the host via the high-speed RS485 bus.

[0023] After responding, each slave device independently manages its own data acquisition sequence. The data acquisition operations of each slave device are independent, synchronous, and parallel, without affecting each other.

[0024] S103. Obtain the working status information and equipment data reported by each slave device through the host.

[0025] In this embodiment, after the host sends data acquisition commands to each slave device one by one, it synchronously listens to and receives real-time working status information reported by each slave device via a high-speed RS485 bus, realizing one-to-one processing of task issuance and status reception for each slave device. The host records the working status identifier of each slave device, thereby monitoring the execution progress of each slave device in real time.

[0026] After the master unit completes sending and receiving data acquisition commands and confirmations from all slave units, it switches to data receiving mode and actively initiates command polling to each slave unit, listening for the device data and operating status information uploaded by each slave unit. Under normal acquisition conditions, all slave units have already completed data acquisition from their connected HART instruments, and the data is cached locally awaiting upload. The master unit sequentially retrieves the cached device data from each slave unit through polling, parses and verifies the received data to confirm its integrity and correctness, and centrally summarizes the data reported by each slave unit, synchronously updating the corresponding slave unit's operating status flag, thus completing one full acquisition cycle.

[0027] This invention provides a data acquisition method comprising: a host sending data acquisition commands to each slave device sequentially; and, upon receiving a response confirmation from the current slave device, continuing to send data acquisition commands to the next slave device; the slave devices, upon returning a response confirmation to the host, autonomously initiating a data acquisition task with the connected target device and reporting their working status information and acquired device data to the host; and the host acquiring the working status information and device data reported by each slave device. This technical solution, by having the host send data acquisition commands to each slave device sequentially and immediately continue sending commands to the next slave device upon receiving a response confirmation from the current slave device, shortens the task interaction time between the host and slave devices from the traditional serial waiting time of several seconds to millisecond-level command interaction. Each slave device executes the acquisition task synchronously and in parallel upon receiving the command, with the host's command issuance and slave device acquisition completely overlapping in time, and the overall acquisition cycle no longer increasing linearly with the number of slave devices. Simultaneously, the slave devices autonomously initiate data acquisition tasks with the connected target device after responding, no longer relying on the host to issue two commands sequentially, enabling the slave devices to have proactive execution capabilities. The host's role shifts from participating in every instrument communication to task dispatching and... The data aggregation management role allows each slave device to independently manage the communication timing of its connected instruments. Even if some instruments experience communication anomalies, it will not affect the master scheduling and the acquisition process of other slave devices. In addition, the slave devices update their own working status information in real time during the execution of acquisition operations and report it when waiting for the master to poll them a second time. After the master sends the command, it synchronously receives the status information reported by the slave device, realizing one-to-one processing of slave task issuance and status reception. The master can use this to keep track of the execution progress of each slave device in real time and intervene in time to handle anomalies, ensuring the continuity and stability of the acquisition system and avoiding the blind spot in traditional solutions where the master is unaware of the status of the slave devices during long waiting periods for acquisition results.

[0028] As a first optional embodiment of this example, the data acquisition system further includes a host computer connected to each host computer. The host computer sends data acquisition commands to each slave computer sequentially through the host computers, and after receiving a response confirmation from the current slave computer, continues to send data acquisition commands to the next slave computer, including: S1011. Obtain the task instruction issued by the host computer, return a confirmation response to the host computer, and create multiple task execution queues according to the instruction type of the task instruction.

[0029] In this embodiment, the host computer can be understood as the control and management device at the top layer of the data acquisition system, responsible for issuing task instructions to the host and receiving the collected data summarized by the host. In this embodiment, it can be a PC. A task instruction can be understood as a control command issued by the host computer to the host to trigger the host to perform data acquisition-related operations, including ordinary communication instructions, channel scanning instructions, and dynamic scanning instructions. A confirmation response can be understood as an acknowledgment signal returned by the host to the host computer after successfully receiving the task instruction, informing the host computer that the host has correctly received the instruction and is ready to execute it. A task execution queue can be understood as a logical container within the host that classifies, stores, and manages tasks according to instruction type. Tasks corresponding to different types of instructions are placed in different queues so that the host can schedule and execute them sequentially according to priority.

[0030] Specifically, after establishing a communication connection with the host computer, the host computer receives task instructions from the host computer via a high-speed RS485 bus. The received task instructions are verified to ensure their integrity and correctness, and then an acknowledgment response is sent to the host computer, informing it that the instruction has been successfully received. The host computer parses the instruction type field in the task instruction to identify the category to which the current instruction belongs, and creates a corresponding task execution queue internally based on the identified instruction type. Different categories of task instructions are placed into their respective queues, and each task execution queue is independent, storing the corresponding type of tasks to be executed. The queues also record relevant information about the tasks for subsequent closed-loop task management.

[0031] S1012. After creating multiple task execution queues, determine the current task execution queue in sequence according to the priority of the task execution queues.

[0032] In this embodiment, the priority of the task execution queue can be understood as the pre-defined execution order among the task queues, used to determine which queue the host should process first when multiple queues have tasks to be executed. The current task execution queue can be understood as the task queue that the host has selected based on priority at the current moment, from which it is retrieving tasks and issuing corresponding data acquisition commands to the slave devices.

[0033] Specifically, after creating all task execution queues, the host no longer processes all queues in parallel. Instead, it determines the current task queues to be executed sequentially from highest to lowest priority, according to the pre-defined priorities of each queue. The host first checks if there are any tasks to be executed in the highest priority queue. If so, it designates that queue as the current task execution queue, retrieves tasks from that queue, and begins the corresponding instruction delivery process. If the queue is empty, it skips that queue and continues checking the next priority queue. The host determines the current task execution queue in this manner and completes the execution of all tasks in that queue before switching to the next queue according to priority, until all tasks in all task queues have been executed.

[0034] S1013. Send a data acquisition command corresponding to the current task execution queue to the current slave device, and after receiving the response confirmation from the current slave device, continue to send the data acquisition command to the next slave device until the response confirmation is received from all slave devices.

[0035] In this embodiment, after determining the current task execution queue, the host retrieves a task to be executed from the queue and generates a corresponding data acquisition command based on the task. Following a preset strategy to determine the slave device order, the host identifies the first slave device as the current slave and sends the data acquisition command to it via a high-speed RS485 bus. After sending, the host reserves a fixed interval to wait for the current slave device to return a response confirmation. Once the current slave device successfully receives the command and verifies its accuracy, it returns a response confirmation to the host. Upon receiving this response confirmation, the host no longer waits for the slave device to complete subsequent instrument data acquisition and immediately establishes a communication connection with the next slave device according to the slave device order, issuing the corresponding data acquisition command. The host proceeds sequentially from front to back along the slave device order until the data acquisition command corresponding to the current task execution queue has been sent to all slave devices and received responses from all slave devices. Then, the host returns to S1012, determines the next current task execution queue based on priority, and repeats the above issuance process until all tasks in all task queues have been processed.

[0036] Furthermore, it retrieves the task instructions issued by the host computer, returns a confirmation response to the host computer, and creates multiple task execution queues based on the instruction type of the task instructions, including: a1. Obtain the task instructions issued by the host computer and return an acknowledgment response to the host computer. The task instructions include ordinary communication instructions, channel scanning instructions, and dynamic scanning instructions.

[0037] In this embodiment, ordinary communication commands can be understood as control commands issued by the host computer for real-time reading or writing operations on HART instruments. Channel scan commands can be understood as control commands issued by the host computer to trigger the master or slave device to perform a comprehensive scan of the channels it is responsible for, in order to identify and save the basic information of connected instruments. Dynamic scan commands can be understood as control commands issued by the host computer to trigger the master to periodically poll all connected instruments and obtain the response data of the target command.

[0038] Specifically, after establishing a communication connection with the host computer, the host computer receives task instructions from the host computer via a high-speed RS485 bus. The host computer verifies the received task instructions, confirming their integrity and correctness, and then sends an acknowledgment response to the host computer, informing it that the instructions have been successfully received. The host computer parses the instruction type field in the task instructions to identify whether the current instruction is a normal communication instruction, a channel scan instruction, or a dynamic scan instruction. Normal communication instructions correspond to the host computer's real-time read / write operation requirements for HART instruments; channel scan instructions correspond to the master / slave machine's operation requirements for scanning the responsible channel and saving basic information of connected instruments; dynamic scan instructions correspond to the host computer's operation requirements for periodically polling all connected instruments and obtaining response data for the target instruction.

[0039] b1. Create a normal communication task queue, a channel scan task queue, and a dynamic scan task queue. Configure the tasks corresponding to normal communication commands into the normal communication task queue, the tasks corresponding to channel scan commands into the channel scan task queue, and the tasks corresponding to dynamic scan commands into the dynamic scan task queue.

[0040] In this embodiment, the ordinary communication task queue can be understood as a logical container within the host specifically used to store and manage tasks corresponding to ordinary communication commands. Tasks in this queue involve real-time read / write operations on HART instruments. The channel scan task queue can be understood as a logical container within the host specifically used to store and manage tasks corresponding to channel scan commands. Tasks in this queue involve performing a comprehensive scan of the channel to identify basic information of connected instruments. The dynamic scan task queue can be understood as a logical container within the host specifically used to store and manage tasks corresponding to dynamic scan commands. Tasks in this queue involve periodically polling all connected instruments to obtain response data.

[0041] Specifically, after the host machine identifies the type of task instruction, it internally creates three independent logical containers: a general communication task queue, a channel scan task queue, and a dynamic scan task queue. Each queue operates independently, storing tasks of the corresponding type to be executed without interference. The host machine places tasks identified as general communication instructions into the general communication task queue, awaiting subsequent execution; tasks identified as channel scan instructions into the channel scan task queue, and tasks identified as dynamic scan instructions into the dynamic scan task queue, awaiting subsequent execution. Each queue records relevant information about the tasks it stores, including slave device identifier, target acquisition channel, data frame length, and task execution status, facilitating subsequent closed-loop task management.

[0042] Furthermore, a data acquisition command corresponding to the current task execution queue is sent to the current slave device, and after receiving a response confirmation from the current slave device, the data acquisition command is sent to the next slave device until responses confirmation are received from all slave devices, including: a2. Determine the slave device arrangement order and the current slave device according to the preset strategy.

[0043] In this embodiment, the preset strategy can be understood as a decision rule used by the host to determine the order in which data acquisition commands are issued by each slave device. This strategy can be flexibly configured by the system according to the actual application scenario, for example, arranged according to the slave device number order, or dynamically adjusted according to the current load status of the slave devices. The slave device arrangement order can be understood as the positional relationship of each slave device in the host command issuance sequence. The host sends data acquisition commands to each slave device in this order, which can be flexibly determined by the preset strategy.

[0044] Specifically, before the host machine begins sending data acquisition commands to the slave machines, it first determines the order of the slave machines according to a preset strategy. This preset strategy can be pre-configured by the system administrator based on actual industrial site requirements, or it can be dynamically generated by the host machine based on the real-time status of each slave machine. After determining the slave machine order according to the preset strategy, the host machine selects the target slave machine from that order to receive the command. At the beginning of the command issuance process, the host machine designates the first slave machine in the order as the current slave machine. In the subsequent sequential issuance process, each time the host machine completes sending the command to the current slave machine and receives its acknowledgment, it designates the next slave machine as the new current slave machine according to the order, until all slave machines have completed command issuance and acknowledgment.

[0045] b2. Send a data acquisition command to the current slave device, carrying the slave device identifier, target acquisition channel, exception handling rules, and the target device's pending command frame.

[0046] In this embodiment, the slave device identifier can be understood as the unique identification information used to identify each slave device. The master device uses this identifier to ensure that data acquisition commands are sent to the correct target slave device. The target acquisition channel can be understood as the physical channel number of the HART instrument connected to the slave device, used to specify the specific channel that the slave device needs to access. The exception handling rules can be understood as the agreed-upon handling strategies to be taken when the slave device encounters communication timeouts, instrument unresponsiveness, or other abnormal situations during the acquisition process, such as the number of retries and the timeout duration. The target device command frame to be executed can be understood as the valid data content extracted and saved by the slave device after parsing the message sent by the master device. This content is also the complete HART data frame that the slave device will send to the target acquisition channel, and the slave device does not need to additionally encapsulate the message.

[0047] Specifically, after identifying the current slave device, the host generates a corresponding data acquisition instruction based on the task retrieved from the current task execution queue. This instruction encapsulates several key fields, including: writing the slave device identifier to the instruction to indicate the target recipient and ensure that only the corresponding slave device responds to the instruction; writing the target acquisition channel to the instruction to specify the specific HART instrument channel the slave device needs to access, allowing the slave device to determine which channel's instrument to communicate with; writing exception handling rules to the instruction to define the handling strategy for exceptions such as communication timeouts or instrument non-response; and writing the target device's pending command frame to the instruction to define the complete data frame content sent by the slave device to the target acquisition channel.

[0048] After all the above fields are encapsulated, the host sends the data acquisition command to the current slave device via a high-speed RS485 bus.

[0049] c2. After sending, wait for a preset interval and receive the response confirmation returned by the current slave device.

[0050] In this embodiment, the preset interval duration can be understood as a fixed time window reserved by the host for waiting for the slave to return a response confirmation after sending the data acquisition command. This duration matches the RS485 bus communication rate and is usually on the order of tens of milliseconds.

[0051] Specifically, after the master device sends a data acquisition command to the current slave device via the high-speed RS485 bus, it does not immediately switch to the next slave device. Instead, it reserves a fixed interval to wait for the current slave device to return a response confirmation. This interval is sufficient for the slave device to complete the reception, verification, and transmission of the data acquisition command, but is much shorter than the single acquisition time of HART communication. If the current slave device successfully receives the command and verifies that the command is complete and error-free, it immediately returns a response confirmation signal to the master device via the high-speed RS485 bus. After receiving the response confirmation from the slave device within the preset interval, the master device confirms that the current slave device has correctly received the command and is ready to execute the subsequent acquisition task.

[0052] d2. After receiving the confirmation response, continue to send data acquisition commands to the next slave device in the slave device sequence until confirmation responses are received from all slave devices.

[0053] In this embodiment, after receiving a response confirmation from the current slave device within a preset interval, the host does not wait for the slave device to complete subsequent instrument data acquisition operations. Instead, it immediately determines the next slave device according to the slave device sequence, updates it as the new current slave device, and sends a data acquisition command to it. The host proceeds sequentially from front to back along the slave device sequence in the above manner. After completing the command sending and response confirmation for each slave device, it continues to process the next slave device until the data acquisition commands in the current task queue have been sent to all slave devices and received response confirmations from all slave devices.

[0054] Throughout the process, the host only needs milliseconds of interaction time to complete the task instruction issuance and handshake confirmation of all slave devices. After receiving the instruction and replying, each slave device enters the subsequent autonomous data collection process.

[0055] As a second optional embodiment of this example, after returning a response confirmation to the host, the system autonomously initiates a data acquisition task with the connected target device and reports the working status information and the acquired device data to the host, including: S1021. Parse the data acquisition command to determine the target device and the corresponding acquisition parameters.

[0056] In this embodiment, the target device can be understood as the specific HART instrument that the slave device determines based on the target acquisition channel in the data acquisition command, and on which data reading operations need to be performed. Acquisition parameters can be understood as the specific configuration information extracted by the slave device from the data acquisition command for performing the acquisition operation. Acquisition parameters include at least the target acquisition channel, exception handling rules, and the command frame to be executed by the target device.

[0057] Specifically, after the slave device returns a confirmation response to the master device, it interprets the data acquisition command, extracts the slave device identifier from the command for verification, and confirms whether the command was indeed sent to the slave device. If the verification passes, it extracts the target acquisition channel field from the command to determine the specific channel number to be accessed, thus identifying the HART instrument connected to that channel as the target device. It also extracts exception handling rules from the command, specifying the handling strategies for abnormal situations such as communication timeouts or instrument non-response during the acquisition process; and extracts the target device's pending command frame, clarifying the complete data frame content sent by the slave device to the target acquisition channel. Finally, it obtains the target device information and various acquisition parameters required for this acquisition task.

[0058] S1022. Based on the acquisition parameters, the first part of the target device and the second part of the target device are accessed in parallel through the first communication link and the second communication link, which are independent of each other and physically isolated, to perform data acquisition operations.

[0059] The first communication link accesses the target device connected to the odd-numbered channel; the second communication link accesses the target device connected to the even-numbered channel; and the number of devices carried by the first and second communication links is balanced.

[0060] In this embodiment, the slave device is configured with two communication links: a first communication link and a second communication link. The first communication link can be understood as a dedicated HART instrument connected to odd-numbered channels within the slave device. The second communication link can be understood as a dedicated HART instrument connected to even-numbered channels within the slave device. The two communication links are completely independent and isolated at the physical layer, each with its own independent transceiver circuitry and communication interface. There are no issues of bus occupancy or message conflicts, enabling completely independent parallel operation.

[0061] Specifically, after parsing the data acquisition command and obtaining the acquisition parameters, the slave device determines the target device to be accessed based on the target acquisition channel in the acquisition parameters. According to the internally pre-configured channel allocation rules, the slave device divides all target device channels into two groups: the first group consists of target devices connected to odd-numbered channels, accessed by the first communication link; the second group consists of target devices connected to even-numbered channels, accessed by the second communication link. The number of devices carried by each link is balanced to avoid overloading a single link and causing acquisition delays. The slave device establishes HART communication connections with its respective target device through the first and second communication links. Both links simultaneously and independently send read commands to their respective HART instruments and receive data returned by the instruments. The two links do not block, wait for, or interfere with each other, performing data acquisition operations synchronously.

[0062] S1023. During the data collection process, update the working status information in real time and wait for the host to poll the data a second time before reporting it. After the data collection is completed, cache the collected device data locally before uploading it to the host.

[0063] In this embodiment, during the data acquisition operation on the first and second communication links, the slave device updates its working status information in real time. When the host polls it again, it immediately reports the status via the high-speed RS485 bus. The slave device reports the task start status at the beginning of acquisition and maintains the task in progress status throughout the acquisition process, allowing the host to monitor the progress of each slave device in real time. If a slave device encounters an abnormal situation such as communication timeout or instrument unresponsiveness during acquisition, it reports a task timeout status, enabling the host to promptly detect and take appropriate abnormality handling measures. After completing the data reading from all target devices, the slave device confirms the integrity and correctness of the acquired device data, temporarily stores the data in its local memory, and then uploads the cached data to the host via the high-speed RS485 bus.

[0064] The method of caching before uploading can effectively avoid communication loss caused by repeated collection, reduce the occupation of high-speed RS485 bus resources, and improve the overall data transmission efficiency.

[0065] As a third optional embodiment of this example, obtaining the working status information and device data reported by each slave device includes: S1031. After sending data acquisition instructions to each slave device, synchronously receive the real-time working status information reported by each slave device.

[0066] In this embodiment, the host does not close the receiving channel while sending data acquisition commands to each slave device one by one, but instead maintains a continuous listening state on the high-speed RS485 bus. After receiving the data acquisition command and returning a confirmation response, each slave device autonomously starts its data acquisition task, updating its working status information in real time during the acquisition process and waiting for the host to report it during a second poll. After completing the handshake with all target slave devices and issuing the task, the host immediately performs a second poll, receiving the real-time working status information reported by each slave device via the high-speed RS-485 bus. The host receives and records the working status identifier of each slave device, classifying and storing the status information according to the slave device number or device identifier, achieving a one-to-one processing of slave task issuance and status reception.

[0067] Because the high-speed RS485 bus communication rate is much higher than the HART communication rate, the host can complete the operation of issuing commands and receiving status within milliseconds, which does not affect the command issuance speed and can also monitor the execution progress of each slave in real time.

[0068] S1032. After completing the sending and response confirmation of all data acquisition commands from all slave devices, switch to data receiving mode, actively poll each slave device, and obtain the device data cached by each slave device.

[0069] In this embodiment, the data receiving mode can be understood as the working state in which the host only receives the collected data uploaded by each slave after completing the instruction issuance and handshake confirmation of all slaves. In this state, the host no longer sends new data collection instructions.

[0070] Specifically, after the master unit completes sending and receiving data acquisition commands and acknowledgments from all slave units, it stops issuing new commands and switches to data receiving mode. Under normal acquisition conditions, all slave units have completed data acquisition from their connected HART instruments, and the device data is cached in local memory awaiting upload. The master unit actively initiates a polling command process to each slave unit via the high-speed RS485 bus, sending data upload requests to each slave unit in sequence according to their arrangement. Upon receiving the polling request, each slave unit uploads its locally cached device data to the master unit via the high-speed RS485 bus. The master unit sequentially retrieves the device data reported by each slave unit, acknowledging the receipt of each data frame to ensure complete data delivery.

[0071] S1033. Parse, verify and summarize the device data reported by each slave device, and update the corresponding slave device's working status identifier according to the working status information reported by each slave device.

[0072] In this embodiment, the working status identifier can be understood as the status record maintained by the host for each slave device, which is used to reflect the current task execution progress of the slave device.

[0073] Specifically, after actively polling to obtain device data cached by each slave device, the host unpacks and decodes the data according to a preset data format, extracting valid fields such as measurement values ​​and diagnostic information of the corresponding HART instruments for each channel from the data frames. The host performs integrity verification on the extracted data, checking whether the data frames are complete, whether each field is within a reasonable range, and whether there are any anomalies such as packet loss or bit errors. The host centrally summarizes all the verified device data according to dimensions such as slave device number and channel number, forming a structured data set. Based on the working status information reported by each slave device during the acquisition process, the host updates the working status identifiers of each slave device locally. For slave devices that report task completion, their status identifier is updated to "completed". For slave devices that report task timeout, their status identifier is updated to "timeout".

[0074] As a fourth optional embodiment of this example, the method further includes: S1041. When the host determines that there is an abnormal slave device that has timed out of executing a task based on the working status information, it updates the task execution status in the task execution queue and switches to the next slave device to query the device data.

[0075] In this embodiment, an abnormal slave device can be understood as a slave device that encounters an abnormal situation during the execution of a data acquisition task. Task execution timeout can be understood in two ways: firstly, the time interval between the master sending the acquisition task to the target slave device and the slave device reporting its working status information exceeds the master's preset allowed waiting time, i.e., the slave device response timeout. This situation indicates that the slave device may have encountered problems such as a hardware communication link interruption; secondly, the time interval between the slave device sending the command frame to be executed to the target channel and the field device replying that the slave device has data exceeds the slave device's preset allowed waiting time, i.e., the target device response timeout. This situation indicates that the slave device may have encountered problems such as the target device not responding during the acquisition process.

[0076] Specifically, while receiving real-time operational status information reported by each slave device, the host continuously monitors the task execution progress of each slave device. The host internally presets an allowed waiting time for each slave device to complete its data acquisition task. When the host receives a task execution timeout status report from a slave device, or fails to receive a task completion status report from the slave device within the preset allowed waiting time, it determines that the slave device has an execution timeout anomaly and identifies it as an abnormal slave device. The host updates the task execution status of the abnormal slave device to "execution timeout" and records it in the information field of the corresponding task in the task execution queue, facilitating subsequent task closed-loop management and anomaly tracing. After the update is completed, the host no longer waits for the acquisition results from the abnormal slave device and immediately switches to the next slave device according to the slave device sequence to continue executing the device data query operation.

[0077] S1042. When the host determines that there is an interruption in the communication link of an abnormal slave device or no response from the corresponding target device based on the working status information, the abnormal information is recorded and the communication status identifier between the abnormal slave device and the target acquisition channel is updated synchronously.

[0078] In this embodiment, a communication link interruption can be understood as the RS485 communication connection between the master and slave devices being broken due to physical line failure, power failure of the slave device, or other reasons, preventing the master from performing normal data interaction with the slave device. No response from the target device can be understood as the HART instrument connected to the slave device failing to respond to the read command issued by the slave device within a preset time due to device failure, power failure, or communication address mismatch. Abnormal information can be understood as data used to record abnormal events.

[0079] Specifically, while receiving real-time operational status information from each slave device, the host continuously monitors the communication status and data acquisition execution of each slave device. When the host detects via the high-speed RS485 bus that it cannot establish a communication connection with a slave device, or that multiple consecutive command transmissions fail to receive any response, the host determines that the slave device has a communication link interruption anomaly. When the operational status information reported by the slave device contains an exception code or fault information indicating that the target device is unresponsive, the host identifies the corresponding unresponsive target device by parsing this information. For slave devices with communication link interruptions, the host records the device identifier of the slave device and promptly replies to the host computer during diagnosis. For unresponsive target devices, the host records the corresponding target channel identifier and promptly replies to the host computer during diagnosis. After completing the anomaly information recording, for slave devices with communication link interruption issues, the host skips the abnormal slave device in subsequent data acquisition processes, no longer sending data acquisition commands to it or waiting for it to report data.

[0080] Figure 3 This is a schematic diagram of a network architecture provided by an embodiment of the present invention. Figure 3 The meanings of the labels in the attached figures are as follows: 1: HART multiplexer host 1; 2: HART multiplexer slave 1; 3: HART multiplexer slave device 2; 4: HART instruments connected to the HART multiplexer host; 5: HART instruments connected to slave unit 1 of the HART multiplexer; 6: HART instruments connected to slave unit 2 of the HART multiplexer; 7: HART multiplexer slave 15; 8: PC version; 9: RS485 communication bus between the PC and HART multiplexer host 1; 10: The first HART communication link between the HART multiplexer host and the field instrument; 11: Odd-numbered field channels handled by the HART multiplexer host; 12: The second HART communication link for the HART multiplexer host to access field instruments; 13: Even-numbered field channels handled by the HART multiplexer host; 14: RS485 communication bus between the HART multiplexer master and slave devices; 15: RS485 communication bus between the PC and HART multiplexer host 2; 16: HART multiplexer host 2.

[0081] like Figure 3 As shown, multiple HART multiplexer hosts are used and cascaded via RS-485. In this configuration, the host address is the RS-485 address, supporting a maximum of 64 hosts connecting to the PC. Under a single RS-485 address, each host can be cascaded with 15 slave devices, and each host / slave can connect to a maximum of 16 HART meters. Therefore, one HART multiplexer host can centrally manage 256 HART meters ((1+15)×16=256). This parallel data acquisition system enables real-time data acquisition and unified configuration management of 16384 HART meters (64×(1+15)×16=16384) from the PC.

[0082] The HART multiplexer master unit 1 communicates with 15 slave units via a single independent high-speed RS485 bus with a configured baud rate of 115200bps. Each master / slave unit has two independent HART communication links. The first HART communication link is used to establish communication connections with eight HART instruments in channels 1, 3, 5, 7, 9, 11, 13, and 15. The second HART communication link is used to establish communication connections with eight HART instruments in channels 2, 4, 6, 8, 10, 12, 14, and 16. All HART communication links are independent, physically isolated, and do not interfere with each other.

[0083] In this embodiment, the core task scheduling logic of one host and 15 slave devices revolves around dual HART communication links to achieve the synchronous execution of 32 acquisition tasks. The specific acquisition process is as follows: After the system initialization is completed, the host receives the instruction task from the PC and responds, then starts a pipelined task distribution process. Combined with the hardware configuration of dual HART communication links of each device, a queue of 32 synchronously executable acquisition tasks is formed. Among them, the host itself has 2 HART communication links corresponding to 2 acquisition tasks, and each of the 15 slave devices has 2 HART communication links corresponding to 30 acquisition tasks, for a total of 32 acquisition tasks. All tasks can be executed synchronously and in parallel, maximizing the utilization of system communication resources.

[0084] During task scheduling, the host strictly follows the interaction logic of "issuing instructions → waiting for slave response → continuing to the next slave," sequentially issuing data acquisition task instructions to 15 slaves. The instructions clearly specify the target slave number, target channel number, target acquisition instruction number, retransmission parameters, etc. After host 1 issues an acquisition task to the first channel of slave 1, it waits 20ms for a response confirmation. Once the slave 1's response is confirmed, host 1 immediately issues an acquisition task to the second channel of slave 1. After completion, it switches to issuing instructions to slave 2 without waiting for slave 1 to complete acquisition. After slave 1 responds to host 1, its two independent HART communication links immediately and synchronously start acquisition, establishing communication with the HART instruments mounted on the target channels. The two links work in parallel without interference, synchronously completing data acquisition from the two HART instruments.

[0085] Following this pattern, after the 15 slave devices complete their task responses in sequence, they all synchronously start their own dual HART communication links for parallel data acquisition. The time difference between the start-up of adjacent slave devices is only tens of milliseconds, forming a state in which 32 data acquisition tasks are carried out simultaneously.

[0086] After the master unit completes the task distribution to all slave units, it enters the status monitoring and data receiving mode. Utilizing the high-speed 115200bps 485 bus, it receives data in real-time from the 15 slave units and its own dual HART links. Because the 32 acquisition tasks are executed synchronously, the total time for the master unit to poll the 15 slave units is controlled to approximately 1 second (the total time for the master unit to distribute the 32 tasks and for the slave units to respond). Furthermore, the slave unit acquisition and the master unit's data reception processes completely overlap, significantly shortening the overall acquisition cycle. After each slave unit completes acquisition via its two HART links, it caches the data locally and then asynchronously uploads it to the master unit via the 485 bus, avoiding communication losses caused by repeated acquisition. If one HART link of a slave unit fails, due to the physical isolation between the two links, the other link can still complete acquisition normally without affecting the acquisition work of other slave units and the master unit, ensuring stable system operation.

[0087] Assuming the time required for a HART multiplexer to complete one data acquisition (complete HART communication) of a single HART instrument is 1 second, in the traditional serial acquisition mode, the process must proceed in the order of "master acquiring data from its own 16 HART instruments → waiting for each slave to acquire data from its 16 HART instruments in sequence," and each master / slave has only a single HART communication link. In this case, acquiring real-time data from 16 HART instruments would take 16 seconds, and the total time for serial acquisition by 16 acquisition units (1 master + 15 slaves) would be 16 × 16 = 256 seconds. Furthermore, the time for the master to poll each slave needs to be added in, so the actual total time will exceed 260 seconds, which cannot meet the real-time and efficient acquisition requirements of industrial sites.

[0088] Employing the task scheduling mechanism of this invention, relying on the synchronous execution of 32 data acquisition tasks, parallel data acquisition via two HART links on each device, and a high-speed 485 bus with a communication rate of 115200, the total time for the master to send data and the slave to respond for the 32 data acquisition tasks is controlled within 1 second. After the master completes the handshake with the slave, it enters the data listening and receiving mode. Under normal circumstances (all hardware connections are normal, and the instruments respond normally), when master 1 accesses slave 1 again, slave 1 is already ready, and master 1 can directly retrieve the final data. The remaining slaves follow the same procedure. Therefore, the master only needs two rounds of interaction to successfully acquire real-time data from 32 HART instruments, with a total time of 2 × 1 second = 2 seconds.

[0089] Data is collected in groups of 32 field channels, requiring a total of 8 groups. Therefore, the total acquisition time for 256 devices is only 2s × 8 = 16s. Considering the rigor of data calculation, the time to complete data acquisition for 256 HART instruments in this invention is no more than 20s. Compared with the 260s of the traditional serial mode, the acquisition time is significantly reduced, fully demonstrating the significant advantages of this invention in saving communication time and improving acquisition efficiency. Furthermore, since each link operates independently and in parallel, even if the acquisition time of one HART communication link is extended due to instrument failure, it will not affect the normal acquisition of the other 31 HART communication links. Only the acquisition delay of the 8 instruments corresponding to that link will not affect the overall acquisition progress, further ensuring the real-time performance and stability of the system. It is also clear that the more slave devices and HART instruments there are, the more obvious the advantages of this invention become.

[0090] After data acquisition is complete, the host computer parses, verifies, and summarizes the final data from all 32 acquisition tasks, and then uploads it to the PC via the 485 communication bus, enabling the PC to read data from 16,384 HART instruments in real time and efficiently. This embodiment, through a scheduling mechanism that executes 32 acquisition tasks simultaneously, combined with the advantages of parallel acquisition via dual HART communication links and high-speed 485 communication, reduces the overall acquisition time by more than 80% compared to the traditional serial polling mode, fully demonstrating the efficiency, stability, and feasibility of this invention in scenarios with multiple slave devices and multiple HART instruments.

[0091] This invention transforms the traditional serial waiting acquisition mode into a parallel overlapping acquisition mode, and converts slow on-site acquisition and slow query reporting into autonomous parallel acquisition and high-speed 485 batch reporting. By combining the host's pipelined command issuance with the autonomous parallel acquisition of each slave, the task interaction time between the host and slave is shortened from several seconds in the traditional serial waiting to milliseconds of command interaction. After receiving the command, each slave synchronously and in parallel executes the acquisition task. The host's command issuance and the slave's acquisition are completely overlapped in time, and the overall acquisition cycle no longer increases linearly with the number of slaves. The more slaves and the more HART instruments there are, the more obvious the advantages of the parallel acquisition of this invention become, which is especially suitable for industrial automation fields with high real-time requirements such as petroleum, chemical, power, and metallurgy. Compared to existing technologies, the dual parallel data acquisition mode of this invention significantly reduces the data acquisition time of the host for a large number of HART instruments. Taking 256 HART instruments as an example, traditional serial acquisition takes about 260 seconds, while this invention takes less than 20 seconds, a reduction of over 80%. The intelligent slave devices enable them to autonomously execute data acquisition tasks, adapting to more complex field instrument communication situations. The system has extremely high scalability; even with an increase in the number of slave devices, the overall acquisition time will not increase significantly, adapting to the needs of industrial sites of different scales. It has strong compatibility, being fully compatible with existing HART instruments in industrial sites without requiring modifications to existing HART instrument communication protocols and hardware. Deployment and maintenance costs are low; master / slave devices experiencing acquisition problems can be easily replaced without affecting the existing network topology. This invention can provide reliable data support for real-time monitoring, scheduling, and optimization of industrial production.

[0092] In one embodiment, Figure 4 This is a schematic diagram of the structure of a data acquisition system provided in an embodiment of the present invention. Figure 4 As shown, the system includes: A host computer 20, at least one host computer 21 connected to the host computer 20, and at least one slave computer 22 connected to each host computer 21; The host 21 is used to send data acquisition instructions to each of the slave devices one by one, and after receiving the response confirmation from the current slave device, it continues to send the data acquisition instructions to the next slave device 22. The slave device 22 is used to autonomously start a data acquisition task with the connected target device after returning a response confirmation to the host 21, and report the working status information and the acquired device data to the host 21. The host 21 is used to obtain the working status information and device data reported by each of the slave devices 22.

[0093] The data acquisition system adopted in this technical solution solves the problems of low communication efficiency, long acquisition time, and heavy burden on the host caused by serial polling and passive waiting of slave devices in traditional acquisition methods, and significantly improves the real-time performance and overall stability of data acquisition in large-scale HART instrument systems.

[0094] Optionally, the host 21 includes: The queue creation module is used to obtain the task instructions issued by the host computer, return an acknowledgment response to the host computer, and create multiple task execution queues according to the instruction type of the task instructions. The current queue determination module is used to determine the current task execution queue in sequence according to the priority of the task execution queues after the creation of the multiple task execution queues is completed; The instruction sending module is used to send a data acquisition instruction corresponding to the current task execution queue to the current slave device, and after receiving the response confirmation from the current slave device, continue to send the data acquisition instruction to the next slave device until the response confirmation is received from all slave devices.

[0095] Optionally, the queue creation module is specifically used for: Obtain the task instructions issued by the host computer and return an acknowledgment response to the host computer. The task instructions include ordinary communication instructions, channel scanning instructions, and dynamic scanning instructions. Create a regular communication task queue, a channel scan task queue, and a dynamic scan task queue. Configure the task corresponding to the regular communication instruction to the regular communication task queue, configure the task corresponding to the channel scan instruction to the channel scan task queue, and configure the task corresponding to the dynamic scan instruction to the dynamic scan task queue.

[0096] Optionally, the instruction sending module is specifically used for: The slave device arrangement order and the current slave device are determined according to the preset strategy; Send a data acquisition command to the current slave device, carrying the slave device identifier, target acquisition channel, anomaly handling rules, and the target device's pending command frame; After sending, wait for a preset interval and receive the response confirmation returned by the current slave device; After receiving the response confirmation, the data acquisition command is sent to the next slave device in the slave device arrangement order until response confirmations are received from all slave devices.

[0097] Optionally, the slave device 22 is specifically used for: The data acquisition command is parsed to determine the target device and the corresponding acquisition parameters; Based on the acquisition parameters, the first part of the target device and the second part of the target device are accessed in parallel through the first communication link and the second communication link, which are independent of each other and physically isolated, to perform data acquisition operations. During the data collection process, the system updates the working status information in real time and waits for the host to poll it a second time before reporting it. After the data collection is completed, the collected device data is first cached locally and then uploaded to the host.

[0098] Optionally, the first communication link accesses the target device connected to the odd-numbered channel; the second communication link accesses the target device connected to the even-numbered channel; and the number of devices carried by the first communication link and the second communication link are balanced.

[0099] Optionally, the host 21 is specifically used for: After sending data acquisition commands to each of the slave devices, the system synchronously receives real-time operating status information reported by each of the slave devices. After completing the sending and response confirmation of all data acquisition commands from all slave devices, the system switches to data receiving mode and actively polls each slave device to obtain the device data cached by each slave device. The device data reported by each slave device is parsed, verified, and summarized, and the working status identifier of the corresponding slave device is updated according to the working status information reported by each slave device.

[0100] Optionally, the host 21 is used to update the task execution status in the task execution queue and switch to the next slave to query device data when it is determined that there is an abnormal slave execution timeout based on the working status information. The host 21 is used to record abnormal information and synchronously update the communication status identifier between the slave device and the target acquisition channel when it is determined from the working status information that the communication link of the abnormal slave device is interrupted or the corresponding target device is unresponsive.

[0101] Optionally, the high-speed communication bus is an RS485 bus; the target device is an addressable remote sensor high-speed channel HART device.

[0102] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0103] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A data acquisition method, characterized in that, This system is applied to a data acquisition system, which includes at least one host computer, each host computer being connected to at least one slave computer via a high-speed communication bus, and includes: The host sends data acquisition commands to each of the slave devices one by one, and after receiving the response confirmation from the current slave device, it continues to send the data acquisition command to the next slave device. After returning a confirmation response to the host, the slave device autonomously initiates a data acquisition task with the connected target device and reports its working status information and the acquired device data to the host. The host obtains the working status information and device data reported by each of the slave devices.

2. The method according to claim 1, characterized in that, The data acquisition system further includes a host computer connected to each of the host computers. The host computer sends data acquisition commands to each of the slave computers sequentially, and after receiving a response confirmation from the current slave computer, continues to send the data acquisition command to the next slave computer, including: Obtain the task instruction issued by the host computer, return a confirmation response to the host computer, and create multiple task execution queues according to the instruction type of the task instruction; After the creation of the multiple task execution queues is completed, the current task execution queue is determined sequentially according to the priority of the task execution queues; Send a data acquisition command corresponding to the current task execution queue to the current slave device, and after receiving the response confirmation from the current slave device, continue to send the data acquisition command to the next slave device until the response confirmation is received from all slave devices.

3. The method according to claim 2, characterized in that, The process of obtaining the task instruction issued by the host computer, returning a confirmation response to the host computer, and creating multiple task execution queues according to the instruction type of the task instruction includes: Obtain the task instructions issued by the host computer and return an acknowledgment response to the host computer. The task instructions include ordinary communication instructions, channel scanning instructions, and dynamic scanning instructions. Create a regular communication task queue, a channel scan task queue, and a dynamic scan task queue. Configure the task corresponding to the regular communication instruction to the regular communication task queue, configure the task corresponding to the channel scan instruction to the channel scan task queue, and configure the task corresponding to the dynamic scan instruction to the dynamic scan task queue.

4. The method according to claim 2, characterized in that, The step of sending a data acquisition command corresponding to the current task execution queue to the current slave device, and after receiving a response confirmation from the current slave device, continuing to send the data acquisition command to the next slave device until response confirmations are received from all slave devices, includes: The slave device arrangement order and the current slave device are determined according to the preset strategy; Send a data acquisition command to the current slave device, carrying the slave device identifier, target acquisition channel, anomaly handling rules, and the target device's pending command frame; After sending, wait for a preset interval and receive the response confirmation returned by the current slave device; After receiving the response confirmation, the data acquisition command is sent to the next slave device in the slave device arrangement order until response confirmations are received from all slave devices.

5. The method according to claim 1, characterized in that, After returning a confirmation response to the host, the process of autonomously initiating a data acquisition task with the connected target device and reporting the working status information and the acquired device data to the host includes: The data acquisition command is parsed to determine the target device and the corresponding acquisition parameters; Based on the acquisition parameters, the first part of the target device and the second part of the target device are accessed in parallel through the first communication link and the second communication link, which are independent of each other and physically isolated, to perform data acquisition operations. During the data collection process, the system updates the working status information in real time and waits for the host to poll it a second time before reporting it. After the data collection is completed, the collected device data is first cached locally and then uploaded to the host.

6. The method according to claim 5, characterized in that, The first communication link accesses the target device connected to the odd-numbered channel; the second communication link accesses the target device connected to the even-numbered channel; the number of devices carried by the first communication link and the second communication link are balanced.

7. The method according to claim 1, characterized in that, The step of obtaining the working status information and device data reported by each of the slave devices includes: After sending data acquisition instructions to each of the slave devices, the system synchronously receives real-time working status information reported by each of the slave devices. After completing the sending and response confirmation of all data acquisition commands from all slave devices, the system switches to data receiving mode and actively polls each slave device to obtain the device data cached by each slave device. The device data reported by each slave device is parsed, verified, and summarized, and the working status identifier of the corresponding slave device is updated according to the working status information reported by each slave device.

8. The method according to claim 1, characterized in that, Also includes: When the host determines that an abnormal slave device has timed out of task execution based on the working status information, it updates the task execution status in the task execution queue and switches to the next slave device to query device data. When the host determines, based on the working status information, that there is a communication link interruption of an abnormal slave device or that the corresponding target device is unresponsive, it records the abnormal information and synchronously updates the communication status identifier between the abnormal slave device and the target acquisition channel.

9. The method according to claim 1, characterized in that, The high-speed communication bus is an RS485 bus; the target device is an addressable remote sensor high-speed channel HART device.

10. A data acquisition system, characterized in that, It includes a host computer, at least one host computer connected to the host computer, and at least one slave computer connected to each host computer; The host is used to send data acquisition instructions to each of the slave devices one by one, and after receiving the response confirmation from the current slave device, continue to send the data acquisition instructions to the next slave device. The slave device is used to autonomously initiate a data acquisition task with the connected target device after returning a response confirmation to the host, and report the working status information and the acquired device data to the host. The host is used to acquire the working status information and device data reported by each of the slave devices.