I have a vi calling another subvi, and I need the subvi to stop its execution when I close it by pressing the close button 'x' on the top right corner of the window. Since vi's have a while loop, I can already close and stop the subvi by ending its loop but I also want to be able to stop the subvi by pressing the close button 'x' on the top right corner of the window.
I have attached to simple vi's to illustrate my point
Any help is appreciated