mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2025-12-17 13:01:12 +00:00
feat(workstation): 更新 Bioyond 和 Coin Cell 组装工作站配置
- 修改 Bioyond Studio 配置文件中的 API 主机地址 - 更新 bioyond_cell_workstation.py 中的默认模板路径 - 新增物料模板文件 material_template.xlsx - 扩展 func_pack_send_msg_cmd 函数以支持 assembly_pressure 参数 - 更新 coin_cell_workstation.yaml 文件以包含 assembly_pressure 的默认值和类型定义
This commit is contained in:
@@ -253,7 +253,7 @@ class BioyondCellWorkstation(BioyondWorkstation):
|
|||||||
def auto_feeding4to3(
|
def auto_feeding4to3(
|
||||||
self,
|
self,
|
||||||
# ★ 修改点:默认模板路径
|
# ★ 修改点:默认模板路径
|
||||||
xlsx_path: Optional[str] = "unilabos\\devices\\workstation\\bioyond_studio\\bioyond_cell\\样品导入模板.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 - 加样头面 (Z=1, 12个点位) ----------------
|
||||||
WH4_x1_y1_z1_1_materialName: str = "", WH4_x1_y1_z1_1_quantity: float = 0.0,
|
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,
|
WH4_x2_y1_z1_2_materialName: str = "", WH4_x2_y1_z1_2_quantity: float = 0.0,
|
||||||
|
|||||||
Binary file not shown.
@@ -8,7 +8,7 @@ import os
|
|||||||
# BioyondCellWorkstation 默认配置(包含所有必需参数)
|
# BioyondCellWorkstation 默认配置(包含所有必需参数)
|
||||||
API_CONFIG = {
|
API_CONFIG = {
|
||||||
# API 连接配置
|
# API 连接配置
|
||||||
"api_host": os.getenv("BIOYOND_API_HOST", "http://172.21.32.103:44388"),
|
"api_host": os.getenv("BIOYOND_API_HOST", "http://172.16.10.169:44388"),
|
||||||
"api_key": os.getenv("BIOYOND_API_KEY", "8A819E5C"),
|
"api_key": os.getenv("BIOYOND_API_KEY", "8A819E5C"),
|
||||||
"timeout": int(os.getenv("BIOYOND_TIMEOUT", "30")),
|
"timeout": int(os.getenv("BIOYOND_TIMEOUT", "30")),
|
||||||
|
|
||||||
|
|||||||
@@ -766,7 +766,7 @@ class CoinCellAssemblyWorkstation(WorkstationBase):
|
|||||||
# self.success = True
|
# self.success = True
|
||||||
# return self.success
|
# return self.success
|
||||||
|
|
||||||
def func_pack_send_msg_cmd(self, elec_use_num, elec_vol, assembly_type) -> bool:
|
def func_pack_send_msg_cmd(self, elec_use_num, elec_vol, assembly_type, assembly_pressure) -> bool:
|
||||||
"""UNILAB写参数"""
|
"""UNILAB写参数"""
|
||||||
while (self.request_rec_msg_status) == False:
|
while (self.request_rec_msg_status) == False:
|
||||||
print("wait for request_rec_msg_status to True")
|
print("wait for request_rec_msg_status to True")
|
||||||
@@ -782,6 +782,9 @@ class CoinCellAssemblyWorkstation(WorkstationBase):
|
|||||||
#发送电解液组装类型
|
#发送电解液组装类型
|
||||||
self._unilab_send_msg_assembly_type(assembly_type)
|
self._unilab_send_msg_assembly_type(assembly_type)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
#发送电池压制力
|
||||||
|
self._unilab_send_msg_assembly_pressure(assembly_pressure)
|
||||||
|
time.sleep(1)
|
||||||
self._unilab_send_msg_succ_cmd(True)
|
self._unilab_send_msg_succ_cmd(True)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
while (self.request_rec_msg_status) == True:
|
while (self.request_rec_msg_status) == True:
|
||||||
@@ -895,16 +898,16 @@ class CoinCellAssemblyWorkstation(WorkstationBase):
|
|||||||
self.client.use_node('REG_MSG_NE_PLATE_MATRIX').write(fujipian_juzhendianwei)
|
self.client.use_node('REG_MSG_NE_PLATE_MATRIX').write(fujipian_juzhendianwei)
|
||||||
self.client.use_node('REG_MSG_SEPARATOR_PLATE_NUM').write(gemopanshu)
|
self.client.use_node('REG_MSG_SEPARATOR_PLATE_NUM').write(gemopanshu)
|
||||||
self.client.use_node('REG_MSG_SEPARATOR_PLATE_MATRIX').write(gemo_juzhendianwei)
|
self.client.use_node('REG_MSG_SEPARATOR_PLATE_MATRIX').write(gemo_juzhendianwei)
|
||||||
self.client.use_node('COIL_ALUMINUM_FOIL').write(lvbodian)
|
self.client.use_node('COIL_ALUMINUM_FOIL').write(not lvbodian)
|
||||||
self.client.use_node('REG_MSG_PRESS_MODE').write(battery_pressure_mode)
|
self.client.use_node('REG_MSG_PRESS_MODE').write(not battery_pressure_mode)
|
||||||
# self.client.use_node('REG_MSG_ASSEMBLY_PRESSURE').write(battery_pressure)
|
# self.client.use_node('REG_MSG_ASSEMBLY_PRESSURE').write(battery_pressure)
|
||||||
self.client.use_node('REG_MSG_BATTERY_CLEAN_IGNORE').write(battery_clean_ignore)
|
self.client.use_node('REG_MSG_BATTERY_CLEAN_IGNORE').write(battery_clean_ignore)
|
||||||
self.success = True
|
self.success = True
|
||||||
|
|
||||||
return self.success
|
return self.success
|
||||||
|
|
||||||
def func_allpack_cmd(self, elec_num, elec_use_num, elec_vol:int=50, assembly_type:int=7, file_path: str="D:\\coin_cell_data") -> bool:
|
def func_allpack_cmd(self, elec_num, elec_use_num, elec_vol:int=50, assembly_type:int=7, assembly_pressure:int=4200, file_path: str="D:\\coin_cell_data") -> bool:
|
||||||
elec_num, elec_use_num, elec_vol, assembly_type = int(elec_num), int(elec_use_num), int(elec_vol), int(assembly_type)
|
elec_num, elec_use_num, elec_vol, assembly_type, assembly_pressure = int(elec_num), int(elec_use_num), int(elec_vol), int(assembly_type), int(assembly_pressure)
|
||||||
summary_csv_file = os.path.join(file_path, "duandian.csv")
|
summary_csv_file = os.path.join(file_path, "duandian.csv")
|
||||||
# 如果断点文件存在,先读取之前的进度
|
# 如果断点文件存在,先读取之前的进度
|
||||||
if os.path.exists(summary_csv_file):
|
if os.path.exists(summary_csv_file):
|
||||||
@@ -954,7 +957,7 @@ class CoinCellAssemblyWorkstation(WorkstationBase):
|
|||||||
print(f"开始第{last_i+i+1}瓶电解液的组装")
|
print(f"开始第{last_i+i+1}瓶电解液的组装")
|
||||||
#第一个循环从上次断点继续,后续循环从0开始
|
#第一个循环从上次断点继续,后续循环从0开始
|
||||||
j_start = last_j if i == last_i else 0
|
j_start = last_j if i == last_i else 0
|
||||||
self.func_pack_send_msg_cmd(elec_use_num-j_start, elec_vol, assembly_type)
|
self.func_pack_send_msg_cmd(elec_use_num-j_start, elec_vol, assembly_type, assembly_pressure)
|
||||||
|
|
||||||
for j in range(j_start, elec_use_num):
|
for j in range(j_start, elec_use_num):
|
||||||
print(f"开始第{last_i+i+1}瓶电解液的第{j+j_start+1}个电池组装")
|
print(f"开始第{last_i+i+1}瓶电解液的第{j+j_start+1}个电池组装")
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ coincellassemblyworkstation_device:
|
|||||||
feedback: {}
|
feedback: {}
|
||||||
goal: {}
|
goal: {}
|
||||||
goal_default:
|
goal_default:
|
||||||
|
assembly_pressure: 4200
|
||||||
assembly_type: 7
|
assembly_type: 7
|
||||||
elec_num: null
|
elec_num: null
|
||||||
elec_use_num: null
|
elec_use_num: null
|
||||||
@@ -88,6 +89,9 @@ coincellassemblyworkstation_device:
|
|||||||
feedback: {}
|
feedback: {}
|
||||||
goal:
|
goal:
|
||||||
properties:
|
properties:
|
||||||
|
assembly_pressure:
|
||||||
|
default: 4200
|
||||||
|
type: integer
|
||||||
assembly_type:
|
assembly_type:
|
||||||
default: 7
|
default: 7
|
||||||
type: integer
|
type: integer
|
||||||
@@ -291,6 +295,7 @@ coincellassemblyworkstation_device:
|
|||||||
feedback: {}
|
feedback: {}
|
||||||
goal: {}
|
goal: {}
|
||||||
goal_default:
|
goal_default:
|
||||||
|
assembly_pressure: null
|
||||||
assembly_type: null
|
assembly_type: null
|
||||||
elec_use_num: null
|
elec_use_num: null
|
||||||
elec_vol: null
|
elec_vol: null
|
||||||
@@ -303,6 +308,8 @@ coincellassemblyworkstation_device:
|
|||||||
feedback: {}
|
feedback: {}
|
||||||
goal:
|
goal:
|
||||||
properties:
|
properties:
|
||||||
|
assembly_pressure:
|
||||||
|
type: string
|
||||||
assembly_type:
|
assembly_type:
|
||||||
type: string
|
type: string
|
||||||
elec_use_num:
|
elec_use_num:
|
||||||
@@ -313,6 +320,7 @@ coincellassemblyworkstation_device:
|
|||||||
- elec_use_num
|
- elec_use_num
|
||||||
- elec_vol
|
- elec_vol
|
||||||
- assembly_type
|
- assembly_type
|
||||||
|
- assembly_pressure
|
||||||
type: object
|
type: object
|
||||||
result: {}
|
result: {}
|
||||||
required:
|
required:
|
||||||
|
|||||||
Reference in New Issue
Block a user