Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /nfs/bronfs/uwfs/hw00/d63/soslab/turbidostat/pmwiki/pmwiki.php on line 666

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /nfs/bronfs/uwfs/hw00/d63/soslab/turbidostat/pmwiki/pmwiki.php on line 669
Klavins Lab Turbidostat Wiki | OperatingManual / Plugins
Recent Changes - Search:

Information

Operating
Manual

Construction
Manual

Derivative
Designs

Downloads

PmWiki

edit SideBar

Plugins

The pump interface as well as the controller interface has been moved to plugins in order to allow maximum flexibility.

Pump Plugin Interface

NOTE: subject to change!

class Pump:
    """ The Pump driver

    """

    def __init__(self,cparams,logfiles,pparams,cport,pport):
        """
        cparams: a dictionary containing all controller parametrs from
            config.ini
        logfiles: deprecated
        pparams: a dictionary containing all pump parameters from config.ini
        cport: an open serial port object for controlling the controller board,
            which may or may not have the pump attached depending on the
            hardware.
        pport: an open serial port object for controlling the pump.  may go
            unused (eg 3d printed pump is controlled from cport)

        NOTE: cport and pport also have thread locks associated with them
            (named .lock).  they should only be used with their lock.
        """


    def withdraw(self, volume):
        """  Instruct the pump to withrdraw volume units.

        """

    def dispense(self,volume):
        """  Instruct the pump to dispese volume units.

        """
        self.withdraw(-volume)

    def waitForPumping(self):
        """ Block until pumping is done

        """

Control Algorithm Interface

TODO: document

class State:
    """ The state variable for the control function.

    This does not need to adhere to any proper interface although a
    readable __str__() method is highly recommended to allow for debugging.
    """
    def __init__(self):

    def __str__(self):


def computeControl(self,od,z=None,chamber=0,time=0.0):
    """  Controller function

    self: self refers to the main controller object that contains
    all state such as the parameters file.  computeControl should never write
    to any members of self
    od: current od of the camber
    chamber: the chamber number indexed from zero
    time: the current time since start up.

    Returns: a tuple (list of dilution values for this chamber, state object)

    """

    return (u,z)
Edit - History - Print - Recent Changes - Search
Page last modified on March 04, 2014, at 10:09 PM