From tom@belmont.astro.nwu.edu Wed Apr 12 22:14:00 2000
Date: Wed, 12 Apr 2000 17:53:19 -0500 (CDT)
From: Tom Renbarger 
To: Greg Griffin 
Cc: rfl@yerkes.uchicago.edu, Tom Renbarger ,
     Giles Novak 
Subject: HWP commands

Greg,

Some basics about the hwp indexer and its documentation:

The manual is ~ 5 x 8 inches, spiral bound, and has Intelligent Motion
Systems and Software Reference Manual (among other things) on the cover.

In discussing hwp mechanics, let it be known that 200 steps of the motor
is one full revolution.  There is a 15:1 gearing ratio between hwp and
motor, so 3,000 motor steps is one full hwp revolution, and 250 steps is a
30 degree hwp rotation.

The commands are, in general, case sensitive.  In all cases of present
interest, as it turns out, you will need to use capital letters. 

Here is some (a lot of, as it turns out) elaboration upon the message from
Bob L.:

> It's easily determined. Previous versions all share a common resource
> file, where the parameters for the HWP are stored, so just switching
> to an older code won't help. However, the last I looked, the parameters
> were the same as used on the CSO. Tom is perhaps the only person
> who knows how to change them other than me...
> 
> What is the problem, exactly?
> 
> Bob
> 
> PS...use ResEdit or another resource editor on the mac to open
> the sparo.rsrc file in the yerk folder. Look for STG# 128 (hwp init).
> It should read:
> 
> I100
> V150
> Y08
> 0

I is the command that sets the initial shaft velocity in steps per second.
It is set with the command I#[cr] where # is the number of steps per
second you want to start at.  Optionally, a space can appear between I and
#.  Of course, [cr] is a carriage return.

V is the final slew velocity.  It is set with the command V#[cr], again
with a space optional between V and #.  For the short moves, V is never
attained, as will be explained below.

"Y08" should read Y 0 8.  Y is the command to set the hold and run
currents of the motor, expressed as a percentage of the maximum current
the indexer can produce.  Y is used with the command Y #1 #2[cr].  Spaces
are needed between Y and #1, and #1 and #2.  Use integers for this
command.  It is necessary to leave #1 as 0, but #2 can be adjusted upwards
to test whether the problem is that we aren't giving enough power to the
motor to turn each step it is asked to turn.

The 0 is actually a capital O.  That command simply sets the current
position as the origin from which further moves are based.  O[cr] is the
syntax for this command.

There is a way to change the defaults of the indexer settings with the S
command.  By entering an S command, you can change one default setting
of I, V, or Y (among others) at a time by entering the command with proper 
syntax immediately after the S command.

The K command sets the ramp up/ramp down parameters.  It's units are
steps/sec/sec.  The command syntax is K #up #down[cr], where #up is the
steps/sec/sec ramp up velocity, and #down is the ramp down rate.  If you
set either to 0, no ramping up (or down, as appropriate) occurs, and the
motor turns at the V setting throughout the whole turn.  The way things
are currently set up, the 150 step/sec velocity is never reached for the
short moves, as the K setting is K 10 10 right now.  It does come into
play for the long backward move.  By setting either or both to 0, you can
just play with the V setting.  The K default can also be changed through
the use of the S command.

In addition to playing with Y #2, I would recommend also turning down V to
see if slower rotation helps.  The hope is that bumping up the run current
will be sufficient.  If we turn down V to 50, for example, that would mean
a 10 second move between hwp positions, and a 30 second move from 150
degrees to 0.

We'll try to get some manual pages scanned in tomorrow.  If you have any
questions (as there is a lot of information here to digest), feel free to
send them along.  I have assumed that you've figured out how to use the
paddle, but if you have any questions about that, please ask those as
well.

Tom