Is there a solution for getting machine 1 to turn off after sensor 2 is activated in my ladder-logic system?

huangapple go评论102阅读模式
英文:

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编辑器。

Is there a solution for getting machine 1 to turn off after sensor 2 is activated in my ladder-logic system?

谢谢

我试图通过传感器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

Is there a solution for getting machine 1 to turn off after sensor 2 is activated in my ladder-logic system?

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将关闭一个周期。

这里发生了以下情况:

  1. TON.Q变为TRUE,从而打开了SENSOR_2
  2. MACHINE_1变为FALSE,因为SENSOR_2不是FALSE
  3. TON被重置,因为MACHINE_1不是TRUE
  4. TON.Q变为FALSE,因为计时器不活动。
  5. SENSOR_2变为FALSE,因为TON.QFALSE
  6. MACHINE_1变为TRUE,因为SENSOR_2FALSE且***SENSOR_1仍然为TRUE***。
  7. TON开始计时。
  8. 无限重复。

只要第一个传感器在计时器运行时关闭,系统应该循环。为了提高鲁棒性,建议添加逻辑来验证在允许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:

  1. TON.Q becomes TRUE, which turns on SENSOR_2.
  2. MACHINE_1 becomes FALSE because SENSOR_2 is not FALSE
  3. TON is reset because MACHINE_1 is not TRUE
  4. TON.Q becomes FALSE because the timer is not active.
  5. SENSOR_2 becomes FALSE because TON.Q is FALSE
  6. MACHINE_1 becomes TRUE because SENSOR_2 is FALSE and SENSOR_1 is still TRUE
  7. TON starts timing
  8. 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.

huangapple
  • 本文由 发表于 2023年5月30日 01:52:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/76359406.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定