变频器集成以及增加点动控制(0209)
This commit is contained in:
@ -29,7 +29,7 @@ class RelayController:
|
||||
self.host = host
|
||||
self.port = port
|
||||
self.modbus_client = ModbusTcpClient(host, port=port)
|
||||
#遥1 DO 7 左 DO8 右 角度 摇2:DO 15下 13上 12 往后 14往前 下料斗DO7开 D09关
|
||||
#遥1 DO 7 左 DO8 右 角度 摇2:DO 15下 13上 12 启动振捣 14停止振捣 下料斗DO7开 D09关
|
||||
# 继电器命令(原始Socket)
|
||||
self.relay_commands = {
|
||||
self.RING: {'open': '00000000000601050000FF00', 'close': '000000000006010500000000'},
|
||||
@ -299,6 +299,22 @@ class RelayController:
|
||||
print(f"上料斗振动关闭完成,延迟{delay_seconds}秒")
|
||||
self.control(self.BREAK_ARCH_UPPER, 'close')
|
||||
|
||||
def control_arch_lower_open_async(self,delay_seconds: float = 15):
|
||||
"""异步控制上料斗振动
|
||||
|
||||
Args:
|
||||
delay_seconds: 延迟关闭时间(秒),默认15秒
|
||||
"""
|
||||
# 关闭下料斗出砼门
|
||||
self.control(self.BREAK_ARCH_LOWER, 'open')
|
||||
# 异步5秒后关闭
|
||||
threading.Thread(target=lambda d: self._close_break_arch_lower(delay_seconds),args=(delay_seconds,), daemon=True, name="_close_break_arch_lower").start()
|
||||
|
||||
def _close_break_arch_lower(self, delay_seconds: float = 15):
|
||||
time.sleep(delay_seconds)
|
||||
print(f"下料斗振动关闭完成,延迟{delay_seconds}秒")
|
||||
self.control(self.BREAK_ARCH_LOWER, 'close')
|
||||
|
||||
|
||||
|
||||
def close_all(self):
|
||||
|
||||
Reference in New Issue
Block a user