IFUM (RaspberryPi) Commands
- 2024-05-22: IFUS_CALIBRATE
- 2022-09-23: CRADLESTATE always returns 'NONE'
- 2022-06-03: updated the SLIT command
- 2022-05-09: reverted to the M2FS order of the LEDs:
UV, BL, Vis, NR, FR, IR
- 2022-04-22: IFU hardhat commands
- 2022-04-20: added the SLITS_HARDHAT command
- 2022-03-02: added the SLITS_SLITPOS command
- 2021-11-29: re-order LED values:
FR, NR, IR, Vis, BL, UV
- 2020-02-21: 15 temperatures, "IFU"--"IFUS"
-
- 2020-01-27: added the MODE command
- 2019-09-25: updated the IFU command(s)
, updated the OCC command(s)
, updated the SLIT command
- 2019-08-22: 3 calibration lamps (was 6)
- 2019-07-11: minor changes
- 2019-06-14: initial draft
Protocol
- All communications are initiated by the IFUM-GUI.
- Commands are terminated by a 'LF' (0x0a) character.
- Responses are terminated by a 'LF' (0x0a) character.
- Multi-line responses shall be separated by (0x0d) characters.
- All commands will be "immediately" answered by the
RaspberryPi (small delays upto 2 seconds are acceptable).
- The Galil motor controllers have a concurrency limit of four axis.
- If the IFUM-GUI attempts to start more than four motions simultaneously
the RaspberryPi software will respond with an "ERROR".
- Response strings to motion commands:
- "OK"
- "!ERROR some explanation" (syntax error)
- "ERROR some explanation" (eg. hardware malfunction or
the command cannot be executed at this time)
- Response strings to status requests:
- "#" (where '#' may be a space separated list of values)
- "MOVING"
- "INTERMEDIATE"
- "UNCALIBRATED"
- "UNKNOWN"
- "!ERROR some explanation" (syntax error)
- "ERROR some explanation" (eg. hardware malfunction)
Commands
Parameter types:
- {a,b,c}: a list of possible values
- {a-b}: a range of values
- # a single value
- # # #: a list of values (space separated)
IFU Selector
Occulter
Disperser Slide
LoRes
HiRes
Focus
Filter
Slits
Caibration Lamps
Other
IFU Selector
- command: IFUS {HR,STD,LSB,STOW}
- response: {OK,ERROR}
- command: IFUS ?
- response: {HR,STD,LSB,STOW,INTERMEDIATE,MOVING,ERROR} #
- position name and encoder value
- command: IFUS_MOVE #
- response: {OK,ERROR}
- Moves the IFU to encoder position '#'
- command: IFUS_IFUPOS {HR,STD,LSB,STOW} #
- response: {OK,ERROR}
- command: IFUS_IFUPOS {HR,STD,LSB,STOW} ?
- response: {#,ERROR}
- set (#) or request (?) the encoder value of the named IFU position
- command: IFUS_ALARM ?
- response: alarm text string (may be long)
- command: IFUS_ALARM CLEAR
- response: {OK,ERROR}
- retrieve or clear the IFU alarm string
- command: IFUS_CALIBRATE
- response: {OK,ERROR}
- Calibrate the IFU selector. Should finish in the "Stow" position.
Occulter
- command: OCC {H,S,L} #
- response: {OK,ERROR}
- range: TBD
- command: OCC {H,S,L} ?
- response: {#,MOVING,UNCALIBRATED,ERROR}
- command: OCC_STEP {H,S,L} #
- response: { OK,ERROR }
- This commands the occulter to move by a step amount ('#')
- command: OCC_CALIBRATE {H,S,L}
- response: {OK,ERROR}
- Causes the occulter to execute a calibration routine.
Disperser Slide
- command: GES {R,B} {LORES,HIRES,LRSWAP}
- response: {OK,ERROR}
- Note: "LRSWAP" will automatically move the LO-Elevation to
a special angle suitable for swapping the grating.
- command: GES {R,B} ?
- response: {LORES # #,
HIRES # #,
LRSWAP # #,
INTERMEDIATE # #,
UNCALIBRATED,
MOVING}
- '# #' are the encoder value and the step position respectively.
- Note: "LASTKNOWN" may be appended to the return if the
status is read back from a file.
- command: GES_CALIBRATE {R,B}
- response: {OK,ERROR}
- Causes the disperser slide to execute a calibration routine.
After the calibration is done the state becomes 'INTERMEDIATE'
with a 'step' value of '0'.
- command: GES_MOVE #
- response: {OK,ERROR}
- Note: TBD "nudge" command
LoRes Elevation
- command: LREL {R,B} {a-b}
- response: {OK,ERROR}
- range: TBD
- command: LREL {R,B} ?
- response: {#,MOVING,UNCALIBRATED}
- Note: "LASTKNOWN" may be appended to the return if the
status is read back from a file
- command: LREL_CALIBRATE {R,B}
- response: {OK,ERROR}
- Causes the LoRes Elevation to execute a calibration routine.
During the motion a 'LREL ?' returns 'MOVING', afterwards '0'.
HiRes Azimuth
- command: HRAZ {R,B} {a-b}
- response: {OK,ERROR}
- range: TBD
- command: HRAZ {R,B} ?
- response: {#,MOVING,UNCALIBRATED}
- Note: "LASTKNOWN" may be appended to the return if the
status is read back from a file
- command: HRAZ_CALIBRATE {R,B}
- response: {OK,ERROR}
- Causes the HiRes Azimuth to execute a calibration routine.
During the motion a 'HRAZ ?' returns 'MOVING', afterwards '0'.
HiRes Elevation
- command: HREL {R,B} {a-b}
- response: {OK,ERROR}
- range: TBD
- command: HREL {R,B} ?
- response: {#,MOVING,UNCALIBRATED}
- Note: "LASTKNOWN" may be appended to the return if the
status is read back from a file
- command: HREL_CALIBRATE {R,B}
- response: {OK,ERROR}
- Causes the HiRes Elevation to execute a calibration routine.
During the motion a 'HREL ?' returns 'MOVING', afterwards '0'.
Focus
- command: FOCUS {R,B} {a-b}
- response: {OK,ERROR}
- range: TBD
- command: FOCUS {R,B} ?
- response: {#,MOVING #}
- While the focus is moving the current encoder reading
is appended to the 'MOVING' string.
Filter
- command: FILTER {R,B} {1-18}
- response: {OK,ERROR}
- 9: CHANGE 10: NONE
- 11-18: move to positions 1-8 but do not insert the filter.
- command: FILTER {R,B} ?
- response: {#,MOVING,INTERMEDIATE,UNKNOWN} # # #
- Engineering commands:
- command: FILTER_MOVE {R,B} #
- response: { OK,ERROR }
- This commands the filter inserter to move by a step amount ('#')
if the elevator is in a safe position.
Slits
- command: SLIT {R,B} {H180,S300,S80,L300,L180,L80}
- response: {OK,ERROR}
- command: SLIT {R,B} ?
- response: {name,MOVING,INTERMEDIATE,ERROR} # #
- Engineering commands: (start with SLITS_)
- command: SLITS_SLITPOS {R,B} {UP,DOWN,PIPE} ?
-
- response: {# # # # # # , ERROR}
- command: SLITS_SLITPOS {R,B} {UP,DOWN,PIPE} # # # # # #
-
- response: {OK , ERROR}
- command: SLITS_HARDHAT {R,B}
- response: {# # # # # # , ERROR}
- The 6 numbers are pipe position, pipe error, pipe tolerance,
height position, height error, height tolerance.
Calibration Lamps
- command: BENEAr {0-10,?}
- response: {OK,ERROR,#.##}
- command: LIHE {0-10,?}
- response: {OK,ERROR,#.##}
- command: THXE {0-10,?}
- response: {OK,ERROR,#.##}
- Note:The return value to '?' is a floating point number.
LEDs
- command: MCLED # # # # # #
- response: { OK,ERROR}
- command: MCLED ?
- response: {# # # # # #,ERROR}
- An ordered list of values (0-4096) for UV, Blue, Visible, N-Red, F-Red, IR.
Slit Shoe Assignment
- command: CRADLESTATE ?
- response: CRADLE_R=string CRADLE_B=string
- where 'string' is one of {SHOE_R,SHOE_B,NONE}
- Note: In IFUM mode the rPi always returns 'NONE'.
Instrument Temperatures
- command: TEMPS
- response: {# # # # # # # # # # # # # # #,ERROR}
- An ordered list
[IFU_Entrance, IFU_Top, Fiber_Exit, IFU_Motor, IFU_Drive, IFU_Hoffman, IFU_Shoebox,
CradleR/B, EchelleR/B, PrismR/B, LoResR/B]
of 15 floating point numbers.
Any temperature [Celsius] may be replaced by an 'U' (UNKNOWN) if it
is currently not available.
Instrument Status
- command: STATUS
- response: A list of strings separated by '\r' [CR].
Each string consists of one or more key:value
pairs separated by a ' ' [SPACE].
RaspberryPi Software version
- command: VERSION
- response: string
- The version of the director.
GUI connection and Shutdown
- command: MODE {M2FS,IFUM}
- response: {OK, ERROR}
- Informs the RaspberryPi software what instrument mode
to use. This may fail if the wrong instrument is connected.
- command: GUICLOSING
- response: OK
- Informs the RaspberryPi software that the
M2FS-GUI will close.
- command: SHUTDOWN
- response: OK
- Exit the RaspberryPi software.