Generic Data Acquisition (GDA) Richard Fearn Data Acquisition Diamond Light Source
Outline ● What is the GDA? ● Technologies and architecture ● Scripting ● Configuration ● Demo
What is the GDA? ● Synchrotron control and data collection software ● Developed jointly by: ● Synchrotron Radiation Computing Group (SRCG) at Daresbury ● Data Acquisition Group (DASC) at Diamond
Aims ● Single software framework for all beamlines ● Consistent look and feel ● Processor and operating system independent ● Modular and flexible ● Easily configurable and customisable ● Includes scripting interface ● Interact with third-party hardware and software
Technologies ● Java 6 ● Jython scripting language ● XML configuration ● CORBA ● Many open-source components ● Castor, JacORB, Spring, JScience, Logback...
Architecture GUI Jython terminal Script editor Object Server Jython interpreter Device drivers and controllers Hardware EPICS, socket,... CORBA
Sample control
Experiment control
Data analysis
Scripting ● Jython interpreter embedded in server ● Simple, easy-to-learn syntax ● Allows use of Java libraries ● GUI includes: ● Terminal window for command line interface ● Script editor
Scripting: extended syntax ● Jython interpreter includes a translator ● Instead of: ● pos(myMotor, 10) ● Can type: ● pos myMotor 10
Jython terminal
Scanning ● Many objects are scannables ● detectors, motors,... ● support setting/reading position ● actions performed before/after scan ● 1D scan scan x ● 2D scan scan x y
Example script print “Moving slits...” oldSlitPosition = s1xgap() pos s1xgap 0 print “Opening shutter...” pos shtr1 1 print “Performing first scan...” scan cryox counterTimer01 1 print “Performing second scan...” scan cryox counterTimer01 1 print “Closing shutter...” pos shtr1 0 print “Returning slits to old position...” pos s1xgap oldSlitPosition print “SCRIPT COMPLETE”
EPICS integration class SimpleEpicsScannable(PseudoDevice): def __init__(self, name, pvName): self.name = name self.pvName = pvName self.ca = CAClient() def isBusy(self): return 0 def getPosition(self): return float(self.ca.caget(self.pvName)) def asynchronousMoveTo(self,new_position): self.ca.caput(self.pvName)
Configuration (1) ● XML used to configure GDA ● EPICS interface provided by Controls ● Server XML file ● Specifies motors, detectors, Jython interpreter, etc. ● Client XML file ● Defines panels that appear in the GUI ● Logging configuration
Configuration (2) ● Until now: ● Schema used to validate XML files ● Castor used to create/initialise objects ● Beginning to use Spring ● Increases modularity of GDA ● Allows third parties to add objects
Remote access ● Users increasingly want to carry out experiments remotely ● GDA allows remote access ● Client includes a 'baton' that users can exchange
Open source ● GDA will soon be open source ● Probably using GPL ● Encourage collaboration ● Third parties can develop their own plugins
Demo
Questions?