Class: OpenTrons::MultiPipette
- Defined in:
- lib/opentrons/instruments.rb
Instance Attribute Summary
Attributes inherited from Pipette
#instruments, #model, #mount, #protocol, #tip_model, #tip_racks
Instance Method Summary collapse
-
#initialize(protocol, instruments, model, mount: "left", tip_racks: [], tip_model: nil) ⇒ MultiPipette
constructor
A new instance of MultiPipette.
- #pick_up_tip(location: false) ⇒ Object
Methods inherited from Pipette
#aspirate, #blowout, #delay, #dispense, #drop_tip, #get_next_tip, #inspect, #to_hash, #to_s, #touch_tip
Constructor Details
#initialize(protocol, instruments, model, mount: "left", tip_racks: [], tip_model: nil) ⇒ MultiPipette
Returns a new instance of MultiPipette.
207 208 209 |
# 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 |
Instance Method Details
#pick_up_tip(location: false) ⇒ Object
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# 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 |