Python Module for controlling Cetoni Nemesys V4 Syringe Pumps over a Serial port
This module allows usage of Cetoni Syringe pumps without the CetoniSDK and runs on most operating systems, including Raspberry Pi's, etc.
You have to install pyserial, e.g., via
pip install pyserial
When using more than one syringe, the serial interface of the first syringe has to be passed as an optional keyword to the init routine of the second syringe as demonstrated in the code below.
Note that you always have to set a non-zero flow rate (in microliter / s) after powering up the syringes.
import cetoniSerial as cs
S1 = cs.Syringe("/dev/ttyUSB0", volume =1000)
S2 = cs.Syringe("", volume = 1000, ser=S1.ser, node=3)
S1.toInput()
S1.positionAbsolute(0)
# use the commands below for fast repeated dispensing or aspirating of the same volume
# and repeat only executePositionRelative() for every dispense / aspirate action
S1.setFlowRate(20)
S1.currentPosition = S1.readCurrentPosition()
S1.configurePositionRelativeByVolume(-100)
S1.executePositionRelative()
# for aspirate / dispense action
S2.setFlowRate(50)
S2.toInput()
S2.aspirate(100)
S2.toOutput()
S2.dispense(50)