优化电机电流自动化采集

This commit is contained in:
2025-02-13 14:45:18 +08:00
parent ab00c564bd
commit 9766c2f620
4 changed files with 14 additions and 12 deletions

View File

@ -1,5 +1,5 @@
import os
import multiprocessing
import threading
import time
import paramiko
import pandas
@ -118,14 +118,14 @@ def gen_result_file(path, number, start_time, end_time, scenario_time):
if number < 12:
records = get_records(start_time, end_time)
p = multiprocessing.Process(target=single_axis_proc, args=(path, records, number))
p.daemon = True
p.start()
t = threading.Thread(target=single_axis_proc, args=(path, records, number))
t.daemon = True
t.start()
elif number < 15:
records = get_records(start_time, end_time)
p = multiprocessing.Process(target=scenario_proc, args=(path, records, number, scenario_time))
p.daemon = True
p.start()
t = threading.Thread(target=scenario_proc, args=(path, records, number, scenario_time))
t.daemon = True
t.start()
def change_curve_state(hr, stat):