#!/bin/csh -f

pc39 << _EOF_
# Run the field rotator motor from limit to limit forever

az			# select the rotator axis 
ac1000000 vl200000	# set max accel and vel
sl			# use soft limits to avoid killing the loop
rp			# report initial position, for fun
wh mr-10000000 go mr10000000 go wg # full range is ~9M

_EOF_

echo Hit RETURN to stop field rotator..
$<

pc39cmd 'az st'
