1 / 16

The Sardana device pool for SPEC lovers BLISS Seminar January 15, 2007

The Sardana device pool for SPEC lovers BLISS Seminar January 15, 2007. Tiago Coutinho - ALBA. Agenda. What is Sardana Guidelines Structure Sardana and other systems Adding new features Examples Current state Future. What is Sardana?.

vito
Download Presentation

The Sardana device pool for SPEC lovers BLISS Seminar January 15, 2007

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007 The Sardana device poolfor SPEC loversBLISS Seminar January 15, 2007 Tiago Coutinho - ALBA

  2. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007 Agenda • What is Sardana • Guidelines • Structure • Sardana and other systems • Adding new features • Examples • Current state • Future

  3. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007 What is Sardana? A software system for instrument control and data acquisition • Client-server architecture • Event driven architecture • Plug-in architecture • Scriptable • Multi-user • Open source Runtime add/update of new SW features • Enables creation of lightweight, platform rich client interfaces: • Java/ATK • IPython • PyQT • C++/QT,C++/MFC • etc Efficient, reliable, time consistent information feedback to the user Easy creation and deployment of new SW features Where have I heard this before?

  4. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007 Guidelines • Long lifetime usage • Core is HW independent • HW specific code written as plug-ins • Performance • Minimize HW calls

  5. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007 HW Configuration Tool Controllers HW Remote PC ... ETH CAN TANGO Device Server HW Client Applications GPIB HW Remote PC SPEC HW .SO Sardana Structure Sardana Configuration API Motors / Pseudo Motors Motor Groups Counters / Pseudo counters MCAs CCDs Measurement Groups Pseudo Motor Lib Controller Lib Lib …

  6. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007 Sardana / SPEC *not yet implemented

  7. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007 Sardana / Tango Abstract classes

  8. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007 Adding new features • Controllers (motor, counter, MCA, CCD, etc.) • Pseudo Motors • Pseudo Counters • Constraints • Languages: • Python • C++ (only for controllers)

  9. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007 IDLE : Motor Controller Skeleton.py class MotorControllerSkeleton(MotorController): """Insert your motor controller description here""" ctrl_extra_attributes = { # insert your extra features here } ctrl_features = [ # insert features supported by your controller here ] def__init__(self,inst,props): MotorController.__init__(self,inst,props) defPreStartAll(self): pass defPreStartOne(self,axis,pos): return True defStartOne(self,axis,pos): pass defStartAll(self): pass . . . class FirePapController(MotorController): ""“An IcePap controller for Sardana""" ctrl_extra_attributes = { } ctrl_features = [‘Encoder','Backlash'] def__init__(self,inst,props): MotorController.__init__(self,inst,props) self.socket_connected = False defPreStartAll(self): pass defPreStartOne(self,axis,pos): return True defStartOne(self,axis,pos): self.GOAbsolute(axis,pos) defStartAll(self): pass . . . IDLE : FirePapCtrl.py Write a new motor controller Example beam topBlade Blade 1 Get the motor controller skeleton Change it to your needs Put it in the right place Create an instance of the controller Create motors Enjoy Sardana Config Interface offset gap topBlade dummy ctrl01 Blade 2 bottomBlade bottomBlade Motor Controller Lib

  10. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007 IPython # ipython Welcome to the IPython Sardana CLI SPEC emulator 1.ISardana> wa Current Positions (user, dial) topBlade 100.00 0.0 bottomBlade 50.00 0.0 gap 50.00 offset 75.00 2.ISardana> mv gap 10 3.ISardana> wa Current Positions (user, dial) topBlade 80.00 -20.0 bottomBlade 70.00 20.0 gap 10.00 offset 75.00 4.ISardana> IDLE : Pseudo Motor Skeleton.py class Slit(PseudoMotor): """A Slit pseudo motor system for controlling gap and offset pseudo motors""" pseudo_motor_roles = ("Gap", "Offset") motor_roles = ("sl2t", "sl2b") class_prop = { 'a_string' : { 'Description' : 'string property example', 'Type' : 'PyTango.DevString', 'DefaultValue' : 'something to print' } } defcalc_physical(self,index,pseudo_pos): print self.a_string half_gap = pseudo_pos[0]/2.0 if index == 0: return raw_offset – half_gap else: return raw_offset + half_gap defcalc_pseudo(self,index,physical_pos): if index == 0: return physical_pos[1] - physical_pos[0] else: return (physical_pos[0] + physical_pos[1])/2.0 IDLE : Slit.py class PseudoMotorSkeleton(PseudoMotor): """Insert your pseudo motor system description here""" pseudo_motor_roles = () motor_roles = () class_prop = { # insert your properties here } defcalc_physical(self,index,pseudo_pos): # insert your code here pass defcalc_pseudo(self,index,physical_pos): # insert your code here pass Write a new pseudo motor Example beam topBlade Blade 1 Get the pseudo motor skeleton Change it to your needs Put it in the right place Create an instance of it Enjoy Sardana Config Interface offset gap topBlade dummy ctrl01 Blade 2 bottomBlade bottomBlade gap offset By the way: This is a 300 line of code example! Pseudo Motor Lib

  11. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007

  12. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007 Server Multi-threaded Pool core Motor Controller Motor Pseudo Motor Motor Group Counter Controller* Counter, Timer* Client IPython (not up to date) Java ATK configuration (up to date) Simulators Motor Controller Counter Controller Motor Controllers: IcePap Current state *Early development stage

  13. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007 geometry library safety static pre-conditions dynamic limit check ... IPython client GUI Plotting Macros windows platform SPEC interaction … Future • data acquisition • counter • timer • pseudo counter • multimeter • MCA • CCD • data storage • ... • scan operations • data acquisition simulator

  14. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007 Thank you for your time Questions

  15. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007 # ipython Welcome to the IPython Sardana CLI SPEC emulator 1.ISardana> wa Current Positions (user, dial) topBlade 100.00 0.0 bottomBlade 50.00 0.0 gap 50.00 offset 75.00 2.ISardana> mv gap 10 3.ISardana> IPython Nice Features Sardana • Add/modify features without having • restart the server • Multiple clients • Copy/paste beamline • configurations

  16. The Sardana device pool for SPEC lovers - BLISS Seminar - January 15, 2007 Sardana Layer IPython ATK BLISS Framework CLI user interface motors, counters, scans, procedures, data files Sardana SPEC Devices, commands, attributes, properties Tango CORBA Network Abstraction Layer

More Related