From f5dbcb1bfc87e338e978dbe2182c81a5d9800ed6 Mon Sep 17 00:00:00 2001 From: calvincao Date: Mon, 10 Nov 2025 13:27:54 +0800 Subject: [PATCH] =?UTF-8?q?feat(bioyond=5Fcell):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=A8=A1=E6=9D=BF=E8=B7=AF=E5=BE=84=E5=B9=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B8=A9=E5=BA=A6=E5=AD=97=E6=AE=B5-=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86=E8=87=AA=E5=8A=A8=E9=80=81=E6=96=99?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E4=B8=AD=E7=9A=84=E9=BB=98=E8=AE=A4=20Excel?= =?UTF-8?q?=20=E6=A8=A1=E6=9D=BF=E8=B7=AF=E5=BE=84-=20=E5=9C=A8=E7=89=A9?= =?UTF-8?q?=E6=96=99=E4=BF=A1=E6=81=AF=E4=B8=AD=E6=96=B0=E5=A2=9E=20temper?= =?UTF-8?q?ature=20=E5=AD=97=E6=AE=B5=EF=BC=8C=E9=BB=98=E8=AE=A4=E5=80=BC?= =?UTF-8?q?=E4=B8=BA0=20-=20=E6=9B=B4=E6=96=B0=E4=BA=86=20create=5Forders?= =?UTF-8?q?=20=E5=87=BD=E6=95=B0=E4=B8=AD=E7=9A=84=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=AE=9E=E9=AA=8C=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84=20-=20?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=8E=89=E4=BA=86=E9=83=A8=E5=88=86=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E4=BB=A3=E7=A0=81=EF=BC=8C=E4=BF=9D=E7=95=99=E5=85=B3?= =?UTF-8?q?=E9=94=AE=E7=A4=BA=E4=BE=8B=E5=92=8C=E8=AF=B4=E6=98=8E=20-=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E5=85=B3=E4=BA=8E=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E7=A0=81=E3=80=81=E5=AE=9E=E9=AA=8C=E6=96=87=E4=BB=B6=E5=92=8C?= =?UTF-8?q?=E7=89=A9=E6=96=99=E6=A8=A1=E6=9D=BF=E7=9A=84=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bioyond_cell/bioyond_cell_workstation.py | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/unilabos/devices/workstation/bioyond_studio/bioyond_cell/bioyond_cell_workstation.py b/unilabos/devices/workstation/bioyond_studio/bioyond_cell/bioyond_cell_workstation.py index fbedd266..f49eae94 100644 --- a/unilabos/devices/workstation/bioyond_studio/bioyond_cell/bioyond_cell_workstation.py +++ b/unilabos/devices/workstation/bioyond_studio/bioyond_cell/bioyond_cell_workstation.py @@ -256,7 +256,7 @@ class BioyondCellWorkstation(BioyondWorkstation): def auto_feeding4to3( self, # ★ 修改点:默认模板路径 - xlsx_path: Optional[str] = "/Users/sml/work/Unilab/Uni-Lab-OS/unilabos/devices/workstation/bioyond_studio/bioyond_cell/material_template.xlsx", + xlsx_path: Optional[str] = "/Users/calvincao/Desktop/work/uni-lab-all/Uni-Lab-OS/unilabos/devices/workstation/bioyond_studio/bioyond_cell/material_template.xlsx", # ---------------- WH4 - 加样头面 (Z=1, 12个点位) ---------------- WH4_x1_y1_z1_1_materialName: str = "", WH4_x1_y1_z1_1_quantity: float = 0.0, WH4_x2_y1_z1_2_materialName: str = "", WH4_x2_y1_z1_2_quantity: float = 0.0, @@ -323,6 +323,7 @@ class BioyondCellWorkstation(BioyondWorkstation): "posX": int(row[2]), "posY": int(row[3]), "posZ": int(row[4]), "materialName": str(row[5]).strip(), "quantity": float(row[6]) if pd.notna(row[6]) else 0.0, + "temperature": 0, }) # 四号手套箱原液瓶面 for _, row in df.iloc[14:23, 2:9].iterrows(): @@ -334,6 +335,7 @@ class BioyondCellWorkstation(BioyondWorkstation): "quantity": float(row[6]) if pd.notna(row[6]) else 0.0, "materialType": str(row[7]).strip() if pd.notna(row[7]) else "", "targetWH": str(row[8]).strip() if pd.notna(row[8]) else "", + "temperature": 0, }) # 三号手套箱人工堆栈 for _, row in df.iloc[25:40, 2:7].iterrows(): @@ -343,11 +345,12 @@ class BioyondCellWorkstation(BioyondWorkstation): "posX": int(row[2]), "posY": int(row[3]), "posZ": int(row[4]), "materialType": str(row[5]).strip() if pd.notna(row[5]) else "", "materialId": str(row[6]).strip() if pd.notna(row[6]) else "", - "quantity": 1 + "quantity": 1, + "temperature": 0, }) else: logger.warning(f"未找到 Excel 文件 {xlsx_path},自动切换到手动参数模式。") - + # TODO: 温度下面手动模式没改,上面的改了 # ---------- 模式 2: 手动填写 ---------- if not items: params = locals() @@ -473,7 +476,7 @@ class BioyondCellWorkstation(BioyondWorkstation): - totalMass 自动计算为所有物料质量之和 - createTime 缺失或为空时自动填充为当前日期(YYYY/M/D) """ - default_path = Path("/Users/sml/work/Unilab/Uni-Lab-OS/unilabos/devices/workstation/bioyond_studio/bioyond_cell/2025092701.xlsx") + default_path = Path("/Users/calvincao/Desktop/work/uni-lab-all/Uni-Lab-OS/unilabos/devices/workstation/bioyond_studio/bioyond_cell/2025092701.xlsx") path = Path(xlsx_path) if xlsx_path else default_path print(f"[create_orders] 使用 Excel 路径: {path}") if path != default_path: @@ -1160,20 +1163,23 @@ if __name__ == "__main__": lab_registry.setup() deck = BIOYOND_YB_Deck(setup=True) ws = BioyondCellWorkstation(deck=deck) - # ws.create_sample(name="test", board_type="配液瓶(小)板", bottle_type="配液瓶(小)", location_code="B01") - # logger.info(ws.scheduler_stop()) + # ws.update_push_ip() #直接修改奔耀端的报送ip地址 + # ws.create_sample(name="配液瓶", board_type="配液瓶(小)板", bottle_type="配液瓶(小)", location_code="E01") + # ws.create_sample(name="分液瓶", board_type="5ml分液瓶板", bottle_type="5ml分液瓶", location_code="D01") + + # # logger.info(ws.scheduler_stop()) # logger.info(ws.scheduler_start()) - # 继续后续流程 # logger.info(ws.auto_feeding4to3()) #搬运物料到3号箱 - # # # 使用正斜杠或 Path 对象来指定文件路径 - # excel_path = Path("unilabos\\devices\\workstation\\bioyond_studio\\bioyond_cell\\2025092701.xlsx") + # 使用正斜杠或 Path 对象来指定文件路径 + # excel_path = Path("/Users/calvincao/Desktop/work/uni-lab-all/Uni-Lab-OS/unilabos/devices/workstation/bioyond_studio/bioyond_cell/2025092701.xlsx") # logger.info(ws.create_orders(excel_path)) # logger.info(ws.transfer_3_to_2_to_1()) - # logger.info(ws.transfer_1_to_2()) - # logger.info(ws.scheduler_start()) + # 1. location code + # 2. 实验文件 + # 3. material template file while True: time.sleep(1)