How to exit a nested if statement

Ross46:
Run the program as usual, giving the accelerations.
Pause the program when pressing a button.
Save the results.
Restart the data collection
Repeat as necessary

The outline I just posted handles all those tasks.