mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-09 17:25:09 +00:00
Compare commits
4 Commits
workstatio
...
709eb0d91c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
709eb0d91c | ||
|
|
14b7d52825 | ||
|
|
c6c2da69ba | ||
|
|
622e579063 |
@@ -24,6 +24,8 @@ class WSConfig:
|
|||||||
max_reconnect_attempts = 999 # 最大重连次数
|
max_reconnect_attempts = 999 # 最大重连次数
|
||||||
ping_interval = 30 # ping间隔(秒)
|
ping_interval = 30 # ping间隔(秒)
|
||||||
```
|
```
|
||||||
|
您可以进入实验室,点击左下角的头像在实验室详情中获取所在实验室的ak sk
|
||||||
|

|
||||||
|
|
||||||
### 完整配置示例
|
### 完整配置示例
|
||||||
|
|
||||||
|
|||||||
BIN
docs/user_guide/image/copy_aksk.gif
Normal file
BIN
docs/user_guide/image/copy_aksk.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 526 KiB |
BIN
docs/user_guide/image/creatworkfollow.gif
Normal file
BIN
docs/user_guide/image/creatworkfollow.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 327 KiB |
BIN
docs/user_guide/image/links.png
Normal file
BIN
docs/user_guide/image/links.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 275 KiB |
BIN
docs/user_guide/image/linksandrun.png
Normal file
BIN
docs/user_guide/image/linksandrun.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 186 KiB |
BIN
docs/user_guide/image/material.png
Normal file
BIN
docs/user_guide/image/material.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 581 KiB |
BIN
docs/user_guide/image/new.png
Normal file
BIN
docs/user_guide/image/new.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 120 KiB |
@@ -245,3 +245,78 @@ unilab --ak your_ak --sk your_sk --port 8080 --disable_browser
|
|||||||
- 检查图谱文件格式是否正确
|
- 检查图谱文件格式是否正确
|
||||||
- 验证设备连接和端点配置
|
- 验证设备连接和端点配置
|
||||||
- 确保注册表路径正确
|
- 确保注册表路径正确
|
||||||
|
|
||||||
|
## 页面操作
|
||||||
|
|
||||||
|
### 1. 启动成功
|
||||||
|
当您启动成功后,可以看到物料列表,节点模版和组态图如图展示
|
||||||
|

|
||||||
|
|
||||||
|
### 2. 根据需求创建设备和物料
|
||||||
|
我们可以做一个简单的案例
|
||||||
|
* 在容器1中加入水
|
||||||
|
* 通过传输泵将容器1中的水转移到容器2中
|
||||||
|
#### 2.1 添加所需的设备和物料
|
||||||
|
仪器设备work_station中的workstation 数量x1
|
||||||
|
仪器设备virtual_device中的virtual_transfer_pump 数量x1
|
||||||
|
物料耗材container中的container 数量x2
|
||||||
|
|
||||||
|
#### 2.2 将设备和物料根据父子关系进行关联
|
||||||
|
当我们添加设备时,仪器耗材模块的物料列表也会实时更新
|
||||||
|
我们需要将设备和物料拖拽到workstation中并在画布上将它们连接起来,就像真实的设备操作一样
|
||||||
|

|
||||||
|
|
||||||
|
### 3. 创建工作流
|
||||||
|
进入工作流模块 → 点击"我创建的" → 新建工作流
|
||||||
|

|
||||||
|
|
||||||
|
#### 3.1 新增工作流节点
|
||||||
|
我们可以进入指定工作流,在空白处右键
|
||||||
|
* 选择Laboratory→host_node中的creat_resource
|
||||||
|
* 选择Laboratory→workstation中的PumpTransferProtocol
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
#### 3.2 配置节点参数
|
||||||
|
根据案例,工作流包含两个步骤:
|
||||||
|
1. 使用creat_resource在容器中创建水
|
||||||
|
2. 通过泵传输协议将水传输到另一个容器
|
||||||
|
|
||||||
|
我们点击creat_resource卡片上的编辑按钮来配置参数⭐️
|
||||||
|
class_name :container
|
||||||
|
device_id : workstation
|
||||||
|
liquid_input_slot : 0或-1均可
|
||||||
|
liquid_type : water
|
||||||
|
liquid_volume : 根据需求填写即可,默认单位ml,这里举例50
|
||||||
|
parent : workstation
|
||||||
|
res_id : containe
|
||||||
|
关联设备名称(原unilabos_device_id) : 这里就填写host_node
|
||||||
|
**配置完成后点击底部保存按钮**
|
||||||
|
|
||||||
|
我们点击PumpTransferProtocol卡片上的编辑按钮来配置参数⭐️
|
||||||
|
event : transfer_liquid
|
||||||
|
from_vessel : water
|
||||||
|
to_vessel : container1
|
||||||
|
volume : 根据需求填写即可,默认单位ml,这里举例50
|
||||||
|
关联设备名称(原unilabos_device_id) : 这里就填写workstation
|
||||||
|
**配置完成后点击底部保存按钮**
|
||||||
|
|
||||||
|
#### 3.3 运行工作流
|
||||||
|
1. 连接两个节点卡片
|
||||||
|
2. 点击底部保存按钮
|
||||||
|
3. 点击运行按钮执行工作流
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 运行监控
|
||||||
|
* 运行状态和消息实时显示在底部控制台
|
||||||
|
* 如有报错,可点击查看详细信息
|
||||||
|
|
||||||
|
### 结果验证
|
||||||
|
工作流完成后,返回仪器耗材模块:
|
||||||
|
* 点击 container1卡片查看详情
|
||||||
|
* 确认其中包含参数指定的水和容量
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ class HTTPClient:
|
|||||||
remote_addr: 远程服务器地址,如果不提供则从配置中获取
|
remote_addr: 远程服务器地址,如果不提供则从配置中获取
|
||||||
auth: 授权信息
|
auth: 授权信息
|
||||||
"""
|
"""
|
||||||
|
self.initialized = False
|
||||||
self.remote_addr = remote_addr or HTTPConfig.remote_addr
|
self.remote_addr = remote_addr or HTTPConfig.remote_addr
|
||||||
if auth is not None:
|
if auth is not None:
|
||||||
self.auth = auth
|
self.auth = auth
|
||||||
@@ -69,12 +70,22 @@ class HTTPClient:
|
|||||||
Returns:
|
Returns:
|
||||||
Response: API响应对象
|
Response: API响应对象
|
||||||
"""
|
"""
|
||||||
|
if not self.initialized:
|
||||||
|
self.initialized = True
|
||||||
|
info(f"首次添加资源,当前远程地址: {self.remote_addr}")
|
||||||
response = requests.post(
|
response = requests.post(
|
||||||
f"{self.remote_addr}/lab/material",
|
f"{self.remote_addr}/lab/material",
|
||||||
json={"nodes": resources},
|
json={"nodes": resources},
|
||||||
headers={"Authorization": f"Lab {self.auth}"},
|
headers={"Authorization": f"Lab {self.auth}"},
|
||||||
timeout=100,
|
timeout=100,
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
response = requests.put(
|
||||||
|
f"{self.remote_addr}/lab/material",
|
||||||
|
json={"nodes": resources},
|
||||||
|
headers={"Authorization": f"Lab {self.auth}"},
|
||||||
|
timeout=100,
|
||||||
|
)
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
res = response.json()
|
res = response.json()
|
||||||
if "code" in res and res["code"] != 0:
|
if "code" in res and res["code"] != 0:
|
||||||
@@ -130,9 +141,19 @@ class HTTPClient:
|
|||||||
Returns:
|
Returns:
|
||||||
Response: API响应对象
|
Response: API响应对象
|
||||||
"""
|
"""
|
||||||
|
if not self.initialized:
|
||||||
|
self.initialized = True
|
||||||
|
info(f"首次添加资源,当前远程地址: {self.remote_addr}")
|
||||||
|
response = requests.post(
|
||||||
|
f"{self.remote_addr}/lab/material",
|
||||||
|
json={"nodes": resources},
|
||||||
|
headers={"Authorization": f"Lab {self.auth}"},
|
||||||
|
timeout=100,
|
||||||
|
)
|
||||||
|
else:
|
||||||
response = requests.put(
|
response = requests.put(
|
||||||
f"{self.remote_addr}/lab/material",
|
f"{self.remote_addr}/lab/material",
|
||||||
json=resources,
|
json={"nodes": resources},
|
||||||
headers={"Authorization": f"Lab {self.auth}"},
|
headers={"Authorization": f"Lab {self.auth}"},
|
||||||
timeout=100,
|
timeout=100,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7304,151 +7304,6 @@ liquid_handler.prcxi:
|
|||||||
title: LiquidHandlerRemove
|
title: LiquidHandlerRemove
|
||||||
type: object
|
type: object
|
||||||
type: LiquidHandlerRemove
|
type: LiquidHandlerRemove
|
||||||
set_group:
|
|
||||||
feedback: {}
|
|
||||||
goal:
|
|
||||||
group_name: group_name
|
|
||||||
volumes: volumes
|
|
||||||
wells: wells
|
|
||||||
goal_default:
|
|
||||||
group_name: ''
|
|
||||||
volumes:
|
|
||||||
- 0.0
|
|
||||||
wells:
|
|
||||||
- category: ''
|
|
||||||
children: []
|
|
||||||
config: ''
|
|
||||||
data: ''
|
|
||||||
id: ''
|
|
||||||
name: ''
|
|
||||||
parent: ''
|
|
||||||
pose:
|
|
||||||
orientation:
|
|
||||||
w: 1.0
|
|
||||||
x: 0.0
|
|
||||||
y: 0.0
|
|
||||||
z: 0.0
|
|
||||||
position:
|
|
||||||
x: 0.0
|
|
||||||
y: 0.0
|
|
||||||
z: 0.0
|
|
||||||
sample_id: ''
|
|
||||||
type: ''
|
|
||||||
handles: {}
|
|
||||||
result: {}
|
|
||||||
schema:
|
|
||||||
description: ''
|
|
||||||
properties:
|
|
||||||
feedback:
|
|
||||||
properties: {}
|
|
||||||
required: []
|
|
||||||
title: LiquidHandlerSetGroup_Feedback
|
|
||||||
type: object
|
|
||||||
goal:
|
|
||||||
properties:
|
|
||||||
group_name:
|
|
||||||
type: string
|
|
||||||
volumes:
|
|
||||||
items:
|
|
||||||
type: number
|
|
||||||
type: array
|
|
||||||
wells:
|
|
||||||
items:
|
|
||||||
properties:
|
|
||||||
category:
|
|
||||||
type: string
|
|
||||||
children:
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
type: array
|
|
||||||
config:
|
|
||||||
type: string
|
|
||||||
data:
|
|
||||||
type: string
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
parent:
|
|
||||||
type: string
|
|
||||||
pose:
|
|
||||||
properties:
|
|
||||||
orientation:
|
|
||||||
properties:
|
|
||||||
w:
|
|
||||||
type: number
|
|
||||||
x:
|
|
||||||
type: number
|
|
||||||
y:
|
|
||||||
type: number
|
|
||||||
z:
|
|
||||||
type: number
|
|
||||||
required:
|
|
||||||
- x
|
|
||||||
- y
|
|
||||||
- z
|
|
||||||
- w
|
|
||||||
title: orientation
|
|
||||||
type: object
|
|
||||||
position:
|
|
||||||
properties:
|
|
||||||
x:
|
|
||||||
type: number
|
|
||||||
y:
|
|
||||||
type: number
|
|
||||||
z:
|
|
||||||
type: number
|
|
||||||
required:
|
|
||||||
- x
|
|
||||||
- y
|
|
||||||
- z
|
|
||||||
title: position
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- position
|
|
||||||
- orientation
|
|
||||||
title: pose
|
|
||||||
type: object
|
|
||||||
sample_id:
|
|
||||||
type: string
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
- name
|
|
||||||
- sample_id
|
|
||||||
- children
|
|
||||||
- parent
|
|
||||||
- type
|
|
||||||
- category
|
|
||||||
- pose
|
|
||||||
- config
|
|
||||||
- data
|
|
||||||
title: wells
|
|
||||||
type: object
|
|
||||||
type: array
|
|
||||||
required:
|
|
||||||
- group_name
|
|
||||||
- wells
|
|
||||||
- volumes
|
|
||||||
title: LiquidHandlerSetGroup_Goal
|
|
||||||
type: object
|
|
||||||
result:
|
|
||||||
properties:
|
|
||||||
return_info:
|
|
||||||
type: string
|
|
||||||
success:
|
|
||||||
type: boolean
|
|
||||||
required:
|
|
||||||
- return_info
|
|
||||||
- success
|
|
||||||
title: LiquidHandlerSetGroup_Result
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- goal
|
|
||||||
title: LiquidHandlerSetGroup
|
|
||||||
type: object
|
|
||||||
type: LiquidHandlerSetGroup
|
|
||||||
set_liquid:
|
set_liquid:
|
||||||
feedback: {}
|
feedback: {}
|
||||||
goal:
|
goal:
|
||||||
@@ -7824,56 +7679,6 @@ liquid_handler.prcxi:
|
|||||||
title: Transfer
|
title: Transfer
|
||||||
type: object
|
type: object
|
||||||
type: Transfer
|
type: Transfer
|
||||||
transfer_group:
|
|
||||||
feedback: {}
|
|
||||||
goal:
|
|
||||||
source_group_name: source_group_name
|
|
||||||
target_group_name: target_group_name
|
|
||||||
unit_volume: unit_volume
|
|
||||||
goal_default:
|
|
||||||
source_group_name: ''
|
|
||||||
target_group_name: ''
|
|
||||||
unit_volume: 0.0
|
|
||||||
handles: {}
|
|
||||||
result: {}
|
|
||||||
schema:
|
|
||||||
description: ''
|
|
||||||
properties:
|
|
||||||
feedback:
|
|
||||||
properties: {}
|
|
||||||
required: []
|
|
||||||
title: LiquidHandlerTransferGroup_Feedback
|
|
||||||
type: object
|
|
||||||
goal:
|
|
||||||
properties:
|
|
||||||
source_group_name:
|
|
||||||
type: string
|
|
||||||
target_group_name:
|
|
||||||
type: string
|
|
||||||
unit_volume:
|
|
||||||
type: number
|
|
||||||
required:
|
|
||||||
- source_group_name
|
|
||||||
- target_group_name
|
|
||||||
- unit_volume
|
|
||||||
title: LiquidHandlerTransferGroup_Goal
|
|
||||||
type: object
|
|
||||||
result:
|
|
||||||
properties:
|
|
||||||
return_info:
|
|
||||||
type: string
|
|
||||||
success:
|
|
||||||
type: boolean
|
|
||||||
required:
|
|
||||||
- return_info
|
|
||||||
- success
|
|
||||||
title: LiquidHandlerTransferGroup_Result
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- goal
|
|
||||||
title: LiquidHandlerTransferGroup
|
|
||||||
type: object
|
|
||||||
type: LiquidHandlerTransferGroup
|
|
||||||
transfer_liquid:
|
transfer_liquid:
|
||||||
feedback: {}
|
feedback: {}
|
||||||
goal:
|
goal:
|
||||||
|
|||||||
@@ -68,12 +68,10 @@ set(action_files
|
|||||||
"action/LiquidHandlerSetTipRack.action"
|
"action/LiquidHandlerSetTipRack.action"
|
||||||
"action/LiquidHandlerStamp.action"
|
"action/LiquidHandlerStamp.action"
|
||||||
"action/LiquidHandlerTransfer.action"
|
"action/LiquidHandlerTransfer.action"
|
||||||
"action/LiquidHandlerSetGroup.action"
|
|
||||||
"action/LiquidHandlerTransferBiomek.action"
|
"action/LiquidHandlerTransferBiomek.action"
|
||||||
"action/LiquidHandlerIncubateBiomek.action"
|
"action/LiquidHandlerIncubateBiomek.action"
|
||||||
"action/LiquidHandlerMoveBiomek.action"
|
"action/LiquidHandlerMoveBiomek.action"
|
||||||
"action/LiquidHandlerOscillateBiomek.action"
|
"action/LiquidHandlerOscillateBiomek.action"
|
||||||
"action/LiquidHandlerTransferGroup.action"
|
|
||||||
"action/LiquidHandlerAdd.action"
|
"action/LiquidHandlerAdd.action"
|
||||||
"action/LiquidHandlerMix.action"
|
"action/LiquidHandlerMix.action"
|
||||||
"action/LiquidHandlerMoveTo.action"
|
"action/LiquidHandlerMoveTo.action"
|
||||||
|
|||||||
Reference in New Issue
Block a user