更新加入料带目标检测,判断料带到位,以及控制滚筒逻辑

This commit is contained in:
琉璃月光
2025-12-30 18:03:47 +08:00
parent 2028a96819
commit ebcd7dcdcb
2 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,7 @@ THRESHOLD_maxX = 1430 # 掉出滚筒阈值
- 掉出滚筒 → 停机报警 - 掉出滚筒 → 停机报警
- 到位: - 到位:
- bag → 立即停止滚筒 - bag → 立即停止滚筒
- bag35 → 延时2s → 反转2s → 停止 - bag35 → 延时2s → 这里不确定能不能直接正转变反转加了一个停止滚筒→ 反转2s → 停止
--- ---

View File

@ -46,6 +46,8 @@ def handle_bag_motor(cls, status_bool, status_text):
elif cls == "bag35": elif cls == "bag35":
print("[bag35] 到位 → 持续正转滚筒1.5秒 后,反转滚筒 1.5 秒 到原位置→ 停止滚筒") print("[bag35] 到位 → 持续正转滚筒1.5秒 后,反转滚筒 1.5 秒 到原位置→ 停止滚筒")
time.sleep(1.5) time.sleep(1.5)
#不确定能不能直接正转变成反转,加一个停止吧
relay_controller.close(conveyor2=True)
relay_controller.open(conveyor2_reverse=True) relay_controller.open(conveyor2_reverse=True)
time.sleep(1.5) time.sleep(1.5)
relay_controller.close(conveyor2_reverse=True) relay_controller.close(conveyor2_reverse=True)