A configuration table-driven multi-channel parallel control method, system, device, and medium for syringe pumps.

The configuration table-driven multi-parallel control method for syringe pumps solves the problems of poor real-time performance and high resource consumption in traditional syringe pump control, realizes high-concurrency parallel control and flexible expansion, and reduces the risk of system deadlock.

CN123067289APending Publication Date: 2026-11-10SHANGHAI TOPWAY AUTO-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611358883.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-03
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Traditional syringe pump control methods result in poor real-time system performance, high resource consumption, and difficulty in flexible expansion, especially in multi-channel high-concurrency applications where there is a risk of communication conflicts and deadlocks.

Method used

A configuration table-driven multi-parallel control method for injection pumps is adopted. By constructing a static configuration table and a non-blocking state machine, asynchronous control and software-level mutual exclusion verification of the injection pump are achieved, thus abandoning the traditional serial blocking and waiting model.

Benefits of technology

It achieves high concurrency and parallelism, system real-time performance, reduces resource overhead, improves system decoupling and scalability, avoids communication conflicts and deadlocks, and supports seamless access to heterogeneous hardware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123067289A_ABST
    Figure CN123067289A_ABST
Patent Text Reader

Abstract

This invention discloses a configuration table-driven method, system, device, and medium for multi-channel parallel control of injection pumps. By constructing a structured configuration table containing underlying RS485 slave addresses, action types, step parameters, and multi-level sub-commands, the abstract control logic is completely decoupled from the underlying hardware instructions. During system operation, the control engine uses a non-blocking state machine to perform main loop polling scheduling of each injection pump entry in the configuration table. For pump operations with the same bus address, a pre-software layer conflict check is implemented, and after the instruction is sent, the corresponding entry is switched to a waiting-to-complete or waiting-to-confirmation state, allowing the main loop to continue seamlessly scheduling injection pumps with other independent addresses. This invention achieves efficient parallel control and time-interleaved scheduling of multiple injection pumps using a single master control core and one RS485 bus, avoiding system stuttering and multi-threading overhead caused by traditional blocking waiting, and significantly improving the real-time performance and scalability of multi-channel fluid control systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated fluid control and multi-machine bus communication technology, and in particular to a method, system, device and medium for multi-channel parallel control of an injection pump based on configuration table driving. Background Technology

[0002] In applications such as automated chemical analyzers, medical analytical instruments, microfluidic chip experiments, automated biochemical synthesis, and high-precision liquid proportioning, a single microprocessor (such as an MCU or FPGA) is typically required to control multiple syringe pumps simultaneously to achieve high-precision multi-channel fluid proportioning, quantitative delivery, or ultra-micro-volume extraction. At the hardware networking level, these high-precision syringe pumps typically use an RS485 industrial bus or Ethernet port for master-slave networking, employing a master-slave query-response mechanism for digital communication with the main control system.

[0003] However, traditional syringe pump control methods typically employ a serial control logic of "sending bus commands - blocking and waiting for pump response - continuously blocking and waiting for the pump's physical mechanical action to complete." Since the mechanical extraction or pushing action of the syringe pump usually requires several seconds or even minutes depending on the process flow rate requirements, if the main control software system uses the traditional blocking waiting method, the microprocessor will be forced to get stuck in a specific communication waiting loop during a single pump operation. This prevents it from responding promptly to concurrent control commands from other channel syringe pumps, and also makes it unable to handle sudden sensor interruptions or human-machine interaction events, resulting in extremely poor overall system real-time performance.

[0004] To alleviate these problems to some extent, traditional solutions often introduce multi-threading or real-time operating system (RTOS) multi-task concurrency mechanisms. However, introducing RTOS task scheduling not only significantly increases the RAM and Flash resource overhead of the underlying microprocessor but also leads to frequent bus control contention. When multiple concurrent threads attempt to read and write to the same physical RS485 bus simultaneously, communication collisions and frame data interleaving conflicts are highly likely to occur. To resolve these conflicts, complex hardware mutexes or bus arbitration mechanisms must usually be introduced, greatly increasing the development complexity of the underlying embedded software and the risk of uncontrollable deadlocks. Furthermore, when the fluid control system needs to dynamically add or remove injection pump hardware, or when mixing injection pumps with different underlying hardware parameters (e.g., different total number of steps in the full stroke, different physical ranges, and slightly different communication protocols), the traditional hard-coded control code needs extensive reconstruction and recompilation. The system's decoupling, scalability, and subsequent maintenance costs are difficult to meet the needs of large-scale industrial deployment. Summary of the Invention

[0005] According to an embodiment of the present invention, a multi-channel parallel control method for an infusion pump based on a configuration table is provided, comprising the following steps: Step S1: Construct a structured static configuration table for the infusion pump. The configuration table defines multiple infusion pump control entries. Each entry must contain at least a unique control identifier (mach), RS485 slave address (addr), request action type (type), base steps (base_steps), maximum number of retries (retry_max), multi-level sequential underlying sub-command structure (cmds), and runtime state machine flag (req_pending). Step S2: Receive the control request of the target injection pump through the application layer, retrieve the configuration table according to the unique control identifier, and when the runtime state machine flag of the corresponding entry is in the idle state (PUMP_IDLE), write the runtime operand and working type of the control request into the entry, and set the state machine flag to the pending state (PUMP_PENDING). Step S3: The main loop uses non-blocking polling to retrieve each entry in the static configuration table. When the state machine flag of the target entry is detected to be in the pending execution state, a software-level mutual exclusion check is first performed through the slave address. If the check passes, the target microstep number is dynamically calculated based on the running operands and the basic step number. The control command sequence is then asynchronously sent to the target injection pump in a multi-level order of the underlying sub-command structure. Subsequently, the state machine flag is changed to the waiting-to-complete state. Step S4: In the subsequent main loop polling cycle, the state of entries marked as non-idle is tracked and maintained. The physical action execution result of each injection pump is determined by non-blocking polling or counter. After the action is completed or the timeout limit is reached, the corresponding task completion callback is triggered, and the state machine flag is reset to the idle state to realize the parallel interleaved control of multiple injection pumps.

[0006] Furthermore, in step S1, the multi-level sequential low-level sub-command structure contains at least three sequentially executed low-level RS485 commands. Each command contains an enable flag, a command code, and a dynamic parameter slot. When the dynamic parameter slot is configured to the first reserved value (0), it is dynamically replaced and filled by the target microstep number calculated in step S3. When it is configured to the second reserved value (0xFFFFFFFF), it is sent directly as a parameterless instruction.

[0007] Furthermore, in step S3, the dynamic calculation formula for the target number of microsteps is: real_steps = (uint32_t)((float)req_oper × base_steps / (*range_ptr)+0.5f) Where real_steps is the calculated number of actual microsteps, req_oper is the control request parameter (request range) input at runtime, base_steps is the total number of basic steps for the full stroke corresponding to this model of injection pump, and range_ptr is the pointer to the real-time correction coefficient of the selected range of the current injection pump.

[0008] Furthermore, in step S3, the software layer mutual exclusion check specifically involves: traversing the entire configuration table to check if there are other entries that have the same RS485 slave address as the current entry to be executed and whose runtime state machine flag is in a conflict state (greater than PUMP_PENDING); if such an entry exists, it is determined that the current bus address is busy, the instruction sending process of the current entry is skipped, the execution state is maintained, and the next round of main loop polling is waited for.

[0009] Furthermore, if the requested action type is a reset action (PUMP_REQ_RESET), the state machine will jump to the pending confirmation state (PUMP_DONE) after sending the reset command. After polling detects that the injection pump is idle due to mechanical reset, it will automatically initiate the underlying precision setting command and change the state machine to the precision setting state (PUMP_PRECISION). The state machine will be reset to the idle state only after the precision setting is completed.

[0010] Furthermore, in step S4, the state machine flag includes the following five discrete states: idle state PUMP_IDLE, pending execution state PUMP_PENDING, waiting for completion state PUMP_WAITING, precision setting state PUMP_PRECISION, and pending confirmation state PUMP_DONE. An asynchronous counter runs in the pending confirmation state PUMP_DONE or the precision setting state PUMP_PRECISION. If the cumulative polling count of the counter exceeds a preset safety cutoff threshold, the state machine flag of the current entry is forcibly reset to the idle state PUMP_IDLE to provide bus deadlock protection.

[0011] Furthermore, the preset safety threshold for the cumulative polling count of the counter is 400 times.

[0012] According to another embodiment of the present invention, a configuration table-driven multi-channel parallel control system for infusion pumps is also provided, which applies the configuration table-driven multi-channel parallel control method for infusion pumps of the previous embodiment, and includes: Configuration table storage module: used for static storage of configuration tables, statically decoupling abstract business instructions from the physical parameters of the underlying pump hardware; Request distribution module: Used to receive fluid operation service requests issued by the application layer, locate configuration table entries by retrieving control identifier codes, and rewrite state machine flags; State machine execution engine: Embedded in the single-threaded main loop of the microprocessor, it is used for non-blocking polling of the scheduling configuration table, sequential execution of address mutual exclusion verification, dynamic parameter parsing, asynchronous instruction outgoing, and timeout deadlock abandonment maintenance.

[0013] According to another embodiment of the present invention, a configuration table-driven multi-parallel control device for an infusion pump is also provided, including a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement the configuration table-driven multi-parallel control method for an infusion pump of the previous embodiment.

[0014] According to another embodiment of the present invention, a computer-readable storage medium is also provided, which stores a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, so as to implement the configuration table-driven multi-parallel control method for an injection pump of the previous embodiment.

[0015] The beneficial effects of this invention are as follows: (1) Extremely high system real-time performance and high concurrency: This invention abandons the traditional serial blocking and waiting model. Through a non-blocking state machine and main loop polling scheduling at the pure software level, a single-threaded system can manage the communication and mechanical operation of dozens of injection pumps simultaneously. The physical mechanical pushing and extraction actions of multiple injection pumps are seamlessly intertwined and efficiently parallelized on the time axis, completely eliminating the "freezing" or implicit system suspension problem caused by microprocessor communication waiting.

[0016] (2) Complete decoupling of hardware and software characteristics and excellent horizontal scalability: By introducing a static configuration table-driven mechanism, all underlying physical characteristics of the injection pump (such as basic step count, slave address, control command sequence, and retry strategy) are digitized and configured. When the fluid control system needs to integrate injection pump hardware of different specifications and heterogeneity (such as a mixed deployment of the P10 series with a full stroke of 48,000 steps and the P11 series with 109,714 steps), developers do not need to make any changes to the underlying state machine execution engine and core scheduling algorithm. They only need to add a line definition to the static configuration table, which greatly shortens the cycle of system upgrades and hardware replacements.

[0017] (3) Reliable software-layer pre-emptive mutual exclusion and communication security: This invention uses a state machine engine to perform pre-emptive conflict verification on the physical slave address before sending instructions, eliminating communication conflicts and instruction overwriting that may occur when sharing the same physical address or the same RS485 bus at the software algorithm level. This lightweight software mutual exclusion design replaces the complex hardware-level semaphores in RTOS, which not only reduces the resource overhead of the microprocessor, but also fundamentally eliminates the risk of system deadlock caused by multi-bus contention.

[0018] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description

[0019] Figure 1 This is the main flowchart of the system scheduling and control execution engine for the configuration table-driven multi-parallel control method for injection pumps according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the five-state discrete state machine transition principle of a single static configuration entry of an injection pump according to an embodiment of the present invention. Detailed Implementation

[0020] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, further illustrating the present invention.

[0021] First, combine Figures 1-2 This invention describes a configuration table-driven multi-channel parallel control method for infusion pumps, which is widely applicable to multi-channel parallel control of infusion pumps.

[0022] like Figures 1-2 As shown in the figure, the configuration table-driven multi-channel parallel control method for an infusion pump according to an embodiment of the present invention includes the following steps: Step S1: Construct a structured static configuration table for the infusion pump. The configuration table defines multiple infusion pump control entries. Each entry must contain at least a unique control identifier (mach), RS485 slave address (addr), request action type (type), base steps (base_steps), maximum number of retries (retry_max), multi-level sequential underlying sub-command structure (cmds), and runtime state machine flag (req_pending). Step S2: Receive the control request of the target injection pump through the application layer, retrieve the configuration table according to the unique control identifier, and when the runtime state machine flag of the corresponding entry is in the idle state (PUMP_IDLE), write the runtime operand and working type of the control request into the entry, and set the state machine flag to the pending state (PUMP_PENDING). Step S3: The main loop uses non-blocking polling to retrieve each entry in the static configuration table. When the state machine flag of the target entry is detected to be in the pending execution state, a software-level mutual exclusion check is first performed through the slave address. If the check passes, the target microstep number is dynamically calculated based on the running operands and the basic step number. The control command sequence is then asynchronously sent to the target injection pump in a multi-level order of the underlying sub-command structure. Subsequently, the state machine flag is changed to the waiting-to-complete state. Step S4: In the subsequent main loop polling cycle, the state of entries marked as non-idle is tracked and maintained. The physical action execution result of each injection pump is determined by non-blocking polling or counter. After the action is completed or the timeout limit is reached, the corresponding task completion callback is triggered, and the state machine flag is reset to the idle state to realize the parallel interleaved control of multiple injection pumps.

[0023] Furthermore, in step S1, the multi-level sequential low-level sub-command structure contains at least three sequentially executed low-level RS485 commands. Each command contains an enable flag, a command code, and a dynamic parameter slot. When the dynamic parameter slot is configured to the first reserved value (0), it is dynamically replaced and filled by the target microstep number calculated in step S3. When it is configured to the second reserved value (0xFFFFFFFF), it is sent directly as a parameterless instruction.

[0024] Furthermore, in step S3, the dynamic calculation formula for the target number of microsteps is: real_steps = (uint32_t)((float)req_oper × base_steps / (*range_ptr)+0.5f) Where real_steps is the calculated number of actual microsteps, req_oper is the control request parameter (request range) input at runtime, base_steps is the total number of basic steps for the full stroke corresponding to this model of injection pump, and range_ptr is the pointer to the real-time correction coefficient of the selected range of the current injection pump.

[0025] Furthermore, in step S3, the software layer mutual exclusion check specifically involves: traversing the entire configuration table to check if there are other entries that have the same RS485 slave address as the current entry to be executed and whose runtime state machine flag is in a conflict state (greater than PUMP_PENDING); if such an entry exists, it is determined that the current bus address is busy, the instruction sending process of the current entry is skipped, the execution state is maintained, and the next round of main loop polling is waited for.

[0026] Furthermore, if the requested action type is a reset action (PUMP_REQ_RESET), the state machine will jump to the pending confirmation state (PUMP_DONE) after sending the reset command. After polling detects that the injection pump is idle due to mechanical reset, it will automatically initiate the underlying precision setting command and change the state machine to the precision setting state (PUMP_PRECISION). The state machine will be reset to the idle state only after the precision setting is completed.

[0027] Furthermore, in step S4, the state machine flag includes the following five discrete states: idle state PUMP_IDLE, pending execution state PUMP_PENDING, waiting for completion state PUMP_WAITING, precision setting state PUMP_PRECISION, and pending confirmation state PUMP_DONE. An asynchronous counter runs in the pending confirmation state PUMP_DONE or the precision setting state PUMP_PRECISION. If the cumulative polling count of the counter exceeds a preset safety cutoff threshold, the state machine flag of the current entry is forcibly reset to the idle state PUMP_IDLE to provide bus deadlock protection.

[0028] Furthermore, the preset safety threshold for the cumulative polling count of the counter is 400 times.

[0029] According to another embodiment of the present invention, a configuration table-driven multi-channel parallel control system for infusion pumps is also provided, which applies the configuration table-driven multi-channel parallel control method for infusion pumps of the previous embodiment, and includes: Configuration table storage module: used for static storage of configuration tables, statically decoupling abstract business instructions from the physical parameters of the underlying pump hardware; Request distribution module: Used to receive fluid operation service requests issued by the application layer, locate configuration table entries by retrieving control identifier codes, and rewrite state machine flags; State machine execution engine: Embedded in the single-threaded main loop of the microprocessor, it is used for non-blocking polling of the scheduling configuration table, sequential execution of address mutual exclusion verification, dynamic parameter parsing, asynchronous instruction outgoing, and timeout deadlock abandonment maintenance.

[0030] According to another embodiment of the present invention, a configuration table-driven multi-parallel control device for an infusion pump is also provided, including a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement the configuration table-driven multi-parallel control method for an infusion pump of the previous embodiment.

[0031] According to another embodiment of the present invention, a computer-readable storage medium is also provided, which stores a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, so as to implement the configuration table-driven multi-parallel control method for an injection pump of the previous embodiment.

[0032] Above, refer to Figures 1-2This paper describes a configuration table-driven multi-channel parallel control method, system, device, and medium for infusion pumps according to embodiments of the present invention. It solves the technical problems of low efficiency and poor real-time performance of the main control system caused by traditional blocking control in multi-channel high-concurrency applications of existing infusion pump control technology, or excessive system resource consumption and high risk of bus conflict due to deep dependence on multi-threaded RTOS, and difficulty in flexible expansion due to excessive software and hardware coupling. It realizes high-concurrency, non-blocking parallel interleaved control of multiple heterogeneous infusion pumps in a single-threaded main loop.

[0033] It should be noted that, in this specification, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes that element.

[0034] Although the present invention has been described in detail through the preferred embodiments above, it should be understood that the above description should not be considered as a limitation of the present invention. Various modifications and substitutions to the present invention will be apparent to those skilled in the art after reading the above description. Therefore, the scope of protection of the present invention should be defined by the appended claims.

Claims

1. A method for multi-channel parallel control of an infusion pump based on a configuration table, characterized in that, Includes the following steps: Step S1: Construct a structured static configuration table for the injection pump. The configuration table defines multiple injection pump control entries. Each entry includes at least a unique control identifier, RS485 slave address, request action type, basic number of steps, maximum number of retries, multi-level sequential low-level sub-command structure, and runtime state machine flag. Step S2: Receive the control request of the target injection pump through the application layer, retrieve the configuration table according to the unique control identifier, and when the runtime state machine flag of the corresponding entry is in an idle state, write the operation number and working type of the control request into the entry, and set the state machine flag to the pending execution state. Step S3: The main loop uses non-blocking polling to retrieve each entry in the static configuration table. When the state machine flag of the target entry is detected to be in the pending execution state, a software layer mutual exclusion check is first performed through the slave address. If the check passes, the target microstep number is dynamically calculated based on the running operands and the basic step number. Then, a control instruction sequence is asynchronously sent to the target injection pump according to the multi-level sequential low-level sub-command structure. Subsequently, the state machine flag is changed to the waiting completion state. Step S4: In the subsequent main loop polling cycle, the entries with the state machine flag set to non-idle state are tracked and maintained. The physical action execution results of each injection pump are read by non-blocking polling or determined by a counter. After the action is completed or the timeout limit is reached, the corresponding task completion callback is triggered, and the state machine flag is reset to the idle state to realize the parallel interleaving control of multiple injection pumps.

2. The method for multi-channel parallel control of an injection pump based on configuration table driving as described in claim 1, characterized in that, In step S1, the multi-level sequential low-level sub-command structure contains at least three sequentially executed low-level RS485 commands. Each command contains an enable flag, a command code, and a dynamic parameter slot. When the dynamic parameter slot is configured to the first reserved value (0), it is dynamically replaced and filled by the target microstep number calculated in step S3. When it is configured to the second reserved value, it is sent directly as a parameterless instruction.

3. The method for multi-channel parallel control of an injection pump based on configuration table driving as described in claim 1, characterized in that, In step S3, the dynamic calculation formula for the target number of microsteps is: Where real_steps is the calculated number of actual microsteps, req_oper is the control request parameter (request range) input at runtime, base_steps is the total number of basic steps for the full stroke corresponding to this model of injection pump, and range_ptr is the pointer to the real-time correction coefficient of the selected range of the current injection pump.

4. The multi-channel parallel control method for an infusion pump based on configuration table driving as described in claim 1, characterized in that, In step S3, the software layer mutual exclusion check specifically involves: traversing the entire configuration table to check if there are other entries that have the same RS485 slave address as the current entry to be executed and whose runtime state machine flags are in conflict; if so, it is determined that the current bus address is busy, the instruction sending process of the current entry is skipped, the pending execution state is maintained, and the next round of main loop polling is waited for.

5. The method for multi-channel parallel control of an injection pump based on configuration table driving as described in claim 1, characterized in that, If the requested action type is a reset action, the state machine jumps to the pending confirmation state after sending the reset command. After polling detects that the injection pump is idle, it automatically initiates the underlying precision setting command and changes the state machine to the precision setting state. The state machine is then reset to the idle state only after the precision setting is completed.

6. The method for multi-channel parallel control of an injection pump based on configuration table driving as described in claim 1, characterized in that, In step S4, the state machine flag includes the following five discrete states: idle state, pending execution state, waiting to complete state, precision setting state, and pending confirmation state. The entry runs an asynchronous counter in the pending confirmation state or precision setting state. If the cumulative polling count of the counter exceeds a preset safety cutoff threshold, the state machine flag of the current entry is forcibly reset to the idle state to provide bus deadlock protection.

7. The multi-channel parallel control method for an injection pump based on configuration table driving as described in claim 6, characterized in that, The preset safety threshold for the cumulative polling count of the counter is 400 times.

8. A configuration table-driven multi-channel parallel control system for an infusion pump, employing the configuration table-driven multi-channel parallel control method for an infusion pump as described in any one of claims 1 to 7, characterized in that, Include: Configuration table storage module: used to statically store the configuration table, statically decoupling the abstract business instructions from the physical parameters of the underlying pump hardware; Request distribution module: used to receive fluid operation service requests issued by the application layer, locate the configuration table entry by retrieving the control identifier code, and rewrite the state machine flag; State machine execution engine: Embedded in the single-threaded main loop of the microprocessor, it is used for non-blocking polling and scheduling of the configuration table, sequential execution of address mutual exclusion verification, dynamic parameter parsing, asynchronous instruction outgoing, and timeout deadlock abandonment maintenance.

9. A configuration table-driven multi-channel parallel control device for an injection pump, characterized in that, The system includes a memory and a processor. The memory stores a computer program that can be executed by the processor to implement the configuration table-driven multi-channel parallel control method for an infusion pump as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The device contains a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, to implement the configuration table-driven multi-parallel control method for an infusion pump as described in any one of claims 1 to 7.