I am new to PLC training. I am trying to do a traffic light intersection with 23 seconds for North and South to cycle through green, yellow and red; 23 seconds for East and West to cycle through. However there is an inductive sensor that if it counts 3 cars will add an additional 3 seconds to its' respective directions cycle.
What is the best practice for handling the 3 second alternate time? Subroutines?