Below is the complete program that I am running in my AC3 controller. Feel free to reference it, copy it or use it in any manner that you wish. I have separated the code into 2 sections; Timers and Program.