Beckman Biomek Driver Page#

This page has all the information specific to the Beckman Biomek driver and adapter.

Supported Beckman Biomek versions#

Beckman Biomek 5.1.10

Beckman Biomek Installer#

You can download the latest installer here.

Beckman Biomek Adapter config.yaml File#

config.yaml#
log:
  level: "DEBUG"
  loggerLevels:
    - logger: "tutorial"
      level: "DEBUG"

artificial:
  host: your-instance.artificial.com
  lab: lab_1a2b3c-4d5e-6f7g-8h9i-123456abcdef

adapter:
  name: BiomekTutorialAdapter
  remoteConfig: False
  allowAnySequenceId: True # Useful when running in a local dev container
  plugin: # all resources this adapter can connect to
    resource:
      name: "Biomek i7"  # user friendly name, unique in the adapter
      id: "asset_name"
      driver:
        name: "biomek" # Driver name, this is a non-configurable string that needs to match the driver identity
        url: "http://biomek.webaddress.com:49835" #  URL of the hardware and driver
        resource_simulation: false     # Set to true to run simulation without hardware
        driver_simulation: false       # Set to true to run simulation without a driver
        cert_file: "adapter/certs/ca.crt"
        workspace_name: "C:/biomek_files/Biomek i7.bif" # Modify to use desired workspace name
  asset_sync:
    devices: # device string names/prefix must match resource id above
       "asset_name": { rid: "d1234567-34d0-4391-be64-7aef4e0b28be" }
  1. Fill in the correct URL and port for the Biomek device. (The IPv4 URL can be obtained on the device by running ipconfig in a command window. The port is listed in the running driver server window).

  2. Fill in the workspace path to match the installation location on the Biomek device.

  3. You may update the resource name above if you wish (any unique string will work).

  4. If you wish to run in simulation without hardware or without a driver, change resource_simulation or driver_simulation to true, respectively.

  5. Under asset_sync, match at least one of your devices to a Digital Twin asset ID. You can fill out the rest of the devices later. Consult the corresponding step in Hardware-Specific Adapter Setup.

  6. Update the artificial section to the correct host and lab. Consult the corresponding step in Hardware-Specific Adapter Setup for how to do this.

Beckman Biomek Adapter adapter/main/plugin.py File#

adapter/main/plugin.py file#
from artificial.adapter_common import ActionModulePlugin, ability_name, action_modules
from artificial.adapter_common.plugin import PluginContext, plugin_config
from artificial.biomek.actions import BiomekActions
from artificial.biomek.core import BiomekResource
from artificial.biomek.event_handler import BiomekEventHandler
from artificial.biomek.models import PluginConfig
from artificial.logging import get_logger
from artificial.resource_base.asset_syncer import ResourceAssetSyncer
from artificial.resource_base.models import SyncConfig

# from .simulators.labware_simulator import BiomekDriverLabwareMock as LabwareSimulator

logger = get_logger(__name__)


@ability_name('biomek')
@action_modules(BiomekActions)
class AdapterPlugin(ActionModulePlugin):
    """assemble resources components with resource configuration"""

    _cfg = plugin_config(PluginConfig)  # this will make PluginConfig show up in the adapter config UI

    async def setup(self, pctx: PluginContext) -> None:
        prog_config = pctx.config
        plugin_conf = self._cfg
        sync_config: SyncConfig = pctx.raw_config.to_dataclass(SyncConfig, 'adapter.asset_sync')
        logger.debug(f'sync_config loaded: {sync_config}')

        # all resources in the adapter use the same res_syncer
        syncer = pctx.asset_sync_manager_v1(f'ResourceSyncer-{prog_config.adapter.name}')
        res_syncer = ResourceAssetSyncer(syncer, sync_config)
        await res_syncer.initialize()

        # create instances of resources for this adapter
        resource = BiomekResource(
            pctx.alabPyBase,
            lab_id=prog_config.artificial.labId,
            adapter_id=prog_config.adapter.name,
            resource_id=plugin_conf.resource.id,
            name=plugin_conf.resource.name,
            res_syncer=res_syncer,
        )

        if resource:
            resource.set_driver(driver_config=plugin_conf.resource.driver, simulator=None)
            await resource.set_health_monitors(pctx.lab.health)
            module = BiomekActions(resource)
            self.add_module(module)

            # subscribe the driver events
            event_handler = BiomekEventHandler(resource)
            resource.add_event_handler(event_handler)

Beckman Biomek Adapter adapter/main/__main__.py File#

Copy the following list of actors into the file in place of the example actors.

actors = [
    ActorConfig(id='biomek', abilities={'run_protocol': 1, 'substrate': 1, 'biomek': 1}),
]

Beckman Biomek Adapter pyproject.toml Dependencies#

Run uv add artificial-biomek-adapter==1.1.* in the terminal to add the required packages to the [project] section.

Your pyproject.toml file should now include artificial-biomek-adapter in the project dependencies section:

[project]
dependencies = [
  "artificial-biomek-adapter==1.1.*"
]

Beckman Biomek Simple Connectivity Workflow#

This workflow will run a method of your choosing and log a message in the UI upon successful completion. You will define which method to run in the request UI by inputting the method name with its full path (e.g., C://Methods//mymethod.med).

A couple of notes:

  1. After copying this code into a file, remember to replace the lab_guid in the workflow heading with the one from your Lab (most easily found by opening the Lab in Artificial and looking in the browser address bar). Consult Adding and Running a Simple Connectivity Test Workflow for more info.

  2. Update the variables in the Workflow to match your protocol.

from typing import List

from artificial.workflows.decorators import parameter, workflow
from artificial.workflows.runtime import show_info
from stubs.stubs_actions import VariableType, run_protocol_to_completion


@workflow('Simple Biomek Connectivity Test Workflow', 'simple_biomek_connectivity_test_workflow', 'lab_8ff750d9-b8c9-4a1b-b433-05437ce87ef2', interactive=True, quick=True)
@parameter('biomek_method_name', {'required': True, 'uiTitle': 'Biomek Method Name'})
async def simple_biomek_connectivity_test_workflow(biomek_method_name: str = 'alab-test') -> None:
    params: List[VariableType] = [
        VariableType(var_name='run_now', var_value='true', var_type='TrueFalse'),
        VariableType(var_name='nplates', var_value='2', var_type='Numeric'),
    ]
    await run_protocol_to_completion(biomek_method_name, params)  # when no path specified, driver's workspace is used
    await show_info('Congratulations, you successfully ran your hardware!', 'Hardware Success')