Lathe machine with a 21iT.

I would like to know if what I want to achieve can be by parameter change or if I must edit the machine ladder.

In my work is often needed to stop the program execution (in the controller is shows MEM HOLD), while the machine is not cutting (after a retraction, for example). In this case sometimes, I want to be able to stop the spindle simply by pressing the spindle stop button.
I use this for cleaning the material.
After that, pressing the RUN button, the machine should resume the work AFTER the spindle is on again.
I worked in a machine with the functionality that I am describing and I would like to implement on a new machine that I have now.

Thank you for any information