英文:
Is there a solution for getting machine 1 to turn off after sensor 2 is activated in my ladder-logic system?
问题
可以有人帮助我吗?
我无法解决这个问题。
当有一个箱子通过时,传感器1激活并启动机器1。
3秒后,传感器2应该激活,机器1应该停止。
但是出现了一些错误,机器1从未关闭。
TON计时器循环并且从未激活传感器2。
有人知道如何解决吗?
我正在使用OpenPLC编辑器。
谢谢
我试图通过传感器2停止机器1。
另外,您知道如何循环这个系统吗?以捕获更多的箱子?
英文:
Can someone help me?
I can't solve this problem.
Sensor 1 activates when a box passes, and activates machine 1.
After 3 seconds, sensor 2 should activate, and machine 1 should deactivate.
But some error is occurring and machine 1 is never turned off.
TON timer loops and never activates Sensor 2
Does anyone know how to solve?
I'm using OpenPLC Editor
Thanks
I'm trying to make machine 1 stop via sensor 2.
Another thing, do you know how I can loop this system? To capture more boxes?
答案1
得分: 1
如果SENSOR_1
在计时器完成时仍然为TRUE
,那么Machine_1
将关闭一个周期。
这里发生了以下情况:
TON.Q
变为TRUE
,从而打开了SENSOR_2
。MACHINE_1
变为FALSE
,因为SENSOR_2
不是FALSE
。TON
被重置,因为MACHINE_1
不是TRUE
。TON.Q
变为FALSE
,因为计时器不活动。SENSOR_2
变为FALSE
,因为TON.Q
是FALSE
。MACHINE_1
变为TRUE
,因为SENSOR_2
为FALSE
且***SENSOR_1
仍然为TRUE
***。TON
开始计时。- 无限重复。
只要第一个传感器在计时器运行时关闭,系统应该循环。为了提高鲁棒性,建议添加逻辑来验证在允许MACHINE_1
重新启动之前传感器是否已关闭。
英文:
IF SENSOR_1
is still TRUE
when the timer completes, then Machine_1
is turning off for one cycle.
Here's what's happening:
TON.Q
becomesTRUE
, which turns onSENSOR_2
.MACHINE_1
becomesFALSE
becauseSENSOR_2
is notFALSE
TON
is reset becauseMACHINE_1
is notTRUE
TON.Q
becomesFALSE
because the timer is not active.SENSOR_2
becomesFALSE
becauseTON.Q
isFALSE
MACHINE_1
becomesTRUE
becauseSENSOR_2
isFALSE
andSENSOR_1
is stillTRUE
TON
starts timing- Repeat forever.
The system should loop as long as the first sensor turns off while the timer is running. For robustness, I recommend adding logic to verify that the sensor turns off before you allow MACHINE_1
to turn back on.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论