Rotator window

Notes as of 1/10/2002

Notes on the rotator:

The rotator window is "brought up" by pressing the "Rotator"
button in the top left corner of the altaz window.
You may get rid of it at any time by pressing the "Dismiss"
button in the top left corner of the rotator window
(and then bring it up again, ad nauseum).

At the top right of the rotator window are three buttons:

"Recal" repeats what should happen whenever rotator drives are
started (this is typically from the tools window).  Recal
marks the rotator as uncalibrated, then repeats the calibration
procedure of moving 2.5 degrees positive, 5.0 degrees negative,
and finally 2.5 degrees positive.  The net result of this is
to put it back exactly where we started, but to traverse
enough marks on the tape to allow the absolute position to be
determined.  This button should not really be necessary, but
when weird things happen, it may prove useful.

"Tracking Off" (the old "Stop") tells the rotator to stop sidereal
tracking.  This should cause no motion at all (the rotator merely stops),
the old behaviour of slewing back to zero
(or the last slew position) was a bug and has been fixed.

"Tracking On" (the old "Start") tells the rotator to start sidereal tracking.
It will immediately try to position itself at the parallactic angle
(modified by the position angle), which in many cases may cause a
large slew.  The fact that a large slew will occur should not be
a suprise if a peek is taken at the main part of the altaz window,
as it shows the position the rotator will be going to
(as the object value.)

"Track at Zero" is a new mode (as of 1-10-2002).  The intent is
to support operation of the rotator with the spectroscopic instruments
(which want the slit normal to horizon), but also want to have the
rotator tracking in order to work in conjunction with the autoguider.
When a slew to a new star is performed, (or when this button is pressed
for the first time), a position angle is calculated that will cancel
the object parallactic angle, putting the rotator at zero degrees,
and tracking will procede from there.

There are several ways to screw around with the rotator position.
The first is to enter an angle into the main part of the altaz
window and type "Go", this turns tracking off (so the mode is
displayed in yellow with the word "SLEW"), and the rotator is
positioned to the specified angle.  The rotator Jog button is
provided as a convenient addition to the entry field in the
main part of the altaz window.  "Jog" provides a relative
positioning function.  The jog amount is entered in via the entry
field, and then the + and - buttons add it to the absolute
rotator position.  You are free to enter a negative jog amount
and use the buttons backwards if you are eager to confuse yourself.
It is important to note that the Jog function is entirely
useless in any tracking mode, it only affects slew position.

Next we have CCW (Counterclockwise) and CW (Clockwise) limits in
degrees.  These are signed values, and typically they are set to
-100 CCW and +100 CW or something like that.  Odd cases could arise
when both numbers will be set to negative or positive values.
Notice that the software will not allow you to set limits that
exclude the current rotator position.  Also the CCW limit must
always be less than the CW limit.  Certain other sanity checks
will result in limit settings being rejected.

The instrument offset is intended to provide for instruments
that are built in such a way that their zero position is
not at the usual rotator zero position (since zero is special
for spectroscopy, such an instrument that mounted with its
slit at some odd angle would probably benefit from the use of
this offset).  The long and short of it is that this offset
should always be set to zero, thus far, no instrument has
been mounted on the 6.5 meter MMT that required a non-zero
offset, and I am eager to hear when the first one shows up.

If a non-zero instrument offset is set, a new field appears
in the rotator GUI (just above the instrument offset line)
that shows the raw rotator position.

The Parallactic angle is calculated by various mathematical
contortions based on the RA and DEC of the star being
observed, the LST, the geographic position of the MMT.
In short, it is the output of the calculations that drive
rotator tracking.

The position angle (aka "Sky Offset") and the instrument offset
are combined with the parallactic angle as follows:

	rotator demand (aka commanded position) = 
		object position (aka parallactic angle)
		+ instrument offset
		- position angle (sky offset).

As an example, if the current parallactic angle (object position)
was 137.0 degrees, and it was desired to place the rotator at
+45 degrees (i.e. this is the desired demanded position),
a position angle of 92.0 degrees would do the job.

As should be clear by now, the demanded position is the value actually
sent to the rotator servo to command the rotator.
The current position is where the rotator actually is
(and if the drives are on and servos are working properly
this will be effectively equal to the demanded/commanded position),
the only exception being while slewing.

As a check, the raw tape position readings are displayed at the
bottom of the window.  These should both match one another, and
also match the current position.  We have seen some weird problems
where the current position has wandered from the tape position.
Please report this occurences in detail, and use the recal button
for now to attempt to recover from them.

Notes as of Summer 2001

Below is an example of the rotator window in its current form.
This window is summoned from the altaz window by pressing the "rotator" button.
It may also be made to vanish by pressing the dismiss button, and it may be summoned or dismissed at any time as you wish.

The most striking thing about the image above is the red background behind the IK320 status field. The IK320 is the hardware board that reads the absolute tape encoders. It has some kind of malady where it gives a bad status when it is first powered on after being off for a long time. Maybe this will be fixed someday, but for now, the only remedy is to power the vme crate off and back on again. Since we are not using the absolute tapes at this time, it is not a big deal one way or the other, but it may be someday.

Stop and Start

These buttons engage or disengage rotator tracking. The rotator first powers up in "slew" mode, which means that tracking is off and the rotator does not move unless commanded to do so via the altaz window, or the jog buttons in the rotator window. Notice that starting tracking may initiate a large slew as the rotator moves to make current equal to demand. Also stopping may cause a large slew as the rotator tries to achieve the commanded slew position. (We really should do a motion cancel when tracking is stopped). To understand this is further detail, read the notes on the altaz window.

Jog

These buttons are provided for initial setup of the rotator. (i.e. to be used in conjunction with the zero button to establish the encoder zero position). Performing a jog here places the rotator axis in slew mode (stops tracking) and offsets from the last commanded slew position. Frankly it is just not intended to be used while tracking and that is that. The slew amount may be set in dd:mm:ss format

Rotator raw

Rotator raw is the raw encoder position as determined by reading the encoder. At this time, the absolute encoder tape is not working, so this value must be zeroed (hence the zero button). When the rotator is first turned on, it must be positioned by hand (the jog buttons are intended for this purpose) to line up physical marks on the rotator, then the "Zero" button is pushed. Rotator raw should then read zero with the marks aligned. This should be good for the entire night, or until the crate reboots (or is rebooted).

If the drives are restarted, there should be no need to redo the zeroing business, the software tries to keep track of the encoder offset and restore it when the drives are restarted. If anyone finds that this is not the case, report this bug, and we will make it so, or at least correct this document.

Limits apply to the raw rotator position (i.e. this value). We once applied them to current (raw - instrument offset), but this leads to too much confusion and possible disaster.

Instrument offset

This is what we once called the rotator offset. It may be useful for instruments which are known to mount at some fixed angle from the zero position determined by aligning the fiducials above. The instrument offset is added to rotator raw to produce rotator current.

The value is limited to the range -90.0 to +0.0 degrees.

The right thing to do is to set the instrument offset once at the beginning of the night, and then leave it alone. When in doubt, leave this value zero and be done with it.

Rotator limits

These limits apply to rotator raw. Notice that the rotator typically tracks so as to make rotator PA smaller

Rotator current

This is where the rotator is right now. This value is the sum of the raw encoder reading and the instrument offset.

Rotator PA

This angle is calculated by the telescope control system for the object currently being tracked (in fact, it is the object position from the altaz window.)

Sky offset

This is an angle in degrees which is added to the PA (Parallactic angle) to produce the following value, the rotator demand.

Rotator demand

The sum of the rotator PA and the Sky offset. When the rotator is told to track, it moves to rotator so as to make rotator current match this value and follow it. However, the rotator is not alowed to move past its limits in its efforts to match the demand.

IK320 status and encoder tapes

Someday these will work we hope. When they do, we will no longer need to do the encoder zeroing business.

What follows are John McAfee's notes about using the rotator: Many things need to be modified now that many changes have been made in the way the rotator operates, so beware.

                          ROTATOR OPERATION NOTES

			  
Windows and Buttons:

1. "Tools" window has Rotator Drive "Stop" and "Start" buttons.
    These are the recommended way to turn the rotator drive off and
    on.  If this "off" button is clicked the rotator will stop moving.

2. "altaz" window has the "Rotator" button for summoning the "Rotator"
    window.  It has a "Drives" button which turns off or on Alt, Az and
    rotator drives simultaneously and a "Cancel" button which sets the
    commanded position of the 3 drives to the instantaneous position
    at which the button is clicked.  This position is static--not
    tracking--for alt and az but questionable for rotator.

3. "Rotator" window has buttons and entry windows that control some
    aspects of rotator behavior:

    a. "Stop" button actually puts rotator in slew mode.  It does not
        stop the rotator except in the unlikely event that the rotator
	is at its commanded position when the button is clicked.  When
	the rotator is in slew mode its commanded position seems to be
	either the entry in "Rotator offset" or a commanded position
	in the "altaz" window.  If these are both 0 there is a good
	chance it will go home to 0 raw.

    b. "Start" button puts rotator in tracking mode and if rotator
        drive is on it will go to commanded angle and track from there.

    c. "Rotator raw" is a readout of the mechanical position of the
        rotator in relation to its zero point.  The zero point is
	arbitrary and will change if the "Zero" button is clicked.

    d. "Zero" button--CAUTION--!This button sets the zero point in
        software to the raw position at which it is clicked.  This is
	usually a bad deal.  If you remember what Rotator raw was
	before you hit this, you could enter its negative in Rotator
	offset to get it back home and then hit zero again to reset.

    e. "Rotator offset" has a reading of the current setting, an entry
        window and a "Set" button.  This is where the Position Angle
	would be set for tracking or a mechanical offset for slewing.
	An entry in the window will not take effect until the "Set"
	button is clicked.  After clicking it can be up to 20 seconds
	before you see a reaction in the rotator.  Beware of quick
	glances for verification.

    f. "Rotator direction" is a mystery to me at this time.  My ops
        recipe regards it as staying in its current setting which is
	minus.  The "Plus" and "Minus" buttons change it accordingly.

    g. "Rotator current" seems to be a sum of "Rotator raw" and
       "Rotator offset".							    

    h. "Rotator TCS" seems to be a variant of parallactic angle
        measured plus or minus 360 from N.  It looks different from
	the Parallactic angle in the scope window but is always
	complimentary in some sign sense.  It naturally increments
        during tracking and represents the position angle of the
	slit in Blue at rotator stow position for pointing position
	of the telescope.  If the angle in "Rotator TCS" is copied into
	the "Rotator offset" window, the "Start" button in the Rotator
	window is clicked and the rotator drive is on, the rotator
	will start tracking from its stow without a big slew.

    i. "Rotator Jog" has an entry window that accepts DD:MM:SS.0
        and "+" and "-" buttons that jog the "Rotator offset" entry
	and related values like "Rotator current".

    j. "Rotator-Limit" of which there are 2, each has a reading, an
        entry window and a "Set" button.  The "Set" button must be
	clicked to move the entry to the readout and make it effective.
	These limits seem to be relative to "Rotator offset".  If "Rotator
        offset" is 0 the entered limits will be about mechanical or raw
	0.  If there is a "Rotator offset" of -100 and you want to limit
	movement to + or - 100 about mechanical 0 the limits would be
	-200, 0. These limits then must be set for each object and
	position angle and are immediately invalidated by a change in
       "Rotator offset".

Known or Suspected Bugs:

1. There may be some kind of bug related to the rotation limits of
   the building at -62 AZ.

2. I have noticed that clicking the "Cancel" button in the altaz
   window seems to mess up the rotator software in such a way that
   is not understandable to me.  The "Rotator TCS" goes to -360 and
   sometimes is stuck there.  All bets are off with entries and
   movements of the rotator.  The only fix is to reboot the mount
   crate.  This may have caused the Friday night runaway.

3. Also relating to the runaway is a possibility that the rotator
   software might see a turn of 360 + or - in the pointing as
   requiring a similar turning of the rotator.

4. I have been trying to use the "Zero" button to adjust the zero
   position and it seems to do make the position zero on the first
   click and reverse the change on the second click and do nothing
   on an subsequent clicks--it seems erratic.

5. The "Rotator offset" entry would not accept a 00:10:00.0 entry
   always writing it as a negative entry as (-00:10:00.0).  This
   as I was doing fine adjustments to the zero position.  The jog
   option achieved what I needed.               
       
Caveats and Concerns and Rules of Operation:

1. If the rotator driive is on do not trust it to be stable through
   any glitch in the system.  It seems to be steady as long as it and
   the telescope are tracking within limits, but drives dropping out
   or computer induced changes in telescope tracking could cause a
   runaway.

2. Never slew the telescope with the rotator on unless you are watching
   it like a hawk and ready to turn its drive off.  When changing positions
   or position angles it is recommended to set "Rotator offset" to 0 and
   click "Stop" in the Rotator window to put rotator in slew mode. It
   should then return to 0 mechanical or raw and stay there. Carol reports
   that it might not do this so beware.  It has done it consistently for
   me.  For extra safety you might turn off the rotator drive once it has
   reached raw 0 during the slew.

3. Be careful not to hit the "Zero" button in the Rotator window by
   accident.  It would make the current raw position into the zero
   position in the software.  This button is between 2 often used ones
   so look where you click.

4. A special caution on the "Stop" button at the top of the Rotator
   window.  This changes rotator mode from track to slew.  It does not
   stop the Rotator but it does redirect it to seek the angle in
  "Rotator offset" instead of the position angle it may be tracking.
   Since the angle in "Rotator offset" is often very large relative to
   limits, this can be a disaster if not noticed. It may have been
   a factor in the runaway of 11/25.

5. The "Cancel" button in the "altaz" window does a similarly dangerous
   move by putting the  angle from "Rotator current" into the "next"
   box where a "go" command could send the rotator to that angle.
   "Rotator current" is a sum of "Rotator offset" and "Rotator raw" and
   can be very large as well.               
   
   In addition there seems to be a bug in the operation of the "Cancel"
   button that screws up the rotator software badly.  There is a
   temporary reading of -360 in the Rotator object line of the altaz
   window and in the "Rotator TCS" line of the rotator window.  And the
   rotator no longer behaves as expected.  The only solution I have
   found is to reboot the mount crate.  This may have been involved in
   the famous runaway.
   
Method of Setup

1. After seeking position note angle in "Rotator TCS".  If you want to
   start the rotator tracking right from its stow position at raw 0,
   copy this angle into "Rotator offset", click "Set", click "Start"
   (both in "Rotator" window),and if necessary click "Start" for the
   rotator drive in the "Tools"window.

2. Setting up arbitrary Position Angles:

   a. Note whether object's Dec. is greater than +31:41.3(rotator will
      track in negative direction) or less than +31:41.3(rotator will
      track in positive direction).
         
   b. Compare desired P.A. to "Rotator TCS" at object position.  When
      the P.A. is entered into the "Rotator offset" window, the
      difference between it and "Rotator TCS" will indicate the amount
      of slew the rotator will do to reach its tracking position.
      For instance if "Rotator TCS" is -46:00:00.0 and you enter a
      P.A. of -66:00:00.0 in "Rotator offset" and click "Set", you
      will see the "Rotator current" readout change to -66 and if
      you turn the rotator drive on and click "Start" in the rotator
      window the rotator will move +20 seen in "Rotator raw" and the
      "Rotator current" will increment back to agree with "Rotator
      TCS" and the rotator will begin tracking at that position in
      direction determined as in (a.) above.
      
      In the above setup if we were to use -26:00:00.0 as the
      P.A. in "Rotator offset" the rotator would slew to -20
      before starting to track.

      If the given angle when compared to "Rotator TCS" puts the
      rotator too close to or past a limit try + or - 180 and
      compare that angle.  One of the three is bound to fit the
      situation.  Remember it is the mechanical or "Rotator raw"
      angle that we are limiting by choice of setup.

      Remember that any change in the "Rotator offset" on the fly
      will take up to 20 seconds to take effect.  Stop the rotator
      with the "Stop" button in the Tools window at need.

   c. In order to move to a new pointing position it is recommended
      to set "Rotator offset" to 0, click on "Stop" in the Rotator
      window to set it in slew mode and rotator should go to 0 raw
      and stop.  Make sure it does.  Extra insurance is stopping
      drive in Tools window again.
         
      Remember that clicking "Stop" in the Rotator window without
      zeroing the "Rotator offset" will send it slewing to the
      offset angle!

Limits:

1. The limits may be set by using the "Rotator offset" value as
   the zero point of the limits.  This is helpful in that it would
   stop the rotator from tracking beyond the limit.  If the "Rotator
   offset" is 40 the limits to use for a + or - 100 degree mechanical
   limit would be -60 and 140.  The problem here is that any change
   in "Rotator offset" invalidates the limits so they must be set
   each time you change the angle in "Rotator offset".