PXRR Technical Documents
protein
crystallography
research resource

A Primer on the Use and Function of EPICS MEDM Motor Control Interfaces

Launch
MEDMs
At all PXRR beamlines the EPICS motor control GUIs, the famous MEDMs, can be invoked by pxuser on the beamline's server from the epx_setup directory. The Motif Editor and Display Managers (MEDMs) provide access to all EPICS-controlled motors of a beamline, including those under control of the EPICS instance running in the VME crate and those under control of the instance running on the server. Complete lists of motors and their groupings will be provided in the beamline's documentation pages.

Here we have a look at a typical example: the detector distance drive at X12B. It is part of the group of 8 motors in the motor8_1 control interface that is launched as follows:

  • Log into x12b-h as pxuser:
    ssh pxuser@x12b-h.nsls.bnl.gov
  • Move to the EPICS user directory:
    cd epx_setup
  • Start the MEDM of the motor group that includes the detector drive:
    motor8_1
The group of 8 MEDMs shown at the top of this page appears. Note, that its launcher window will auto-erase within seconds. When no longer needed MEDMs are removed from the screen with the [x]. This has no impact on motor or EPICS function.


MEDM
Anatomy
Each motor's MEDM provides information fields, called out to the left side in the figure below, and action fields that are explained on the right hand side. During operation, the Readback Value and the Motor Status change frequently. The Readback value reports the current excursion of a motor in engineering units.

Move motor to absolute target: Entering a new drive value, when uploaded by an 'Enter' keystroke, will immediately start a motor moving to this target. This is a motor movement to an absolute target.

Move motor by incremental tweaks: Small motor movements on a relative scale, so-called tweaks, are initiated by pressing the < or > carrots. Before hitting the tweak buttons it is prudent to note the tweak step size. New, and typically small values are uploaded from the tweak size field with the 'Enter' key .

Stop halts just one motor. Stops or aborts do not need resets of any kind and can be followed by drive or tweak commands.

Abort should kill all ongoing motions on the beamline.


Motor
Status

Done move: A motor status may be 'done move' (panel 1 above) which in our implementation unfortunately in shown as a black blank status field. An idle motor has the 'done move' status.

Moving: When a motor is happily moving, the green 'Moving' status appears and the readback value is continuosly updating (panel 2). A 'Moving' status combined with a static readback display indicates a hung state. It can usually be fixed by 'touching' the motor with a click of tweak carrot.

Soft limit: The yellow 'soft limit' state (panel 3) indicates that a drive value was entered that is outside the range defined by the motor's soft limits. When a motion target entered as new drive value or tweak is out-of-range the motor will not begin to move. The section below on Setup MEDM explains how to set or reset soft limits.

Hard limit: A red bar in the readback value field (panel 4) indicates that a motion ran into a limit switch. The motion can be eased off a limit by moving it by tweak of by entering a suitable drive value. However, under these circumstances it is always a good idea to pause and visually inspect the out-of-range motion.

Motor stati can also be read on demand by the EPICS channel access utility Probe.


More
Displays
Additional MEDM control screens are accessible in the pull down menu at the 'Related displays' button next to More.

The Help screen is a useful but hard to read version of the MEDM's anatomy explained above.

The Setup MEDM screen is essential for beamline operation. It provides an IO-path to tighten or relax software limits. Further it allows one to verify that the important motor parameters are set correctly.

The All display is an expanded version of the Setup display with all its attendant complications, and More provides MEDMs in various formats from All to tiny.


Setup
MEDM
The Setup MEDM fully characterizes a motor and its operation. In this primer, which is concerned with motor operation, I only discuss its Limits and its Calibration fields. Complete records of the motor setup parameters, i.e. its dynamics, resolution, and readback fields are given in the beamline's 'Motor Setup Parameters' page, which is part of the line's Technical Documentation.

Calibration:
Dial: In most cases motors are operated without offset values. Off in the Calibration field is then zero. The scale for readback and drive value of a non-offset motor is the Dial. Note: small offsets accumulate in motors under CBASS control. If these are small, i.e. at or below the Deadband, the motor is considered as having no offset.

User: By contrast, a motor with an offset scale (Off≠0) reports readback values and receives drive target values on the User scale. Monochromator drives usually have offset values that resulted from mono-calibrations in CBASS at the Se absorbtion edge. In addition, jacks of kinematical diffractometer tables also typically have offsets resulting from table leveling at beam height.

Limits: Soft limits are defined in the User and Dial coordinate systems just described. The User scale is offset by the Off-value from a motor's native Dial scale. Therefore, when resetting soft limits on a motor with no offset enter the new values in the Dial columns. For motors with offsets (mono, table jacks) enter new soft limits in the User columns.

Updated 5 Sep 2006 Security Notice   Webteam   Site Map   Bio   PXRR   NSLS   BNL