Purpose
For use in scripts involving grating moves, this waits
until a grating move is completed by checking for the
file created by the "grating" command. This is to
allow parallel motor moves. In practice a script would
would start a grating change, spawning the "grating"
command off using an ampersand at the end of the command.
The script would then do other motor moves, such as
slitmask moves. At the end of the script would be a
"grwait" command to wait until the grating moves are
complete.
Usage
grwait [timeout]
Arguments
timeout - an optional number of seconds to wait for success
If not specified, 300 seconds is the timeout.
Output
none
Exit values
0 = normal completion
1 = wrong number of arguments
2 = timed out
Restrictions
none
Example
1) use "grating" to set a grating, then "mask" to set
a slitmask. After the "mask" command wait until the
grating command is finished.
grating 300/5000 5650
mask long_1.0
grwait
echo done