Starting an entire subroutine with a single momentary button press

When I call the function from the setup(), it only runs for one iteration then stops.

That is how setup() is intended to work.

Post the revised code, with the control function in loop(), using code tags.