The result

In our hypothetical situation, night falls after seven trafficsignal cycles, for ten seconds the trafficsignal turns itself off, then we have daylight again, the traffic light unit turns itself on again, and the whole process starts again from the beginning. If you like, do another test of the current version of your program in simulation mode before we go on to create the POU PLC_PRG.