The PAUSE instruction can help for stop robot but your goal need to more info.
If you are using HMI and that is directly to connected to robot controller, you don't need to use DIN, you can send your data directly to variables. (B variables or other variables)
You said about your goal, you will stop robot in a position by input a number in HMI.
Do you know in which position you will robot stop?
The PAUSE instruction can help to stop robot when that is moving and use IF in PAUSE and check your variable in it.
Same as below code:
PAUSE IF B000=5 //B000 come directly from HMI
But i think your goal isn't this because you can use this code in some of your lines, if you need to check all thine the variable that come from HMI, need to use system job function.