Robin2:
I think that should work.As to your English, I think a lot of the confusion would have been avoided if your Original Post had said
I have a project on which I would like to detect an emergency stop.
rather than
I have a project on which I would like to implement an emergency stop....R
Thank you for highlighting to me the confusing point. I've amended the title.
I know that should work in principle.
Where the challenge lies is the second part to my query: Is possible to reset the loop to the start the moment the interrupt is triggered?