You just need to break things down in to bite sized pieces.
1) What instruction would you use for timing the 20 seconds from the button being pressed to the output turning on?
2) What instruction would let you keep the output on for X amount of time and then turn the output off? I'll give you a hint on this one, because many people get this wrong. The TOF instruction is a tool of Satan and should never ever be used. People who say otherwise, likely hate the Packers, brats, and puppies. Don't be that person.
Sort those two issues out, and post the code you came up with. From there we can help get the rest of the issues sorted out.
Bubba.