Don't mind losing position, however, "DoOEMButton(1003)" by itself causes estop to activate, even just that line by itself. Like I said before if I hit the button when it isn't coded and given function stop standard code 3 it works just fine, it stops, doesn't rewind though, but it stops without going into e-stop.
I've tried the code, still didn't work, even if the program is not executing, just by pressing the button with code 1003 causes e-stop to activate.