0

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

Ladder Logic screenshot

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?

lcecl
  • 326
  • 2
  • 11
Tsr N
  • 11
  • 1

1 Answers1

0

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.

lcecl
  • 326
  • 2
  • 11