! ----------------------------------------------------------------------------------------------- ! 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: FocusGetPos.scr ! Date: ! Author: ! Revisions: ! Comments: ! MetroScript script file. ! Gets the current position of the focus motor and assigns 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_MOTOR_POS ! Sets cur_pos_raw% and cur_pos_mm pos_mm = cur_pos_mm gosub SET_FOCUS_POSITION_CONTROL_VAL ! Uses pos_mm end ! ----------------------------------------------------------------------------------------------- loadsub "FocusSubs.scr" ! -----------------------------------------------------------------------------------------------