This is my second day of learning PLC online. I am doing a simple ladder diagram, and I came up with the following diagram:
The process I have in mind is as follows:
As the switch is closed, the belt is activated. Afterwards, the IR Sensor is activated, turning off the belt, and initiating the timer. For the duration of 5s, "ValveD" and "ValveU" are both turned on. During the first second, "Press" is also turned on. After the 5s and the reset of the timer, I wish to have the belt start moving again (Note that at this stage the IR Sensor is still off), and the cycle is repeated. I am not sure of the correctness of the diagram, however. Moreover, I am not sure how can I add a memory to indicate that the timer has already ended, and the belt should start moving again (OR DONE with the IR Sensor?) Also, when I simulate, the timer keeps resetting and restarting itself, although video tutorials online showed that all timers stopped after they reached their preset time.
So is there a reason why the timer is always working, or does it depend on the used software? Moreover, is there a need for the Switch and IR Sensor inputs to be in the 2nd ladder, since the belt is enough to control the timer. Thank you.
EDIT: This is my final circuit. The first time I tried simulation, I remember it working exactly as desired. However, minor issues happened and Rung 0 was deleted, so I had to add it again, exactly as before. However, now the timer keeps repeating itself. Also, this is the timing diagram of the PLC.
________________________________ Switch ___| ____________ IR sensor __________| |______ ______ _________ Belt ___| |_________| _________ Valve D __________| . . . . |______ _________ Valve U __________| . . . . |______ _ Press __________| |______________