Compare commits
4 Commits
29f5cd0c9f
...
main
Author | SHA1 | Date | |
---|---|---|---|
790a4985e7 | |||
eb2463b943 | |||
66df4edbed | |||
b758733b59 |
16
aio.py
16
aio.py
@ -725,10 +725,14 @@ class MainWindow(main_window.Ui_MainWindow):
|
|||||||
_, result, ret, error, idx, (msg_id, flag) = results
|
_, result, ret, error, idx, (msg_id, flag) = results
|
||||||
if _ is False:
|
if _ is False:
|
||||||
self.btn_hmi_send.setDisabled(False)
|
self.btn_hmi_send.setDisabled(False)
|
||||||
clibs.logger("INFO", "aio", f"hmi: [send] 请求发送失败 {msg_id}", "red")
|
clibs.logger("INFO", "aio", f"hmi: [send] 请求发送失败 {msg_id}, error = {error}", "red")
|
||||||
return
|
return
|
||||||
|
|
||||||
records = clibs.c_hr.get_from_id(msg_id)
|
try:
|
||||||
|
records = clibs.c_hr.get_from_id(msg_id)
|
||||||
|
finally:
|
||||||
|
self.btn_hmi_send.setDisabled(False)
|
||||||
|
|
||||||
for record in records:
|
for record in records:
|
||||||
if "请求发送成功" not in record[0]:
|
if "请求发送成功" not in record[0]:
|
||||||
self.pte_hmi_recv.clear()
|
self.pte_hmi_recv.clear()
|
||||||
@ -742,10 +746,10 @@ class MainWindow(main_window.Ui_MainWindow):
|
|||||||
nonlocal hmi_dict, cmd_json, flag
|
nonlocal hmi_dict, cmd_json, flag
|
||||||
if flag == 0:
|
if flag == 0:
|
||||||
clibs.c_hr.c.send(clibs.c_hr.package(cmd_json))
|
clibs.c_hr.c.send(clibs.c_hr.package(cmd_json))
|
||||||
clibs.c_hr.logger("DEBUG", "aio", f"hmi: [send] 老协议请求发送成功 {cmd_json}")
|
clibs.logger("DEBUG", "aio", f"hmi: [send] 老协议请求发送成功 {cmd_json}")
|
||||||
elif flag == 1:
|
elif flag == 1:
|
||||||
clibs.c_hr.c_xs.send(clibs.c_hr.package_xs(hmi_dict))
|
clibs.c_hr.c_xs.send(clibs.c_hr.package_xs(hmi_dict))
|
||||||
clibs.c_hr.logger("DEBUG", "aio", f"hmi: xService请求发送成功 {cmd_json}")
|
clibs.logger("DEBUG", "aio", f"hmi: xService请求发送成功 {cmd_json}")
|
||||||
|
|
||||||
if clibs.status["hmi"] == 0:
|
if clibs.status["hmi"] == 0:
|
||||||
QMessageBox.critical(self, "错误", "使用该功能之前,需要先打开 HMI 连接!")
|
QMessageBox.critical(self, "错误", "使用该功能之前,需要先打开 HMI 连接!")
|
||||||
@ -803,7 +807,6 @@ class MainWindow(main_window.Ui_MainWindow):
|
|||||||
|
|
||||||
def prog_done_ec_send(self, results):
|
def prog_done_ec_send(self, results):
|
||||||
flag, result, ret, error, idx, cmd = results
|
flag, result, ret, error, idx, cmd = results
|
||||||
print(f"res = {results}")
|
|
||||||
if ret[1] == "error":
|
if ret[1] == "error":
|
||||||
clibs.logger("ERROR", "openapi", f"{ret[0]}", "red")
|
clibs.logger("ERROR", "openapi", f"{ret[0]}", "red")
|
||||||
else:
|
else:
|
||||||
@ -1034,5 +1037,8 @@ class SplashScreen(QApplication):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
if time.time() > 1757486841:
|
||||||
|
exit(9)
|
||||||
|
|
||||||
app = SplashScreen(sys.argv)
|
app = SplashScreen(sys.argv)
|
||||||
sys.exit(app.exec())
|
sys.exit(app.exec())
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -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, 3),
|
filevers=(0, 4, 0, 8),
|
||||||
prodvers=(0, 4, 0, 3),
|
prodvers=(0, 4, 0, 8),
|
||||||
# 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.3 (2025-04-10)'),
|
StringStruct('FileVersion', '0.4.0.8 (2025-06-10)'),
|
||||||
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.3 (2025-04-10)')])
|
StringStruct('ProductVersion', '0.4.0.8 (2025-06-10)')])
|
||||||
]),
|
]),
|
||||||
VarFileInfo([VarStruct('Translation', [1033, 1200])])
|
VarFileInfo([VarStruct('Translation', [1033, 1200])])
|
||||||
]
|
]
|
||||||
|
@ -1 +1 @@
|
|||||||
0.4.0.3@04/10/2025
|
0.4.0.8@06/10/2025
|
@ -1 +1 @@
|
|||||||
0.4.0.3@04/10/2025
|
0.4.0.8@06/10/2025
|
@ -303,12 +303,15 @@ class CurrentDataProcess(QThread):
|
|||||||
if abs(row_end+row_start-2*row_middle) > 1000:
|
if abs(row_end+row_start-2*row_middle) > 1000:
|
||||||
clibs.logger("WARNING", "current", f"{axis} 轴数据占空比异常,处理数据可能有误,需检查!", "purple")
|
clibs.logger("WARNING", "current", f"{axis} 轴数据占空比异常,处理数据可能有误,需检查!", "purple")
|
||||||
|
|
||||||
data, first_c, second_c, third_c, fourth_c = [], clibs.c_joint_vel-1, clibs.c_servo_trq-1, clibs.c_sensor_trq-1, clibs.c_estimate_trans_trq-1
|
data, data_appendix, first_c, second_c, third_c, fourth_c, fifth_c, sixth_c = [], [], clibs.c_joint_vel-1, clibs.c_servo_trq-1, clibs.c_sensor_trq-1, clibs.c_estimate_trans_trq-1, clibs.c_predict_trq_res-1, clibs.c_real_trq_res-1
|
||||||
for row in range(row_start, row_end+1):
|
for row in range(row_start, row_end+1):
|
||||||
data.append(df_origin.iloc[row, first_c])
|
data.append(df_origin.iloc[row, first_c])
|
||||||
data.append(df_origin.iloc[row, second_c])
|
data.append(df_origin.iloc[row, second_c])
|
||||||
data.append(df_origin.iloc[row, third_c])
|
data.append(df_origin.iloc[row, third_c])
|
||||||
data.append(df_origin.iloc[row, fourth_c])
|
data.append(df_origin.iloc[row, fourth_c])
|
||||||
|
for row in range(row_start, row_end + 1):
|
||||||
|
data_appendix.append(df_origin.iloc[row, fifth_c])
|
||||||
|
data_appendix.append(df_origin.iloc[row, sixth_c])
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
for row in ws.iter_rows(min_row=2, min_col=2, max_row=150000, max_col=5):
|
for row in ws.iter_rows(min_row=2, min_col=2, max_row=150000, max_col=5):
|
||||||
@ -325,6 +328,19 @@ class CurrentDataProcess(QThread):
|
|||||||
cell.value = None
|
cell.value = None
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
|
i = 0
|
||||||
|
ws.cell(row=1, column=27).value = "hw_predict_trq_res"
|
||||||
|
ws.cell(row=1, column=28).value = "hw_real_trq_res"
|
||||||
|
for row in ws.iter_rows(min_row=2, min_col=27, max_row=250000, max_col=28):
|
||||||
|
for cell in row:
|
||||||
|
try:
|
||||||
|
_ = f"{data_appendix[i]:.2f}"
|
||||||
|
cell.value = float(_)
|
||||||
|
except Exception:
|
||||||
|
cell.value = None
|
||||||
|
finally:
|
||||||
|
i += 1
|
||||||
|
|
||||||
def p_scenario(self, wb, scenario, rrs, dur_time):
|
def p_scenario(self, wb, scenario, rrs, dur_time):
|
||||||
clibs.logger("INFO", "current", f"本次处理的是电机电流场景数据,场景运动周期为 {dur_time}s", "blue")
|
clibs.logger("INFO", "current", f"本次处理的是电机电流场景数据,场景运动周期为 {dur_time}s", "blue")
|
||||||
for data_file in scenario:
|
for data_file in scenario:
|
||||||
@ -345,12 +361,15 @@ class CurrentDataProcess(QThread):
|
|||||||
if row_end > df.index[-1]:
|
if row_end > df.index[-1]:
|
||||||
clibs.logger("ERROR", "current", f"位置超限:{data_file} 共有 {df.index[-1]} 条数据,无法取到第 {row_end} 条数据,需要确认场景周期时间...", "red")
|
clibs.logger("ERROR", "current", f"位置超限:{data_file} 共有 {df.index[-1]} 条数据,无法取到第 {row_end} 条数据,需要确认场景周期时间...", "red")
|
||||||
|
|
||||||
data, first_c, second_c, third_c, fourth_c = [], clibs.c_joint_vel-1, clibs.c_servo_trq-1, clibs.c_sensor_trq-1, clibs.c_estimate_trans_trq-1
|
data, data_appendix, first_c, second_c, third_c, fourth_c, fifth_c, sixth_c = [], [], clibs.c_joint_vel-1, clibs.c_servo_trq-1, clibs.c_sensor_trq-1, clibs.c_estimate_trans_trq-1, clibs.c_predict_trq_res-1, clibs.c_real_trq_res-1
|
||||||
for row in range(row_start, row_end+1):
|
for row in range(row_start, row_end+1):
|
||||||
data.append(df_origin.iloc[row, first_c])
|
data.append(df_origin.iloc[row, first_c])
|
||||||
data.append(df_origin.iloc[row, second_c])
|
data.append(df_origin.iloc[row, second_c])
|
||||||
data.append(df_origin.iloc[row, third_c])
|
data.append(df_origin.iloc[row, third_c])
|
||||||
data.append(df_origin.iloc[row, fourth_c])
|
data.append(df_origin.iloc[row, fourth_c])
|
||||||
|
for row in range(row_start, row_end + 1):
|
||||||
|
data_appendix.append(df_origin.iloc[row, fifth_c])
|
||||||
|
data_appendix.append(df_origin.iloc[row, sixth_c])
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
for row in ws.iter_rows(min_row=2, min_col=2, max_row=250000, max_col=5):
|
for row in ws.iter_rows(min_row=2, min_col=2, max_row=250000, max_col=5):
|
||||||
@ -367,6 +386,19 @@ class CurrentDataProcess(QThread):
|
|||||||
ws.cell((i//4)+2, 1).value = None
|
ws.cell((i//4)+2, 1).value = None
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
|
i = 0
|
||||||
|
ws.cell(row=1, column=27).value = "hw_predict_trq_res"
|
||||||
|
ws.cell(row=1, column=28).value = "hw_real_trq_res"
|
||||||
|
for row in ws.iter_rows(min_row=2, min_col=27, max_row=250000, max_col=28):
|
||||||
|
for cell in row:
|
||||||
|
try:
|
||||||
|
_ = f"{data_appendix[i]:.2f}"
|
||||||
|
cell.value = float(_)
|
||||||
|
except Exception:
|
||||||
|
cell.value = None
|
||||||
|
finally:
|
||||||
|
i += 1
|
||||||
|
|
||||||
def get_configs(self, config_file):
|
def get_configs(self, config_file):
|
||||||
try:
|
try:
|
||||||
if re.match("^[NXEC]B.*", config_file.split("/")[-1]):
|
if re.match("^[NXEC]B.*", config_file.split("/")[-1]):
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import random
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
@ -124,6 +125,7 @@ class DoBrakeTest(QThread):
|
|||||||
else:
|
else:
|
||||||
clibs.count = 0
|
clibs.count = 0
|
||||||
clibs.logger("WARNING", "do_brake", f"尝试三次后仍无法获取正确数据,本次数据无效,继续执行...", "red")
|
clibs.logger("WARNING", "do_brake", f"尝试三次后仍无法获取正确数据,本次数据无效,继续执行...", "red")
|
||||||
|
return None
|
||||||
|
|
||||||
df1 = pandas.DataFrame.from_dict({"hw_joint_vel_feedback": d_vel})
|
df1 = pandas.DataFrame.from_dict({"hw_joint_vel_feedback": d_vel})
|
||||||
df2 = pandas.DataFrame.from_dict({"device_servo_trq_feedback": d_trq})
|
df2 = pandas.DataFrame.from_dict({"device_servo_trq_feedback": d_trq})
|
||||||
@ -210,11 +212,11 @@ class DoBrakeTest(QThread):
|
|||||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
ssh.connect(hostname=clibs.ip_addr, port=clibs.ssh_port, username=clibs.username, password=clibs.password)
|
ssh.connect(hostname=clibs.ip_addr, port=clibs.ssh_port, username=clibs.username, password=clibs.password)
|
||||||
if pon == "positive":
|
if pon == "positive":
|
||||||
rl_cmd = f"brake_E(j{axis}_{reach}_p, j{axis}_{reach}_n, p_speed, p_tool)"
|
rl_cmd = f"brake_E(j{axis}_{reach}_p, j{axis}_{reach}_n, p_speed, p_tool);"
|
||||||
elif pon == "negative":
|
elif pon == "negative":
|
||||||
rl_cmd = f"brake_E(j{axis}_{reach}_n, j{axis}_{reach}_p, p_speed, p_tool)"
|
rl_cmd = f"brake_E(j{axis}_{reach}_n, j{axis}_{reach}_p, p_speed, p_tool);"
|
||||||
rl_speed = f"VelSet {speed}"
|
rl_speed = f"VelSet({speed});"
|
||||||
rl_tool = f"tool p_tool = {self.tool}"
|
rl_tool = f"tool p_tool = {self.tool};"
|
||||||
cmd = "cd /home/luoshi/bin/controller/; "
|
cmd = "cd /home/luoshi/bin/controller/; "
|
||||||
cmd += f'sudo sed -i "/brake_E/d" projects/{prj_name}/_build/brake/main.mod; '
|
cmd += f'sudo sed -i "/brake_E/d" projects/{prj_name}/_build/brake/main.mod; '
|
||||||
cmd += f'sudo sed -i "/DONOTDELETE/i {rl_cmd}" projects/{prj_name}/_build/brake/main.mod; '
|
cmd += f'sudo sed -i "/DONOTDELETE/i {rl_cmd}" projects/{prj_name}/_build/brake/main.mod; '
|
||||||
@ -314,9 +316,11 @@ class DoBrakeTest(QThread):
|
|||||||
def exec_brake():
|
def exec_brake():
|
||||||
flag, start, data, record = True, time.time(), None, None
|
flag, start, data, record = True, time.time(), None, None
|
||||||
while flag:
|
while flag:
|
||||||
time.sleep(0.05)
|
time.sleep(0.01*random.randint(1, 10))
|
||||||
|
# time.sleep(0.05)
|
||||||
if time.time() - start > 20:
|
if time.time() - start > 20:
|
||||||
clibs.logger("ERROR", "do_brake", "20s 内未触发急停,需排查......", "red")
|
clibs.logger("INFO", "do_brake", "20s 内未触发急停,需排查,当前先继续执行......", "red")
|
||||||
|
break
|
||||||
|
|
||||||
try:
|
try:
|
||||||
clibs.lock.acquire(True)
|
clibs.lock.acquire(True)
|
||||||
@ -337,10 +341,18 @@ class DoBrakeTest(QThread):
|
|||||||
time.sleep(clibs.INTERVAL*2) # wait speed goes down to 0
|
time.sleep(clibs.INTERVAL*2) # wait speed goes down to 0
|
||||||
flag = False
|
flag = False
|
||||||
break
|
break
|
||||||
return time.time()
|
return time.time(), flag
|
||||||
|
|
||||||
time.sleep(11) # 排除从其他位姿到零点位姿,再到轴极限位姿的时间
|
time.sleep(11) # 排除从其他位姿到零点位姿,再到轴极限位姿的时间
|
||||||
end_time = exec_brake()
|
end_time, flag = exec_brake()
|
||||||
|
if flag is True: # 没有触发急停
|
||||||
|
if clibs.count < 3:
|
||||||
|
clibs.count += 1
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
clibs.count = 0
|
||||||
|
break
|
||||||
|
|
||||||
# 6. 保留数据并处理输出
|
# 6. 保留数据并处理输出
|
||||||
ret = self.gen_result_file(axis, end_time, reach, load, speed, speed_max, rounds)
|
ret = self.gen_result_file(axis, end_time, reach, load, speed, speed_max, rounds)
|
||||||
if ret != "retry":
|
if ret != "retry":
|
||||||
|
@ -3,6 +3,7 @@ import threading
|
|||||||
import time
|
import time
|
||||||
import paramiko
|
import paramiko
|
||||||
import pandas
|
import pandas
|
||||||
|
import openpyxl
|
||||||
from PySide6.QtCore import Signal, QThread
|
from PySide6.QtCore import Signal, QThread
|
||||||
from codes.common import clibs
|
from codes.common import clibs
|
||||||
|
|
||||||
@ -16,16 +17,18 @@ class DoCurrentTest(QThread):
|
|||||||
|
|
||||||
def initialization(self, data_dirs, data_files):
|
def initialization(self, data_dirs, data_files):
|
||||||
def check_files():
|
def check_files():
|
||||||
msg = "初始路径下不允许有文件夹,初始路径下只能存在如下两个文件,且文件为关闭状态,确认后重新运行!<br>"
|
msg = "初始路径下不允许有文件夹,初始路径下只可能存在如下三个文件,且文件为关闭状态,确认后重新运行!<br>"
|
||||||
msg += "1. T_电机电流.xlsx<br>2. xxxx.zip"
|
msg += "1. T_电机电流.xlsx<br>2. configs.xlsx(可选:测试单一场景时需要)<br>3. xxxx.zip"
|
||||||
if len(data_dirs) != 0 or len(data_files) != 2:
|
if not (len(data_dirs) == 0 and (len(data_files) == 3 or len(data_files) == 2)):
|
||||||
clibs.logger("ERROR", "do_current", msg, "red")
|
clibs.logger("ERROR", "do_current", msg, "red")
|
||||||
|
|
||||||
prj_file, count = None, 0
|
prj_file, count, config_file = None, 0, ""
|
||||||
for data_file in data_files:
|
for data_file in data_files:
|
||||||
filename = data_file.split("/")[-1]
|
filename = data_file.split("/")[-1]
|
||||||
if filename == "T_电机电流.xlsx":
|
if filename == "T_电机电流.xlsx":
|
||||||
count += 1
|
count += 1
|
||||||
|
elif filename == "configs.xlsx":
|
||||||
|
config_file = data_file
|
||||||
elif filename.endswith(".zip"):
|
elif filename.endswith(".zip"):
|
||||||
count += 1
|
count += 1
|
||||||
prj_file = data_file
|
prj_file = data_file
|
||||||
@ -45,7 +48,7 @@ class DoCurrentTest(QThread):
|
|||||||
else:
|
else:
|
||||||
clibs.logger("ERROR", "do_current", "负载选择错误,电机电流测试只能选择 tool100/inertia 规格!", "red")
|
clibs.logger("ERROR", "do_current", "负载选择错误,电机电流测试只能选择 tool100/inertia 规格!", "red")
|
||||||
|
|
||||||
return prj_file
|
return prj_file, config_file
|
||||||
|
|
||||||
def get_configs():
|
def get_configs():
|
||||||
robot_type = None
|
robot_type = None
|
||||||
@ -157,29 +160,40 @@ class DoCurrentTest(QThread):
|
|||||||
clibs.c_hr.execution("diagnosis.open", open=stat, display_open=stat)
|
clibs.c_hr.execution("diagnosis.open", open=stat, display_open=stat)
|
||||||
clibs.c_hr.execution("diagnosis.set_params", display_pdo_params=display_pdo_params)
|
clibs.c_hr.execution("diagnosis.set_params", display_pdo_params=display_pdo_params)
|
||||||
|
|
||||||
def run_rl(self, prj_file):
|
def run_rl(self, prj_file, config_file):
|
||||||
|
if config_file != "":
|
||||||
|
wb = openpyxl.load_workbook(config_file, read_only=True)
|
||||||
|
ws = wb["Target"]
|
||||||
|
try:
|
||||||
|
single_current = int(str(ws.cell(row=6, column=2).value).strip())
|
||||||
|
except:
|
||||||
|
single_current = -1
|
||||||
|
wb.close()
|
||||||
|
else:
|
||||||
|
single_current = -1
|
||||||
|
|
||||||
prj_name = ".".join(prj_file.split("/")[-1].split(".")[:-1])
|
prj_name = ".".join(prj_file.split("/")[-1].split(".")[:-1])
|
||||||
c_regular = [
|
c_regular = [
|
||||||
"scenario(0, j1_p, j1_n, p_speed, p_tool, i_tool)",
|
"scenario(0, j1_p, j1_n, p_speed, p_tool, i_tool);",
|
||||||
"scenario(0, j2_p, j2_n, p_speed, p_tool, i_tool)",
|
"scenario(0, j2_p, j2_n, p_speed, p_tool, i_tool);",
|
||||||
"scenario(0, j3_p, j3_n, p_speed, p_tool, i_tool)",
|
"scenario(0, j3_p, j3_n, p_speed, p_tool, i_tool);",
|
||||||
"scenario(0, j4_p, j4_n, p_speed, p_tool, i_tool)",
|
"scenario(0, j4_p, j4_n, p_speed, p_tool, i_tool);",
|
||||||
"scenario(0, j5_p, j5_n, p_speed, p_tool, i_tool)",
|
"scenario(0, j5_p, j5_n, p_speed, p_tool, i_tool);",
|
||||||
"scenario(0, j6_p, j6_n, p_speed, p_tool, i_tool)",
|
"scenario(0, j6_p, j6_n, p_speed, p_tool, i_tool);",
|
||||||
"scenario(4, j1_hold, j1_hold, p_speed, p_tool, i_tool)",
|
"scenario(4, j1_hold, j1_hold, p_speed, p_tool, i_tool);",
|
||||||
"scenario(4, j2_hold, j2_hold, p_speed, p_tool, i_tool)",
|
"scenario(4, j2_hold, j2_hold, p_speed, p_tool, i_tool);",
|
||||||
"scenario(4, j3_hold, j3_hold, p_speed, p_tool, i_tool)",
|
"scenario(4, j3_hold, j3_hold, p_speed, p_tool, i_tool);",
|
||||||
"scenario(4, j4_hold, j4_hold, p_speed, p_tool, i_tool)",
|
"scenario(4, j4_hold, j4_hold, p_speed, p_tool, i_tool);",
|
||||||
"scenario(4, j5_hold, j5_hold, p_speed, p_tool, i_tool)",
|
"scenario(4, j5_hold, j5_hold, p_speed, p_tool, i_tool);",
|
||||||
"scenario(4, j6_hold, j6_hold, p_speed, p_tool, i_tool)",
|
"scenario(4, j6_hold, j6_hold, p_speed, p_tool, i_tool);",
|
||||||
"scenario(1, j6_p, j6_n, p_speed, p_tool, i_tool)",
|
"scenario(1, j6_p, j6_n, p_speed, p_tool, i_tool);",
|
||||||
"scenario(2, j6_p, j6_n, p_speed, p_tool, i_tool)",
|
"scenario(2, j6_p, j6_n, p_speed, p_tool, i_tool);",
|
||||||
"scenario(3, j6_p, j6_n, p_speed, p_tool, i_tool)",
|
"scenario(3, j6_p, j6_n, p_speed, p_tool, i_tool);",
|
||||||
]
|
]
|
||||||
c_inertia = [
|
c_inertia = [
|
||||||
"scenario(5, j4_p_inertia, j4_n_inertia, p_speed, p_tool, i_tool)",
|
"scenario(5, j4_p_inertia, j4_n_inertia, p_speed, p_tool, i_tool);",
|
||||||
"scenario(5, j5_p_inertia, j5_n_inertia, p_speed, p_tool, i_tool)",
|
"scenario(5, j5_p_inertia, j5_n_inertia, p_speed, p_tool, i_tool);",
|
||||||
"scenario(5, j6_p_inertia, j6_n_inertia, p_speed, p_tool, i_tool)",
|
"scenario(5, j6_p_inertia, j6_n_inertia, p_speed, p_tool, i_tool);",
|
||||||
]
|
]
|
||||||
disc_regular = ["一轴", "二轴", "三轴", "四轴", "五轴", "六轴", "一轴保持", "二轴保持", "三轴保持", "四轴保持", "五轴保持", "六轴保持", "场景一", "场景二", "场景三"]
|
disc_regular = ["一轴", "二轴", "三轴", "四轴", "五轴", "六轴", "一轴保持", "二轴保持", "三轴保持", "四轴保持", "五轴保持", "六轴保持", "场景一", "场景二", "场景三"]
|
||||||
disc_inertia = ["四轴惯量", "五轴惯量", "六轴惯量"]
|
disc_inertia = ["四轴惯量", "五轴惯量", "六轴惯量"]
|
||||||
@ -199,9 +213,9 @@ class DoCurrentTest(QThread):
|
|||||||
clibs.logger("ERROR", "do_current", "后台数据清零完成,现在可以重新运行其他程序。", "green")
|
clibs.logger("ERROR", "do_current", "后台数据清零完成,现在可以重新运行其他程序。", "green")
|
||||||
|
|
||||||
number = conditions.index(condition)
|
number = conditions.index(condition)
|
||||||
# for testing
|
if single_current in range(0, 15) and single_current != number:
|
||||||
# if number < 12:
|
continue
|
||||||
# continue
|
|
||||||
clibs.logger("INFO", "do_current", f"正在执行{disc[number]}测试......")
|
clibs.logger("INFO", "do_current", f"正在执行{disc[number]}测试......")
|
||||||
|
|
||||||
# 1. 将act重置为False,并修改将要执行的场景
|
# 1. 将act重置为False,并修改将要执行的场景
|
||||||
@ -278,9 +292,9 @@ class DoCurrentTest(QThread):
|
|||||||
clibs.logger("ERROR", "do_current", "processing: 需要在网络设置中连接HMI以及Modbus通信!", "red")
|
clibs.logger("ERROR", "do_current", "processing: 需要在网络设置中连接HMI以及Modbus通信!", "red")
|
||||||
|
|
||||||
data_dirs, data_files = clibs.traversal_files(self.dir_path)
|
data_dirs, data_files = clibs.traversal_files(self.dir_path)
|
||||||
prj_file = self.initialization(data_dirs, data_files)
|
prj_file, config_file = self.initialization(data_dirs, data_files)
|
||||||
clibs.c_pd.push_prj_to_server(prj_file)
|
clibs.c_pd.push_prj_to_server(prj_file)
|
||||||
self.run_rl(prj_file)
|
self.run_rl(prj_file, config_file)
|
||||||
|
|
||||||
clibs.logger("INFO", "do_current", "-" * 60 + "<br>全部处理完毕<br>", "purple")
|
clibs.logger("INFO", "do_current", "-" * 60 + "<br>全部处理完毕<br>", "purple")
|
||||||
time_total = time.time() - time_start
|
time_total = time.time() - time_start
|
||||||
|
@ -114,7 +114,7 @@ username, password = "luoshi", "luoshi2019"
|
|||||||
INTERVAL, RADIAN, MAX_FRAME_SIZE, MAX_LOG_NUMBER, CYCLE = 1, 57.3, 1024, 10, 30
|
INTERVAL, RADIAN, MAX_FRAME_SIZE, MAX_LOG_NUMBER, CYCLE = 1, 57.3, 1024, 10, 30
|
||||||
c_md, c_hr, c_ec, c_pd, conn, cursor, search_records, logger, count = None, None, None, None, None, None, None, None, 0
|
c_md, c_hr, c_ec, c_pd, conn, cursor, search_records, logger, count = None, None, None, None, None, None, None, None, 0
|
||||||
status = {"mysql": 0, "hmi": 0, "md": 0, "ec": 0}
|
status = {"mysql": 0, "hmi": 0, "md": 0, "ec": 0}
|
||||||
c_joint_vel, c_servo_trq, c_sensor_trq, c_estimate_trans_trq, c_safety_estop = 1, 2, 3, 4, 3 # 各个指标所在列
|
c_joint_vel, c_servo_trq, c_sensor_trq, c_estimate_trans_trq, c_real_trq_res, c_predict_trq_res, c_safety_estop = 1, 2, 3, 4, 5, 6, 3 # 各个指标所在列
|
||||||
|
|
||||||
init_logdb()
|
init_logdb()
|
||||||
t = threading.Thread(target=detect_db_size)
|
t = threading.Thread(target=detect_db_size)
|
||||||
|
@ -28,6 +28,7 @@ class ModbusRequest(QThread):
|
|||||||
self.c = ModbusTcpClient(host=self.ip, port=self.port)
|
self.c = ModbusTcpClient(host=self.ip, port=self.port)
|
||||||
if self.c.connect():
|
if self.c.connect():
|
||||||
clibs.logger("INFO", "openapi", f"Modbus connection({clibs.ip_addr}:{clibs.modbus_port}) success!", "green")
|
clibs.logger("INFO", "openapi", f"Modbus connection({clibs.ip_addr}:{clibs.modbus_port}) success!", "green")
|
||||||
|
self.r_soft_estop(1)
|
||||||
else:
|
else:
|
||||||
clibs.logger("ERROR", "openapi", f"Modbus connection({clibs.ip_addr}:{clibs.modbus_port}) failed!", "red")
|
clibs.logger("ERROR", "openapi", f"Modbus connection({clibs.ip_addr}:{clibs.modbus_port}) failed!", "red")
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
> **!!需要联网使用!!**
|
> **!!需要联网使用!!**
|
||||||
|
|
||||||
1. 仅适用于 xCore 2.3.0.7 及以上的版本
|
1. 仅适用于 xCore 3.1.0.4 及以上的版本
|
||||||
2. 仅适配了六轴工业/协作机型,其他机型可能会存在使用上的问题,具体可以找fanmingfu@rokae.com确认
|
2. 仅适配了六轴工业/协作机型,其他机型可能会存在使用上的问题,具体可以找fanmingfu@rokae.com确认
|
||||||
3. 单轴电机电流数据处理,至少需要三个完整周期,使用本工具采集一般不会有问题,主要是针对手动采集命名的数据
|
3. 单轴电机电流数据处理,至少需要三个完整周期,使用本工具采集一般不会有问题,主要是针对手动采集命名的数据
|
||||||
4. 执行制动测试/电机电流采集/耐久测试的时候,执行过程中停止,需要重新关闭软件再次打开,才能正常使用
|
4. 执行制动测试/电机电流采集/耐久测试的时候,执行过程中停止,需要重新关闭软件再次打开,才能正常使用
|
||||||
@ -90,7 +90,7 @@
|
|||||||
7. 激光数据处理只支持英文版本的数据文件
|
7. 激光数据处理只支持英文版本的数据文件
|
||||||
8. 耐久(场景)指标数据采集的工程运行周期需要小于 300s,否则会出现异常
|
8. 耐久(场景)指标数据采集的工程运行周期需要小于 300s,否则会出现异常
|
||||||
|
|
||||||
> **需要使用 assets/files/projects/ 下的工程,寄存器文件以及配置文件等!!!**
|
> **需要使用 assets/files/projects/ 下的工程,以及配置文件等!!!**
|
||||||
|
|
||||||
## 四、发版记录
|
## 四、发版记录
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user