Tecan EVOware Driver Page#

This page has all the information specific to the Tecan EVOware driver and adapter.

Supported Tecan EVOware versions#

Tecan EVOware 2.8 SP_6, 2.8 SP_7

Tecan EVOware Installer#

You can download the latest installer here.

Tecan EVOware 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: EVOwareTutorialAdapter
  remoteConfig: False
  allowAnySequenceId: True # Useful when running in a local dev container
  plugin: # all resources this adapter can connect to
    resource:
      name: "My EVOware"  # user friendly name, unique in the adapter
      id: "asset_name"
      driver:
        name: "evoware" # Driver name, this is a non-configurable string that needs to match the driver identity
        url: "http://evoware.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"
        user_name: ""  # user name if needed for the evoware software login
        user_password: ""  # password if needed for evoware software login
  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 EVOware 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. You may update the resource name above if you wish (any unique string will work).

  3. Fill in the user_name and password if needed.

  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.

Tecan EVOware Adapter adapter/main/plugin.py File#

adapter/main/plugin.py file#
from artificial.adapter_common import ActionModulePlugin, action_modules
from artificial.adapter_common.plugin import PluginContext, plugin_config
from artificial.evoware.actions import EvowareActions
from artificial.evoware.core import EvowareResource
from artificial.evoware.driver_client_simulator import EvowareDriverMock
from artificial.evoware.event_handler import EvowareEventHandler
from artificial.evoware.models import EvowarePluginConfig
from artificial.logging import get_logger
from artificial.resource_base.asset_syncer import ResourceAssetSyncer
from artificial.resource_base.models import SyncConfig

logger = get_logger(__name__)


@action_modules(EvowareActions)
class AdapterPlugin(ActionModulePlugin):
    _cfg = plugin_config(EvowarePluginConfig)

    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 = EvowareResource(
            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=EvowareDriverMock())
            await resource.set_health_monitors(pctx.lab.health)
            module = EvowareActions(resource)
            self.add_module(module)

            # subscribe the driver events
            event_handler = EvowareEventHandler(resource)  # there is no custom event, protocol-runner events will be good enough
            resource.add_event_handler(event_handler)

Tecan EVOware Adapter adapter/main/__main__.py File#

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

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

Tecan EVOware Adapter pyproject.toml Dependencies#

Run the below commands in your terminal to add the required packages:

`uv add artificial-evoware-resource-library==0.0.*`
`uv add artificial-protocol-runner-library==2.0.5`
`uv add artificial-resource-base-library==2.2.0`

Your pyproject.toml file should now include the following packages in the project dependencies section:

[project]
dependencies = [
  "artificial-evoware-resource-library==0.0.*",
  "artificial-protocol-runner-library==2.0.5",
  "artificial-resource-base-library==2.2.0"
]

Tecan EVOware 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). You must also enter the start line, end line and sample count.

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.

from typing import List

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

@parameter('protocol_name', {'uiTitle': 'ProtocolName', 'required': True, 'uiWidget': 'text'})
@parameter('start_line', {'uiTitle': 'Start Line', 'required': True, 'uiWidget': 'numeric'})
@parameter('end_line', {'uiTitle': 'End Line', 'required': True, 'uiWidget': 'numeric'})
@parameter('sample_count', {'uiTitle': 'Sample Count', 'required': True, 'uiWidget': 'numeric'})
@workflow(
    'Simple Evoware Connectivity Test Workflow',
    'simple_evoware_connectivity_test_workflow',
    'lab_d245c224-6857-4e29-8f73-17d5b35a1709',
    interactive=True,
)
async def simple_evoware_connectivity_test_workflow(protocol_name: str = '', start_line: int = 0, end_line: int = 0, sample_count: int = 2) -> None:
    await evoware_initialize_instrument()
    protocol_name = protocol_name
    params: List[VariableType] = [
        VariableType(var_name='StartLine', var_value=str(start_line), var_type='int'),
        VariableType(var_name='EndLine', var_value=str(end_line), var_type='int'),
        VariableType(var_name='sampleCount', var_value=str(sample_count), var_type='int'),
    ]
    await run_script_with_variable(protocol_name, params)
    await show_info('Congratulations, you successfully ran your hardware!', 'Hardware Success')