pump - A simple interface to the Cetoni neMESYS syringe pump system

Please specify the name of the pump configuration to use in the PsychoPy preferences under Hardware / Qmix pump configuration. See the readme file of the pyqmix project for details on how to set up your computer and create the configuration file.

Simple interface to the Cetoni neMESYS syringe pump system, based on the pyqmix library. The syringe pump system is described in the following publication:

CA Andersen, L Alfine, K Ohla, & R Höchenberger (2018): “A new gustometer: Template for the construction of a portable and

modular stimulator for taste and lingual touch.”

Behavior Research Methods. doi: 10.3758/s13428-018-1145-1

class psychopy.hardware.qmix.Pump(index, volumeUnit='mL', flowRateUnit='mL/s', syringeType='50 mL glass')[source]

An interface to Cetoni neMESYS syringe pumps, based on the pyqmix library.

Parameters
  • index (int) – The index of the pump. The first pump in the system has index=0, the second index=1, etc.

  • volumeUnit ('mL') – The unit in which the volumes are provided. Currently, only ‘ml’ is supported.

  • flowRateUnit ('mL/s' or 'mL/min) – The unit in which flow rates are provided.

  • syringeType ('25 mL glass' or '50 mL glass') – Type of the installed syringe, as understood by pyqmix.

aspirate(volume, flowRate, waitUntilDone=False, switchValveWhenDone=False)[source]

Aspirate the specified volume.

Parameters
  • volume (float) – The volume to aspirate.

  • flowRate (float) – The desired flow rate.

  • waitUntilDone (bool) – Whether to block program execution until calibration is completed.

  • switchValveWhenDone (bool) – If True, switch the valve to dispense position after the aspiration is finished. Implies wait_until_done=True.

calibrate(waitUntilDone=False)[source]

Calibrate the syringe pump.

You must not use this function if a syringe is installed in the pump as the syringe may be damaged!

Parameters

waitUntilDone (bool) – Whether to block program execution until calibration is completed.

clearFaultState()[source]

Switch the pump back to an operational state after an error had occurred.

dispense(volume, flowRate, waitUntilDone=False, switchValveWhenDone=False)[source]

Dispense the specified volume.

Parameters
  • volume (float) – The volume to dispense.

  • flowRate (float) – The desired flow rate.

  • waitUntilDone (bool) – Whether to block program execution until calibration is completed.

  • switchValveWhenDone (bool) – If True, switch the valve to aspiation position after the dispense is finished. Implies wait_until_done=True.

empty(flowRate, waitUntilDone=False, switchValveWhenDone=False)[source]

Empty the syringe entirely.

Parameters
  • flowRate (float) – The desired flow rate.

  • waitUntilDone (bool) – Whether to block program execution until calibration is completed.

  • switchValveWhenDone (bool) – If True, switch the valve to aspirate position after the dispensing is finished. Implies wait_until_done=True.

fill(flowRate, waitUntilDone=False, switchValveWhenDone=False)[source]

Fill the syringe entirely.

Parameters
  • flowRate (float) – The desired flow rate.

  • waitUntilDone (bool) – Whether to block program execution until calibration is completed.

  • switchValveWhenDone (bool) – If True, switch the valve to dispense position after the aspiration is finished. Implies wait_until_done=True.

property fillLevel

Current fill level of the syringe.

property flowRateUnit

The unit in which flow rates are provided.

property isInFaultState

Whether the pump is currently in a non-operational “fault state”.

To enable the pump again, call clearFaultState().

property maxFlowRate

Maximum flow rate the pump can provide with the installed syringe.

stop()[source]

Stop any pump operation immediately.

switchValvePosition()[source]

Switch the valve to the opposite position.

property syringeType

Type of the installed syringe.

property volumeUnit

The unit in which the volumes are provided.


Back to top