I don't understand why you even need a subVI? All this could be done in a very simple flat state machine. I assume this is a simplified demo of some more involved code. Can you explain what the purpose is?
Yes, could you suggest good ways to do the following?
(1) When user click 'start', the loop in subvi runs processing and output progress (xloop and yloop),
(2) When user click 'cancel' (can be the same button or another button), the subvi finish calcellation, then the start button is back to default again, waiting to accept user input for another processing.
(3) If user doesn't click "cancel", the subvi will finish all processing, then change the 'start' to default, waiting to accept user input for another processing.