ESRF Instrument Control Overview

(Speaker J.Klora)

Beam Line Instrument Software Support: G. Berruyer, A. Beteva, M.C. Dominguez, F.Epaud, D. Fernandez, A. Goetz, T. Guenzel, J. Klora, M.C. Lagier, G. Pepellin, S. Peters, V. Rey, F. Sever, D. Spruce

Task

  • Instrument Support for 30 BL -> choice of tools, scripts, installation

Overview

  • Modular setup
  • How could you profit from our developments

SPEC

  • Commercial program from Certified Scientific Software.
  • Instrument control package to move motors, use all kind of detectors (counters, MCA, CCD,)
  • Routines to scan these devices, plot, save the data, work with diffractometers in reciprocal space (n-circle, kappa, z-axis,) etc.
  • Command Line Interface

  • Powerful macro language to automate data taking, powerful data handling routines to analyze data on line.

SPEC at the ESRF

  • The ESRF has a site license (with the source code) for SPEC.

 

SPEC at the ESRF - Some numbers

Number of installations (beam lines and labs)

all beam lines and labs

Number of motors controlled at the ESRF

~3000

Number of counter channels

~1000

Number of different devices

~100

Can it be shared?

  • No- Commercial program. But the developments done for the ESRF will benefit to other customers.
  • Programs and Macros developed at the ESRF can be of course shared. Information in the talk ofGerry Swislowand underhttp://www.certif.com

ESRF SPEC macro development

 

Many macro sets (The "official" ESRF macros written by our group for SPEC are now more than 40000 lines of macro code)

General Hardware support

  • MCA macros (calibration, data taking, saving, ROIs,)
  • CCD macros (calibration, data taking, saving, ROIs,)

General Utilities

  • Plotting to screen and printer
  • Macro handling, setup,

Experimental procedures

  • Continuous scans, extended range scans, time scans,
  • PHI slicing, EDS, refl. search, peak centring

Pseudo motors

Can it be shared?

Low Level Software

Device Server (Taco)

  • Object Oriented Toolkit for distributed Client Server Systems
  • Runs on HP-UX, Solaris, Linux, Windows 95/NT, OS9, VxWorks
  • Talk to VME card in OS9 crate.

     

  • Use of PC hardware and windows driver and library.
  • Clean interface (work as a team).
  • Not every device needs a dedicated server. It is sufficient to have a server for the access port (serial line, gpib, VME memory)
  • The device server concept can also be used to transfer some intelligence from the Unix side (SPEC) to the device server on the front-end.

     

Can it be shared?

Future

  • Use Corba (and DCOM?)

On-line Analysis

  • SPEC can use external programs on-line.

 

  • We have interfaced programs for auto indexing, OM refinement, peak searching and on-line spatial distortion corrections
  • synchronous now -> asynchr.
  • Data exchange as arguments to data_pipe or by usage of shared memory.

Spatial correction distortion

  • Image intensifiers have extreme spatial distortion (up to 100 pixel on 1024x1024 ccd).
  • Background, Floodfield and Spatial distortion correction on-line very fast.

     

     

Algorithm

  • Calculate Look-up table from pixel distribution.

     

  • Writes program to do the whole distortion correction without loops

     

  • Compresses and optimizes this program (5 million instructions) approx. 5 MB RAM space required.

Machine Type

Time [s] Spatial Corr.

(int)

T[s] + flood field + back ground (float)

HP9000/755 /B

1.0

1.5

HP9000/871 D370

0.7

 

Ultra Sparc-1 143 MHz

0.8

1.2

PC 200 MHz Pentium Pro (Linux)

0.4

1.0

PC 266 MHz Pentium II (Linux)

0.35

(1.9)

Can it be shared?

  • YESfor Fit2D - Talk to its AuthorA. Hammersleyorhttp://www.esrf.fr/computing/expg/subgroups/data_analysis/FIT2D
  • YES SOONfor On-line correction - only available on demand for the moment. No documentation yet other than from the command line.
  • On-line correction can work via files or shared memory. The only requirement for the shared memory is a standard header.

On-line Displays

 

  • Camera Display - DIS
  • Multi Channel Analyzer Display - McaTCL
  • Specplot - Scan display
  • Signal Monitoring

Shared memory

  • Very simple header, easy to create.
  • The only synchronization is through the update counter.
  • Data taking program never has to wait but data is not guaranteed.
  • Display program can offer a choice of possible data to display with help of a magic number.

MCA Display - McaTCL

 

y

  • Display spectra
  • Do peak search and calibration.
  • Input from shared memory or files.

Can it be shared?

On-line Display for CCD cameras DIS

  • Fast (4 images 1024*1024 per second)
  • Many features (Cuts, Zoom, Time series, 3D Plots,)

Can it be shared?

  • YES- Documentation and download via WWW soon
  • Needs Motif,XRT Widgets(Hp, Sun, Linux). Binary version can be used without XRT License.
  • People who do not want to use SPEC need to exchange data on-line with shared memory with a standard header.
  • Currently only very few file formats supported (ESRF, Mar, binary)

Specplot

  • Displays scan data
  • Peak search, fit data
  • Extract data
  • Reads standard SPEC files.
  • On-line shared memory part not finished yet.

Can be shared?

Signal Monitoring

  • Signals are values together withsome information about them, which can come from different sources.
  • Signal sources are files, shared memory (our ESRF historical database, the data collector or device servers)

Can it be shared?

  • Not yet available - runs on the ESRF control system.

Graphical user interface on top of SPEC

 

SPEC <-> Interface communication

 

 

Communication Step

Example in TCL

The Interface registers itself

send Builder SB_CONNECT

The Interface tells the Builder which callbacks it can treat

send Builder SB_REGCMD status

The Interface goes into its mainloop.

 

General SPEC GUI

  • Very flexible
  • Built in standard commands (move motors, count, group elements, start/ stop SPEC, display positions)
  • Setup can be saved to disk.
  • Can run multiple sessions of SPEC
  • User defined panels as extra windows or "stuck" to the main window.
  • Simple Interfaces can be written in hours (days)

Examples

Can it be shared?

Overview Graph

Discussion/Future

  • Use Linux on the Front-end computer (VME crate).
  • Why is it so hard to share programs in Instrument Control / Data Acquisition? (Missing documentation, Know-how, Ego)
  • Pool of software modules, Data format,