! ----------------------------------------------------------------------------------------------- ! THIS PROGRAM IS AN UNPUBLISHED WORK FULLY PROTECTED BY THE UNITED ! STATES COPYRIGHT LAWS AND IS CONSIDERED A TRADE SECRET BELONGING TO ! THE COPYRIGHT HOLDER. COPYRIGHT (C) ZYGO CORPORATION. ! ! Version: 1.0 ! ! File: FocusGotoPos.scr ! Date: ! Author: ! Revisions: ! Comments: ! MetroScript script file. ! Moves the focus motor to the position specified by the Focus Position control. ! ----------------------------------------------------------------------------------------------- loadsub "FocusGlobals.scr" ! ----------------------------------------------------------------------------------------------- gosub VERIFY_FOCUS_MOTOR_AVAIL gosub GET_FOCUS_MOTOR_HOME_STATUS ! Sets status% in range [0,3] if status% <> 3 then msg$ = " Focus home is unknown " on error goto DIALOG_ESCAPED _i% = dialog(msg$, 2) off error stop endif gosub GET_FOCUS_POSITION_CONTROL_VAL ! Sets pos_mm gosub READ_FOCUS_MAX ! Sets focus_max if (pos_mm < 0) or (pos_mm > focus_max) then ofmtr("%.7g") msg$ = " Focus Position control value " & val$(pos_mm) & " is out of range [0," & val$(focus_max) & "] " on error goto DIALOG_ESCAPED _i% = dialog(msg$, 2) off error stop endif gosub FOCUS_MOTOR_MOVE_TO_POS ! Uses pos_mm end ! ----------------------------------------------------------------------------------------------- loadsub "FocusSubs.scr" ! -----------------------------------------------------------------------------------------------