By Russell Owen
Documentation update 2014-01-21
- Finally documented the split of the 3.5m tertiary Galil into two Galils, one for the axial actuators and the other for everything else.
Documentation update 2013-07-30
- Added hex values to status stop bits table in manual.
- Fix a comment in the code.
Manual update 2013-07-10
- Fix a few typos.
- Links to TCC documentation were relative; I changed these to absolute links to increase robustness.
- Switch from um to μm everywhere.
v2.1.9 2008-11-24
- 3.5m M3 only: updated constants for new tertiary rotation motor encoder (changed from 1000 lines per rev to 2048).
Manual update 2008-11-17
- Corrected the description of stop code 8 (which was listed as not being used, but is used for servomotors, e.g. 3.5m M3 rotation).
- 3.5m M3 only: corrected some details for the axial actuators.
v2.1.8 2008-09-09
- 3.5m M3 only: updated constants for new actuators and increased range of tertiary rotation because the reverse limit switch was moved.
- combineGalilCode.py: changed galil->Galil in a help string.
v2.1.7 2007-11-30
- The code now explicitly sets encoder type (CE). I assumed that the default would do, which proved false for 3.5m tertiary rotation (a servomotor).
v2.1.6 2007-11-28
- 3.5m M3 only:
- The tertiary ENCRESE was changed back to 46.6667 from 186.6667. We don't know why it sometimes changes but so far is always one of these two values.
v2.1.5 2007-11-16
- 3.5m M3 only:
- The tertiary rotation motor is always turned off after a successful move even if MOFF=0.
v2.1.4 2007-10-19
- 3.5m M3 only:
- Changed servo error limit on axis E from 2000 to 7000 to match the value currently in use.
Manual Update 2007-10-02
- 3.5m M3: further improved documentation of tertiary rotation.
Manual Update 2007-10-01
- 3.5m M3: improved documentation of the rotation system.
- Removed redundant history section from commands manual.
- Minor cleanup of the html markup.
v2.1.3 2007-10-01
- 3.5m M3 only:
- Added servo error for axis E to auxiliary output
- Added off-on-error and error limit for axis E
- Added output of off-on-error and error limit for all axes (but only for 3.5m M3, so far, because the other mirrors don't use servo motors)
- 3.5m M2 only:
- Updated specific information for the axial actuator stepper motors.
- Split the version history into a separate file.
v2.1.2 2007-07-23
- 3.5m M3 only:
- Corrected ENCRESE in the constants file
Constants 35m M3.gal
and corrected the corresponding documentation in this manual.
- Added off-on-error to axis E (tertiary rotation) in the parameter file
ParamAdd 35m M3.gal
. It is presently set to 7000 counts, which is roughly 1 degree.
- Documented the Galil error light.
Manual update 2007-07-18
- Updated the 3.5m M2-specific information for the new top end.
- Updated the 3.5m M3-specific information with a warning that homing axis E (tertiary rotation) will end with an error about the clamp not closing.
v2.1.1 2007-06-27
- 3.5m M3 only: status now reports the commanded and measured tertiary rotation angle (in servomotor encoder ticks, the same units as for setting that angle).
v2.1 2006-10-27
- Added support for MINCORRx.
- Added updated constants for new 3.5m top end (also retained old constants as "Constants 35m Old M2.gal").
- SDSS: one more fix for PR 294: SDSS M2 Galil code fails on clean install due to undefined variables. This change only affected code specific to SDSS M2.
v2.01 2005-10-19
- Updated the "Upload Code" section with information about the subversion repository.
- Fixed PR 296: Galil reports 0 seconds for move if NCORR=0. An equation was wrong due to trying to keep the line short enough and the Galil's unusual order of evaluation.
- 3.5m
- Changed M3 MAXCORRA-C from 0 to 300000 in "Constants 35m M3.gal", thus enabling correction for axes A-C. This matches how the mirror controller was configured.
- Changed M2 MAXCORRA-C from 0 to 100000 and NCORR from 0 to 1 in "Constants 35m M2.gal", thus enabling correction for axes A-C. This matches how the mirror controller was configured.
- SDSS: Fixed PR 294: SDSS M2 Galil code fails on clean install due to undefined variables. This change only affected code specific to SDSS M2.
v2.0 2005-09-08
- Changes to the main code:
- Added constants NCORR and ENCTIME to improve control of encoder corrections.
- Renamed #GOCORR to #GOPOS and eliminated the old non-correcting #GOPOS.
- Simplified #STOP and made it an engineering command: it now halts as soon as possible and not necessarily on a full step.
- Eliminated #TESTHM and #TESTMV.
- Overhauled SHOWPAR to display DOAUX, NCORR, ENCTIME, WTIME, LSTIME and MAXCORRx (all the constants I found that were not already being displayed). There is no descriptive text for the times because they are hard to summarize briefly and I'm running low on program steps.
- Modified auxiliary output so that it now outputs commanded position when it changes and not at other times. This should make it much easier to interpret the auxiliary output. (Note that the auxiliary port is driven by a background process; if the command position only changes for a brief moment then the background process may not detect it. However, this is unlikely to occur in practice.)
- Added constant AUXMAXN to control new AUX output.
- Minor improvements to predicted move time. A few fixed costs for correcting a move were improperly omitted from axes that were not using an encoder.
- Removed discussion of constant DEFVF; it was not being used.
- Modified the constants files to add NCORR (0 or 1 based on MAXCORRx) and ENCTIME (set to 0). These values provide the same performance as before the upgrade.
- The code repository is now checked into subversion instead of cvs.
v1_12 2004-04-29
- Enhanced the main code (now version 1.12):
- Improved handling of DOAUX. Setting it nonzero now halts auxiliary output after one iteration (formerly it only blocked automatic restart). Thus you can halt auxiliary output almost immediately, yet still force a single auxiliary output by executing XQ#AUXSTAT manually.
- Modified to allow devices to append additional output to the auxiliary port status via new routine #LAUXOUT.
- Enhanced the SDSS Secondary code (now version 1.03):
- The SDSS Secondary now includes piezo correction information as part of the auxiliary output.
- The XQ #LMOVE command is now a fully supported foreground command. It returns OK when finished, prints out the new position and it also pauses automatic piezo corrections for you (if necessary).
- The status for SDSS Secondary has changed slightly. A single bit for "piezo correction enabled" has been expanded to a 3 bit piezo status word. This more accurately shows the status of automatic piezo corrections.
- Automatic piezo corrections do not occur unless all three axial axes are homed (since the Heidenhain encoder data used to adjust the piezos is meaningless unless the axial axes are homed).
- LGAPTIME was eliminated. It wasn't being used and complicated the code for no good reason.
- Improved the scripts for processing Galil code:
- combineGalilCode.py now halts early and does not write an output file if the code contains any errors.
- Bug fix: combineGalilCode.py checked the wrong files if there was no device-specific parameter file.
- Improved checkGalilCode.py to return a flag indicating success or failure.
2003-07-07
Expanded the section on the SDSS Secondary mirror controlller. No code changes, so not checked into CVS.
v1_11 2002-08-13
Fixed bugs in "checkGalilCode.py" that resulted in false reports of errors, e.g. when using combineGalilCode.py to generate code for a particular controller. No changes in the Galil code itself.
v1_10 April 12, 2002
- Misfeature fix: a simple XQ command (with no label) would mess up the controller by marking all axes as unhomed. Fixed by putting an EN at the beginning so nothing happens.
- Added python scripts to combine all code files needed for a particular device and to check this code. (See "Installing a Galil" for instructions).
- Renamed "Constants 3.5m..." files to "Constants 35m..." to regularize file naming and so simplify the new combiner script.
- Renamed "Constants Dev Test.gal" to "Constants Def Galil.gal" for clarity (these are the constants I use for my developmental Galil).
- Renamed "ReadMe.doc" to "ReadMe.txt" and overhauled the text to refer to the installation section of this manual.
- Documented these scripts (under "Uploading Code").
November 30, 2001
- Added the section "Installing A Galil"
v1_9 October 16, 2001
- Changes to STATUS:
- Added a second amplifier fault input as the 19th status bit.
- Changed bit 17 to "full step error", meaning that the motor should be on a full step but is not. The bit used to simply mean "on full step", and whether that was good or bad depended on whether the axis was a stepper motor and whether MOFF=0 or 1.
- Renamed file "ParamAdd 25m M2.gal" to "ParamAdd 25m M2.gal"
(to match the convention for other files) and "ParamAdd 25m
M3.gal" to "ParamAdd SDSS M1.gal" (to match the convention and
correct the mirror name).
- Changed SDSS M2-specific code (ProgAdd SDSS M2.gal) to version
1.1. This is a trivial change, correcting a spelling error in one
line of status: "...piezos correction enabled..." changed to
"...piezo correction enabled...".
- COMPVAR now sets DESPOSx, fixing a problem with homing axes
when code has been newly installed.
- All device-specific code files defined new constants that had
to be separately saved with BV, an easy step to forget. After
finding this out the hard way, I moved all such constants into the
respective device-specific constants files. Now all constants can
be burned at once with BV after loading the device-specific
constants file. As a result, I updated the version number for all
device-specific code, even though there were no actual code
changes. The new version numbers are:
- ProgAdd 3.5m M3.gal: version 1.6
- ProgAdd SDSS M1.gal: version 1.7
- ProgAdd SDSS M2.gal: version 1.2
- Checked into galileo CVS, package "galil", using release tag
"v1_9".
September 4, 2001
Internal changes for HTML standards compliance, including adding a
document type and changing the internal links.
August 29, 2001
Improvements to the manual, including:
- A description of normal status in the "status word"
section
- A link to the status word section from the main table of
contents
- A troubleshooting section with entires for the on full step
error and amplifier fault.
v1_8C, June 7, 2001
The following changes are only relevant to the 3.5m tertiary
mirror controller. These changes are due to the fact that the mirror
cover state switches fire somewhat before the mirror cover reaches
the desired state.
- #LDOCOV no longer quits right away if the mirror covers are
already in the state you want them. It always tries to move the
covers.
- Once the switches state that motion is complete, the mirror
cover motors are driven for an additional LCVADDT number of
seconds (initially set to 2).
- The polling interval is now set by variable LCVPOLLT and has
been decreased to 0.5 seconds from 1 second, making the additional
run time a bit more accurate.
- In the interest of name consistency, I renamed the mirror
cover motion time limit from LCOVTIME to LCVMAXT. Note that the
true time limit for motion is LCVMAXT + LCVADDT + LCVPOLLT.
- #LSHWPAR (and hence #SHOWPAR) displays the new variables and
has an extra line of output.
The following changes are relevant to the SDSS mirror
controllers
- Added parameter files "ParamAdd 25m M2.gal" and "ParamAdd 25m
M3.gal" to lower the baud rate of the auxiliary port.
v1_8B, May 8, 2001
Changes are only relevant to the 3.5m tertiary mirror
controller.
- Renamed #LOPEYEA to #LOPEYE because it now works much more
like LCLEYE
- Changed #LCLEYE to close the eyelid specified by variable A,
or all eyelids if A is not set or out of range. Note that LOPEYE
does not allow opening all eyelids at once, as that is apparently
not a typical mode.
- Changed #LOPEYE, #LCLEYE and #LDOCOV (which is called by
#LOPCOV and #LCLCOV) to report what they are going to do as they
begin and to report status at the end.
- Changed #LDOCOV to stop moving shortly after the covers arrive
(by polling once a second), rather than just going for a set
amount of time. I have not done this to eyelid motion because we
don't have the necessary signals coming into the Galil.
- Output from #LSTATUS, and hence #STATUS, now includes a new
line for the eyelids that shows the requested position for each
eyelid, in addition to the state of the "all closed" switch.
- Output from #LSHWPAR, and hence #SHOWPAR, now includes all
tertiary-specific user-settable parameters.
v1_8A, April 26, 2001
- Updated the 3.5m tertiary-specific parameters file "ParamAdd
35m M3.gal" to include the correct motor type for the servo motor
that controls rotation 9axis E).
- Corrected the file name for "ProgAdd SDSS M2.gal" (it was
"ProgAdd SDSS M2.gal"). It is possible that this file was not
properly checked in for tag "v1_8". In any case, it's checked in
now.
- Released version 1.3 of the 3.5m tertiary-specific code
"ProgAdd 35m M3.gal". This adds support for control of the primary
mirror covers and eyelids.
- Warning: the release versions of #LCLEYE and #LOPEYEA are
somewhat different than the beta versions.
- Checked in all code with release tag "v1_8A". Although the
changes only affect the tertiary (aside from correcting one file
name), this is the current version to use for all Galils.
April 9, 2001
- Updated information about the 3.5m tertiary, which now uses
Heidenhain encoders instead of rotator encoders. Also updated for
mirror-specific code version 1.3b2, which includes a preliminary
attempt at primary mirror cover and eyelid automation.
v1_8, March 7, 2001
- Checked version 1_8 code into CVS as "/rowen/galil" using
vendor tag "rowen" and release tag "v1_8"
- Added a call from #CLEANUP to #LCLNUP. This allows local
modifications to run code at cleanup time.
- Removed unused code after #DONE (code that had been moved to
#CLEANUP).
- Local additions require the following changes:
- Implement #LCLNUP
- Download following #LCLNUP, not #LCMPVAR
- Added SDSS M2 piezo information.
- SDSS M1 version 1.6 program additions:
- Minor modifications for program version 1.8.
- Do not set constant(s) in the program, so changes are
easier to save.
- 3.5m M3 version 1.3b1 program additions:
- Minor modifications for program version 1.8.
- Do not set constant(s) in the program, so changes are
easier to save.
- Added mirror cover and eyelid control commands.
v1_7, January 26, 2001
- Checked version 1.7 code into CVS as "/rowen/galil", using
vendor tag "rowen" and release tag "v1_7".
- Also updated the introduction section of this manual.
Version 1.7, August 15, 2000
- Released version 1.7
- Documented modified 3.5m tertiary wiring. Formerly the clamp
was controlled by outputs 2 and 3; now it is controlled only by
output 2.
Version 1.7b5, May 22, 2000
- Added DoAux constant.
- Added auxiliary port status output.
Version 1.6, February 17, 2000
- Corrected SDSS primary air link output bit (was listed as 1,
is actually 9) on March 3, 2000.
- Some corrections to mirror-specific information (especially
units for encoder resolution).
- Overhauled handling of motor initialization so that it's
easier to make local modifications that can detect if a move was
actually requested (as opposed to an axis being told to go where
it already is):
- #MINIT functionality rolled into #GO. There is no need to
explicitly initialize the motors anymore; it's done
automatically as part of #GO.
- #MSTOP now called from #DONE. (#MYERR does not call #DONE,
to reduce the chance of infinite loops).
- #MSTOP and #MYERR now explicitly halt existing motion, if
any, and #DONE never returns to the caller.
- Put some #DONE functionality into #CLEANUP, which
explicitly does NOT call #MSTOP. #MSTOP and #LMSTOP must exit
to #CLEANUP, not #DONE, to avoid infinite loops.
- As a result of these changes, #GOFS, #GORLIM, etc. all now
initialize the motors before they begin and (if they are the
last subroutine in the calling chain) turn them off when they
are finished.
- #LMINIT renamed to #LGO. #LGO may be called multiple times
for one motion command, so existing local implementations of
LGO should be made smart enough to determine if an init already
happened for the current move (especially if initialization is
a slow process).
- #LMSTOP may be called multiple times as a motion ends.
(This can be fixed if necessary, but the fix introduces slight
code maintenance headaches.) #LMSTOP should be smart enough to
only do things (at least things that take time) if needed.
- #LMITIME renamed to #LMVTIME. The code should be made smart
enough to not add time if an initialization isn't actually
needed.
- Improved homing:
- If the first attempt run at the reverse limits ends with
some actuators no longer contacting their reverse limit
switches, a second attempt is made (but only, of course, if all
switches were seen the first time).
- #GORLIM now only runs into the limit switches, making it
more useful for engineering
- #SETHM defines the current position as home. It sets
actuator and encoder position and reports homing data.
- Improved the test routines:
- #TESTMV now uses TESTNI as # of cycles, not # of
moves.
- Renamed global variable ITER to TESTST. This is used by the
test routines, including #TESTHM, #TESTMV and #GOTEST.
- Fixed #GOTEST, which had not been updated when #GOPOS
changed.
- Documented #GOFS, #GOIND and #GORLIM as engineering
commands.
Version 1.5
- Corrected the information for the 3.5m Secondary transverse actuators. R.O. 2007-09-13
- Added a section for the 3.5m Secondary mirror and made minor improvements to the mechanical descriptions of other mirrors. R.O. 12/10/99
- Released version 1.5b17 as version 1.5. R.O. 10/12/99
- Improved device-specific information and added information about the SDSS secondary. R.O. 7/7/99
- Minor enhancements to the documentation. R.O. 5/6/99
- Moves are now synchronous. Added parameter MAXCORRx and changed ST_FS to ST_FSx. R.O. 4/25/99
- Corrected documentation for 3.5m Tertiary at slot input (it turned out to be inverted from what I was originally told). R.O. 4/2/99
- Documented the SDSS M1 and 3.5m M3 device-specific modifications, including commands and wiring. R.O. 3/26/99
- Documented the wiring for the standard software, but not for device-specific modifications. R.O. 3/12/99
- Status has a new line that shows which axes have been homed. R.O. 2/25/99
- New LMINIT and LMSTOP subroutines support device-specific actions before and after a move. R.O. 12/28/98
- HOME now can be done for individual axes and requires that A, B, C... be set. R.O. 12/28/98
- MV has been removed from the documentation and will be removed from the code in the next update. R.O. 12/28/98
- Changed most constants to normal units (microsteps), thereby cleaning up the code and eliminating a lot of variables. Also changed HASINDx to INDSEPx, and modified the output of #SHOWPAR accordingly. Also added #LMSTIME to improve estimates of motion end times. #LMINIT now includes a new line saying how long it will take (0 seconds, if no local modifications). R.O. 3/16/99
Version 1.4
- Major changes in MOVE and MOVEREL. R.O. Apr 28, 1998
- Documented the use of BN to save the state of the digital outputs. R.O. Apr 28, 1998
Version 1.1
- Various homing processes are limited by setting minimal soft limits instead of a background timeout timer. R.O. Apr 7, 1998
- Fixed an error in the manual: LSTIME was listed as LIMTIME. R.O. Apr 7, 1998
Version 1.0
- Improved the section "Details of the Interface". R.O. Apr 6, 1998.
- Updated for v0.39. R.O. Mar ?, 1998
- Updated for v0.38 (XQ #MV now allows default values) and for M1-specific code v0.4, the first documented version. R.O. Mar 29, 1998.
- First version with a history entry. R. Owen, Feb 13, 1998.