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?
IF
SENSOR_1is stillTRUEwhen the timer completes, thenMachine_1is turning off for one cycle.Here's what's happening:
TON.QbecomesTRUE, which turns onSENSOR_2.MACHINE_1becomesFALSEbecauseSENSOR_2is notFALSETONis reset becauseMACHINE_1is notTRUETON.QbecomesFALSEbecause the timer is not active.SENSOR_2becomesFALSEbecauseTON.QisFALSEMACHINE_1becomesTRUEbecauseSENSOR_2isFALSEandSENSOR_1is stillTRUETONstarts timingThe 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_1to turn back on.