#!/bin/csh -f #+ # telfoc -- set/show the telescope secondary position # # Purpose: # With no arguments, show the current position of the telescope # secondary. With one argument, reset the telescope secondary # to the given position. # # Usage: # telfoc [x] # # Arguments: # x = new value for telescope secondary position # # Output: # The new/current secondary position is printed on STDOUT # # Restrictions: # # Exit values: # 0 = normal completion # 1 = wrong number of arguments # # Example: # #- # Modification history: # Date unknown RWG Original version # 2000-Jul-05 GDW Added documentation #----------------------------------------------------------------------- # check args... if (${#argv} > 1) then echo "Usage: telfoc [x]" exit 1 endif # set/show value... if ( $#argv == 0 ) then show -s dcs -terse telfocus else modify -s dcs telfocus=$1 secmove=1 sleep 2 waitfor -s dcs secmove=0 -timeout 30 endif