# Settling Time error

**URL:** <https://discuss.pylabrobot.org/t/settling-time-error/197>\
**Category:** General\
**Created:** [April 7, 2025, 8:06pm UTC](https://discuss.pylabrobot.org/t/settling-time-error/197 "2025-04-07T20:06:27Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![linx5o](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/linx5o/32/272_2.png) [@linx5o](https://discuss.pylabrobot.org/u/linx5o)\
**Post date:** [April 7, 2025, 8:06pm UTC](https://discuss.pylabrobot.org/t/settling-time-error/197/1 "2025-04-07T20:06:27Z")

</div>

![Screenshot 2025-04-07 at 16.02.20](https://discuss.pylabrobot.org/uploads/default/original/1X/754ef57c5858b60493c7726d88bc500e04e1fbce.png)  
When trying to change the settling time I get this.  
 ![Screenshot 2025-04-07 at 16.05.51](https://discuss.pylabrobot.org/uploads/default/original/1X/940e606951b36a4bd1f93c475ba37874bf41f987.png)  
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!

---

<div class="post-metadata">

**Author:** ![jrast](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/jrast/32/20_2.png) [@jrast](https://discuss.pylabrobot.org/u/jrast)\
**Post date:** [April 7, 2025, 8:24pm UTC](https://discuss.pylabrobot.org/t/settling-time-error/197/2 "2025-04-07T20:24:36Z")

</div>

> 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%?

---

<div class="post-metadata">

**Author:** ![linx5o](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/linx5o/32/272_2.png) [@linx5o](https://discuss.pylabrobot.org/u/linx5o)\
**Post date:** [April 7, 2025, 8:41pm UTC](https://discuss.pylabrobot.org/t/settling-time-error/197/3 "2025-04-07T20:41:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jrast](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/jrast/32/20_2.png) [@jrast](https://discuss.pylabrobot.org/u/jrast)\
**Post date:** [April 7, 2025, 8:46pm UTC](https://discuss.pylabrobot.org/t/settling-time-error/197/4 "2025-04-07T20:46:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![linx5o](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/linx5o/32/272_2.png) [@linx5o](https://discuss.pylabrobot.org/u/linx5o)\
**Post date:** [April 7, 2025, 9:29pm UTC](https://discuss.pylabrobot.org/t/settling-time-error/197/5 "2025-04-07T21:29:46Z")

</div>

```auto
settling_time=10
settling_time=[10]

```

I tried both of the above in asiprate.

 ![Screenshot 2025-04-07 at 17.28.03](https://discuss.pylabrobot.org/uploads/default/original/1X/049081b4f1aec9ef72908af2d35357b89d0acbb5.png)  
Both time this same result.

```auto
[100]

```

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

---

<div class="post-metadata">

**Author:** ![jrast](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/jrast/32/20_2.png) [@jrast](https://discuss.pylabrobot.org/u/jrast)\
**Post date:** [April 8, 2025, 7:25pm UTC](https://discuss.pylabrobot.org/t/settling-time-error/197/6 "2025-04-08T19:25:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![linx5o](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/linx5o/32/272_2.png) [@linx5o](https://discuss.pylabrobot.org/u/linx5o)\
**Post date:** [April 8, 2025, 8:11pm UTC](https://discuss.pylabrobot.org/t/settling-time-error/197/7 "2025-04-08T20:11:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![linx5o](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/linx5o/32/272_2.png) [@linx5o](https://discuss.pylabrobot.org/u/linx5o)\
**Post date:** [April 8, 2025, 8:16pm UTC](https://discuss.pylabrobot.org/t/settling-time-error/197/8 "2025-04-08T20:16:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rickwierenga](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/rickwierenga/32/963_2.png) [@rickwierenga](https://discuss.pylabrobot.org/u/rickwierenga)\
**Post date:** [April 9, 2025, 3:28am UTC](https://discuss.pylabrobot.org/t/settling-time-error/197/9 "2025-04-09T03:28:29Z")

</div>

> [@linx5o](#):
>
> 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?

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

```python
    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.

> [@linx5o](#):
>
> With the settling time would it be easier for me to change the profile in `star.py` under `liquid_handling/liquid_classes/hamilton`?

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

```auto
await lh.aspirate(..., flow_rates=[0.4])

```

---

<div class="post-metadata">

**Author:** ![linx5o](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/linx5o/32/272_2.png) [@linx5o](https://discuss.pylabrobot.org/u/linx5o)\
**Post date:** [April 9, 2025, 6:37am UTC](https://discuss.pylabrobot.org/t/settling-time-error/197/10 "2025-04-09T06:37:13Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![rickwierenga](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/rickwierenga/32/963_2.png) [@rickwierenga](https://discuss.pylabrobot.org/u/rickwierenga)\
**Post date:** [April 9, 2025, 2:56pm UTC](https://discuss.pylabrobot.org/t/settling-time-error/197/11 "2025-04-09T14:56:51Z")

</div>

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

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

```

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

---

<div class="post-metadata">

**Author:** ![rickwierenga](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/rickwierenga/32/963_2.png) [@rickwierenga](https://discuss.pylabrobot.org/u/rickwierenga)\
**Post date:** [April 9, 2025, 2:59pm UTC](https://discuss.pylabrobot.org/t/settling-time-error/197/12 "2025-04-09T14:59:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![linx5o](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/linx5o/32/272_2.png) [@linx5o](https://discuss.pylabrobot.org/u/linx5o)\
**Post date:** [April 9, 2025, 10:30pm UTC](https://discuss.pylabrobot.org/t/settling-time-error/197/13 "2025-04-09T22:30:21Z")

</div>

Code I tried:

```auto
    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

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

```

Error:

```auto
[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`

---

<div class="post-metadata">

**Author:** ![linx5o](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/linx5o/32/272_2.png) [@linx5o](https://discuss.pylabrobot.org/u/linx5o)\
**Post date:** [April 10, 2025, 12:27am UTC](https://discuss.pylabrobot.org/t/settling-time-error/197/14 "2025-04-10T00:27:56Z")

</div>

Nevermind. It all just made sense to me.

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

```auto
await lh.aspirate(..., settling_time=[9.9])

```

---

<div class="post-metadata">

**Author:** ![rickwierenga](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/rickwierenga/32/963_2.png) [@rickwierenga](https://discuss.pylabrobot.org/u/rickwierenga)\
**Post date:** [April 10, 2025, 1:40am UTC](https://discuss.pylabrobot.org/t/settling-time-error/197/15 "2025-04-10T01:40:08Z")

</div>

Yes
