Try adding
Code:
IF Save = 1 then GOTO loop
before
Code:
If Save = 0 then goto SetSetPoint