duPont-M2 TCP/IP Interface


2016-05-11: v1.0
2016-04-07: draft


Protocol

  • All communications are initiated by the client software.
  • Commands are terminated by a 'LF' (0x0a) character.
  • Responses are terminated by a 'LF' (0x0a) character.
  • All commands will be "immediately" answered by the M2-GUI (non-blocking).

  • Status Requests

    command: version
    Request the M2-GUI version string.
    response: 0.9 (0078)
    or similar [version (build)].

    command: status
    Request the current system status.
    response: State={DONE,MOVING,ERROR} Ori=#,#,#,#,# Lamps={off,string} Galil={on,off}
    State=ERROR: an error occured during the last move.
    Ori: focus[um],tip["],tilt["],X[um[,Y[um]
    Lamps: 'string' is the combination of all lamps that are on.
    Galil: motor controller power status.

    command: focus
    Request the current focus position.
    response: {#,MOVING}
    #: the current focus value (floating point value between 0 and 25000.0 um).
    MOVING: the mirror is currenly moving.

    command: getlamps
    Request the (8) calibration lamp labels and states.
    response: -=-1 -=-1 -=-1 -=-1 -=-1 -=-1 HeAr=0 Ne=0
    Label: A '-' indicates that the lamp at that position is not available.
    State: '0'=off, '1'=on, '-1'=N/A.

    command: lamps
    Request the curent calibration lamps status.
    response: {off,string}
    The return is either "off" or a concatenation of the labels of all lamps that are currently on (eg. HeNeAr).

    command: speed
    Request the actuator motor speed.
    response: 25.0

    command: galil
    Request the power status of the Galil motor controllers.
    response: {on,off}


    Motion (Set) Commands

    All motion commands return one of the following three responses:
    OK: command accepted
    ERROR: INVALID invalid position requested
    ERROR: MOVING the mirror is already moving
    command: move # # # # #
    Move the mirror to the {focus,tip,tilt,x,y} position [um,arcsec].
    response: {OK,ERROR}

    command: offset # # # # #
    Move the mirror by the requested amounts [um,arcsec].
    response: {OK,ERROR}

    command: focus #
    Move the mirror to the requested focus (piston) position.
    response: {OK,ERROR}

    command: dfocus #
    Move the mirror focus (piston) by the requested amount [um].
    response: {OK,ERROR}

    command: galil {on,off}
    Switch the power to the Galil motor controllers.
    response: {OK,ERROR}

    command: stop
    Stops all actuator movements immediately.
    response: {OK}

    command: lamp # #
    response: {string,ERROR}
    'string' is either "off" or a concatenation of the labels of all lamps that are currently on (eg. HeNeAr).


    M2-GUI documentation