优化非六轴电机电流数据处理

This commit is contained in:
2025-08-01 14:24:43 +08:00
parent 790a4985e7
commit d45205a72b
5 changed files with 15 additions and 9 deletions

2
aio.py
View File

@@ -1037,7 +1037,7 @@ class SplashScreen(QApplication):
if __name__ == '__main__': if __name__ == '__main__':
if time.time() > 1757486841: if time.time() > 1767196800:
exit(9) exit(9)
app = SplashScreen(sys.argv) app = SplashScreen(sys.argv)

View File

@@ -6,8 +6,8 @@ VSVersionInfo(
ffi=FixedFileInfo( ffi=FixedFileInfo(
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4) # filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
# Set not needed items to zero 0. # Set not needed items to zero 0.
filevers=(0, 4, 0, 8), filevers=(0, 4, 0, 9),
prodvers=(0, 4, 0, 8), prodvers=(0, 4, 0, 9),
# Contains a bitmask that specifies the valid bits 'flags'r # Contains a bitmask that specifies the valid bits 'flags'r
mask=0x3f, mask=0x3f,
# Contains a bitmask that specifies the Boolean attributes of the file. # Contains a bitmask that specifies the Boolean attributes of the file.
@@ -31,12 +31,12 @@ VSVersionInfo(
'040904b0', '040904b0',
[StringStruct('CompanyName', 'Rokae - https://www.rokae.com/'), [StringStruct('CompanyName', 'Rokae - https://www.rokae.com/'),
StringStruct('FileDescription', 'All in one automatic toolbox'), StringStruct('FileDescription', 'All in one automatic toolbox'),
StringStruct('FileVersion', '0.4.0.8 (2025-06-10)'), StringStruct('FileVersion', '0.4.0.9 (2025-08-01)'),
StringStruct('InternalName', 'AIO.exe'), StringStruct('InternalName', 'AIO.exe'),
StringStruct('LegalCopyright', '© 2024-2025 Manford Fan'), StringStruct('LegalCopyright', '© 2024-2025 Manford Fan'),
StringStruct('OriginalFilename', 'AIO.exe'), StringStruct('OriginalFilename', 'AIO.exe'),
StringStruct('ProductName', 'AIO'), StringStruct('ProductName', 'AIO'),
StringStruct('ProductVersion', '0.4.0.8 (2025-06-10)')]) StringStruct('ProductVersion', '0.4.0.9 (2025-08-01)')])
]), ]),
VarFileInfo([VarStruct('Translation', [1033, 1200])]) VarFileInfo([VarStruct('Translation', [1033, 1200])])
] ]

View File

@@ -1 +1 @@
0.4.0.8@06/10/2025 0.4.0.9@08/01/2025

View File

@@ -1 +1 @@
0.4.0.8@06/10/2025 0.4.0.9@08/01/2025

View File

@@ -1,4 +1,5 @@
import json import json
import os
import openpyxl import openpyxl
import pandas import pandas
import re import re
@@ -189,7 +190,7 @@ class CurrentDataProcess(QThread):
continue continue
else: else:
# one more time如果连续两次 200 个点的平均值都小于 threshold说明已经到了临界点了其实也不一定只不过相对遇到一次就判定临界点更安全一点点 # one more time如果连续两次 200 个点的平均值都小于 threshold说明已经到了临界点了其实也不一定只不过相对遇到一次就判定临界点更安全一点点
# 从实际数据看,这逻辑很小概率能触发到 # 从实际数据看,这逻辑很小概率能触发到
speed_avg = df.iloc[row_s-end_point*skip_scale:row_e-end_point*skip_scale].abs().mean() speed_avg = df.iloc[row_s-end_point*skip_scale:row_e-end_point*skip_scale].abs().mean()
if speed_avg > threshold: if speed_avg > threshold:
clibs.logger("WARNING", "current", f"【gt】{axis} 轴第 {seq} 次查找数据可能有异常row_s = {row_s}, row_e = {row_e}", "purple") clibs.logger("WARNING", "current", f"【gt】{axis} 轴第 {seq} 次查找数据可能有异常row_s = {row_s}, row_e = {row_e}", "purple")
@@ -422,7 +423,12 @@ class CurrentDataProcess(QThread):
r_max_t = configs["TRANSMISSION"]["MAX_PEAK_TORQUE"] # 减速器瞬时最大转矩 r_max_t = configs["TRANSMISSION"]["MAX_PEAK_TORQUE"] # 减速器瞬时最大转矩
r_avg_t = configs["TRANSMISSION"]["MAX_AVERAGE_TORQUE"] # 减速器平均负载转矩允许最大值 r_avg_t = configs["TRANSMISSION"]["MAX_AVERAGE_TORQUE"] # 减速器平均负载转矩允许最大值
clibs.logger("INFO", "current", f"get_configs: 机型文件版本 {config_file}_{version}") m_params = [r_rrs, m_avs, m_stall_ts, m_rts, m_max_ts, m_r_rpms, m_max_rpms, r_max_sst, r_max_t, r_avg_t]
for _ in m_params:
if len(_) < 6:
for idx in range(6-len(_)):
_.append(1000)
clibs.logger("INFO", "current", f"get_configs: 机型文件版本 {os.path.basename(config_file.removesuffix('.cfg'))}_{version}")
clibs.logger("INFO", "current", f"get_configs: 减速比 {r_rrs}") clibs.logger("INFO", "current", f"get_configs: 减速比 {r_rrs}")
clibs.logger("INFO", "current", f"get_configs: 额定转矩 {m_rts}") clibs.logger("INFO", "current", f"get_configs: 额定转矩 {m_rts}")
clibs.logger("INFO", "current", f"get_configs: 最大角速度 {m_avs}") clibs.logger("INFO", "current", f"get_configs: 最大角速度 {m_avs}")