PLC traffic light complete routine