Syringe Pump

Peristaltic Pump

Recorded Data

The Syringe Pump records the following attributes during operation:

  • status: The status of the syringe pump. It is represented as a u8 value and can have one of the following values:
    • 0: Stopped
    • 1: Infusing
    • 2: Withdrawing
    • 3: Paused
  • mode: The operational mode of the syringe pump. It is represented as a u8 value and can have one of the following values:
    • 0: Continuous
    • 1: Finite
  • ul_min: The current infusion or withdrawal rate of the pump in microliters per minute (uL/min). The value is always positive.
  • finite_value: The target volume to dispense or withdraw when operating in Finite mode. The value is always positive.
  • finite_units: The units of the target volume to dispense or withdraw when operating in Finite mode. It is represented as a u8 value.
  • finite_ul_target: The target volume in microliters (uL) to dispense or withdraw when operating in Finite mode.
  • finite_ul_infused: The volume in microliters (uL) infused so far when operating in Finite mode.
  • finite_ul_withdrawn: The volume in microliters (uL) withdrawn so far when operating in Finite mode.
  • position: The plunger position of the syringe pump, ranging from 0 to 1. A value of 0 indicates the fully infused position, and a value of 1 indicates the fully withdrawn position.
  • position_target: The plunger target position of the syringe pump, ranging from 0 to 1. A value of 0 indicates the fully infused position, and a value of 1 indicates the fully withdrawn position.
  • valve_position: The valve position of the syringe pump. The mapping of the position to a port depends on the valve configuration.
  • plunger_mode: The plunger positioning mode of the syringe pump. Not all configurations utilize this field. It is represented as a u8 value.

Python API

The Syringe Pump can be controlled using the Aqueduct Python API. The Python code for interacting with the syringe pump can be found in the aqueduct-py repository.

The syringe.py module provides functions and classes to control the syringe pump. You can use this API to set the infusion rate, target volume, and operational mode. The API allows you to integrate the syringe pump into your Python applications and automation scripts.

To use the Python API, you can import the SyringePump class from the syringe.py module and create an instance of the pump. Then, you can call the available methods to control and monitor the pump's operation.

"""SyringePump demo.

This demo program initializes a SyringePump device, sets
the pump to run continuously at increasing flow rates,
and then reverses the direction of each pump input one by
one as it reaches 0 flow rate. The program continuously
checks the flow rates of each pump input and sends new start
commands to reverse the direction if the flow rate
reaches 0.
"""
# import necessary modules
import time
from typing import List

from aqueduct.core.aq import Aqueduct
from aqueduct.core.aq import InitParams
from aqueduct.devices.pump.syringe import Status
from aqueduct.devices.pump.syringe import SyringePump

# get initialization parameters
params = InitParams.parse()
# create an instance of the Aqueduct API with the given user_id, ip_address and port
aq = Aqueduct(params.user_id, params.ip_address, params.port)
# initialize the pump
aq.initialize(params.init)
# set a delay between sending commands to the pump
aq.set_command_delay(0.05)

# get the SyringePump device
pump: SyringePump = aq.devices.get("syringe_pump_000001")
# create a list to store the last direction used for each pump
last_directions: List[Status] = []

commands = pump.make_commands()
# create start commands for each pump at increasing rates
for i in range(0, pump.len):
    # create a command to set the pump to continuous mode, with a rate of i+1 ml/min, infusing
    c = pump.make_start_command(
        mode=pump.MODE.Finite,
        rate_units=pump.RATE_UNITS.MlMin,
        rate_value=i + 1,
        direction=pump.STATUS.Infusing,
        finite_units=pump.FINITE_UNITS.Ml,
        finite_value=1.0,
    )
    # store the direction used for this command
    last_directions.append(pump.STATUS.Infusing)
    # set the command for this pump
    pump.set_command(commands, i, c)

# start the pumps
pump.start(commands)

while True:
    # get the flow rates for each pump
    ul_min = pump.get_ul_min()
    # create a new list of commands for each pump
    commands = pump.make_commands()
    # check if any pumps have a flow rate of 0, and if so, reverse their direction
    for i, s in enumerate(ul_min):
        if ul_min[i] == 0:
            # reverse the direction of this pump
            d = last_directions[i].reverse()
            # create a new command with the reversed direction
            c = pump.make_start_command(
                mode=pump.MODE.Continuous,
                rate_units=pump.RATE_UNITS.MlMin,
                rate_value=i + 1,
                direction=d,
                finite_units=pump.FINITE_UNITS.Ml,
                finite_value=1.0,
            )
            # update the last direction used for this pump
            last_directions[i] = d
            # set the new command for this pump
            pump.set_command(commands, i, c)
    # start the pumps with the new commands
    pump.start(commands)
    # wait for a short time before checking again
    time.sleep(0.05)

Please refer to the aqueduct-py repository for more details on how to use the Python API with the Syringe Pump.

E-Stop Behavior

In the Aqueduct system, pressing the E-Stop button has a specific behavior for syringe pumps:

  • When the Aqueduct E-Stop button is pressed, all syringe pumps will immediately stop their operation.
  • Upon resumption, the operator will have the option to manually resume the pump's operation by selecting the appropriate control settings.

Supported Hardware

  • with the 2x Can + 2x RS485 device node, supports control of up to 16 TriContinent C(X) series syringe pumps