This is my first time programming a PLC or Smart Relay and normally I am an embedded systems programmer.
I am trying to build the circuit using WindLGC to determine direction. I have six photobeams.
If Photobeam 1 is ON, then I open the gate and start a timer. If photobeam 2 is ON, photobeam 1 is OFF, then I reset timer for closing since I know that someone is coming through. However, the difficulty is for back-outs. If photobeam 1 is off, photobeam 2 is on, then photobeam 1 is on and then off, then I close the gate (as long as no one is on safety beam). The problem is determining direction using the circuit. How do I do this?
Do I use a counter to increment and decrement ? Should I rely on the timer so that when it hits the timer it closes rather than immediately on back-out? It seems it should be closed immediately on back-out.
I know how to do this in code, but circuits are new to me. The logic on paper makes sense but designing the circuit in the program is a little difficult.
Any help anyone can provide would be really appreciated.


