}

SpecMech Version History

Version 3.0.4 2013-08-15 Russell Owen and John Parejko

  • Fix ticket 1559: incorrect reported exposure times on sp1 or sp2. This was a bug in util_deltaTicks mis-handling wraparound.
  • Change motor port to use hardware flow control (as expected by the motor controllers).
  • If a motor command is too long (probably impossible) motor_moveRel rejects the command instead of sending a truncated command.
  • Improved the code documentation.

Version 3.0.3 2012-08-29 Russell Owen

  • Bug fixes:
    • Changed all instances of strncpy to strcpy because all copying is of fixed-length strings or strings whose length has been verified to be short enough to fit. In some cases the specified length was incorrect. This addresses an issue in ticket #1636.
    • Fixed missing return values from ps_ functions and a few clang warnings.

Version 3.0.2 2010-08-05 Russell Owen

  • Improved exposure timing by starting to close the shutter early based on how long it took to open the shutter to get as close as possible to the requested exposure time. The previous version exposed longer than the requested time by the shutter open and close time.
  • Fix ticket 713: exposures < 1s never finish.

Manual update 2010-03-25 Russell Owen

Added a hardware manual and moved the information about the collimator actuators to it.

Version 3.0.1 2010-03-08 Russell Owen and Jon Brinkmann

  • Fix ticket 649: Hartmann reported and/or actual positions incorrect.

Version 3.0.0 2010-03-04 Russell Owen and Jon Brinkmann

Major overhaul to add support for reboot acknowledgement, improve exposure timing, improve status output and attempt to make collimator motor control more robust (despite serious limitations in the motor controller). The command set was also overhauled.

  • Visible changes:
    • Most commands are rejected until you acknowledge reboot with "!".
    • Most commands have been combined into two-character commands.
    • Exposure time may be specified as a float, is measured to milliseconds and reported to 0.01 seconds. Formerly it was specified and reported as an integer.
    • The command to alter exposure time can now alter a paused exposure; formerly the exposure had to be active.
    • Motor commands are rejected if motor initialization fails.
    • New status commands allow querying just one type of status.
    • Status improvements:
      • All output starts with a keyword.
      • Motor commands output motor status at the end.
      • Commands that move the shutter and Hartmann screen output status, but only while the command is executing (since output must be in response to a command). Thus changes at the end of an exposure are still not reported.
      • The shutter and Hartmann screen status output has been simplified.
      • Errors in reading motor replies are reported at the time that they happen, using a new keyword. This simplifies motor status and position output.
      • Error messages are no longer surrounded by { }.
    • Always beeps SOS when shutter or Hartmann screen fails to move as commanded; formerly this only occurred for certain kinds of moves.
    • It is no longer possible to set the date. It wasn't being used for anything.
    • Rearranged the documentation.
    • Added manuals for Dynamic C, the motor controller, etc.
  • Internal changes:
    • Waiting for motor end-of-move should be a bit more reliable. Formerly the command WS100 was used, which waits for no encoder counts to be seen in 100 ms and might never terminate. Now command WE50,WA100 is used, which waits for the position error to drop below 10 encoder counts and then waits an additional 100 ms to give the motor a chance to settle. This is still not a very good way to wait for a move to end, but the motor controller is very primitive and it's about the best I can do without replacing it. (I had hoped to add real homing and absolute motion, but felt it was not wise with the limitations of the current motor controller.)
    • Motor replies are now read by working back from the end of the reply. This should be more reliable than the old code (which assumed the data started at the beginning of the reply). This also has the advantage that if multiple replies somehow get into the buffer, the most recent data is used.
    • All timing is done with MS_TIMER. This eliminated the use of an extra timer.
    • Fixed a potential bug in board_tdelay: depending on how subtraction of unsigned ints works, it could potentially wait nearly forever if MS_TIMER wrapped around at the wrong time.
    • Added code for testing the basics on unix.
    • Removed status.Sec
    • Removed global variable g_boot_time; it was redundant with status.Sec and unused
    • board_setAD now sets the A/D reading function based on the spectrograph ID bit instead of a compiled constant. As a result, the same source code works for both spectrographs.

Manual Update 2008-01-10 Russell Owen

  • Added documentation for motor status bits.
  • Added note about motor limits.

Version v2_9_0 2007-07-20 Russell Owen and Jon Brinkmann

  • Added one humidity sensor, renaming the other one and removing a temperature sensor at the same time.
  • The temperature and humidity are now shown as NaN if invalid and the raw A/D values are shown without surrounding parenthesis.
  • Overhauled the reading and reporting of motor position and status. It should be far more reliable about detecting invalid replies, which are reported as NaN. All replies include the raw data from the motor (just the suitable bits if the data was valid, otherwise the whole string).

Version v2_8_0 2006-09-28 Russell Owen

  • Modified "s" (stop) command to not clear last_exp.time if no exposure was happening. Fixed by making expose_stop not clear status.exp.accum.

Version v2_5_0? 2002-10-17 Russell Owen and Jon Brinkmann

Appended several items to the status output:

  • Exp_state (one of None, Paused, Exposing)
  • Shutter_open_transit (sec to open shutter, float)
  • Shutter_close_transit (sec to close shutter, float)
  • Coll_motor_A_status (status word, hex with 0x prefix)
  • Coll_motor_B_status (status word, hex with 0x prefix)
  • Coll_motor_C_status (status word, hex with 0x prefix)

Version v2_4_0 2002-09-25 Russell Owen and Jon Brinkmann

  • Fixed the bug that caused the help command to fail.
  • Improved exposure timing. The exposure is now considered to start halfway between when the shutter closed sensor goes off and the shutter open sensor goes on, and similarly for the exposure end time. One side effect is that the shutter will start to close some time before the listed Exp_time_left.
  • The (A)lter command can now alter paused exposures; formerly this was an error (oops).
  • The (e)xpose command will now terminate a paused exposure first, if present. Formerly this was an error.
  • Exposure times may be expressed in decimal seconds (but the decimal point is optional) and are displayed to 1/10ths of a second.
  • Increased the shutter motion time limit from 5 seconds to 10 and the Hartmann screen motion time limit from 2 seconds to 5. This should increase reliability in cold weather.
  • Removed all use of the LCD except to display the startup message. Thus there is now no display of the operating command nor of an exposure countdown.
  • Changed the beeper to act primarily as shutter state feedback. The new patterns are:
    • "...." when the shutter finishes opening.
    • "- -" when the shutter finishes closing.
    • "... --- ..." (SOS in Morse Code) if shutter or Hartmann motion times out (this is no change).
    • The same old pattern at startup.
  • Internally I overhauled the timing code to use the MS_TIMER counter, eliminated the exposure countdown task and made all serial port writes time limited.

2005-02-01 Russell Owen and Jon Brinkmann

Status now outputs humidity and temperature.

Version v2_2_0 2002-07-18 Russell Owen and Jon Brinkmann

Major overhaul. Notable changes include:

  • Commands are echoed.
  • If a command fails, an error message is printed and the rest of the line is ignored.
  • Multiple commands may not be combined on one line.
  • The (i)nteractive and (n)on-interactive commands are now no-ops. There is only one mode.
  • Some command are rejected with an error message if not in the correct state (current exposure, paused exposure or no exposure). These include (A)bort, (e)xpose, (P)ause and (R)esume. Formerly some of these commands silently did strange things when specMech was in the wrong state. Note that (S)top is always safe and is the proper way to make sure that specMech is not exposing.
  • The status line Last_exp.time now always indicates the time of the most recently completed exposure. Formerly it was 0.0 if an exposure was in progress.
  • Added the (I)nitialize command.

2001-02-14 Jon Brinkmann

  • Fixed reporting format for spMechVersion so it reports the version number without "$Name$".
  • Fixed bugs in cmd_s, cmd_S, exposure_start and exposure_countdown.

2001-02-06 Jon Brinkmann

  • Fixed exposure control routines so that exposures can be altered, paused and resumed.
  • More cleanup and documenting.

2001-01-29 Jon Brinkmann

  • Removed fan and temperature code.
  • Added Spectrograph ID.
  • Did lots of documentation and cleaning up.
  • Added conditional code so that the code can be debugged under UNIX using the command:
    gcc -c -o /dev/null -Wall -DUNIX_DEBUG specMech.c

2000-07-14 Jon Brinkmann

  • Added CVS tagging

Credits

Alan Uomoto wrote the initial specMech code. The history starts from when Jon Brinkmann started maintaining it.

Thanks to Eric Neilsen for adapting SOP to my modifications of the specMech code and to Craig Loomis for his help debugging a nasty problem.