示例#1
0
    def setUp(self):
        self.robot = Robot()
        self.robot.home()
        self.trash = containers_load(self.robot, 'point', '1')
        self.tiprack1 = containers_load(self.robot, 'tiprack-10ul', '5')
        self.tiprack2 = containers_load(self.robot, 'tiprack-10ul', '8')

        self.plate = containers_load(self.robot, '96-flat', '4')

        self.p200 = Pipette(
            self.robot,
            ul_per_mm=18.5,
            trash_container=self.trash,
            tip_racks=[self.tiprack1, self.tiprack2],
            min_volume=10,  # These are variable
            mount='left',
            channels=1,
            name='other-pipette-for-transfer-tests'
        )
        self.p200.max_volume = 200

        self.p200.reset()

        self.p200.calibrate_plunger(top=0, bottom=10, blow_out=12, drop_tip=13)
        self.robot.home()
示例#2
0
    def setUp(self):
        self.robot = Robot()

        self.smoothie_version = 'edge-1c222d9NOMSD'

        self.robot.reset()
        self.robot.connect(options={'firmware': self.smoothie_version})
        self.robot.home(enqueue=False)
示例#3
0
def fixture(config, monkeypatch):
    from opentrons.robot.robot import Robot
    from opentrons.instruments.pipette import Pipette
    from collections import namedtuple
    from opentrons.drivers.smoothie_drivers import driver_3_0

    log = []
    X = (-25, 25)
    Y = (-25, 25)
    Z = (0, 100)

    def move(self, target, *args, **kwargs):
        log.append(('move', target))
        self.update_position(target)
        return target

    def probe_axis(self, axis, probing_distance):
        log.append(('probe_axis', axis, probing_distance))
        mapping = {'X': X, 'Y': Y, 'Z': Z, 'A': Z}
        self.update_position(
            {axis.upper(): mapping[axis][0 if probing_distance > 0 else 1]})
        return self._position

    monkeypatch.setattr(driver_3_0.SmoothieDriver_3_0_0, 'move', move)
    monkeypatch.setattr(driver_3_0.SmoothieDriver_3_0_0, 'probe_axis',
                        probe_axis)

    robot = Robot(config=config)
    pipette = Pipette(robot, mount='right')
    robot.home()

    return namedtuple('fixture',
                      'robot instrument log X Y Z')(robot=robot,
                                                    instrument=pipette,
                                                    log=log,
                                                    X=X,
                                                    Y=Y,
                                                    Z=Z)
示例#4
0
from opentrons.robot.robot import Robot
from opentrons.robot.command import Command

robot = Robot()

__all__ = [Robot, Command, robot]

from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
示例#5
0
def reset():
    global robot
    robot = Robot()
    return robot