! ! misc.scr - NewBug miscellaneous routines ! Jan 13, 1999 ! Copyright Zygo Corporation 1996, 1997, 1998, 1999 ! The functions in this file are temporary, undocumented, ! unsupported, and may be changed without notice. ! !! patches Space for fixes, called at the end of "init" patches: return !! pztloop Do many acquires and print time pztloop: di.average = 0 acquire 1 0 print time$(timedate) goto pztloop !! grabloop Do many grabs and print time grabloop: grab 0 ! no wait if si.rampIndex >= 0 then rr_ramp_start(ri.slot) wait(0.25) rr_ramp_wait(1) print time$(timedate) goto grabloop !! sfacloop Do many acquires and print S-factor sfacloop: di.average = 0 acquire 1 0 print ac_calc_sfactor(3) goto sfacloop !! scheckloop Do many acquires and print tilt of S-factor scheckloop: acquire 1 1 print "Gain = "; ri.rampGain; " "; print "Sfac = "; ac_calibrate calvert pz3_process(0, 0) goto scheckloop !! r0 Gradually ramp PZT from rdac to 0 r0: if si.instrBdType <> IB_GPI AND si.instrBdType <> IB_XRGP then print "r0 only works for instr boards IB_GPI and IB_XRGP" return endif for n = rdac to 0 step -100 uz_write_rampDAC(n) rdac = n wait (0.04) next n return !! r4000 Gradually ramp PZT from rdac to 4000 r4000: if si.instrBdType <> IB_GPI AND si.instrBdType <> IB_XRGP then print "r4000 only works for instr boards IB_GPI and IB_XRGP" return endif for n = rdac to 4000 step 100 uz_write_rampDAC(n) rdac = n wait (0.04) next n return !! pztstats Print rampTriples and rampGain pztstats: ? "rh.rampTriple(0) = "; rh.rampTriple(0) ? "rh.rampTriple(1) = "; rh.rampTriple(1) ? "rh.rampTriple(2) = "; rh.rampTriple(2) ? "ri.rampGain = "; ri.rampGain return !! acal Acquire and calc S-factor across field acal: di.average = 0 acquire 1 1 rcal: copy gl.fb_mat gl.ac_mat calvert return !! am0 Acquire and calculate DC light value am0: di.average = 0 acquire 1 1 rmag0: copy gl.fb_mat gl.ac_mat magvert 0 return !! am1 Acquire and calculate modulation magnitude am1: di.average = 0 acquire 1 1 rmag1: copy gl.fb_mat gl.ac_mat magvert 1 return !! showramps Show ramps loaded in instrument showramps: if si.instrBdType <> IB_GPI AND si.instrBdType <> IB_XRGP then print "showramps only works for instr boards IB_GPI and IB_XRGP" return endif r$ = uz_ramp_request n = len(r$) ofmtr("%4.0f") for i = 1 to n r = num(r$[i]) print i-1; r next i return waitcr: input "Press Enter to continue " return mesazoom: if si.systemType <> SYSTEM_MESA then ? "Not a MESA system" return endif input "Enter number of cycles ", n input "Enter delay (in seconds) ", delay mesa_zoom_fault_reset for i = 1 to n mesa_change_zoom(0) wait delay mesa_change_zoom(1) ? i wait delay next i return