Compare commits
5 Commits
2f2f0d430d
...
c3dbb2cff0
Author | SHA1 | Date | |
---|---|---|---|
c3dbb2cff0 | |||
4ba8af842c | |||
a0fe9b5939 | |||
346379ec1a | |||
215e312480 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ aio/.idea/
|
|||||||
aio/code/__pycache__/
|
aio/code/__pycache__/
|
||||||
aio/package/
|
aio/package/
|
||||||
aio/venv
|
aio/venv
|
||||||
|
aio/__pycache__/
|
@ -188,39 +188,49 @@ v0.1.4(2024/06/06)
|
|||||||
6. 支持工业/协作两条产品线的电机电流数据处理,包括单轴,场景,max/avg计算
|
6. 支持工业/协作两条产品线的电机电流数据处理,包括单轴,场景,max/avg计算
|
||||||
|
|
||||||
v0.1.5(2024/06/12)
|
v0.1.5(2024/06/12)
|
||||||
1. [aio.py]: 主界面切换不同功能时保持placehold一致
|
1. [aio.py] 主界面切换不同功能时保持placehold一致
|
||||||
2. [brake.py]: 由于制动采集模板和内容的更改,适配了新的数据,更新了算法
|
2. [brake.py] 由于制动采集模板和内容的更改,适配了新的数据,更新了算法
|
||||||
3. [aio.py]: 新增tabview组件,区分数据处理和自动化测试功能
|
3. [aio.py] 新增tabview组件,区分数据处理和自动化测试功能
|
||||||
4. [aio.py]: 重新调整界面配色
|
4. [aio.py] 重新调整界面配色
|
||||||
5. [aio.py]: 修改了write2textbox函数,定制化显示每一行的颜色,针对每一行可自定义输出内容颜色
|
5. [aio.py] 修改了write2textbox函数,定制化显示每一行的颜色,针对每一行可自定义输出内容颜色
|
||||||
6. [brake.py/iso.py/current.py]: 由于第 5 点的更改,同时修改了其他文件相关引用的部分
|
6. [brake.py/iso.py/current.py] 由于第 5 点的更改,同时修改了其他文件相关引用的部分
|
||||||
7. [aio.py]: 更改label/entry/optionmenu等控件的生成方式,使用循环实现,更加简洁和容易维护
|
7. [aio.py] 更改label/entry/optionmenu等控件的生成方式,使用循环实现,更加简洁和容易维护
|
||||||
8. [aio.py]: 修改customtkinter库中C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\customtkinter\windows\widgets\ctk_tabview.py文件,参考https://github.com/TomSchimansky/CustomTkinter/issues/2296,实现修改tabview组件的字体大小
|
8. [aio.py] 修改customtkinter库中C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Lib\site-packages\customtkinter\windows\widgets\ctk_tabview.py文件,参考https://github.com/TomSchimansky/CustomTkinter/issues/2296,实现修改tabview组件的字体大小
|
||||||
9. [aio.py]: 修改menu_main->menu_main_dp,menu_sub->menu_sub_dp,为后续其他tab功能按钮做扩展,是针对第三点做出的相应调整
|
9. [aio.py] 修改menu_main->menu_main_dp,menu_sub->menu_sub_dp,为后续其他tab功能按钮做扩展,是针对第三点做出的相应调整
|
||||||
10. [layout.xlsx]: 添加了各个功能的流程图
|
10. [layout.xlsx] 添加了各个功能的流程图
|
||||||
|
|
||||||
v0.1.5.1(2024/06/12)
|
v0.1.5.1(2024/06/12)
|
||||||
[current.py]: 修改cycle功能中,数据清理范围为70000行,并将threshold从2调整为5
|
1. [current.py] 修改cycle功能中,数据清理范围为70000行,并将threshold从2调整为5
|
||||||
[current.py]: 修改位置超限提示,使更清楚了解问题原因
|
2. [current.py] 修改位置超限提示,使更清楚了解问题原因
|
||||||
[current.py]: 修改find_point函数中错误提示,增加定位信息
|
3. [current.py] 修改find_point函数中错误提示,增加定位信息
|
||||||
[README.md]: 精简打包命令
|
4. [README.md] 精简打包命令
|
||||||
[requirements.txt]: 新增必要库配置文件
|
5. [requirements.txt] 新增必要库配置文件
|
||||||
|
|
||||||
v0.1.5.2(2024/06/13)
|
v0.1.5.2(2024/06/13)
|
||||||
[brake.py/aio.py]: 将sto修改为estop
|
1. [brake.py/aio.py]: 将sto修改为estop
|
||||||
[brake.py]: 修改了速度计算逻辑,新版本的vel列数据遵循如下规则,av = vel * 180 / pi,根据av再计算speed
|
2. [brake.py] 修改了速度计算逻辑,新版本的vel列数据遵循如下规则,av = vel * 180 / pi,根据av再计算speed
|
||||||
[brake.py]: 将threshold修改为常量50
|
3. [brake.py] 将threshold修改为常量50
|
||||||
[brake.py]: 提高了输出提示语的明确性,删除了不必要的省略号
|
4. [brake.py] 提高了输出提示语的明确性,删除了不必要的省略号
|
||||||
[brake.py]: 更正了之前的数据copy错误,重新优化了estop处是否达到指定百分比的判定逻辑
|
5. [brake.py] 更正了之前的数据copy错误,重新优化了estop处是否达到指定百分比的判定逻辑
|
||||||
|
|
||||||
v0.1.5.3(2024/06/14)
|
v0.1.5.3(2024/06/14)
|
||||||
[aio.py]: 修改w_param为84,适配14寸电脑屏幕
|
1. [aio.py] 修改w_param为84,适配14寸电脑屏幕
|
||||||
[brake.py]: 将判定合规逻辑修改为角速度超过指定角速度的95%
|
2. [brake.py] 将判定合规逻辑修改为角速度超过指定角速度的95%
|
||||||
[README.md]: 稍作修改,包括打包方式,功能特性等
|
3. [README.md] 稍作修改,包括打包方式,功能特性等
|
||||||
|
|
||||||
v0.1.6.0(2024/06/15)
|
v0.1.6.0(2024/06/15)
|
||||||
[aio.py]: 新增wavelogger处理界面
|
[aio.py] 新增wavelogger处理界面
|
||||||
[wavelogger.py]: 新增精度数据处理模块
|
[wavelogger.py] 新增精度数据处理模块
|
||||||
|
|
||||||
|
v0.1.6.1(2024/06/16)
|
||||||
|
1. [wavelogger.py] bugfix single_file_proc函数中,修改_start起始点的计算逻辑
|
||||||
|
2. [wavelogger.py] bugfix find_point函数中,当判断条件为临界值 2.0 的时候,针对forward和backward两种情况,对row_target做与判断逻辑相同的处理,目的是避免形成死循环
|
||||||
|
|
||||||
v0.1.6.2(2024/06/16)
|
v0.1.6.2(2024/06/16)
|
||||||
1. [current.py] 修改了max/avg相关功能中对于返回值的处理逻辑,并在输出框以行的形式打印出来
|
1. [current.py] 修改了max/avg相关功能中对于返回值的处理逻辑,并在输出框以行的形式打印出来
|
||||||
|
|
||||||
|
v0.1.6.3(2024/06/18)
|
||||||
|
1. [current.py] 适配电机电流中速度使用hw_joint_vel_feedback的数据,取消对device_servo_vel_feedback的支持,后续所有涉及到速度相关的数据均已前者为准,现已完成对单轴和场景的适配
|
||||||
|
|
||||||
|
> !!WARNING:目前版本的电机电流程序还支持DriverMaster采集的数据处理,等明确后,将不再支持,也即所有的电机电流数据(工业+协作),都是用诊断曲线来采集
|
||||||
|
|
||||||
|
@ -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, 1, 6, 2),
|
filevers=(0, 1, 6, 3),
|
||||||
prodvers=(0, 1, 6, 2),
|
prodvers=(0, 1, 6, 3),
|
||||||
# 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.1.6.2 (2024-06-16)'),
|
StringStruct('FileVersion', '0.1.6.3 (2024-06-18)'),
|
||||||
StringStruct('InternalName', 'AIO.exe'),
|
StringStruct('InternalName', 'AIO.exe'),
|
||||||
StringStruct('LegalCopyright', '© 2024-2024 Manford Fan'),
|
StringStruct('LegalCopyright', '© 2024-2024 Manford Fan'),
|
||||||
StringStruct('OriginalFilename', 'AIO.exe'),
|
StringStruct('OriginalFilename', 'AIO.exe'),
|
||||||
StringStruct('ProductName', 'AIO'),
|
StringStruct('ProductName', 'AIO'),
|
||||||
StringStruct('ProductVersion', '0.1.6.2 (2024-06-16)')])
|
StringStruct('ProductVersion', '0.1.6.3 (2024-06-18)')])
|
||||||
]),
|
]),
|
||||||
VarFileInfo([VarStruct('Translation', [1033, 1200])])
|
VarFileInfo([VarStruct('Translation', [1033, 1200])])
|
||||||
]
|
]
|
||||||
|
@ -1 +1 @@
|
|||||||
0.1.6.2 @ 06/16/2024
|
0.1.6.3 @ 06/18/2024
|
@ -72,7 +72,7 @@ class App(customtkinter.CTk):
|
|||||||
btns['log']['btn'].configure(command=lambda: self.thread_it(self.func_log_callback))
|
btns['log']['btn'].configure(command=lambda: self.thread_it(self.func_log_callback))
|
||||||
btns['end']['btn'].configure(command=lambda: self.thread_it(self.func_end_callback))
|
btns['end']['btn'].configure(command=lambda: self.thread_it(self.func_end_callback))
|
||||||
# create version info
|
# create version info
|
||||||
self.label_version = customtkinter.CTkLabel(self.frame_func, justify='left', text="Vers: 0.1.6.2\nDate: 06/16/2024", font=self.my_font, text_color="#4F4F4F")
|
self.label_version = customtkinter.CTkLabel(self.frame_func, justify='left', text="Vers: 0.1.6.3\nDate: 06/18/2024", font=self.my_font, text_color="#4F4F4F")
|
||||||
self.frame_func.rowconfigure(6, weight=1)
|
self.frame_func.rowconfigure(6, weight=1)
|
||||||
self.label_version.grid(row=6, column=0, padx=20, pady=20, sticky='s')
|
self.label_version.grid(row=6, column=0, padx=20, pady=20, sticky='s')
|
||||||
# =====================================================================
|
# =====================================================================
|
||||||
|
@ -232,10 +232,12 @@ def p_single(wb, single, vel, trq, rpm, w2t):
|
|||||||
axis = int(data_file.split('\\')[-1].split('_')[0].removeprefix('j'))
|
axis = int(data_file.split('\\')[-1].split('_')[0].removeprefix('j'))
|
||||||
shtname = f"J{axis}"
|
shtname = f"J{axis}"
|
||||||
ws = wb[shtname]
|
ws = wb[shtname]
|
||||||
|
addition = 1
|
||||||
set_option("display.precision", 2)
|
set_option("display.precision", 2)
|
||||||
if data_file.endswith('.data'):
|
if data_file.endswith('.data'):
|
||||||
df = read_csv(data_file, sep='\t')
|
df = read_csv(data_file, sep='\t')
|
||||||
|
rr = float(wb['统计'].cell(row=2, column=axis+1).value)
|
||||||
|
addition = 180 / 3.1415926 * 60 / 360 * rr
|
||||||
elif data_file.endswith('.csv'):
|
elif data_file.endswith('.csv'):
|
||||||
df = read_csv(data_file, sep=',', encoding='gbk', header=8)
|
df = read_csv(data_file, sep=',', encoding='gbk', header=8)
|
||||||
csv_reader = reader(open(data_file))
|
csv_reader = reader(open(data_file))
|
||||||
@ -249,7 +251,7 @@ def p_single(wb, single, vel, trq, rpm, w2t):
|
|||||||
ws["H11"] = cycle
|
ws["H11"] = cycle
|
||||||
|
|
||||||
col_names = list(df.columns)
|
col_names = list(df.columns)
|
||||||
df_1 = df[col_names[vel-1]].multiply(rpm)
|
df_1 = df[col_names[vel-1]].multiply(rpm*addition)
|
||||||
df_2 = df[col_names[trq-1]].multiply(scale)
|
df_2 = df[col_names[trq-1]].multiply(scale)
|
||||||
df = concat([df_1, df_2], axis=1)
|
df = concat([df_1, df_2], axis=1)
|
||||||
|
|
||||||
@ -309,10 +311,12 @@ def p_scenario(wb, single, vel, trq, rpm, dur, w2t):
|
|||||||
axis = int(data_file.split('\\')[-1].split('_')[0].removeprefix('j'))
|
axis = int(data_file.split('\\')[-1].split('_')[0].removeprefix('j'))
|
||||||
shtname = f"J{axis}"
|
shtname = f"J{axis}"
|
||||||
ws = wb[shtname]
|
ws = wb[shtname]
|
||||||
|
addition = 1
|
||||||
set_option("display.precision", 2)
|
set_option("display.precision", 2)
|
||||||
if data_file.endswith('.data'):
|
if data_file.endswith('.data'):
|
||||||
df = read_csv(data_file, sep='\t')
|
df = read_csv(data_file, sep='\t')
|
||||||
|
rr = float(wb['统计'].cell(row=2, column=axis+1).value)
|
||||||
|
addition = 180 / 3.1415926 * 60 / 360 * rr
|
||||||
elif data_file.endswith('.csv'):
|
elif data_file.endswith('.csv'):
|
||||||
df = read_csv(data_file, sep=',', encoding='gbk', header=8)
|
df = read_csv(data_file, sep=',', encoding='gbk', header=8)
|
||||||
csv_reader = reader(open(data_file))
|
csv_reader = reader(open(data_file))
|
||||||
@ -326,7 +330,7 @@ def p_scenario(wb, single, vel, trq, rpm, dur, w2t):
|
|||||||
ws["H11"] = cycle
|
ws["H11"] = cycle
|
||||||
|
|
||||||
col_names = list(df.columns)
|
col_names = list(df.columns)
|
||||||
df_1 = df[col_names[vel-1]].multiply(rpm)
|
df_1 = df[col_names[vel-1]].multiply(rpm*addition)
|
||||||
df_2 = df[col_names[trq-1]].multiply(scale)
|
df_2 = df[col_names[trq-1]].multiply(scale)
|
||||||
df = concat([df_1, df_2], axis=1)
|
df = concat([df_1, df_2], axis=1)
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import random
|
||||||
|
|
||||||
from pandas import read_csv
|
from pandas import read_csv
|
||||||
from csv import reader
|
from csv import reader
|
||||||
@ -6,7 +7,7 @@ from sys import argv
|
|||||||
from os.path import exists
|
from os.path import exists
|
||||||
from os import scandir, remove
|
from os import scandir, remove
|
||||||
from openpyxl import Workbook
|
from openpyxl import Workbook
|
||||||
|
from random import randint
|
||||||
|
|
||||||
def traversal_files(path, w2t):
|
def traversal_files(path, w2t):
|
||||||
# 功能:以列表的形式分别返回指定路径下的文件和文件夹,不包含子目录
|
# 功能:以列表的形式分别返回指定路径下的文件和文件夹,不包含子目录
|
||||||
@ -33,14 +34,18 @@ def find_point(bof, step, pos, data_file, flag, df, row, w2t):
|
|||||||
# flag: greater than or lower than
|
# flag: greater than or lower than
|
||||||
if flag == 'gt':
|
if flag == 'gt':
|
||||||
while 0 < row < df.index[-1]-100:
|
while 0 < row < df.index[-1]-100:
|
||||||
if df.iloc[row, 2] > 2:
|
_value = df.iloc[row, 2]
|
||||||
|
if _value > 2:
|
||||||
if bof == 'backward':
|
if bof == 'backward':
|
||||||
row -= step
|
row -= step
|
||||||
elif bof == 'forward':
|
elif bof == 'forward':
|
||||||
row += step
|
row += step
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
row_target = row
|
if bof == 'backward':
|
||||||
|
row_target = row - step
|
||||||
|
elif bof == 'forward':
|
||||||
|
row_target = row + step
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
if bof == 'backward':
|
if bof == 'backward':
|
||||||
@ -49,14 +54,18 @@ def find_point(bof, step, pos, data_file, flag, df, row, w2t):
|
|||||||
row_target = row + 100
|
row_target = row + 100
|
||||||
elif flag == 'lt':
|
elif flag == 'lt':
|
||||||
while 0 < row < df.index[-1]-100:
|
while 0 < row < df.index[-1]-100:
|
||||||
if df.iloc[row, 2] < 2:
|
_value = df.iloc[row, 2]
|
||||||
|
if _value < 2:
|
||||||
if bof == 'backward':
|
if bof == 'backward':
|
||||||
row -= step
|
row -= step
|
||||||
elif bof == 'forward':
|
elif bof == 'forward':
|
||||||
row += step
|
row += step
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
row_target = row
|
if bof == 'backward':
|
||||||
|
row_target = row - step
|
||||||
|
elif bof == 'forward':
|
||||||
|
row_target = row + step
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
if bof == 'backward':
|
if bof == 'backward':
|
||||||
@ -117,13 +126,15 @@ def single_file_proc(ws, data_file, df, low, high, cycle, w2t):
|
|||||||
_step = 5
|
_step = 5
|
||||||
_data = {}
|
_data = {}
|
||||||
row_max = df.index[-1]-100
|
row_max = df.index[-1]-100
|
||||||
|
print(data_file)
|
||||||
while _row < row_max:
|
while _row < row_max:
|
||||||
if count not in _data.keys():
|
if count not in _data.keys():
|
||||||
_data[count] = []
|
_data[count] = []
|
||||||
|
|
||||||
if df.iloc[_row, 2] < 2:
|
_value = df.iloc[_row, 2]
|
||||||
|
if _value < 2:
|
||||||
_row_lt = find_point('forward', _step, 'c'+str(_row), data_file, 'lt', df, _row, w2t)
|
_row_lt = find_point('forward', _step, 'c'+str(_row), data_file, 'lt', df, _row, w2t)
|
||||||
_start = int((_row_lt - _row_gt - 50) / 2)
|
_start = int(_row_gt + (_row_lt - _row_gt - 50) / 2)
|
||||||
_end = _start + 50
|
_end = _start + 50
|
||||||
value = df.iloc[_start:_end, 2].mean() + df.iloc[_start:_end, 2].std()
|
value = df.iloc[_start:_end, 2].mean() + df.iloc[_start:_end, 2].std()
|
||||||
_data[count].append(value)
|
_data[count].append(value)
|
||||||
@ -138,6 +149,7 @@ def single_file_proc(ws, data_file, df, low, high, cycle, w2t):
|
|||||||
ws.cell(row=1, column=i).value = f"第{i-1}次测试"
|
ws.cell(row=1, column=i).value = f"第{i-1}次测试"
|
||||||
ws.cell(row=i, column=1).value = f"第{i-1}次精度变化"
|
ws.cell(row=i, column=1).value = f"第{i-1}次精度变化"
|
||||||
|
|
||||||
|
print(_data)
|
||||||
for i in sorted(_data.keys()):
|
for i in sorted(_data.keys()):
|
||||||
_row = 2
|
_row = 2
|
||||||
_column = i + 1
|
_column = i + 1
|
||||||
@ -150,6 +162,9 @@ def execution(data_files, w2t):
|
|||||||
wb = Workbook()
|
wb = Workbook()
|
||||||
for data_file in data_files:
|
for data_file in data_files:
|
||||||
ws, df, low, high, cycle = preparation(data_file, wb, w2t)
|
ws, df, low, high, cycle = preparation(data_file, wb, w2t)
|
||||||
|
print(f"low = {low}")
|
||||||
|
print(f"high = {high}")
|
||||||
|
print(f"cycle = {cycle}")
|
||||||
single_file_proc(ws, data_file, df, low, high, cycle, w2t)
|
single_file_proc(ws, data_file, df, low, high, cycle, w2t)
|
||||||
|
|
||||||
wd = data_files[0].split('\\')
|
wd = data_files[0].split('\\')
|
||||||
|
Reference in New Issue
Block a user