0313界面对接
This commit is contained in:
@ -54,9 +54,9 @@ class InverterController:
|
||||
frequency_value = self.inverter.read_register(0x7310)
|
||||
_ret=frequency_value / 100
|
||||
else:
|
||||
print(f"读取频率{frequency}失败")
|
||||
print(f"读取频率失败")
|
||||
except Exception as e:
|
||||
print(f"读取频率{frequency}异常:{e}")
|
||||
print(f"读取频率异常:{e}")
|
||||
finally:
|
||||
if self.inverter:
|
||||
self.inverter.serial.close()
|
||||
|
||||
@ -145,18 +145,6 @@ class RelayController:
|
||||
time.sleep(duration)
|
||||
self.control(self.DOOR_UPPER_OPEN, 'close')
|
||||
|
||||
def control_upper_close_sync(self,duration):
|
||||
thread_name = threading.current_thread().name
|
||||
print(f"[{thread_name}] 尝试执行上料斗同步关闭,实际操作下料斗")
|
||||
|
||||
with self.door_control_lock:
|
||||
print(f"[{thread_name}] 获得下料斗控制锁,执行同步关闭操作")
|
||||
self.control(self.DOOR_UPPER_OPEN, 'close')
|
||||
self.control(self.DOOR_UPPER_CLOSE, 'open')
|
||||
time.sleep(duration)
|
||||
self.control(self.DOOR_UPPER_CLOSE, 'close')
|
||||
print(f"[{thread_name}] 同步关闭操作完成,释放控制锁")
|
||||
|
||||
def control_upper_open(self):
|
||||
#关闭信号才能生效
|
||||
self.control(self.DOOR_UPPER_CLOSE, 'close')
|
||||
@ -314,7 +302,16 @@ class RelayController:
|
||||
print(f"下料斗振动关闭完成,延迟{delay_seconds}秒")
|
||||
self.control(self.BREAK_ARCH_LOWER, 'close')
|
||||
|
||||
|
||||
|
||||
def control_upper_to_jbl(self):
|
||||
"""控制上料斗到搅拌楼"""
|
||||
# self.control(self.UPPER_TO_ZD, 'close')
|
||||
# self.control(self.UPPER_TO_JBL, 'open')
|
||||
|
||||
def control_upper_to_zd(self):
|
||||
"""控制上料斗到料斗"""
|
||||
# self.control(self.UPPER_TO_JBL, 'close')
|
||||
# self.control(self.UPPER_TO_ZD, 'open')
|
||||
|
||||
def close_all(self):
|
||||
"""关闭所有继电器"""
|
||||
|
||||
Reference in New Issue
Block a user