Status and future of beamline control - a passion for ... · PDF fileStatus and future of...

29

Transcript of Status and future of beamline control - a passion for ... · PDF fileStatus and future of...

Page 1: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz
Page 2: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

Status and future of beamline control software at ESRF

E P illE.Papillon, Beamline Control Unit

Page 3: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

ISDDISDDInstrument Services and Development Divisions

SOFTWARE GROUPA.Goetz

Data Analysis UnitC.Ferrero

Accelerator Control U.JM.Chaize

Beamline Control UnitL.Claustre

Beamline Control Unit (former BLISS)Beamline Control Unit (former BLISS)

Support and Development of beamline control software29 ESRF and 12 CRG beamlines, 6 Laboratories

16 l

E.Papillon, 2010, NSLSII 3

16 people

Page 4: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

O tliOutline

• Beamline control today: • Software architecture• Continuous scans• Continuous scans• Fast 2D detectors• Graphical Interfaces

• Evolution• Conclusion

E.Papillon, 2010, NSLSII 4

Page 5: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

S ft iS ft iSoftware overviewSoftware overview

USERS

B li GUI / O li di l

USERS

Beamline GUI / Online display

SPEC

TACO / TANGO

HARDWARE

Linux / Windows drivers

E.Papillon, 2010, NSLSII 5

Page 6: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

H d iH d iHardware overview :Hardware overview :

Network Linux workstation

Industrial PC / Linux

ICEPAP motor t ll

E.Papillon, 2010, NSLSII 6

VME + Bus Coupler

controller

Detectors

Page 7: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

TACO / TANGOTACO / TANGOControl of distributed hardware

• TACO • TANGOTACO

• Developed at ESRF

TANGO

• Collaboration ESRF, Elettra, Soleil, ALBA, DESY

• Obj. C / RPC• Client and server API in

C/python/matlab/labview/…

DESY• C++ / CORBA• Client and server API in C/C++/python/java

Commands attributes properties• Only commands

Widely used on beamlines:

• Commands, attributes, properties• Multi-thread• Events support

~100 different servers~100 different servers7000+ devices exported7000+ devices exported All new servers in tango

E.Papillon, 2010, NSLSII 7

Page 8: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

What is SPEC for the beamline ?What is SPEC for the beamline ?

• Command Line Interface• Main sequencerq• Handle diffractometers geometries• Device controller:

• Integrated in SPEC• Integrated in SPEC• Taco interface:

• Motors / Counters• MCA / CCD• MCA / CCD

• Generic Interface to:• Serial Line• GPIB• GPIB• Socket• Taco / Tango

E.Papillon, 2010, NSLSII 8

Page 9: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

SPECSPEC macros

• Macro motors:• Physical : ICEPAP (socket), piezo (GPIB), …• Calculational : slit offset/gap, 3 legs table, …

M t• Macro counters:• Physical : eurotherm, lakeshore, … • Calculational : ratio, attenuators transmission, …

• Other Macros:• Other type of devices : beam shutters, filter box, …• New sequences : exafs scans gap scans• New sequences : exafs scans, gap scans, …

Very flexible : many devices/sequences written

E.Papillon, 2010, NSLSII 9

limited data types, no debugger, no multi-threads

Page 10: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

Continuous scansContinuous scans

• From SequentialMOVE

• From SequentialEXPOSURE

READOUTTime

• To Paralell MOVE

EXPOSURE

P i l I

EXPOSUREREADOUT

Time

• Practical Issues

• Synchronization• Data Buffering

• Distributed System• Multiple detectors

E.Papillon, 2010, NSLSII 10

• Data BufferingMultiple detectors• Short exposure time

Page 11: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

Continuous scans : synchronizationContinuous scans : synchronization

• By software : S h i h i i i d i l h• Synchro. with time: no wiring, good on single host

• By hardware : • Needs wiring, good for distributed hosts• Synchro. with time : P201, OPIOM boardsSynchro. with time : P201, OPIOM boards• Need more : motor position, mixed time/position, …

MUSST board

• Very flexible event generator• 6 x input signals :

Di it l t

MUSST board

• Digital counter• Analog• Positioning (motor steps and encoders)

• 16 x digital I/O• Host Interface : GPIB

E.Papillon, 2010, NSLSII 11

Page 12: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

C ti d t b ff iContinuous scans : data buffering• Software implementation : HOOK

• Kernel driver + TACO device server• Hardware readout + buffering• For In-house developed hardware

• PCI and VME boards• PCI and VME boards• Software event generator

• Hardware implementation : MUSST• Hardware implementation : MUSST• Encoders, motor steps• Counters, ADC• Canberra MCA (ICB)Canberra MCA (ICB)

• Data handling:• SPEC polls data buffersSPEC polls data buffers• Counters / motors saved by SPEC

E.Papillon, 2010, NSLSII 12

Page 13: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

C ti d t tContinuous scans : detectors

• Canberra MCA (ICB)10 / t• Data buffering on MUSST

• XIA XMAP• PXI board – 4 channels

10 ms / spectra

• PXI/PCI bus coupler• External sync. Signal• 4MB memory / board

1 ms / spectra(one board)

y• Data buffering in TACO

Spectras saved by device serversyIntegrated ROIs transferred to SPEC (online plotting)

Configuration issues

E.Papillon, 2010, NSLSII 13

Configuration issuesNo generic counter interface

Page 14: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

2D d t t2D detectors

• TACO CCD interface in SPEC• Many CCDs supported:

• Princeton, Sensicam, PCO, Andor, Photonic Science, …• Standard macro set• Standard macro set• Beam parameters, Multi-frame buffer, Parallel saving, …

× Per device development

LIMA: Library for Image Acquisition

• Reuse of common code generic procedures + interfaces• Support recent fast detectors

E.Papillon, 2010, NSLSII 14

Page 15: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

2D d t t LIMA2D detectors: LIMA• Hardware layer• Control layer

• Software “features” fallback if hardware has limited capabilities:• RoI, Binning, Frame Accumulation

• Basic processing and data reduction:• Beam parameters, RoI statistics, parallel saving, dark substraction…

• Specific data reduction algorithms through “plug-ins” (C++)• Low level: C++ (multi-threaded)• High level: C++ / Python (SIP)

• Generic TANGO interface + detector configuration• Currently integrated: Pilatus, Frelon, Maxipixy g p

E.Papillon, 2010, NSLSII 15

Page 16: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

2D d t t ESPIA d2D detectors : ESPIA card

• Designed to interface the FReLoN 2k• Collaboration ESRF + SECAD, S.A.• 2 Gbps fiber optic link (> 100 m)• PCI 64 bits / 66 MHz• ~180 MB/s maximum data rate• FOCLA : 2xCameraLink connectors

FReLoN HD (PSB-2)2048 x 1024 @ 32 fps ~125 MB/s

E.Papillon, 2010, NSLSII 16

Page 17: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

2D d t t M di i 2 / M i i2D detectors : Medipix2 / Maxipix

• Pixel detector photon countingp g• 256 x 256 – 13 bit• 0.3 ms readout time• Max: 1400 fps 180 MB/s

M i i M di i 2 5 1 2 2• Maxipix: Medipix2 array 5x1,2x2• Image reconstruction in LIMA

1000 fps 650 MB/s1000 fps 650 MB/sESPIA next generation:

PCI-Express 8x lanesEspia4 fiber optic links @ 250 MB/s 1 GB/s

E.Papillon, 2010, NSLSII 17

Espia

Page 18: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

Online DisplayOnline Display•• Standalone tool for visualisation (python/Qt)Standalone tool for visualisation (python/Qt)

W k liW k li SPECSPEC h dh d•• Work online : use Work online : use SPECSPEC shared memoryshared memory•• Work offline : Work offline : specfilesspecfiles, , edfedf files, files, hdfhdf filesfiles

E.Papillon, 2010, NSLSII 18

PyMCAOxidis

Page 19: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

Beamline GUI : BlissFrameworkBeamline GUI : BlissFramework• Written in python/Qt – MVC architecture• GUI application is made of “cemented” bricksGUI application is made of cemented bricks• Communication to SPEC: server mode

• Socket interface• SpecClient python module• SpecClient python module

• First GUI: MxCube (MaxLab, Soleil, Bessy)

Hardware Repository Hardware Repository Hardware Repository Hardware Repository serverserver

SpecSpec SpecSpec

Cli tCli t

GUI applicationGUI application

TacoTacoTangoTango

DSDS

ClientClient

Taco/Taco/TangoTango

PollerPoller Hardware Objects poolHardware Objects pool

Hardware ObjectHardware Object GUI brickGUI brick

E.Papillon, 2010, NSLSII 19

PollerPoller Hardware Objects poolHardware Objects pool

Page 20: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

Beamline GUI : exampleBeamline GUI : example

E.Papillon, 2010, NSLSII 20

Page 21: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

Beamline GUI : exampleBeamline GUI : example

E.Papillon, 2010, NSLSII 21

Page 22: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

E l ti iEvolution : on-going

• Common 2D detectors framework : LIMACommon 2D detectors framework : LIMA• More detectors to come• New interface in spec

• More beamline GUI:• BlissFramework4 readyy• First application : BioSaxsCube

TANGO to replace TACO whenever possible• TANGO to replace TACO whenever possible• Hardware upgrade : replace VME

E.Papillon, 2010, NSLSII 22

Page 23: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

E l tiEvolution

• Integrated beamline configuration toolg g• Continuous scans

• Easier integration on beamlineE i i t ti f d t t• Easier integration of detectors

• New data format:New data format:• Specfiles + EDF Files HDF5

• Experiment database : ISpyB ??

• keep SPEC ??

E.Papillon, 2010, NSLSII 23

Page 24: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

E l ti lt ti t SPECEvolution : alternatives to SPEC

• Evaluation of 3 control systems:

• GDA (diamond)• GDA (diamond)• Most advanced solution

• SARDANA (alba)( )• Based on already used tools (python, qt, tango)• No beamline yet

• In house solution• In-house solution

E.Papillon, 2010, NSLSII 24

Page 25: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

C l iConclusion

Keep improving existing system• Keep improving existing system

M i t i t f i b li• Maintain support of running beamlines

• Prepare new upgrade beamlines (start in 2011)

• Investigate new solutions

E.Papillon, 2010, NSLSII 25

Page 26: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

Thank you!

E.Papillon, 2010, NSLSII 26

Page 27: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

E.Papillon, 2010, NSLSII 27

Page 28: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

Continuous scansContinuous scans

DISPLAYconfiguration

start event storage

SPEC XMAP TACO

HW trigger

data bufferingd t lli

XMAPHOOKPCI / VME

data polling

datafiles

XMAPPXI crate

Motor

boards

MotorEncoder

E.Papillon, 2010, NSLSII 28

Page 29: Status and future of beamline control - a passion for ... · PDF fileStatus and future of beamline control ... Instrument Services and Development Divisions SOFTWARE GROUP A.Goetz

2D d t t C Li k2D detectors : Camera Link

• FOCLA module• Connects to ESPIA• 2 X Camera Link connectors• Multiple pixel packing formatsMultiple pixel packing formats• Test image generator @ ~180 MB/s

1 60• Dalsa Pantera 1M60• Frame transfer technology• 1024 x 1024 @ 60 fps 120 MB/s@ p

• Sarnoff CAM512• 2 x 8 ADCs – 12 bit

512 512 @ 300 f 150 MB/• 512 x 512 @ 300 fps 150 MB/s• 512 x 128 @ 500 fps 125 MB/s

E.Papillon, 2010, NSLSII 29