}

SpecMech Commands Manual

Commands

The commands are as follows, where {abc} means pick exactly one of a, b or c (and the chosen letter must not have leading whitespace):

Miscellaneous Commands

?Help: return this text
!Acknowledge reboot; required to run any other command. A no-op if the reboot has already been acknowledged.

Exposure Commands

e{olrc} secBegin an exposure of time seconds with the Hartmann screens: o=open, l=left closed, r=right closed, c=both closed. Example: "eo 10.5" opens both Hartmann screens and starts a 10.5 second exposure.
eA secAlter the desired total time of current exposure to sec sec. If the new time is less than the accumulated exposure time then the exposure ends immediately (and is shorter than requested), else if the exposure is paused then it remains paused.
ePPause the current exposure, closing the shutter and pausing the timer. A no-op if already paused.
eRResume exposure paused with P. Rejected if no paused exposure.
eSStop current exposure, closing the shutter and halting the timer.

Motor Commands

mr AOff BOff COffOffset the motors by the specified amount (encoder counts). Offsets are limited to +/- 1000 counts.
mzDefine the current motor position as zero.

Status Commands

saPrint all status.
sePrint exposure status.
smPrint motor status.
soPrint other status: version and BootAcknowledged.
svPrint environmental status.

Engineering Commands

xiInitialize the controller.
xh{clro}Hartmann screen: c=close both, l=close left, r=close right, o=open both; closed means in the beam).
xs{co}Shutter: open or close (use while exposing will mess up the exposure time).
xm{01} cmdSend an arbitrary command to the specified PI C-808 motor controller: 0 for motors A and B, 1 for motor C. Note: for single-character commands no terminating \r is sent; this allows sending commands such as @ (report current position).

Details of the Interface

  • Each command must be on its own line.
  • Exposure times are in decimal seconds, but the decimal point is optional.
  • White space between the command letter and numerical arguments is allowed but not required.
  • White space is prohibited between command letters and single-character arguments.
  • The following is returned in response to each command (and at no other time; specMech does not output unsolicited data):
    • The command echoed
    • Zero or more keywords of data, one per line
    • A final OK or Failed
  • Commands are sent over an RS232 serial line at 9600 baud with CTS/RTS hardware flow control, 8 data bits, 1 stop bit, no parity.

Collimator Motors

The collimator motors have a resolution of 1000 ticks/mm and a mechanical range of approximately 10mm (10,000 ticks).

Warnings:

  • If a collimator actuator hits a limit switch then the actuator is moved away from the of the limit by 4000 counts.
  • If you try to exceed the forward limit (by setting the limit unreasonably large) you may strip an actuator gear head.