mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-04 05:15:10 +00:00
* feat(bioyond): 添加计算实验设计功能,支持化合物配比和滴定比例参数 * feat(bioyond): 添加测量小瓶功能,支持基本参数配置 * feat(bioyond): 添加测量小瓶配置,支持新设备参数 * feat(bioyond): 更新仓库布局和尺寸,支持竖向排列的测量小瓶和试剂存放堆栈 * feat(bioyond): 优化任务创建流程,确保无论成功与否都清理任务队列以避免重复累积 * feat(bioyond): 添加设置反应器温度功能,支持温度范围和异常处理 * feat(bioyond): 调整反应器位置配置,统一坐标格式 * feat(bioyond): 添加调度器启动功能,支持任务队列执行并处理异常 * feat(bioyond): 优化调度器启动功能,添加异常处理并更新相关配置 * feat(opcua): 增强节点ID解析兼容性和数据类型处理 改进节点ID解析逻辑以支持多种格式,包括字符串和数字标识符 添加数据类型转换处理,确保写入值时类型匹配 优化错误提示信息,便于调试节点连接问题 * feat(registry): 新增后处理站的设备配置文件 添加后处理站的YAML配置文件,包含动作映射、状态类型和设备描述 * 添加调度器启动功能,合并物料参数配置,优化物料参数处理逻辑 * 添加从 Bioyond 系统自动同步工作流序列的功能,并更新相关配置 * fix:兼容 BioyondReactionStation 中 workflow_sequence 被重写为 property * fix:同步工作流序列 * feat: remove commented workflow synchronization from `reaction_station.py`. * 添加时间约束功能及相关配置 * fix:自动更新物料缓存功能,添加物料时更新缓存并在删除时移除缓存项 * fix:在添加物料时处理字符串和字典返回值,确保正确更新缓存 * fix:更新奔曜错误处理报送为物料变更报送,调整日志记录和响应消息 * feat:添加实验报告简化功能,去除冗余信息并保留关键信息 * feat: 添加任务状态事件发布功能,监控并报告任务运行、超时、完成和错误状态 * fix: 修复添加物料时数据格式错误 * Refactor bioyond_dispensing_station and reaction_station_bioyond YAML configurations - Removed redundant action value mappings from bioyond_dispensing_station. - Updated goal properties in bioyond_dispensing_station to use enums for target_stack and other parameters. - Changed data types for end_point and start_point in reaction_station_bioyond to use string enums (Start, End). - Simplified descriptions and updated measurement units from μL to mL where applicable. - Removed unused commands from reaction_station_bioyond to streamline the configuration. * fix:Change the material unit from μL to mL * fix:refresh_material_cache * feat: 动态获取工作流步骤ID,优化工作流配置 * feat: 添加清空服务端所有非核心工作流功能 * fix:修复Bottle类的序列化和反序列化方法 * feat:增强材料缓存更新逻辑,支持处理返回数据中的详细信息 * Add debug log * feat(workstation): update bioyond config migration and coin cell material search logic - Migrate bioyond_cell config to JSON structure and remove global variable dependencies - Implement material search confirmation dialog auto-handling - Add documentation: 20260113_物料搜寻确认弹窗自动处理功能.md and 20260113_配置迁移修改总结.md * Refactor module paths for Bioyond devices in YAML configuration files - Updated the module path for BioyondDispensingStation in bioyond_dispensing_station.yaml to reflect the new directory structure. - Updated the module path for BioyondReactionStation and BioyondReactor in reaction_station_bioyond.yaml to align with the revised organization of the codebase. * fix: WareHouse 的不可哈希类型错误,优化父节点去重逻辑 * refactor: Move config from module to instance initialization * fix: 修正 reaction_station 目录名拼写错误 * feat: Integrate material search logic and cleanup deprecated files - Update coin_cell_assembly.py with material search dialog handling - Update YB_warehouses.py with latest warehouse configurations - Remove outdated documentation and test data files * Refactor: Use instance attributes for action names and workflow step IDs * refactor: Split tipbox storage into left and right warehouses * refactor: Merge tipbox storage left and right into single warehouse --------- Co-authored-by: ZiWei <131428629+ZiWei09@users.noreply.github.com> Co-authored-by: Andy6M <xieqiming1132@qq.com>
162 lines
7.2 KiB
Python
162 lines
7.2 KiB
Python
from os import name
|
||
from pylabrobot.resources import Deck, Coordinate, Rotation
|
||
|
||
from unilabos.resources.bioyond.YB_warehouses import (
|
||
bioyond_warehouse_1x4x4,
|
||
bioyond_warehouse_1x4x4_right, # 新增:右侧仓库 (A05~D08)
|
||
bioyond_warehouse_1x4x2,
|
||
bioyond_warehouse_reagent_stack, # 新增:试剂堆栈 (A1-B4)
|
||
bioyond_warehouse_liquid_and_lid_handling,
|
||
bioyond_warehouse_1x2x2,
|
||
bioyond_warehouse_2x2x1, # 新增:321和43窗口 (2行×2列)
|
||
bioyond_warehouse_1x3x3,
|
||
bioyond_warehouse_5x3x1, # 新增:手动传递窗仓库 (5行×3列)
|
||
bioyond_warehouse_10x1x1,
|
||
bioyond_warehouse_3x3x1,
|
||
bioyond_warehouse_3x3x1_2,
|
||
bioyond_warehouse_5x1x1,
|
||
bioyond_warehouse_1x8x4,
|
||
bioyond_warehouse_reagent_storage,
|
||
# bioyond_warehouse_liquid_preparation,
|
||
bioyond_warehouse_density_vial,
|
||
)
|
||
from unilabos.resources.bioyond.warehouses import (
|
||
bioyond_warehouse_tipbox_storage_left, # 新增:Tip盒堆栈(左)
|
||
bioyond_warehouse_tipbox_storage_right, # 新增:Tip盒堆栈(右)
|
||
)
|
||
|
||
|
||
class BIOYOND_PolymerReactionStation_Deck(Deck):
|
||
def __init__(
|
||
self,
|
||
name: str = "PolymerReactionStation_Deck",
|
||
size_x: float = 2700.0,
|
||
size_y: float = 1080.0,
|
||
size_z: float = 1500.0,
|
||
category: str = "deck",
|
||
setup: bool = False
|
||
) -> None:
|
||
super().__init__(name=name, size_x=2700.0, size_y=1080.0, size_z=1500.0)
|
||
if setup:
|
||
self.setup()
|
||
|
||
def setup(self) -> None:
|
||
# 添加仓库
|
||
# 说明: 堆栈1物理上分为左右两部分
|
||
# - 堆栈1左: A01~D04 (4行×4列, 位于反应站左侧)
|
||
# - 堆栈1右: A05~D08 (4行×4列, 位于反应站右侧)
|
||
self.warehouses = {
|
||
"堆栈1左": bioyond_warehouse_1x4x4("堆栈1左"), # 左侧堆栈: A01~D04
|
||
"堆栈1右": bioyond_warehouse_1x4x4_right("堆栈1右"), # 右侧堆栈: A05~D08
|
||
"站内试剂存放堆栈": bioyond_warehouse_reagent_storage("站内试剂存放堆栈"), # A01~A02
|
||
# "移液站内10%分装液体准备仓库": bioyond_warehouse_liquid_preparation("移液站内10%分装液体准备仓库"), # A01~B04
|
||
"站内Tip盒堆栈(左)": bioyond_warehouse_tipbox_storage_left("站内Tip盒堆栈(左)"), # A02~B03
|
||
"站内Tip盒堆栈(右)": bioyond_warehouse_tipbox_storage_right("站内Tip盒堆栈(右)"), # A01~B01
|
||
"测量小瓶仓库(测密度)": bioyond_warehouse_density_vial("测量小瓶仓库(测密度)"), # A01~B03
|
||
}
|
||
self.warehouse_locations = {
|
||
"堆栈1左": Coordinate(-200.0, 400.0, 0.0), # 左侧位置
|
||
"堆栈1右": Coordinate(2350.0, 400.0, 0.0), # 右侧位置
|
||
"站内试剂存放堆栈": Coordinate(640.0, 400.0, 0.0),
|
||
"站内Tip盒堆栈(左)": Coordinate(300.0, 100.0, 0.0),
|
||
"站内Tip盒堆栈(右)": Coordinate(2250.0, 100.0, 0.0), # 向右偏移 2 * item_dx (137.0)
|
||
"测量小瓶仓库(测密度)": Coordinate(1000.0, 530.0, 0.0),
|
||
}
|
||
|
||
for warehouse_name, warehouse in self.warehouses.items():
|
||
self.assign_child_resource(warehouse, location=self.warehouse_locations[warehouse_name])
|
||
|
||
class BIOYOND_PolymerPreparationStation_Deck(Deck):
|
||
def __init__(
|
||
self,
|
||
name: str = "PolymerPreparationStation_Deck",
|
||
size_x: float = 2700.0,
|
||
size_y: float = 1080.0,
|
||
size_z: float = 1500.0,
|
||
category: str = "deck",
|
||
setup: bool = False
|
||
) -> None:
|
||
super().__init__(name=name, size_x=2700.0, size_y=1080.0, size_z=1500.0)
|
||
if setup:
|
||
self.setup()
|
||
|
||
def setup(self) -> None:
|
||
# 添加仓库 - 配液站的3个堆栈,使用Bioyond系统中的实际名称
|
||
# 样品类型(typeMode=1):烧杯、试剂瓶、分装板 → 试剂堆栈、溶液堆栈
|
||
# 试剂类型(typeMode=2):样品板 → 粉末堆栈
|
||
self.warehouses = {
|
||
# 试剂类型 - 样品板
|
||
"粉末堆栈": bioyond_warehouse_1x4x4("粉末堆栈"), # 4行×4列 (A01-D04)
|
||
|
||
# 样品类型 - 烧杯、试剂瓶、分装板
|
||
"试剂堆栈": bioyond_warehouse_reagent_stack("试剂堆栈"), # 2行×4列 (A01-B04)
|
||
"溶液堆栈": bioyond_warehouse_1x4x4("溶液堆栈"), # 4行×4列 (A01-D04)
|
||
}
|
||
self.warehouse_locations = {
|
||
"粉末堆栈": Coordinate(-200.0, 400.0, 0.0),
|
||
"试剂堆栈": Coordinate(1750.0, 160.0, 0.0),
|
||
"溶液堆栈": Coordinate(2350.0, 400.0, 0.0),
|
||
}
|
||
|
||
for warehouse_name, warehouse in self.warehouses.items():
|
||
self.assign_child_resource(warehouse, location=self.warehouse_locations[warehouse_name])
|
||
|
||
class BIOYOND_YB_Deck(Deck):
|
||
def __init__(
|
||
self,
|
||
name: str = "YB_Deck",
|
||
size_x: float = 4150,
|
||
size_y: float = 1400.0,
|
||
size_z: float = 2670.0,
|
||
category: str = "deck",
|
||
setup: bool = False
|
||
) -> None:
|
||
super().__init__(name=name, size_x=4150.0, size_y=1400.0, size_z=2670.0)
|
||
if setup:
|
||
self.setup()
|
||
|
||
def setup(self) -> None:
|
||
# 添加仓库
|
||
self.warehouses = {
|
||
"321窗口": bioyond_warehouse_2x2x1("321窗口"), # 2行×2列
|
||
"43窗口": bioyond_warehouse_2x2x1("43窗口"), # 2行×2列
|
||
"手动传递窗右": bioyond_warehouse_5x3x1("手动传递窗右", row_offset=0), # A01-E03
|
||
"手动传递窗左": bioyond_warehouse_5x3x1("手动传递窗左", row_offset=5), # F01-J03
|
||
"加样头堆栈左": bioyond_warehouse_10x1x1("加样头堆栈左"),
|
||
"加样头堆栈右": bioyond_warehouse_10x1x1("加样头堆栈右"),
|
||
|
||
"15ml配液堆栈左": bioyond_warehouse_3x3x1("15ml配液堆栈左"),
|
||
"母液加样右": bioyond_warehouse_3x3x1_2("母液加样右"),
|
||
"大瓶母液堆栈左": bioyond_warehouse_5x1x1("大瓶母液堆栈左"),
|
||
"大瓶母液堆栈右": bioyond_warehouse_5x1x1("大瓶母液堆栈右"),
|
||
"2号手套箱内部堆栈": bioyond_warehouse_3x3x1("2号手套箱内部堆栈"), # 新增:3行×3列 (A01-C03)
|
||
}
|
||
# warehouse 的位置
|
||
self.warehouse_locations = {
|
||
"321窗口": Coordinate(-150.0, 158.0, 0.0),
|
||
"43窗口": Coordinate(4160.0, 158.0, 0.0),
|
||
"手动传递窗左": Coordinate(-150.0, 877.0, 0.0),
|
||
"手动传递窗右": Coordinate(4160.0, 877.0, 0.0),
|
||
"加样头堆栈左": Coordinate(385.0, 1300.0, 0.0),
|
||
"加样头堆栈右": Coordinate(2187.0, 1300.0, 0.0),
|
||
|
||
"15ml配液堆栈左": Coordinate(749.0, 355.0, 0.0),
|
||
"母液加样右": Coordinate(2152.0, 333.0, 0.0),
|
||
"大瓶母液堆栈左": Coordinate(1164.0, 676.0, 0.0),
|
||
"大瓶母液堆栈右": Coordinate(2717.0, 676.0, 0.0),
|
||
"2号手套箱内部堆栈": Coordinate(-800, -500.0, 0.0), # 新增:位置需根据实际硬件调整
|
||
}
|
||
|
||
for warehouse_name, warehouse in self.warehouses.items():
|
||
self.assign_child_resource(warehouse, location=self.warehouse_locations[warehouse_name])
|
||
|
||
def YB_Deck(name: str) -> Deck:
|
||
by=BIOYOND_YB_Deck(name=name)
|
||
by.setup()
|
||
return by
|
||
|
||
|
||
|
||
|
||
|