chore: 鏈湴淇敼瀛樻。 - 0.10.18 鍩虹鐗堟湰澶囦唤 (2026-03-24)

Made-with: Cursor
This commit is contained in:
Andy6M
2026-03-24 10:52:18 +08:00
parent 7505e024f3
commit 41a018febc
25 changed files with 1429 additions and 160 deletions

View File

@@ -1111,6 +1111,42 @@ class CoinCellAssemblyWorkstation(WorkstationBase):
raise RuntimeError(error_msg)
logger.info(" ✓ COIL_GB_L_IGNORE_CMD 检查通过 (值为False使用左手套箱)")
# 检查握手寄存器残留正常初始状态均应为False
# 若上次运行意外断网这些Unilab侧COIL可能被遗留为True导致PLC逻辑卡死
handshake_checks = [
("COIL_UNILAB_SEND_MSG_SUCC_CMD", "Unilab→PLC 配方发送完毕", "上次配方握手未正常复位PLC可能处于等待配方的卡死状态"),
("COIL_UNILAB_REC_MSG_SUCC_CMD", "Unilab→PLC 数据接收完毕", "上次数据接收握手未正常复位"),
("UNILAB_SEND_ELECTROLYTE_BOTTLE_NUM", "Unilab→PLC 瓶数发送完毕", "上次瓶数握手未正常复位"),
("UNILAB_SEND_FINISHED_CMD", "Unilab→PLC 一组完成确认", "上次完成握手未正常复位"),
("COIL_REQUEST_REC_MSG_STATUS", "PLC→Unilab 请求接收配方", "PLC正处于等待配方状态设备流程已卡死需重启PLC或手动复位握手"),
("COIL_REQUEST_SEND_MSG_STATUS", "PLC→Unilab 请求发送测试数据", "PLC正处于等待发送数据状态设备流程已卡死"),
]
for coil_name, coil_desc, stuck_reason in handshake_checks:
try:
hs_node = self.client.use_node(coil_name)
hs_value, hs_err = hs_node.read(1)
if hs_err:
logger.warning(f" ⚠ 无法读取 {coil_name},跳过此项检查")
continue
hs_actual = hs_value[0] if isinstance(hs_value, (list, tuple)) else hs_value
logger.info(f" {coil_name} 当前值: {hs_actual}")
if hs_actual:
error_msg = (
"❌ 前置握手寄存器检查失败!\n"
f" {coil_name} = True (期望值: False)\n"
f" 含义: {coil_desc}\n"
f" 原因: {stuck_reason}\n"
" 建议: 检查上次运行是否意外中断手动将该寄存器置为False后重试"
)
logger.error(error_msg)
raise RuntimeError(error_msg)
logger.info(f"{coil_name} 检查通过 (值为False)")
except RuntimeError:
raise
except Exception as hs_e:
logger.warning(f" ⚠ 检查 {coil_name} 时发生异常: {hs_e},跳过此项")
logger.info("✓ 所有前置条件检查通过!")
except ValueError as e:

View File

@@ -0,0 +1,10 @@
Time,open_circuit_voltage,pole_weight,assembly_time,assembly_pressure,electrolyte_volume,coin_num,electrolyte_code,coin_cell_code,formulation_order_code,formulation_ratio
20260317_162514,0.6470000147819519,28.75,502.0,3318,80,7,NoRead88,YS104219,,
20260317_163955,0.6800000071525574,28.780000686645508,883.0,3285,80,7,NoRead88,YS104395,,
20260317_171603,1.1490000486373901,0.0,2167.0,3302,80,7,NoRead88,YS104287,,
20260317_172257,1.3760000467300415,28.10999870300293,414.0,3269,80,7,NoRead88,YS104286,,
20260317_173332,3.171999931335449,28.84000015258789,634.0,3318,80,7,NoRead88,17160106,,
20260317_173614,3.0429999828338623,28.75,161.0,3285,80,7,NoRead88,YS104389,,
20260317_173856,3.140000104904175,28.579998016357422,160.0,3205,80,7,NoRead88,YS104357,,
20260317_174428,3.171999931335449,28.06999969482422,318.0,3285,80,7,NoRead88,YS104212,,
20260317_180440,3.171999931335449,28.44999885559082,200.0,3269,80,7,NoRead88,YS104228,,
1 Time open_circuit_voltage pole_weight assembly_time assembly_pressure electrolyte_volume coin_num electrolyte_code coin_cell_code formulation_order_code formulation_ratio
2 20260317_162514 0.6470000147819519 28.75 502.0 3318 80 7 NoRead88 YS104219
3 20260317_163955 0.6800000071525574 28.780000686645508 883.0 3285 80 7 NoRead88 YS104395
4 20260317_171603 1.1490000486373901 0.0 2167.0 3302 80 7 NoRead88 YS104287
5 20260317_172257 1.3760000467300415 28.10999870300293 414.0 3269 80 7 NoRead88 YS104286
6 20260317_173332 3.171999931335449 28.84000015258789 634.0 3318 80 7 NoRead88 17160106
7 20260317_173614 3.0429999828338623 28.75 161.0 3285 80 7 NoRead88 YS104389
8 20260317_173856 3.140000104904175 28.579998016357422 160.0 3205 80 7 NoRead88 YS104357
9 20260317_174428 3.171999931335449 28.06999969482422 318.0 3285 80 7 NoRead88 YS104212
10 20260317_180440 3.171999931335449 28.44999885559082 200.0 3269 80 7 NoRead88 YS104228

View File

@@ -0,0 +1,2 @@
Time,open_circuit_voltage,pole_weight,assembly_time,assembly_pressure,electrolyte_volume,coin_num,electrolyte_code,coin_cell_code,formulation_order_code,formulation_ratio
20260319_114636,0.2590000033378601,27.529996871948242,258.0,3302,60,7,NoRead88,YS104373,,
1 Time open_circuit_voltage pole_weight assembly_time assembly_pressure electrolyte_volume coin_num electrolyte_code coin_cell_code formulation_order_code formulation_ratio
2 20260319_114636 0.2590000033378601 27.529996871948242 258.0 3302 60 7 NoRead88 YS104373

View File

@@ -0,0 +1,7 @@
Time,open_circuit_voltage,pole_weight,assembly_time,assembly_pressure,electrolyte_volume,coin_num,electrolyte_code,coin_cell_code,formulation_order_code,formulation_ratio
20260323_144656,0.01600000075995922,12.25999927520752,220.0,3334,20,7,NoRead88,14441891,,
20260323_144929,0.0,11.940000534057617,152.0,3075,20,7,NoRead88,14465181,,
20260323_145329,0.0,12.229999542236328,160.0,3269,20,7,NoRead88,14492431,,
20260323_145726,0.0,12.34999942779541,316.0,3367,20,7,NoRead88,14544961,,
20260323_150000,0.0,12.100000381469727,152.0,3269,20,7,NoRead88,14572221,,
20260323_150514,0.0,12.49000072479248,314.0,3237,20,7,NoRead88,14595521,,
1 Time open_circuit_voltage pole_weight assembly_time assembly_pressure electrolyte_volume coin_num electrolyte_code coin_cell_code formulation_order_code formulation_ratio
2 20260323_144656 0.01600000075995922 12.25999927520752 220.0 3334 20 7 NoRead88 14441891
3 20260323_144929 0.0 11.940000534057617 152.0 3075 20 7 NoRead88 14465181
4 20260323_145329 0.0 12.229999542236328 160.0 3269 20 7 NoRead88 14492431
5 20260323_145726 0.0 12.34999942779541 316.0 3367 20 7 NoRead88 14544961
6 20260323_150000 0.0 12.100000381469727 152.0 3269 20 7 NoRead88 14572221
7 20260323_150514 0.0 12.49000072479248 314.0 3237 20 7 NoRead88 14595521