#!/bin/csh -f #+ #OSIRIS library of scripts # #NAME # wait4fsm - waits for field steering mirror to complete move # #SYNOPSIS # wait4fsm (no arguments) # #DESCRIPTION # waits for the field steering mirror to transition to "INPOS". # #OPTIONS # none # #EXAMPLES # wait4fsm # #ENVIRONMENT VARIABLES # none # #FILES # none # #SERVERS & KEYWORDS # service = ao # keywords: obfmstst # #SCRIPTS CALLED # help # #EXIT STATUS # 0 - normal exit, no error # 1 - script aborted by an interrupt # 2 - syncheck error # #SEE ALSO # ??? #- # # Modification History: # 20050220 - MB: Adapted from NIRC2 scripts # # Boiler plate for "-h" support for command autohelp. if ("$1" == "-h") then help $0 | more exit $status endif # Boilerplate for syncheck. # Note that the boiler plate should be transparent for all usages, # but to make correct use of syncheck you will need to specify the # correct pattern. set noglob # set CheckStatus = `syncheck -command $0 $* -pattern` set CheckStatus = "OK" unset noglob if ("$CheckStatus" != "OK") then help $0 | more exit 2 endif # End of help/syncheck boiler plate. sleep 1 set done = 0 while (! $done) set test = `show -s ao -terse obfmstst` if ("$test" == "INPOS") exit 0 sleep 1 end