class OpenTrons::MultiPipette

Public Class Methods

new(protocol, instruments, model, mount: "left", tip_racks: [], tip_model: nil) click to toggle source
Calls superclass method OpenTrons::Pipette::new
# File lib/opentrons/instruments.rb, line 207
def initialize(protocol, instruments, model, mount: "left", tip_racks: [], tip_model: nil)
        super(protocol, instruments, model, mount: mount, tip_racks: tip_racks, tip_model: tip_model)
end

Public Instance Methods

pick_up_tip(location: false) click to toggle source
# File lib/opentrons/instruments.rb, line 211
def pick_up_tip(location: false)
        if !location
                tip_location = self.get_next_tip(multi: true)
                # If no tip found and tip model is provided, create a tip rack.
                if !tip_location
                        if tip_model
                                tip_racks += protocol.labware.load(tip_model, protocol.labware.free_slots[-1], 'Auto-generated-tip-rack')
                        else
                                raise ArgumentError.new "pick_up_tip called without location and pipette is out of tips."
                        end
                end
                tip_location = self.get_next_tip(multi: true)
                location = tip_location
        end

        if location.is_a? Array
                well = location[0]
        else
                well = location
        end

        column = well.labware_item.well_list.find do |column|
                column.include? well
        end

        column.each {|x| x.tip = false}
        
        command = PickUpTip.new(self, location)
        protocol.commands.command_list << command
        return command
end