Settling Time error


When trying to change the settling time I get this.

I have set the plate to Glycerin.

Please tell me if I’m missing something.

Sidenote: Settling time is a wait after aspiration right? Trying to work with Glycerin. Default profile seems to aspirate to quickly.

Thank you!

Sidenote: Settling time is a wait after aspiration right?

Correct. It’s the time between “end-of-plunger-move” until “start-move-out-of-liquid”.

Trying to work with Glycerin. Default profile seems to aspirate to quickly.

So the error only happens when you use the Liquids.GLYCERIN liquid class? For this liquid class the settling_time defaults to 2 seconds, which should actually pass the check which fails in your code, so it would be interesting what the settling_time actually is when the code is run.

Are you really working with pure Glycerin and not some mixture, like Glycerin 80%?

Just tried with None for liquid. Same issue. Pure Glycerin. Could it be something wrong with how I am passing it in? I do see that _fill_in_defaults cleans things us pretty well.

Can you inspect the values actually end up in the aspirate_pip method?

settling_time=10
settling_time=[10]

I tried both of the above in asiprate.


Both time this same result.

[100]

Is coming from print(settling_time) before all the assets in aspirate_pip in STAR.py

So it seems like on top level (LiquidHandler), the value is given in seconds? And 10s seems quite long, even for Glycerin. If such a long settling time is required, you probably are better of with a slower flowrate.

1 Like

I already have the flow rate set to the lowest (4). It is still not enough time for the glycerin to flow. Doing it manually with a clear pipette, for 200ul it needs quite a significant settling time before everything actually moves into the pipette.

Following this, I see in some hamilton documuentation that the flow rate can be set as low as 0.4ul, PLR only allows a minimum of 4ul. Is this correct? I am minunderstanding something?

With the settling time would it be easier for me to change the profile in star.py under liquid_handling/liquid_classes/hamilton? Really interested in playing around with settling time and seeing the effects. Thanks.

actually, the minimum is 0.4 (in PLR we support what the hardware supports). The reason you see

    assert all(
      4 <= x <= 5000 for x in aspiration_speed
    ), "aspiration_speed must be between 4 and 5000"

is because in STAR.aspirate_pip (and other low level, firmware-command-wrapper-functions) the units are the same as the firmware units in 0.1us, 0.1us/s, 0.1mm, etc. Tenths for default PLR units.

If using a liquid class, but why not just pass the parameter directly?

await lh.aspirate(..., flow_rates=[0.4])
1 Like

@rickwierenga Thank you for pointing out the flow rate for me. I will definitely try with the lower value.

Wanting to edit the liquid class settling_time parameter specifically. Cannot seem to pass it in with the aspirate command.

1 Like

it is not a parameter of LiquidHandler.aspirate directly, but you can actually pass it when calling lh.aspirate because of backend_kwargs: all extra parameters that the front end does not recognize are simply passed on to the backend.

eg

await lh.aspirate(..., settling_time=[1])

Note that all front end calls use PLR units, so 1 here means 1 second.

also please copy and paste code into a code block rather than using screenshots so these threads are easier to search through and so people can copy and paste code.

Code I tried:

    plate_2_liquids = [(Liquid.GLYCERIN, 2000)]*12
    plate2.set_well_liquids(plate_2_liquids)
    
    await lh.pick_up_tips(tip_rack1["A1"])
    
    await lh.aspirate(plate2["B3"], vols=[200], flow_rates=[5], settling_time=10)

and

await lh.aspirate(plate2["B3"], vols=[200], flow_rates=[5], settling_time=[10])

Error:

[100]
Traceback (most recent call last):
  File "/home/sdl6/starlet/test.py", line 128, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/sdl6/starlet/test.py", line 85, in main
    await lh.aspirate(plate2["B3"], vols=[200], flow_rates=[5], blow_out_air_volume=[5], settling_time=[10])
  File "/home/sdl6/starlet/pylabrobot/pylabrobot/machines/machine.py", line 35, in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sdl6/starlet/pylabrobot/pylabrobot/liquid_handling/liquid_handler.py", line 917, in aspirate
    self._trigger_callback(
  File "/home/sdl6/starlet/pylabrobot/pylabrobot/liquid_handling/liquid_handler.py", line 2208, in _trigger_callback
    raise error
  File "/home/sdl6/starlet/pylabrobot/pylabrobot/liquid_handling/liquid_handler.py", line 899, in aspirate
    await self.backend.aspirate(ops=aspirations, use_channels=use_channels, **backend_kwargs)
  File "/home/sdl6/starlet/pylabrobot/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 1840, in aspirate
    return await self.aspirate_pip(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sdl6/starlet/pylabrobot/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 97, in wrapper
    result = await method(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sdl6/starlet/pylabrobot/pylabrobot/liquid_handling/backends/hamilton/STAR.py", line 4340, in aspirate_pip
    assert all(0 <= x <= 99 for x in settling_time), "settling_time must be between 0 and 99"
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: settling_time must be between 0 and 99

The [100] is a print statement in pip_aspirate printing settling_time

1 Like

Nevermind. It all just made sense to me.

If not mistaken then the max settling time would be 9.9?
So it should be:

await lh.aspirate(..., settling_time=[9.9])
1 Like

Yes