spec

Software for Diffraction

5.5.5.3. - Linked Configurations



An installation such as a synchrotron beamline uses many motors with most associated with beamline control. Spectrometers used for particular experiments have motors that aren't used in other experiments. To avoid having to merge the motor configurations and settings from one set of files to another when the spectrometer is changed, you can set things up so that a single version of the config and settings files will describe a number of different spectrometers. Here is how to set up the files:

  • If you already have several geometry configurations installed, you should make backup copies of the config and settings files from the current geometries.

  • If you already have several geometry configurations installed, remove the config and settings files from all but one of the geometry directories. Save the config file that has the most motors, as you will have to add motors from the other geometries to the remaining config file.

  • Set up hard links in all the geometry directories so that the config and settings in all the geometry directories refer to the same file. For example, if the files already exist in the fourc directory, use the commands
    ln fourc/config surf/config
    ln fourc/settings surf/settings
    
    to create hard links in the surf directory. Don't use symbolic links.

  • Edit the config file by hand to add new control lines that assign numbers to the different geometries. These control lines must be before the lines that assign motor information. The format of the geometry control lines is as follows:
    GEO0 = common
    GEO1 = fourc
    GEO2 = surf
    GEO3 = fivec
    etc.
    
    The parameter GEO0 always refers to the motors that are common to all the geometries. Subsequent lines assign consecutive numbers to the other geometries.

  • Now run edconf. The motor screen will have a new field that lets you assign a spectrometer geometry to each motor or to make the motor in common with all the spectrometers. You can do the same for each scaler on the scaler screen (as of release 4.03.12).

    The hard links must be maintained for the shared config and settings file scheme to work. You can safely use vi and cp to manipulate the files. However, using mv will destroy the links, as will some text editors.

    When running edconf with a geometry directory as an argument or when invoking the config macro from spec, use the G command to toggle between displaying all the motors and scalers in the config file and just those motors and scalers used by the given geometry.