How can I pick up standard tips from APE_CARRIER on Hamilton STAR?

My goal is to pick up a standard tip from a APE_CARRIER/APE 01710 on Hamilton STAR. I tried to just use PLT_CAR_L5AC_A00 like in the docs example but I get an error and the tip gets not really picked up. Generally I am not sure if there is any support for APE_CARRIER/APE 01710. I looked through PyHamilton und PyLabRobot repos but could not find any results for that name.

Error

File "/Users/maxhager/Projects2022/KiwiBiolab/PyLabRobot/control.py", line 56, in <module> lh.pick_up_tips(tiprack["B1:C1"]) File "/Users/maxhager/Projects2022/KiwiBiolab/PyLabRobot/pylabrobot/pylabrobot/liquid_handling/liquid_handler.py", line 95, in wrapper func(self, *args, **kwargs) # pylint: disable=not-callable File "/Users/maxhager/Projects2022/KiwiBiolab/PyLabRobot/pylabrobot/pylabrobot/liquid_handling/liquid_handler.py", line 487, in pick_up_tips self.backend.pick_up_tips(*channels, **backend_kwargs) File "/Users/maxhager/Projects2022/KiwiBiolab/PyLabRobot/pylabrobot/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 592, in pick_up_tips return self.pick_up_tip( File "/Users/maxhager/Projects2022/KiwiBiolab/PyLabRobot/pylabrobot/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 2089, in pick_up_tip return self.send_command( File "/Users/maxhager/Projects2022/KiwiBiolab/PyLabRobot/pylabrobot/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 351, in send_command parsed_response = self.parse_fw_string(res) File "/Users/maxhager/Projects2022/KiwiBiolab/PyLabRobot/pylabrobot/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 240, in parse_fw_string find_param("id####") File "/Users/maxhager/Projects2022/KiwiBiolab/PyLabRobot/pylabrobot/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 203, in find_param raise ValueError(f"could not find matches for parameter {name}")

APE_CARRIER

The error you got means the response sent by the Hamilton was not parseable by PLR. Could you share your log file? It should be located in the directory where you ran your script.

Also, we do not have wrappers for the APE_CARRIER yet. If you have VENUS definitions for those (.rck and .ctr files, likely located in C:\Program Files (x86)\HAMILTON\Labware on a Windows computer with VENUS), feel free to send those over and I can create a wrapper.

I was not able to find APE_CARRIER .rck and .ctr files but will try to get them. I also would need support for SMP_CAR_32_A00 and a self made 3D print construction.

For SMP_CAR_32_A00 I only found the .rck but not .ctr. Do you need .ctr? For the self made 3D print construction I still need to search for .rck and .ctr files. If you share a link to the file where you create a wrapper I could try by myself. Thanks for your offer!

Indeed there are log files created but they are empty. What do you wanna check in this log files? If the problem is derived from not having the dimensions of the APE_CARRIER how should that help?

Download link to SMP_CAR_32_A00.rck

As you asked about in a PM, there are tools you can use to create wrappers yourself.

There are a couple of scripts to create wrappers here. You can see an example of generated resources here.

Feel free to create a PR adding your resources to the library.

For the 3D printed items you will probably not have those. You will need to create instances of Resource or subclass it.

How do you use those resources in VENUS?

The error you posted above has to do with the firmware responses. I do not suppose it is necessarily related to not having an APE_CARRIER resource, and it could indicate other problems. Are you able to reproduce the error / can you share the logs?

You should be able to turn on logging by including

import logging
logging.getLogger("pylabrobot").setLevel(logging.DEBUG)

somewhere in your code.

Alright.

I will figure that out and then post in the forum.

2022-10-11 22:07:37,437 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Finding Hamilton USB device... 2022-10-11 22:07:37,444 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Found Hamilton USB device. 2022-10-11 22:07:37,444 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Found endpoints. Write: ENDPOINT 0x2: Bulk OUT =============================== bLength : 0x7 (7 bytes) bDescriptorType : 0x5 Endpoint bEndpointAddress : 0x2 OUT bmAttributes : 0x2 Bulk wMaxPacketSize : 0x40 (64 bytes) bInterval : 0x0 Read: ENDPOINT 0x81: Bulk IN =============================== bLength : 0x7 (7 bytes) bDescriptorType : 0x5 Endpoint bEndpointAddress : 0x81 IN bmAttributes : 0x2 Bulk wMaxPacketSize : 0x40 (64 bytes) bInterval : 0x0 2022-10-11 22:07:37,444 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Sent command: C0QWid0001 2022-10-11 22:07:37,493 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Received response: C0QWid0001er00/00qw1 2022-10-11 22:07:37,494 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Sent command: R0QWid0002 2022-10-11 22:07:37,503 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Received response: R0QWid0002qw1 2022-10-11 22:07:37,503 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Sent command: C0PGid0003th2840 2022-10-11 22:07:37,533 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Received response: C0PGid0003er00/00 2022-10-11 22:07:37,534 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Sent command: C0TTid0004tt01tf1tl0871tv12500tg3tu0 2022-10-11 22:07:37,560 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Received response: C0TTid0004er00/00 2022-10-11 22:07:37,561 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Sent command: C0TPid0005xp10629 10629 00000&yp1368 1278 0000&tm1 1 0&tt01tp2244tz2164th2450td0

Do you now how to interpret this log?

The log does not look particularly strange.

Let’s try to see where, if at any point, we differ from VENUS. Could you try running the same procedure (tip pickup in the same location) in VENUS and send me the log from there? (Should be in C:\Program Files (x86)\HAMILTON\Logs)

The VENUS log files are long so I send them here.

Following a picture of my methods which I used for producing the logs. I am confused because the logs are different compared to them on my Mac which makes it difficult to compare.

Here the recent logs from my Mac:

2022-10-12 01:24:52,182 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Finding Hamilton USB device... 2022-10-12 01:24:52,187 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Found Hamilton USB device. 2022-10-12 01:24:52,187 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Found endpoints. Write: ENDPOINT 0x2: Bulk OUT =============================== bLength : 0x7 (7 bytes) bDescriptorType : 0x5 Endpoint bEndpointAddress : 0x2 OUT bmAttributes : 0x2 Bulk wMaxPacketSize : 0x40 (64 bytes) bInterval : 0x0 Read: ENDPOINT 0x81: Bulk IN =============================== bLength : 0x7 (7 bytes) bDescriptorType : 0x5 Endpoint bEndpointAddress : 0x81 IN bmAttributes : 0x2 Bulk wMaxPacketSize : 0x40 (64 bytes) bInterval : 0x0 2022-10-12 01:24:52,187 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Sent command: C0QWid0001 2022-10-12 01:24:52,235 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Received response: C0QWid0001er00/00qw0 2022-10-12 01:24:52,237 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Running backend initialization procedure. 2022-10-12 01:24:52,237 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Sent command: C0VIid0002 2022-10-12 01:25:11,133 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Received response: C0VIid0002er00/00 2022-10-12 01:25:11,134 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Sent command: C0DIid0003xp08000&yp4050 3782 3514 3246 2978 2710 2442 2175tp2450tz1220te3600tm1&tt04ti0 2022-10-12 01:25:57,976 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Received response: C0DIid0003er00/00kz000 000 000 000 000 000 000 000vz000 000 000 000 000 000 000 000 2022-10-12 01:25:57,977 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Sent command: R0QWid0004 2022-10-12 01:25:57,986 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Received response: R0QWid0004qw1 2022-10-12 01:25:57,987 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Sent command: C0PGid0005th2840 2022-10-12 01:25:58,017 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Received response: C0PGid0005er00/00 2022-10-12 01:25:58,020 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Sent command: C0TTid0006tt01tf0tl0519tv04000tg2tu0 2022-10-12 01:25:58,045 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Received response: C0TTid0006er00/00 2022-10-12 01:25:58,046 - pylabrobot.liquid_handling.backends.hamilton.STAR - INFO - Sent command: C0TPid0007xp10630 00000&yp2420 0000&tm1 0&tt01tp2244tz2164th2450td0

Code which produced this logs (in the meanwhile I also added resources via the wrapper):

from pylabrobot.liquid_handling import LiquidHandler
from pylabrobot.liquid_handling.backends import STAR
from pylabrobot.liquid_handling.resources.hamilton import STARDeck
import logging
logging.getLogger("pylabrobot").setLevel(logging.DEBUG)

backend = STAR()
lh = LiquidHandler(backend=backend, deck=STARDeck())

lh.setup()

from pylabrobot.liquid_handling.resources import (
    MFX_CAR_5Tip,
    VER_ST
)

tip_car = MFX_CAR_5Tip(name='tip carrier')
tip_car[1] = VER_ST(name='tips_01')

lh.deck.assign_child_resource(tip_car, rails=43)

lh.summary()

tiprack = lh.get_resource("tips_01")
lh.pick_up_tips(tiprack["A1"])

It appears as if your tip rack VER_ST has the wrong tip types. Could you confirm you are using the correct ones?

The wrapper for the tip racks created this output

#: Rack with 96 300ul Standard Volume Tip
def VER_ST(name: str) -> TipRack:
  return TipRack(
    name=name,
    size_x=122.4,
    size_y=82.6,
    size_z=20.0,
    tip_type=standard_volume_tip_no_filter,
    items=create_equally_spaced(Tip,
      num_items_x=12,
      num_items_y=8,
      dx=11.7,
      dy=9.8,
      dz=-50.5,
      item_size_x=9.0,
      item_size_y=9.0,
      tip_type=standard_volume_tip_no_filter,
    ),
  )

I added this at the end of tip_racks.py. Do I miss something or is that everything what is needed to add a tip rack resource (perhaps I did something wrong here)? The tip type and the other resources are the same like on the Hamilton. I can confirm that.

Update

I was able to pick up a tip but with a tip type which is not the tip type which is on the deck. More information soon.