Peristaltic Pump

Peristaltic Pump

Recorded Data

The Peristaltic Pump records the following attributes during operation:

  • ml_target: The target volume in milliliters (ml) for the pump operation.
  • ml_done: The volume in milliliters (ml) that has been pumped so far.
  • ml_min: The current pump rate in milliliters per minute (ml/min).
  • status: The status of the peristaltic pump. It is represented as a u8 value and can have one of the following values:
    • 0: Stopped
    • 1: Clockwise
    • 2: CounterClockwise
  • mode: The operational mode of the peristaltic pump. It is represented as a u8 value and can have one of the following values:
    • 0: Continuous
    • 1: Finite

Python API

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

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

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

"""A module for controlling peristaltic pumps using the Aqueduct framework.

This demo program initializes a PeristalticPump device, sets the pump to run
continuously at a specific flow rate, and then reverses the direction of the
pump's rotation after a certain amount of time has passed. The program continuously
checks the flow rate of the pump and sends new start commands to reverse
the direction if the flow rate reaches 0.
"""
from aqueduct.core.aq import Aqueduct
from aqueduct.core.aq import InitParams
from aqueduct.devices.pump import PeristalticPump

# parse initialization parameters and create Aqueduct instance
params = InitParams.parse()
aq = Aqueduct(params.user_id, params.ip_address, params.port)

# initialize the devices and set a command delay
aq.initialize(params.init)
aq.set_command_delay(0.05)

# get the peristaltic pump device and create a command object
pump: PeristalticPump = aq.devices.get("peristaltic_pump_000001")
commands = pump.make_commands()
c = pump.make_start_command(
    mode=pump.MODE.Continuous,
    rate_units=pump.RATE_UNITS.MlMin,
    rate_value=2,
    direction=pump.STATUS.Clockwise,
)

# set the command for each channel and start the pump
for i in range(0, pump.len):
    pump.set_command(commands, i, c)

pump.start(commands)

# set the maximum speed and speed increment for the pump
MAX_SPEED: float = 50
INCREMENT: float = 0.1

# calculate the number of steps based on the maximum speed and increment
STEPS = int(MAX_SPEED / INCREMENT)

# loop through the speed increment steps
while True:
    for i in range(0, STEPS):
        commands = pump.make_commands()

        # create a command to change the pump speed
        c = pump.make_change_speed_command(
            rate_value=i * INCREMENT, rate_units=pump.RATE_UNITS.MlMin
        )

        # set the command for each channel and change the pump speed
        for i in range(0, pump.len):
            pump.set_command(commands, i, c)

        pump.change_speed(commands)

    # loop through the speed decrement steps
    for i in range(STEPS, 0, -1):
        commands = pump.make_commands()

        # create a command to change the pump speed
        c = pump.make_change_speed_command(
            rate_value=i * INCREMENT, rate_units=pump.RATE_UNITS.MlMin
        )

        # set the command for each channel and change the pump speed
        for i in range(0, pump.len):
            pump.set_command(commands, i, c)

        pump.change_speed(commands)

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

E-Stop Behavior

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

  • When the Aqueduct E-Stop button is pressed, all peristaltic 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 Masterflex L/S® Mixed Signal (4-20mA I/O, isolated DIO) device node, supports control of a single Masterflex L/S® Pump

  • with the Stepper Motor device node, supports control of a single Boxer 9QQ/15QQ Pump

  • with the 2x Can + 2x RS485 device node, supports control of six Boxer 9QQ/15QQ Pumps via Can or RS485