更新加入料带目标检测,判断料带到位,以及控制滚筒逻辑
This commit is contained in:
@ -47,7 +47,7 @@ THRESHOLD_maxX = 1430 # 掉出滚筒阈值
|
|||||||
- 掉出滚筒 → 停机报警
|
- 掉出滚筒 → 停机报警
|
||||||
- 到位:
|
- 到位:
|
||||||
- bag → 立即停止滚筒
|
- bag → 立即停止滚筒
|
||||||
- bag35 → 延时2s → 反转2s → 停止
|
- bag35 → 延时2s → 这里不确定能不能直接正转变反转加了一个停止滚筒→ 反转2s → 停止
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user