@Abdullah_Anwar Looks better… and thanks for going back and editing all the previous ones as well
Not many do that.
Now as for your timing issue… @Jamin posted a good example of triggering relays for a set time in this post here [SOLVED] Triggered cycle counter Check it out for ideas on how to work Simple Timer into your code.