Hello KB,
that's easy:
The tab control has a connector in the block diagram, which gives you the selected tab as a number. Just check this number to get the selected tab. If the user selects the correct tab, start the while loop (perhaps using a case structure...). In the while loop check a local variable of the tab to see the user change the selected tab. End the while loop when this happens.
Best regards,
GerdW
Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019