Current channel/tip status?

I’m working on a script that takes in a csv with list of media needed for each well and I’m trying to figure out some logic on tip swapping. The volumes can range from 5-500uL so I want it to switch between 50uL and 1mL tips depending on the volume. Is there some call like lh.has_tip or lh.status that would return what tips are on what channels? I’m thinking it would see what tips it already has attached and either continue to the next step or swap tips and then proceed.

2 Likes

yes: you can access through lh.head

lh.head[0].has_tip

lh.head[0].get_tip().maximal_volume
1 Like

Thanks this is exactly what I was looking for!

Now I’m trying to use that status to go pick up the next available tip of the appropriate size. I’m following along with the User Guide on looping through tip racks and I wrote this:

for v, i in zip(vols, range(8)):
            print(v, i)
            #check channel status - if false, check volume and pick up new tip; if true, check volume, if good continue if not discard and pick up new tip
            if lh.head[i].has_tip:
                max_vol = lh.head[i].get_tip().maximal_volume
                if v >= max_vol:
                    if v <= 300:
                        await discard_and_get_new_tip(lh, [await tip_300ul_linear_generator.__anext__()], channel=i)
                    else:
                        await discard_and_get_new_tip(lh, [await tip_1ml_linear_generator.__anext__()], channel=i)  

            else:
                if v >= 300:
                    await lh.pick_up_tips([await tip_1ml_linear_generator.__anext__()], use_channels=[i])
                elif 50 <= v < 300:
                    await lh.pick_up_tips([await tip_300ul_linear_generator.__anext__()], use_channels=[i])
                elif v < 50:
                    await lh.pick_up_tips([await tip_50ul_linear_generator.__anext__()], use_channels=[i])

I’m trying to develop this and running into an issue where I have to keep clearing the cache (i.e. deleting the json files and initialing the generator). What is the better way to do this? The docs describe set_index but when I try

tip_1ml_linear_generator.set_index(0)

I get

AttributeError: 'async_generator' object has no attribute 'set_index'

this is a feature i recently added. are you running the latest version of plr?

also, sorry for being grumpy admin, please make new posts for every issue that is clearly separate. this will make it easy to find topics later on. thanks :slight_smile:

1 Like

You are correct! I was not running the latest version. After pulling, I was able to run .set_index(0) to reset the generator.

1 Like