UniteLabs

Covers and Lights

Control the covers and deck lights on the Hamilton Vantage.

Hamilton Microlab Vantage has covers that can be locked and unlocked programmatically to prevent unauthorized access and guarantee safety during operation. If covers are not locked, the liquid handler will operate at reduced speed.

Prerequisites

  • A switched on Hamilton Vantage liquid handler
  • A running Hamilton Vantage connector
  • Basic understanding of the liquid handler class (See liquid handling)

Basic Setup

from unitelabs.liquid_handling.hamilton import Vantage

vantage = Vantage(name="Hamilton Microlab Vantage")
await vantage.configure()
await vantage.initialize()

Deck lights

The deck lights can be controlled to indicate different states or to provide visual feedback during operation.

RGB colors can be set in the range of 0-100. For example set_deck_light(red=100, blue=100) sets red and blue channel at maximum brightness, resulting in pink light, while set_deck_light(red=0, blue=0, green=0) turns the lights off. set_deck_light(white=50) sets white light at 50% brightness.

# Turn on the deck lights
await vantage.set_deck_light(red=100, blue=100)

# Turn off the deck lights
await vantage.set_deck_light(red=0, blue=0, green=0)

# Turn on the white light
await vantage.set_deck_light(white=50)

Additionally, blinking mode can be enabled with blink parameter, with specified period in milliseconds (0 disables blink).

# Blinking red light with 200ms period
await vantage.set_deck_light(red=100, blink=200)

A cycling rainbow pattern using set_deck_light(rainbow=True).

Get cover status

Vantage can have up to three lockable covers and loading trays all equipped with sensors, but most benchtop instruments have one cover and one loading tray (cover1 and tray1). You can check the cover configuration of your device by calling vantage.api.get_cover_config() and the status of cover sensors and locks by calling vantage.get_cover_status().

covers = await vantage.api.get_cover_config()
print(covers)
# {'Cover1Present': True, 'Cover2Present': False, 'Cover3Present': False, 'Tray1Present': True, 'Tray2Present': False, 'Tray3Present': False}

cover_status = await vantage.get_cover_status()
print(cover_status)
# {'Cover1Sensor': True, 'Cover2Sensor': False, 'Cover3Sensor': False, 'Tray1Sensor': True, 'Tray2Sensor': False, 'Tray3Sensor': False, 'Cover1Locked': False, 'Cover2Locked': False, 'Cover3Locked': False, 'Tray1Locked': False, 'Tray2Locked': False, 'Tray3Locked': False, 'Cover1Mask': False, 'Cover2Mask': False, 'Cover3Mask': False, 'Tray1Mask': False, 'Tray2Mask': False, 'Tray3Mask': False}

Cover locks

If covers are not locked, Vantage will operate at reduced speed.

vantage.lock_covers() and vantage.unlock_covers() can be used to unlock and lock all covers present on the instrument.

await vantage.lock_covers()
await vantage.unlock_covers()

By passing parameters to vantage.lock_cover("cover1"), each lock can be controlled separately. The following example only locks cover 1:

await vantage.lock_cover("cover1")
print(await vantage.get_cover_status())
# {'Cover1Sensor': True, 'Cover2Sensor': False, 'Cover3Sensor': False, 'Tray1Sensor': True, 'Tray2Sensor': False, 'Tray3Sensor': False, 'Cover1Locked': True, 'Cover2Locked': False, 'Cover3Locked': False, 'Tray1Locked': False, 'Tray2Locked': False, 'Tray3Locked': False, 'Cover1Mask': False, 'Cover2Mask': False, 'Cover3Mask': False, 'Tray1Mask': False, 'Tray2Mask': False, 'Tray3Mask': False}

Notice that all trays and covers not explicitly set to True are per default set to False and therefore are being left unlocked even if they were previously locked. It is good practice to either use vantage.lock_covers() to address all covers present on an instrument explicitly.

await vantage.unlock_cover("cover1")
print(await vantage.get_cover_status())
# {'Cover1Sensor': True, 'Cover2Sensor': False, 'Cover3Sensor': False, 'Tray1Sensor': True, 'Tray2Sensor': False, 'Tray3Sensor': False, 'Cover1Locked': False, 'Cover2Locked': False, 'Cover3Locked': False, 'Tray1Locked': False, 'Tray2Locked': False, 'Tray3Locked': False, 'Cover1Mask': False, 'Cover2Mask': False, 'Cover3Mask': False, 'Tray1Mask': False, 'Tray2Mask': False, 'Tray3Mask': False}
Remember to manually close the front cover of the instrument before locking covers. Trying to lock an open cover will result in the following error:
ProcessError[82]: Cover Is Open (command: LL)
Forcefully opening a locked cover during a run disturbs the safety circuit of the Vantage and results in an immediate cut out of power to motors and unrecoverable hardware error.