! EncZoomGotoUPL.scr ! Go To Upper Program Limit ! ----------------------------------------------------------------------------------------------- loadsub "EncZoomGlob.scr" ! ----------------------------------------------------------------------------------------------- gosub CLR_STATUS_MSG_ALL gosub SET_SCRIPT_STATUS_FAIL ! ----------------------------------------------------------------------------------------------- msg$ = "Go To UPL" gosub SET_STATUS_MSG_1 ! ----------------------------------------------------------------------------------------------- gosub GET_UPPER_PROG_LIMIT ! Gets control value into var UpperProgLimit if UpperProgLimit <= 0 then msg$ = " The Upper Prog Limit control is not set " gosub SHOW_ERROR_DIALOG stop endif ! ----------------------------------------------------------------------------------------------- ofmtr("%.0f") msg$ = "Moving to " & val$(UpperProgLimit) gosub SET_STATUS_MSG_2 ! ----------------------------------------------------------------------------------------------- TargPos = UpperProgLimit gosub MOVE_AND_CHECK_POS_ERROR ! Uses vars TargPos and PosErrorTol, sets vars CurPos and PosError ! ----------------------------------------------------------------------------------------------- ofmtr("%.0f") msg$ = "Moved to " & val$(UpperProgLimit) msg$ = msg$ & ", CurPos = " & val$(CurPos) & ", PosError = " & val$(PosError) gosub SET_STATUS_MSG_2 gosub SET_SCRIPT_STATUS_PASS ! ----------------------------------------------------------------------------------------------- end ! ----------------------------------------------------------------------------------------------- loadsub "EncZoomSubs.scr" ! -----------------------------------------------------------------------------------------------