Tango at Hasylab Version March 19, 2015 Contents 1 The Introduction 17 2 What to do, if ... 2.1 ... you get an error in the installation of Tango v 6.0.0 in Linux computers . . . . . . . . . . . . . . . 18 18 3 News 19 4 General Remarks 4.1 The Installation . . . . . . . . . 4.1.1 The Base System on Linux 4.1.2 PyTango . . . . . . . . . 4.2 Attributes . . . . . . . . . . . . . 4.2.1 float scalar . . . . . . . . 4.2.2 string scalar . . . . . . . . 4.3 States . . . . . . . . . . . . . . . 4.4 Performance . . . . . . . . . . . . 4.4.1 cpp . . . . . . . . . . . . 4.4.2 Python . . . . . . . . . . 5 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 20 20 22 23 23 24 24 25 25 26 How to ... 5.1 ... read xml files in Qt . . . . . . . . . . . . 5.2 ... change attributes from inside the server . . 5.3 Use a spectrum-of-strings attribute in a server 5.4 Use a spectrum-of-strings attribute in a client 5.5 ... overwrite the default State method . . . . 5.6 ... change the configuration of one attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 27 28 29 29 31 31 Motor Servers 6.1 Introduction . . . . . . . 6.2 AbsorberController . . . 6.2.1 Properties . . . . 6.2.2 States . . . . . . 6.2.3 Commands . . . 6.2.4 Attributes . . . . 6.2.5 Client examples . 6.2.6 How to ... . . . . 6.3 Analyzer . . . . . . . . . 6.3.1 Properties . . . . 6.3.2 States . . . . . . 6.3.3 Commands . . . 6.3.4 Attributes . . . . 6.3.5 Client Example . 6.4 AnalyzerEP01 . . . . . . 6.4.1 Properties . . . . 6.4.2 States . . . . . . 6.4.3 Commands . . . 6.4.4 Attributes . . . . 6.5 AttoCube . . . . . . . . 6.5.1 AttoCubeCtrl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 33 33 33 33 33 34 34 36 36 37 37 37 37 37 43 44 44 44 44 44 44 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 6.6 6.7 6.8 6.9 6.10 6.11 6.12 6.13 6.14 6.15 6.5.2 AttoCubeMotor . . . . . . . . . . . . . . . . . . . . . 6.5.3 Example Clients . . . . . . . . . . . . . . . . . . . . 6.5.4 How to ... . . . . . . . . . . . . . . . . . . . . . . . . AttoCubeANC300 . . . . . . . . . . . . . . . . . . . . . . . 6.6.1 AttoCubeANC300Ctrl . . . . . . . . . . . . . . . . . 6.6.2 AttoCubeANC300Motor . . . . . . . . . . . . . . . . 6.6.3 Example Clients . . . . . . . . . . . . . . . . . . . . 6.6.4 How to ... . . . . . . . . . . . . . . . . . . . . . . . . AttributeMotor . . . . . . . . . . . . . . . . . . . . . . . . . 6.7.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . 6.7.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . 6.7.3 Commands . . . . . . . . . . . . . . . . . . . . . . . 6.7.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . 6.7.5 Example . . . . . . . . . . . . . . . . . . . . . . . . DiffracMuP09 . . . . . . . . . . . . . . . . . . . . . . . . . . 6.8.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . 6.8.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . 6.8.3 Commands . . . . . . . . . . . . . . . . . . . . . . . 6.8.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . EcovarioServoMotor . . . . . . . . . . . . . . . . . . . . . . 6.9.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . 6.9.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . 6.9.3 Commands . . . . . . . . . . . . . . . . . . . . . . . 6.9.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . FMBOxfDCM . . . . . . . . . . . . . . . . . . . . . . . . . . 6.10.1 FMBOxfDCMCtrl . . . . . . . . . . . . . . . . . . . 6.10.2 FMBOxfDCMEnergy . . . . . . . . . . . . . . . . . 6.10.3 FMBOxfDCMMotor . . . . . . . . . . . . . . . . . . 6.10.4 FMBOxfDCMEnergy (version using PLCs in PMAC) 6.10.5 Example Clients . . . . . . . . . . . . . . . . . . . . 6.10.6 How to ... . . . . . . . . . . . . . . . . . . . . . . . . Focusing Mirror P02 . . . . . . . . . . . . . . . . . . . . . . 6.11.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . 6.11.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . 6.11.3 Commands . . . . . . . . . . . . . . . . . . . . . . . 6.11.4 Scalar Attributes . . . . . . . . . . . . . . . . . . . . GalilDMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.12.1 GalilDMCCtrl . . . . . . . . . . . . . . . . . . . . . 6.12.2 GalilDMCMotor . . . . . . . . . . . . . . . . . . . . 6.12.3 GalilDMCSlit . . . . . . . . . . . . . . . . . . . . . . 6.12.4 Example Clients . . . . . . . . . . . . . . . . . . . . 6.12.5 How to ... . . . . . . . . . . . . . . . . . . . . . . . . Hexapod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.13.1 HexapodCtrl . . . . . . . . . . . . . . . . . . . . . . 6.13.2 HexapodConfig . . . . . . . . . . . . . . . . . . . . . 6.13.3 HexapodMotor . . . . . . . . . . . . . . . . . . . . . 6.13.4 Example Clients . . . . . . . . . . . . . . . . . . . . 6.13.5 How to ... . . . . . . . . . . . . . . . . . . . . . . . . KohzuSC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.14.1 KohzuSCCtrl . . . . . . . . . . . . . . . . . . . . . . 6.14.2 KohzuSCAxis . . . . . . . . . . . . . . . . . . . . . . 6.14.3 KohzuSCMultiAxis . . . . . . . . . . . . . . . . . . . 6.14.4 Example Clients . . . . . . . . . . . . . . . . . . . . 6.14.5 How to ... . . . . . . . . . . . . . . . . . . . . . . . . LensesBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.15.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . 6.15.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . 6.15.3 Commands . . . . . . . . . . . . . . . . . . . . . . . 6.15.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . 6.15.5 Client examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 47 47 47 47 47 48 48 48 48 49 49 49 49 49 49 49 50 50 50 50 50 50 50 51 51 51 54 56 58 58 58 58 58 58 58 58 58 59 60 61 61 61 61 61 62 63 63 63 63 64 66 67 67 67 67 67 67 67 68 6.15.6 How to ... . . . . . . . . . . . 6.16 LOM, the large offset monochromator 6.16.1 LOM . . . . . . . . . . . . . 6.16.2 LOMENERGY, P08, 1250 . . 6.16.3 LOM500ENERGY, P03 . . . 6.17 Meta Motor . . . . . . . . . . . . . . 6.17.1 Properties . . . . . . . . . . . 6.17.2 States . . . . . . . . . . . . . 6.17.3 Commands . . . . . . . . . . 6.17.4 Attributes . . . . . . . . . . . 6.17.5 Further developments . . . . . 6.17.6 Clients . . . . . . . . . . . . 6.18 MirrorP02 . . . . . . . . . . . . . . . 6.18.1 Properties . . . . . . . . . . . 6.18.2 States . . . . . . . . . . . . . 6.18.3 Commands . . . . . . . . . . 6.18.4 Attributes . . . . . . . . . . . 6.19 MirrorP09 . . . . . . . . . . . . . . . 6.19.1 Properties . . . . . . . . . . . 6.19.2 States . . . . . . . . . . . . . 6.19.3 Commands . . . . . . . . . . 6.19.4 Attributes . . . . . . . . . . . 6.20 Multilayer Monochromator Energy . . 6.20.1 Properties . . . . . . . . . . . 6.20.2 States . . . . . . . . . . . . . 6.20.3 Commands . . . . . . . . . . 6.20.4 Attributes . . . . . . . . . . . 6.21 MMC100Micos . . . . . . . . . . . . 6.21.1 MMC100MicosCtrl . . . . . 6.21.2 MMC100MicosAxis . . . . . 6.22 MonoP04 . . . . . . . . . . . . . . . 6.22.1 Properties . . . . . . . . . . . 6.22.2 States . . . . . . . . . . . . . 6.22.3 Commands . . . . . . . . . . 6.22.4 Scalar Attributes . . . . . . . 6.23 MonoUndSynchronMotor . . . . . . . 6.23.1 Properties . . . . . . . . . . . 6.23.2 States . . . . . . . . . . . . . 6.23.3 Commands . . . . . . . . . . 6.23.4 Scalar Attributes . . . . . . . 6.24 MultipleMotors . . . . . . . . . . . . 6.24.1 Properties . . . . . . . . . . . 6.24.2 States . . . . . . . . . . . . . 6.24.3 Commands . . . . . . . . . . 6.24.4 Attributes . . . . . . . . . . . 6.24.5 Example . . . . . . . . . . . 6.25 NewFocus . . . . . . . . . . . . . . . 6.25.1 NewFocusCtrl . . . . . . . . 6.25.2 NewFocusDriver . . . . . . . 6.25.3 NewFocusPicomotor . . . . . 6.26 OMS VME58 . . . . . . . . . . . . . 6.26.1 Properties . . . . . . . . . . . 6.26.2 States . . . . . . . . . . . . . 6.26.3 Commands . . . . . . . . . . 6.26.4 Attributes . . . . . . . . . . . 6.26.5 Example Clients . . . . . . . 6.26.6 How to ... . . . . . . . . . . . 6.27 PhaseRetarderP09 . . . . . . . . . . . 6.27.1 Properties . . . . . . . . . . . 6.27.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 71 71 73 76 76 77 77 77 77 78 78 78 78 78 78 79 79 79 80 80 80 81 81 81 81 81 81 81 82 82 82 82 82 82 82 82 82 82 83 83 83 83 83 83 84 84 84 85 85 86 86 86 86 86 86 91 91 92 92 6.28 6.29 6.30 6.31 6.32 6.33 6.34 6.35 6.36 6.37 6.38 6.39 6.27.3 Commands . . . . . . 6.27.4 Attributes . . . . . . . 6.27.5 Example config file . . PhyMotion . . . . . . . . . . 6.28.1 PhyMotionCtrl . . . . 6.28.2 PhyMotionMotor . . . PiezoJena . . . . . . . . . . . 6.29.1 PiezoJenaCtrl . . . . . 6.29.2 PiezoJenaNV401CLE PiezoPiCtrl . . . . . . . . . . 6.30.1 Properties . . . . . . . 6.30.2 States . . . . . . . . . 6.30.3 Commands . . . . . . 6.30.4 Attributes . . . . . . . 6.30.5 How to ... . . . . . . . PiezoPiE185 . . . . . . . . . . 6.31.1 Properties . . . . . . . 6.31.2 States . . . . . . . . . 6.31.3 Commands . . . . . . 6.31.4 Attributes . . . . . . . PiezoPiE710 . . . . . . . . . . 6.32.1 Properties . . . . . . . 6.32.2 States . . . . . . . . . 6.32.3 Commands . . . . . . 6.32.4 Attributes . . . . . . . PiezoPiE712 . . . . . . . . . . 6.33.1 Properties . . . . . . . 6.33.2 States . . . . . . . . . 6.33.3 Commands . . . . . . 6.33.4 Attributes . . . . . . . PiezoPiE816 . . . . . . . . . . 6.34.1 Properties . . . . . . . 6.34.2 States . . . . . . . . . 6.34.3 Commands . . . . . . 6.34.4 Attributes . . . . . . . PiezoPiE861 . . . . . . . . . . 6.35.1 Properties . . . . . . . 6.35.2 States . . . . . . . . . 6.35.3 Commands . . . . . . 6.35.4 Attributes . . . . . . . PiezoPiGpibCtrl . . . . . . . . 6.36.1 Properties . . . . . . . 6.36.2 States . . . . . . . . . 6.36.3 Commands . . . . . . 6.36.4 Attributes . . . . . . . 6.36.5 How to ... . . . . . . . PitchRollCorrection . . . . . . 6.37.1 Properties . . . . . . . 6.37.2 States . . . . . . . . . 6.37.3 Commands . . . . . . 6.37.4 Attributes . . . . . . . PlcUndulator . . . . . . . . . 6.38.1 Properties . . . . . . . 6.38.2 States . . . . . . . . . 6.38.3 Commands . . . . . . 6.38.4 Attributes . . . . . . . 6.38.5 Client examples . . . . 6.38.6 How to ... . . . . . . . SMCHydra . . . . . . . . . . 6.39.1 SMCHydraCtrl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 92 93 93 93 94 94 94 95 95 95 96 96 96 96 96 96 96 96 96 96 96 97 97 97 98 98 98 98 98 99 99 99 99 100 100 100 100 100 100 100 101 101 101 101 101 101 101 101 102 102 102 102 102 103 103 103 105 105 105 6.40 6.41 6.42 6.43 6.44 6.45 6.46 6.47 7 6.39.2 SMCHydraMotor . . . 6.39.3 Example Clients . . . 6.39.4 How to ... . . . . . . . Slt/Spk PLC, Beckhoff . . . . 6.40.1 Properties . . . . . . . 6.40.2 States . . . . . . . . . 6.40.3 Commands . . . . . . 6.40.4 Attributes . . . . . . . 6.40.5 Example Client . . . . Tango Motor . . . . . . . . . 6.41.1 Properties . . . . . . . 6.41.2 States . . . . . . . . . 6.41.3 Commands . . . . . . 6.41.4 Attributes . . . . . . . 6.41.5 Example Client . . . . TcpIpMotorP10 . . . . . . . . 6.42.1 Properties . . . . . . . 6.42.2 States . . . . . . . . . 6.42.3 Commands . . . . . . 6.42.4 Attributes . . . . . . . 6.42.5 Example Client . . . . TwoThetaP07 . . . . . . . . . VICIMultiPosValve . . . . . . 6.44.1 Properties . . . . . . . 6.44.2 States . . . . . . . . . 6.44.3 Commands . . . . . . 6.44.4 Attributes . . . . . . . VICITwoPosValve . . . . . . 6.45.1 Properties . . . . . . . 6.45.2 States . . . . . . . . . 6.45.3 Commands . . . . . . 6.45.4 Attributes . . . . . . . VmExecutor . . . . . . . . . . 6.46.1 Properties . . . . . . . 6.46.2 States . . . . . . . . . 6.46.3 Commands . . . . . . 6.46.4 Attributes . . . . . . . 6.46.5 A very trivial example 6.46.6 A trivial example . . . ZMX . . . . . . . . . . . . . 6.47.1 Properties . . . . . . . 6.47.2 States . . . . . . . . . 6.47.3 Commands . . . . . . 6.47.4 Attributes . . . . . . . 6.47.5 Client examples . . . . Counter Servers 7.1 Introduction . . . . . . . 7.2 Abstract Counter Class . 7.2.1 States . . . . . . 7.2.2 Commands . . . 7.2.3 Attributes . . . . 7.3 SIS3820 Class . . . . . . 7.3.1 Properties . . . . 7.3.2 States . . . . . . 7.3.3 Commands . . . 7.3.4 Attributes . . . . 7.3.5 Example Clients 7.4 V260 Class . . . . . . . 7.4.1 Properties . . . . 7.4.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 108 108 108 108 108 108 108 108 109 110 110 110 110 111 112 112 112 112 113 113 114 114 114 114 114 114 114 114 114 114 114 114 115 115 115 115 115 117 118 118 119 119 119 121 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 127 127 127 127 127 127 128 128 128 128 128 130 130 130 7.5 8 9 7.4.3 Commands . . . . . . . . . . . 7.4.4 Attributes . . . . . . . . . . . . 7.4.5 Example Clients . . . . . . . . VcExecutor . . . . . . . . . . . . . . . 7.5.1 Entry in online.xml . . . . . . . 7.5.2 Properties . . . . . . . . . . . . 7.5.3 States . . . . . . . . . . . . . . 7.5.4 Commands . . . . . . . . . . . 7.5.5 Attributes . . . . . . . . . . . . 7.5.6 A trivial example . . . . . . . . 7.5.7 The Petra Current . . . . . . . . 7.5.8 The VFCADC Attribute Counts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 130 131 132 132 133 133 133 133 133 134 134 Timer Servers 8.1 Introduction . . . . . . . . . . . 8.2 Abstract Timer Class . . . . . . 8.2.1 States . . . . . . . . . . 8.2.2 Commands . . . . . . . 8.2.3 Attributes . . . . . . . . 8.3 DGG2 Class . . . . . . . . . . . 8.3.1 Properties . . . . . . . . 8.3.2 States . . . . . . . . . . 8.3.3 Commands . . . . . . . 8.3.4 Attributes . . . . . . . . 8.3.5 Example Client, Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 136 136 136 136 136 137 137 137 137 137 138 IO Register Servers 9.1 Introduction . . . . . . . . 9.2 Abstract IO Register Class 9.2.1 Properties . . . . . 9.2.2 States . . . . . . . 9.2.3 Commands . . . . 9.2.4 Attributes . . . . . 9.3 SIS3610 Class . . . . . . . 9.3.1 Properties . . . . . 9.3.2 States . . . . . . . 9.3.3 Commands . . . . 9.3.4 Attributes . . . . . 9.3.5 Example Clients . 9.4 VDOT32 Class . . . . . . 9.4.1 Properties . . . . . 9.4.2 States . . . . . . . 9.4.3 Commands . . . . 9.4.4 Attributes . . . . . 10 ADC Servers 10.1 Introduction . . . . . . . 10.2 Abstract ADC Class . . . 10.2.1 States . . . . . . 10.2.2 Commands . . . 10.2.3 Attributes . . . . 10.3 TIP830u20 Class . . . . 10.3.1 Properties . . . . 10.3.2 States . . . . . . 10.3.3 Commands . . . 10.3.4 Attributes . . . . 10.3.5 Example Clients 10.4 TIP850ADC Class . . . 10.4.1 Properties . . . . 10.4.2 States . . . . . . 10.4.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 139 139 139 139 139 139 139 140 140 140 140 140 141 141 141 141 142 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 143 143 143 143 143 143 143 144 144 144 144 145 145 145 145 10.4.4 Attributes . . . . 10.4.5 Example Clients 10.5 VFCADC Class . . . . . 10.5.1 Properties . . . . 10.5.2 States . . . . . . 10.5.3 Commands . . . 10.5.4 Attributes . . . . 10.5.5 Example Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 145 146 146 146 147 147 147 11 DAC Servers 11.1 Introduction . . . . . . . 11.2 Abstract DAC Class . . . 11.2.1 States . . . . . . 11.2.2 Commands . . . 11.2.3 Attributes . . . . 11.3 TIP551 Class . . . . . . 11.3.1 Properties . . . . 11.3.2 States . . . . . . 11.3.3 Commands . . . 11.3.4 Attributes . . . . 11.3.5 Example Clients 11.4 TIP850DAC Class . . . . 11.4.1 Properties . . . . 11.4.2 States . . . . . . 11.4.3 Commands . . . 11.4.4 Attributes . . . . 11.4.5 Example Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 150 150 150 150 150 150 151 151 151 151 151 153 153 153 153 153 153 12 Electrometer Servers 12.1 I404, BPM . . . . . . . 12.1.1 Properties . . . 12.1.2 States . . . . . 12.1.3 Commands . . 12.1.4 Attributes . . . 12.1.5 Example Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 155 155 155 155 155 156 13 Power Supply Servers 13.1 Introduction . . . . . . . . 13.2 AgilentTech667x . . . . . 13.2.1 Properties . . . . . 13.2.2 States . . . . . . . 13.2.3 Commands . . . . 13.2.4 Attributes . . . . . 13.3 DeltaElektronikaSM7022 . 13.3.1 Properties . . . . . 13.3.2 States . . . . . . . 13.3.3 Commands . . . . 13.3.4 Attributes . . . . . 13.4 HViseg . . . . . . . . . . 13.4.1 HVisegMPODCtrl 13.4.2 HVisegEHS80 . . 13.4.3 Example Clients . 13.4.4 How to ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 158 158 158 158 158 158 158 158 158 158 159 159 159 159 160 160 14 MCA Servers 14.1 Abstract MCA Class 14.1.1 Properties . . 14.1.2 States . . . . 14.1.3 Commands . 14.1.4 Attributes . . 14.2 MCA8715 Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 161 161 161 161 161 161 . . . . . . . . . . . . . . . . . . . . . . . . 14.2.1 Properties . . . . 14.2.2 States . . . . . . 14.2.3 Commands . . . 14.2.4 Attributes . . . . 14.2.5 Example Clients 14.3 XIA Class . . . . . . . . 14.3.1 Properties . . . . 14.3.2 States . . . . . . 14.3.3 Commands . . . 14.3.4 Attributes . . . . 14.3.5 Client examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 162 162 162 163 164 164 164 165 165 167 15 Multi Channel Scaler Servers 15.1 Introduction . . . . . . . . 15.2 Abstract MCS Class . . . . 15.2.1 Properties . . . . . 15.2.2 States . . . . . . . 15.2.3 Commands . . . . 15.2.4 Attributes . . . . . 15.3 SIS3820MCS Class . . . . 15.3.1 Properties . . . . . 15.3.2 States . . . . . . . 15.3.3 Commands . . . . 15.3.4 Attributes . . . . . 15.3.5 Client examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 169 169 169 169 169 169 170 170 170 170 170 171 16 Encoder Servers 16.1 Introduction . . . . . . . 16.2 Abstract Encoder Class . 16.2.1 States . . . . . . 16.2.2 Commands . . . 16.2.3 Attributes . . . . 16.3 IK220 Class . . . . . . . 16.3.1 Properties . . . . 16.3.2 States . . . . . . 16.3.3 Commands . . . 16.3.4 Attributes . . . . 16.3.5 Client examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 174 174 174 174 174 174 175 175 175 175 176 17 X-ray Detector Servers 17.1 Introduction . . . . . . . . 17.2 FastSciDetector . . . . . . 17.2.1 FastSciDetectorCtrl 17.2.2 FastSciDetector . . 17.3 MaiaDetector . . . . . . . 17.3.1 MaiaDetector . . . 17.3.2 MaiaCtrl . . . . . 17.3.3 MaiaLogger . . . . 17.3.4 MaiaScan . . . . . 17.3.5 MaiaProcessing . . 17.3.6 MaiaEncoderAxis 17.3.7 MaiaSensor . . . . 17.3.8 MaiaFlux . . . . . 17.3.9 MaiaDimension . . 17.3.10 MaiaMetadata . . 17.4 Mar345Ctrl . . . . . . . . 17.4.1 Properties . . . . . 17.4.2 States . . . . . . . 17.4.3 Commands . . . . 17.4.4 Attributes . . . . . 17.5 PerkinElmerDetector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 178 178 178 179 179 180 180 180 181 181 181 181 182 182 182 183 183 183 183 184 184 17.5.1 17.5.2 17.6 Pilatus 17.6.1 17.6.2 17.6.3 17.6.4 PerkinElmerCtrl . . PerkinElmerDetector . . . . . . . . . . . . Properties . . . . . . States . . . . . . . . Commands . . . . . Scalar Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 184 186 186 186 186 186 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 187 187 187 187 188 190 195 196 197 197 197 197 19 Camera Servers 19.1 Introduction . . . . . . . . . . . . . . 19.2 AndorCamera . . . . . . . . . . . . . 19.2.1 Properties . . . . . . . . . . . 19.2.2 States . . . . . . . . . . . . . 19.2.3 Commands . . . . . . . . . . 19.2.4 Attributes . . . . . . . . . . . 19.3 Roper Scientific Quadro Camera . . . 19.3.1 Properties . . . . . . . . . . . 19.3.2 States . . . . . . . . . . . . . 19.3.3 Commands . . . . . . . . . . 19.3.4 Scalar Attributes . . . . . . . 19.3.5 Image Attributes . . . . . . . 19.3.6 Client examples . . . . . . . . 19.3.7 How to ... . . . . . . . . . . . 19.4 ISGCamera . . . . . . . . . . . . . . 19.4.1 Properties . . . . . . . . . . . 19.4.2 States . . . . . . . . . . . . . 19.4.3 Commands . . . . . . . . . . 19.4.4 Attributes . . . . . . . . . . . 19.5 LCXCamera . . . . . . . . . . . . . . 19.5.1 LCXCameraCtrl . . . . . . . 19.5.2 LCXCamera . . . . . . . . . 19.6 MarCCD . . . . . . . . . . . . . . . 19.6.1 Properties . . . . . . . . . . . 19.6.2 States . . . . . . . . . . . . . 19.6.3 Commands . . . . . . . . . . 19.6.4 Attributes . . . . . . . . . . . 19.7 Pco Cameras . . . . . . . . . . . . . 19.7.1 Properties . . . . . . . . . . . 19.7.2 States . . . . . . . . . . . . . 19.7.3 Commands . . . . . . . . . . 19.7.4 Attributes . . . . . . . . . . . 19.7.5 Running with external trigger 19.8 Prosilica Camera . . . . . . . . . . . 19.8.1 Properties . . . . . . . . . . . 19.8.2 States . . . . . . . . . . . . . 19.8.3 Commands . . . . . . . . . . 19.8.4 Scalar Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 198 198 198 198 198 198 198 198 199 199 199 200 200 201 201 201 201 201 201 201 202 202 203 203 203 204 204 204 204 204 204 204 204 204 204 204 205 205 18 MicroStrip Detector Servers 18.1 Mythen . . . . . . . . . 18.1.1 Properties . . . . 18.1.2 States . . . . . . 18.1.3 Commands . . . 18.1.4 Attributes . . . . 18.1.5 Client examples . 18.1.6 How to ... . . . . 18.2 MythenRoIs . . . . . . . 18.2.1 Properties . . . . 18.2.2 States . . . . . . 18.2.3 Commands . . . 18.2.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.8.5 Image Attributes . . . . . . . . . . . . 19.8.6 Client examples . . . . . . . . . . . . . 19.8.7 How to ... . . . . . . . . . . . . . . . . 19.9 Photonic Science Camera (Gemstar X-ray) . . . 19.9.1 Properties . . . . . . . . . . . . . . . . 19.9.2 States . . . . . . . . . . . . . . . . . . 19.9.3 Commands . . . . . . . . . . . . . . . 19.9.4 Scalar Attributes . . . . . . . . . . . . 19.9.5 Image Attributes . . . . . . . . . . . . 19.10Photonic Science Camera (X-ray Imager VHR) 19.10.1 Properties . . . . . . . . . . . . . . . . 19.10.2 States . . . . . . . . . . . . . . . . . . 19.10.3 Commands . . . . . . . . . . . . . . . 19.10.4 Scalar Attributes . . . . . . . . . . . . 19.10.5 Image Attributes . . . . . . . . . . . . 19.11Lambda Cameras . . . . . . . . . . . . . . . . 19.11.1 Properties . . . . . . . . . . . . . . . . 19.11.2 States . . . . . . . . . . . . . . . . . . 19.11.3 Commands . . . . . . . . . . . . . . . 19.11.4 Attributes . . . . . . . . . . . . . . . . 19.12Gotthard Cameras . . . . . . . . . . . . . . . . 19.12.1 Properties . . . . . . . . . . . . . . . . 19.12.2 States . . . . . . . . . . . . . . . . . . 19.12.3 Commands . . . . . . . . . . . . . . . 19.12.4 Attributes . . . . . . . . . . . . . . . . 20 Detectors in Lima 20.1 Introduction . . . . . . . . . 20.2 Andor . . . . . . . . . . . . 20.3 Maxipix . . . . . . . . . . . 20.4 Mythen . . . . . . . . . . . 20.4.1 Properties . . . . . . 20.4.2 Commands . . . . . 20.4.3 Scalar Attributes . . 20.5 Pilatus . . . . . . . . . . . . 20.6 Prosilica . . . . . . . . . . . 20.7 RoperScientific . . . . . . . 20.7.1 Properties . . . . . . 20.7.2 Commands . . . . . 20.7.3 Scalar Attributes . . 20.8 Pco . . . . . . . . . . . . . 20.8.1 Image Acquistion . . 20.8.2 Online Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 207 209 210 210 210 210 210 211 211 211 211 211 212 212 212 212 212 212 212 212 213 213 213 213 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 214 214 214 214 214 214 215 215 215 215 215 215 216 216 216 216 21 Communication 21.1 ADS (Beckhoff) . . . . . . . . . . 21.1.1 Properties . . . . . . . . . 21.1.2 Commands . . . . . . . . 21.1.3 Example client, Lom . . . 21.1.4 Example client, Spk . . . 21.2 Gateways between Tango and Tine 21.2.1 Tine to Tango . . . . . . . 21.2.2 Tango to Tine . . . . . . . 21.2.3 TTTDynamicAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 217 217 217 218 218 220 220 220 220 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Miscellaneous 22.1 ADWandlerWT . . . . . . . . . . . . . . . . . . 22.1.1 Properties . . . . . . . . . . . . . . . . . 22.1.2 States . . . . . . . . . . . . . . . . . . . 22.1.3 Commands . . . . . . . . . . . . . . . . 22.1.4 Attributes . . . . . . . . . . . . . . . . . 22.2 APDDetector . . . . . . . . . . . . . . . . . . . 22.2.1 APDDetectorCtrl . . . . . . . . . . . . . 22.2.2 APDDetector . . . . . . . . . . . . . . . 22.2.3 Run a Scan in the discriminator threshold 22.3 AttenFactorCalc . . . . . . . . . . . . . . . . . . 22.3.1 Properties . . . . . . . . . . . . . . . . . 22.3.2 States . . . . . . . . . . . . . . . . . . . 22.3.3 Commands . . . . . . . . . . . . . . . . 22.3.4 Attributes . . . . . . . . . . . . . . . . . 22.4 BronkhorstMassFlow . . . . . . . . . . . . . . . 22.4.1 BronkhorstMassFlow . . . . . . . . . . . 22.4.2 BronkhorstMassFlowCtrl . . . . . . . . . 22.5 BSCryoTempCrontrolP01 . . . . . . . . . . . . . 22.5.1 Properties . . . . . . . . . . . . . . . . . 22.5.2 States . . . . . . . . . . . . . . . . . . . 22.5.3 Commands . . . . . . . . . . . . . . . . 22.5.4 Attributes . . . . . . . . . . . . . . . . . 22.6 CenterThree . . . . . . . . . . . . . . . . . . . . 22.6.1 CenterThreeCtrl . . . . . . . . . . . . . 22.6.2 CenterThree . . . . . . . . . . . . . . . . 22.7 Clipboard . . . . . . . . . . . . . . . . . . . . . 22.7.1 Properties . . . . . . . . . . . . . . . . . 22.7.2 States . . . . . . . . . . . . . . . . . . . 22.7.3 Commands . . . . . . . . . . . . . . . . 22.7.4 Attributes . . . . . . . . . . . . . . . . . 22.7.5 Client Example . . . . . . . . . . . . . . 22.7.6 Synchronization between Clients . . . . . 22.8 CollisionsSensor . . . . . . . . . . . . . . . . . 22.8.1 Properties . . . . . . . . . . . . . . . . . 22.8.2 States . . . . . . . . . . . . . . . . . . . 22.8.3 Commands . . . . . . . . . . . . . . . . 22.8.4 Attributes . . . . . . . . . . . . . . . . . 22.8.5 Set a motor device for using it . . . . . . 22.8.6 Client Example . . . . . . . . . . . . . . 22.9 CryoConnector . . . . . . . . . . . . . . . . . . 22.9.1 Properties . . . . . . . . . . . . . . . . . 22.9.2 States . . . . . . . . . . . . . . . . . . . 22.9.3 Commands . . . . . . . . . . . . . . . . 22.9.4 Attributes . . . . . . . . . . . . . . . . . 22.10CryoConTempCtrl . . . . . . . . . . . . . . . . 22.10.1 Properties . . . . . . . . . . . . . . . . . 22.10.2 States . . . . . . . . . . . . . . . . . . . 22.10.3 Commands . . . . . . . . . . . . . . . . 22.10.4 Attributes . . . . . . . . . . . . . . . . . 22.11CryoSMSMagnet . . . . . . . . . . . . . . . . . 22.11.1 Properties . . . . . . . . . . . . . . . . . 22.11.2 States . . . . . . . . . . . . . . . . . . . 22.11.3 Commands . . . . . . . . . . . . . . . . 22.11.4 Attributes . . . . . . . . . . . . . . . . . 22.12CryoSMSPowerSupplyGpib . . . . . . . . . . . 22.12.1 Properties . . . . . . . . . . . . . . . . . 22.12.2 States . . . . . . . . . . . . . . . . . . . 22.12.3 Commands . . . . . . . . . . . . . . . . 22.12.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 223 223 223 223 223 223 223 224 224 224 224 224 224 224 225 225 225 225 225 225 226 226 226 226 226 227 227 227 227 228 229 230 230 230 230 230 230 231 232 233 233 233 233 233 233 233 233 233 233 234 234 234 234 234 234 234 234 234 234 22.13DKRF400TempHumSensor . . 22.13.1 Properties . . . . . . . 22.13.2 States . . . . . . . . . 22.13.3 Commands . . . . . . 22.13.4 Attributes . . . . . . . 22.14ElcomatHR . . . . . . . . . . 22.14.1 Properties . . . . . . . 22.14.2 States . . . . . . . . . 22.14.3 Commands . . . . . . 22.14.4 Attributes . . . . . . . 22.15FestoCompAirDistributor . . . 22.15.1 Properties . . . . . . . 22.15.2 States . . . . . . . . . 22.15.3 Commands . . . . . . 22.15.4 Attributes . . . . . . . 22.16HaakeChiller . . . . . . . . . 22.16.1 Properties . . . . . . . 22.16.2 States . . . . . . . . . 22.16.3 Commands . . . . . . 22.16.4 Attributes . . . . . . . 22.17IPGLaserYLR . . . . . . . . . 22.17.1 IPGLaserYLRCtrl . . 22.17.2 IPGLaserYLR100AC . 22.17.3 IPGLaserYLR100SM 22.18Keithley2000 . . . . . . . . . 22.18.1 Properties . . . . . . . 22.18.2 States . . . . . . . . . 22.18.3 Commands . . . . . . 22.18.4 Attributes . . . . . . . 22.19Keithley3706 . . . . . . . . . 22.19.1 Properties . . . . . . . 22.19.2 States . . . . . . . . . 22.19.3 Commands . . . . . . 22.19.4 Attributes . . . . . . . 22.20Keithley428 . . . . . . . . . . 22.20.1 Properties . . . . . . . 22.20.2 States . . . . . . . . . 22.20.3 Commands . . . . . . 22.20.4 Attributes . . . . . . . 22.21Keithley6485ml . . . . . . . . 22.21.1 Properties . . . . . . . 22.21.2 States . . . . . . . . . 22.21.3 Commands . . . . . . 22.21.4 Attributes . . . . . . . 22.22Keithley6517a . . . . . . . . . 22.22.1 Properties . . . . . . . 22.22.2 States . . . . . . . . . 22.22.3 Commands . . . . . . 22.22.4 Attributes . . . . . . . 22.23KMTronicRelay . . . . . . . . 22.23.1 Properties . . . . . . . 22.23.2 States . . . . . . . . . 22.23.3 Commands . . . . . . 22.23.4 Attributes . . . . . . . 22.24LEDSchott . . . . . . . . . . 22.24.1 LEDSchottCtrl . . . . 22.24.2 LEDSchott . . . . . . 22.24.3 Example Clients . . . 22.24.4 How to ... . . . . . . . 22.25LKS336 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 234 234 235 235 235 235 235 235 235 235 235 235 235 235 236 236 236 236 236 236 236 237 238 238 239 239 239 239 239 239 239 239 239 239 239 240 240 240 240 240 240 240 240 241 241 241 241 241 241 241 241 241 241 241 242 242 243 243 243 22.25.1 LKS336 . . . . . . . . . . 22.25.2 LKS336SensorInput . . . 22.25.3 LKS336HeaterOutput . . 22.26LKS336TempCtrl . . . . . . . . . 22.26.1 Properties . . . . . . . . . 22.26.2 States . . . . . . . . . . . 22.26.3 Commands . . . . . . . . 22.26.4 Attributes . . . . . . . . . 22.27LKS340TempCtrl . . . . . . . . . 22.27.1 Properties . . . . . . . . . 22.27.2 States . . . . . . . . . . . 22.27.3 Commands . . . . . . . . 22.27.4 Attributes . . . . . . . . . 22.28LoCuM4ENZ . . . . . . . . . . . 22.28.1 Properties . . . . . . . . . 22.28.2 States . . . . . . . . . . . 22.28.3 Commands . . . . . . . . 22.28.4 Attributes . . . . . . . . . 22.29MercuryiTCTempCtrl . . . . . . . 22.29.1 MercuryiTCTempCtrl . . 22.29.2 MercuryiTCTempSensor . 22.30MirrorCalculator . . . . . . . . . 22.30.1 Properties . . . . . . . . . 22.30.2 States . . . . . . . . . . . 22.30.3 Commands . . . . . . . . 22.30.4 Attributes . . . . . . . . . 22.31MythenClient . . . . . . . . . . . 22.31.1 Properties . . . . . . . . . 22.31.2 States . . . . . . . . . . . 22.31.3 Commands . . . . . . . . 22.31.4 Attributes . . . . . . . . . 22.31.5 Sardana Listener . . . . . 22.32OxfCryostreamCooler . . . . . . . 22.32.1 OxfCryostreamCoolerCtrl 22.32.2 OxfCryostreamCooler . . 22.33Petra3ICS . . . . . . . . . . . . . 22.33.1 Properties . . . . . . . . . 22.33.2 States . . . . . . . . . . . 22.33.3 Commands . . . . . . . . 22.33.4 Attributes . . . . . . . . . 22.34Petra3Info . . . . . . . . . . . . . 22.34.1 Properties . . . . . . . . . 22.34.2 States . . . . . . . . . . . 22.34.3 Commands . . . . . . . . 22.34.4 Attributes . . . . . . . . . 22.35Petra3Shutter . . . . . . . . . . . 22.35.1 Properties . . . . . . . . . 22.35.2 States . . . . . . . . . . . 22.35.3 Commands . . . . . . . . 22.35.4 Attributes . . . . . . . . . 22.36Petra3Undulator . . . . . . . . . . 22.36.1 Properties . . . . . . . . . 22.36.2 States . . . . . . . . . . . 22.36.3 Commands . . . . . . . . 22.36.4 Attributes . . . . . . . . . 22.37PfeifferGauge . . . . . . . . . . . 22.37.1 Properties . . . . . . . . . 22.37.2 States . . . . . . . . . . . 22.37.3 Commands . . . . . . . . 22.37.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 244 244 244 244 244 244 244 245 245 245 245 245 246 246 246 246 246 246 246 246 247 247 247 247 247 247 247 247 247 247 248 249 249 249 250 250 250 250 250 250 250 250 250 250 250 251 251 251 251 251 252 252 252 252 253 253 253 253 253 22.38PiLC . . . . . . . . . . . 22.38.1 Properties . . . . 22.38.2 States . . . . . . 22.38.3 Commands . . . 22.38.4 Attributes . . . . 22.39PIPEClient . . . . . . . 22.39.1 Properties . . . . 22.39.2 States . . . . . . 22.39.3 Commands . . . 22.39.4 Scalar Attributes 22.40PIPEKeithley . . . . . . 22.40.1 Properties . . . . 22.40.2 States . . . . . . 22.40.3 Commands . . . 22.40.4 Scalar Attributes 22.41PLCTempCtrlP02 . . . . 22.41.1 Properties . . . . 22.41.2 States . . . . . . 22.41.3 Commands . . . 22.41.4 Scalar Attributes 22.42RMUp04 . . . . . . . . 22.42.1 Properties . . . . 22.42.2 States . . . . . . 22.42.3 Commands . . . 22.42.4 Scalar Attributes 22.43SardanaStarter . . . . . . 22.43.1 Properties . . . . 22.43.2 States . . . . . . 22.43.3 Commands . . . 22.43.4 Attributes . . . . 22.44SaveLoadAttrs . . . . . 22.44.1 Properties . . . . 22.44.2 States . . . . . . 22.44.3 Commands . . . 22.44.4 Attributes . . . . 22.45SPSeh2 . . . . . . . . . 22.45.1 Properties . . . . 22.45.2 States . . . . . . 22.45.3 Commands . . . 22.45.4 Attributes . . . . 22.46SRSResGasAnalyzer . . 22.46.1 Properties . . . . 22.46.2 States . . . . . . 22.46.3 Commands . . . 22.46.4 Attributes . . . . 22.47T95TempProgLinkam . . 22.47.1 Properties . . . . 22.47.2 States . . . . . . 22.47.3 Commands . . . 22.47.4 Attributes . . . . 22.48TIP850u10 Class . . . . 22.48.1 Properties . . . . 22.48.2 States . . . . . . 22.48.3 Commands . . . 22.48.4 Attributes . . . . 22.49TGA1240WaveGen . . . 22.49.1 Properties . . . . 22.49.2 States . . . . . . 22.49.3 Commands . . . 22.49.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 254 254 254 254 254 254 254 254 254 254 254 254 254 254 255 255 255 255 255 255 255 255 255 255 255 255 256 256 256 256 256 256 256 256 257 257 257 257 257 257 257 257 257 257 257 257 257 257 258 258 258 258 258 258 258 258 258 258 258 22.50ThermocoupleioLogikE2262 . . . . . . . . . . . . . . . . . . . . . 22.50.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.50.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.50.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 22.50.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.51ThermoScientificTempCtrl . . . . . . . . . . . . . . . . . . . . . . 22.51.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.51.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.51.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 22.51.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.52UndulatorP04 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.52.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.52.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.52.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 22.52.4 Scalar Attributes . . . . . . . . . . . . . . . . . . . . . . . 22.52.5 Example of the file with conversion formulas and parameters 22.53VarianGetterpump . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.53.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.53.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.53.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 22.53.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.54Vibrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.54.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.54.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.54.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 22.54.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.55WebThermograph . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.55.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.55.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.55.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 22.55.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.56WebThermoHygrobarograph . . . . . . . . . . . . . . . . . . . . . 22.56.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.56.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.56.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 22.56.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.57XMCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.57.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.57.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.57.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 22.57.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.58Zebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.58.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.58.2 States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.58.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 22.58.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Matlab Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 258 258 259 259 259 259 259 259 259 259 259 259 259 259 260 260 260 260 260 261 261 261 261 261 261 261 261 261 261 261 262 262 262 262 262 262 262 262 262 262 262 263 263 263 263 264 List of Figures 4.1 4.2 4.3 Jive: Create Starter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Jive: Create TangoTest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Jive with Starter and TangoTest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 22 22 6.1 6.2 jive, MultipleMotors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . jddd, MultipleMotors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 85 21.1 TTTGW (Tine to Tango) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 21.2 TangoToTineGw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 21.3 Tine Instant Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 16 Chapter 1 The Introduction Tango is a CORBA based distributed control system which has been created at the ESRF. It is currently developed in a collaboration between the ESRF, ALBA, ELETTRA and SOLEIL. The Tango homepage can be found at www.tangocontrols.org. Useful links are: Astor: http://www.esrf.eu/computing/cs/tango/tango doc/tools doc/astor doc/index.html Jive: http://www.esrf.eu/computing/cs/tango/tango doc/tools doc/jive doc/index.html Pogo: http://www.esrf.eu/computing/cs/tango/tango doc/tools doc/pogo doc/index.html 17 Chapter 2 What to do, if ... This chapter contains instructions about what to do, if an error occurred. 2.1 ... you get an error in the installation of Tango v 6.0.0 in Linux computers $ cd tango-6.6.0/build $ export CC=gcc $ export CXX=g++ $ ../configure ##### $ edit cppserver/database/create_db.sql in 1.row replace @ by mysql $ make all root$ make install 18 Chapter 3 News This chapter lists the most recent changes. March 19, 2015 Latest LaTex run of this manual. 19.11.2007 First version of these pages. Still very preliminar. 19 Chapter 4 General Remarks 4.1 The Installation 4.1.1 The Base System on Linux This section displays the steps that are necessary to install Tango on a Sientific Linux V4 PC. We start with the Installation of mysql. $ tar xvf ./tars/mysql-5.0.24a.tar $ cd mysql-5.0.24a $ ./configure $ make root$ make install root$ adduser -u 52 -g 2 -d /var/lib/mysql mysql root$ /usr/local/bin/mysql_install_db --user=mysql root$ cd /var/lib root$ chown -R mysql.daemon ./mysql root$ /usr/local/bin/mysqld_safe --user=mysql& The installation of the object request broker (ORB): tar xvzf omniOrb-4.0.7.tar.gz $ cd omniOrb-4.0.7 $ mkdir build $ cd build $ ../configure $ make root$ make install The installation of the event service: $ tar xvzf omniNotify-2.1.tar.gz $ cd omniNotify-2.1 $ mkdir build $ cd build $ ../configure $ make root$ make install The documentation is done with Doxygen: $ tar xvzf doxygen-1.4.7.src.tar.gz $ cd doxygen-1.4.7 $ ./configure $ make root$ make install Finally, Tango is installed. 20 $ cd tango-5.5.0/build $ export CC=gcc $ export CXX=g++ $ ../configure $ make all root$ make install The next command starts the data base server. $ DataBaseds 2 -ORBendPoint giop:tcp::10000 -v \end{vaerbatim} \begin{verbatim} $ tango status $ tango start $ export TANGO_HOST=has107k:10000 edit /usr/local/bin/jive, replace NONE by /usr/local edit /usr/local/bin/astor, replace NONE by /usr/local The Starter server needs to be registered. This is done with jive. We use the Create Server button which can be found in the Edit menu. Figure 4.1 displays the information that has to be provided. Figure 4.1: Jive: Create Starter Next we define TangoTest (4.2). After both servers have been registered, jive looks like this 4.3. The following command makes the shared libraries avaliable: root$ ldconfig /usr/local/lib The Starter server is needed by astor. $ /usr/local/bin/Starter has107k & These are important tools to work with Tango. $ pogo & $ jive & $ astor & Figure 4.2: Jive: Create TangoTest Figure 4.3: Jive with Starter and TangoTest 4.1.2 PyTango The installation of PyTango: ----- Installation: --$ tar xvzf ˜/tars/boost_1_33_1.tar.gz ( do not install) $ tar xzfv ˜/tars/boost-jam-3.1.13-1-linuxx86.tgz root$ cp ./boost-jam-3.1.13-1-linuxx86/bjam /usr/local/bin $ mkdir PyTango $ cd PyTango $ tar xvzf ˜/tars/PyTango-3.0.1.tar.gz read ˜/PyTango/Readfile.unix edit ˜/PyTango/src/boost-build.jam boost-build $(HOME)/boost_1_33_1/tools/build/v1 ; edit ˜/PyTango/src/Jamrules path-global BOOST_ROOT : $(HOME)/boost_1_33_1 ; PYTHON_VERSION = 2.4 ; PYTHON_ROOT = /usr/local ; PYTHON_INCLUDES = /usr/local/include/python2.4 ; # PYTHON_LIB_PATH = <path to Python library object> ; $ cp Jamfile.unix Jamfile $ export OMNI_ROOT=/usr/local $ export TANGO_ROOT=/usr/local $ bjam -sTOOLS=gcc -sBUILD=release root$ cd /usr/local/lib/python2.4 root$ mkdir PyTango root$ cd PyTango root$ cp /home/kracht/PyTango/src/bin/src/_PyTango.so/gcc/release/shared-linkable-true/_ root$ cp /home/kracht/PyTango/modules/TgFactory.py ./ root$ cp /home/kracht/PyTango/modules/__init__.py ./ root$ cp /home/kracht/PyTango/src/bin/boost/libs/python/build/libboost_python.so/gcc/rel root$ ldconfig /usr/local/lib $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/python2.4/PyTango 4.2 Attributes 4.2.1 float scalar The following piece of code shows how the double_scalar attribute of the Tango test server is written and read; #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { string attrName = "double_scalar"; double x = 4.5; DeviceProxy *device = new DeviceProxy( "//has107k:10000/sys/tg_test/1"); DeviceAttribute *da = new DeviceAttribute( attrName, x); try { device->write_attribute( *da); } catch ( Tango::DevFailed &e) { fprintf( stderr, "TangoTest, DevFailed exception \n attr: %s\n", attrName.c_str()); fprintf( stderr, " reason: %s \n desc: %s \n origin: e.errors[0].reason.in(), e.errors[0].desc.in(), e.errors[0].origin.in()); %s \n", } DeviceAttribute dd = device->read_attribute( attrName); dd >> x; cout << " received " << x << endl; } 4.2.2 string scalar The following piece of code shows how the string_scalar attribute of the Tango test server is written and read. The Tango test server has to run for the device sys/tg_test/1. #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { string attrName = "string_scalar"; string str = "hello3"; string str_out; DeviceProxy *device = new DeviceProxy( "//has107k:10000/sys/tg_test/1"); DeviceAttribute *da = new DeviceAttribute( attrName, str); try { device->write_attribute( *da); } catch ( Tango::DevFailed &e) { fprintf( stderr, "TangoTest, DevFailed exception \n attr: %s\n", attrName.c_str()); fprintf( stderr, " reason: %s \n desc: %s \n origin: e.errors[0].reason.in(), e.errors[0].desc.in(), e.errors[0].origin.in()); } DeviceAttribute dd = device->read_attribute( attrName); dd >> str_out; cout << " received " << str_out << endl; } 4.3 States Here is the list of Tango states: Tango::ON Tango::OFF Tango::CLOSE Tango::OPEN Tango::INSERT Tango::EXTRACT Tango::MOVING Tango::STANDBY Tango::FAULT Tango::INIT Tango::RUNNING 0 1 2 3 4 5 6 7 8 9 10 %s \n", Tango::ALARM Tango::DISABLE Tango::UNKNOWN 11 12 13 4.4 Performance 4.4.1 cpp If the client runs on the local host (P4 @ 2.4 GHz) which is connected to the VME crate, we observe an IO speed of 2.6 kHz (10000 read cycles in 3.8s). If the client runs on a remote host (P4 @ 2.8 GHz), the speed is reduced to 1.8 kHz. Here is the code. #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { unsigned long temp; int i; DeviceProxy *device = new DeviceProxy( "//has107k:10000/bw4/exp/t1"); for( i = 0; i < 10000; i++) { DeviceData devdata = device->command_inout( "Check"); } } And the make file. CC = g++ TANGO_HOME = /usr/local INCLUDE_DIRS = -I $(TANGO_HOME)/include -I . LIB_DIRS = -L $(TANGO_HOME)/lib CXXFLAGS = -D_REENTRANT $(INCLUDE_DIRS) LFLAGS = $(LIB_DIRS) -ltango \ -llog4tango \ -lomniORB4 \ -lomniDynamic4 \ -lCOS4 \ -lomnithread \ -lpthread .SUFFIXES: .o .cpp .cpp.o: $(CC) $(CXXFLAGS) -c $< all: DGG2Test DGG2Speed DGG2Test: DGG2Test.o $(CC) DGG2Test.o -o DGG2Test $(LFLAGS) DGG2Speed: DGG2Speed.o $(CC) DGG2Speed.o -o DGG2Speed $(LFLAGS) clean: rm -f *.o core 4.4.2 Python A local Python client executes at 2.1 kHz. The test was done using this code: #!/usr/bin/env python from PyTango import * t1 = DeviceProxy( "//has107k:10000/bw4/exp/t1") i = 0 while( i < 10000): t1.command_inout( "Check") i = i + 1; Chapter 5 How to ... 5.1 ... read xml files in Qt This section shows how to read a prototype of xml file with motor information inside a Qt client using Qt libraries. The xml file looks like: <?xml version="1.0"?> <hw> <motor> <name>mot1</name> <type>stepping_motor</type> <module>oms58</module> <device>bw4/exp/mot1</device> <control>tango</control> <hostname>has107k</hostname> </motor> <motor> <name>mot2</name> <type>stepping_motor</type> <module>oms58</module> <device>bw4/exp/mot2</device> <control>tango</control> <hostname>has107k</hostname> </motor> <motor> <name>mot3</name> <type>stepping_motor</type> <module>oms58</module> <device>bw4/exp/mot3</device> <control>tango</control> <hostname>has107k</hostname> </motor> <motor> <name>mot4</name> <type>stepping_motor</type> <module>oms58</module> <device>bw4/exp/mot4</device> <control>tango</control> <hostname>has107k</hostname> </motor> <motor> <name>mot5</name> <type>stepping_motor</type> <module>oms58</module> <device>bw4/exp/mot5</device> <control>tango</control> <hostname>has107k</hostname> </motor> <motor> <name>mot6</name> <type>stepping_motor</type> <module>oms58</module> <device>bw4/exp/mot6</device> <control>tango</control> <hostname>has107k</hostname> </motor> <motor> <name>mot7</name> <type>stepping_motor</type> <module>oms58</module> <device>bw4/exp/mot7</device> <control>tango</control> <hostname>has107k</hostname> </motor> <motor> <name>mot8</name> <type>stepping_motor</type> <module>oms58</module> <device>bw4/exp/mot8</device> <control>tango</control> <hostname>has107k</hostname> </motor> </hw> And an example program for reading it: #include <stdlib.h> #include <QtXml> #include <iostream> 27 using namespace std; void getMotorInformation( const QDomElement &motor ); int main(int argc,char** argv){ QDomDocument doc("online"); QFile file("online.xml"); if (!file.open(QIODevice::ReadOnly)) return 0; if (!doc.setContent(&file)) { file.close(); return 0; } file.close(); // Take the elements that are children of the outermost element. QDomElement docElem = doc.documentElement(); for(QDomNode n = docElem.firstChild(); !n.isNull(); n = n.nextSibling()) { if( !n.isNull() ) { if ( n.isElement() && n.nodeName() == "motor" ) { QDomElement motor = n.toElement(); getMotorInformation( motor ); } } } return 1; } void getMotorInformation( const QDomElement &motor ) { // visit all children of the motor element and take the info that is needed string name_for_motor; for(QDomNode n = motor.firstChild(); !n.isNull(); n = n.nextSibling()) { if( !n.isNull() ) { if ( n.isElement() && n.nodeName() == "name" ) { QDomElement motor = n.toElement(); QString text_my = motor.text(); name_for_motor = text_my.toStdString(); cout << "Debug: name " << name_for_motor << endl; if(name_for_motor == "mot1") cout << "Debug: mot1 is the name " << endl; } } } } This code can be introduced in a standard Qt client. 5.2 ... change attributes from inside the server If the value of a Tango attribute is changed inside of any function of the class and not using the write function asotiated to this attribute, the new set value is not send to the Tango database, and it is lost once the program is stopped. In order to avoid that, the value of the attribute has to be changed using the funcion write attribute from DeviceProxy. Example: Tango::DeviceProxy *device; string name=this->device_name; device = new Tango::DeviceProxy(name); Tango::DeviceAttribute da( "Num1",attr_Num1_write ); device->write_attribute(da); 5.3 Use a spectrum-of-strings attribute in a server // in the header file: ... Tango::DevString ResultSim[100]; ... void TangoMotor::read_ResultSim(Tango::Attribute &attr) { char print_buffer[100]; sprintf( print_buffer, "mot1 %g", ResultSim[0] = CORBA::string_dup( sprintf( print_buffer, "mot2 %g", ResultSim[1] = CORBA::string_dup( sprintf( print_buffer, "mot3 %g", ResultSim[2] = CORBA::string_dup( attr_PositionSim_write); print_buffer); attr_PositionSim_write*2); print_buffer); attr_PositionSim_write*3); print_buffer); attr.set_value( ResultSim, 3); } 5.4 Use a spectrum-of-strings attribute in a client // // attrName contains the name of the attribute // extern "C" int tng_attrStringArrRd( DeviceProxy *device, char *attrName, int lenMax, char **value) { int status = 1; DeviceAttribute da; vector<string> str; try { da = device->read_attribute( (const char *) attrName); } catch ( Tango::DevFailed &e) { DbDevImportInfo info = device->import_info(); fprintf( stderr, "Reason: %s \n desc: %s \n origin: e.errors[0].reason.in(), e.errors[0].desc.in(), e.errors[0].origin.in()); status = 0; goto finish; } %s \n", if( da.has_failed()) { DevErrorList err = da.get_err_stack(); fprintf( stderr, " reason: %s \n desc: err[0].reason.in(), err[0].desc.in(), err[0].origin.in()); status = 0; goto finish; } %s \n origin: %s \n", try { da >> str; } catch ( Tango::WrongData &e) { strcpy( value[0], ""); status = 1; goto finish; } for( int i=0; i < (int) str.size(); i++) { if( i == (lenMax-1)) { fprintf( stderr, "tng_attrStringArrRd: too many strings, size %d, lenMax %d", str.size(), lenMax); status = 0; goto finish; } strcpy( value[i], str[i].c_str()); strcpy( value[i+1], ""); } finish: return status; } \section{... change between real and simulation mode} A device property called SimulationMode tells each process (device) if it has to run in simu The property can be set using jive or any program accesing the Tango database. {bf Example of cpp code:} \begin{verbatim} include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { // // create a connection to the new IK220 TANGO device // DeviceProxy *device = new DeviceProxy( "tango://has107k:10000/exp/line1/enc1"); unsigned long simulation_mode = 1; DbDatum simulation_mode_toput("SimulationMode"); DbData db_data; simulation_mode_toput << simulation_mode; db_data.push_back(simulation_mode_toput); device->put_property(db_data); } Example with python script: # Before running this script TANGO_HOST has to be set to the host where this device run. # For example: export TANGO_HOST=has107k:10000 from PyTango import * db = Database() device = ’exp/line1/mcs1’ db.put_device_property(device,{’SimulationMode’:[’1’]}) # Add this property with this value 5.5 ... overwrite the default State method This section shows how to overwrite the default State method in the Tango Server.It is useful for adding some check functions looking at the state. Example for the motors: Add to the header file from your server (server name.h): Tango::DevState dev_state(); Add to the server file (server name.cpp): Tango::DevState OmsVme58::dev_state(){ check_move(); Tango::Device_3Impl::dev_state(); return device_state; } 5.6 ... change the configuration of one attribute This section shows how to change the display format of one attribute using a python script, instead of the ATK panel. It is useful when due to a wrong setting of the format the ATK panel gives an error and can not be open. The python script can be easily changed for setting any other configuration parameter. from PyTango import * import sys import time def read_format(values): t1 = DeviceProxy(sys.argv[1]) info = t1.get_attribute_config(sys.argv[2]) print print print print print print "Current format for attribute" sys.argv[2] "in device" sys.argv[1] " " info.format def write_format(values): print values t1 = DeviceProxy(sys.argv[1]) info = t1.get_attribute_config(sys.argv[2]) info.format = str(sys.argv[3]) t1.set_attribute_config_ex([info]) # # main # try : if( len( sys.argv) == 1 ): print "Usage:" print "->for changing format" print "python set_attribute_display_format.py device_name atribute_name new_format" print "new_format with sintax like %6.2f for float or %6d for integer." print "Ex." print "python set_attribute_display_format.py line1/exp/por2 Atribute2 %6.1f" print "->for getting current format" print "python set_attribute_display_format.py device_name atribute_name" elif( len( sys.argv) == 3 ): read_format(sys.argv) elif( len( sys.argv) == 4 ): write_format(sys.argv) except : print "Failed with exception !" print sys.exc_info()[0] Chapter 6 Motor Servers 6.1 Introduction The implemetation of the motors in Tango is divided in three levels: • Device Server Layer. It contains the Tango Servers that talk directly to the hardware. These Servers are base in a Abstract Motor Class. • MetaMoto Server Layer. It contains Tango Servers that talk to the Device Server Layer, defining different combinations of movements for several motors. • Client Layer. It contains Tango Clients, connecting to the previous layers. It displays motor information and controls the movements. 6.2 AbsorberController Tango Server for controlling an absorber consisiting of a given number of sliders. The control is done accessing a Beckhoff PLC, that is connected via the Ads Tango Class. This class is already included in the same proccess as the AbsorberController class. IP address and port number of the device are given as properties in the Ads Tango device. pogo_html_docu/AbsorberController/index.html See pogo generated info for more details. 6.2.1 Properties pogo_html_docu/AbsorberController/Properties.html See pogo generated info for more details. PlcServer. Name of the ads tango device running in the same process as the AbsorberController device. SimulationMode. 0 real, 1 simulation. NbSliders. Number of sliders in the system. 6.2.2 States pogo_html_docu/AbsorberController/States.html See pogo generated info for more details. ON Idle state. MOVING Sliders being moved. FAULT. Sliders are not able to reach the set position in 5 sec. 6.2.3 Commands pogo_html_docu/AbsorberController/Commands.html See pogo generated info for more details. CheckMove. Returns 1 if sliders has still not reach the set position. It is called from the thread. Move. Move to the in position the sliders set in the SetIn attribute. State. Returns the device state. Default Tango Command. Status. It gets the device status. Default Tango Command. 33 6.2.4 Attributes pogo_html_docu/AbsorberController/Attributes.html See pogo generated info for more details. StatusSliders. Spectrum of 24 elements (maximum number of sliders in the system) with a value 1 or 0 depending on the status of the slider (in error or not). Only read. FlagMovementOK. Indicates if the movement has finished smoothly. Only read. FlagError. Indicates if there is an error in any slider. Only read. SetIn. Spectrum of 24 elements (maximum number of sliders in the system) for selecting the sliders that should be put in (they will be only move after executing the Move command). The read value indicates the sliders currently selected. SlidersIn. Spectrum of 24 elements (maximum number of sliders in the system) telling which sliders are in the IN position. Only read. SlidersOut. Spectrum of 24 elements (maximum number of sliders in the system) telling which sliders are in the OUT position. Only read. Position. Read the current position (12 bits as decimal number). Writing a value will move the sliders indicated by the input (decimal number interpreted as 12 bits). 6.2.5 Client examples from PyTango import * import sys import time def get_nbsliders(absorbercontroller): """The get_nbsliders function is used to read the number of sliderss.""" prop = absorbercontroller.get_property([’NbSliders’]) for v in prop[’NbSliders’]: nb_sliders = v print "Number of sliders:" print nb_sliders def set_slidersToMoveIn(absorbercontroller, sliders): """The set_slidersToMoveIn function is used to select the sliders that will go to the IN values = [] for p in sliders: values.append(p) absorbercontroller.write_attribute("SetIn",values) def get_slidersToMoveIn(absorbercontroller): """The get_slidersToMoveIn function is used to read the sliders that will go to the IN b dim_x = absorbercontroller.read_attribute("SetIn").dim_x if dim_x > 0: sliders_inout = absorbercontroller.SetIn print "Sliders to move In (flaged to 1):" for slider in sliders_inout: print slider def get_slidersIn(absorbercontroller): """The get_statusIn function is used to read the status of the sliders (1 IN, 0 OUT).""" dim_x = absorbercontroller.read_attribute("SlidersIn").dim_x if dim_x > 0: sliders_inout = absorbercontroller.SlidersIn print "Sliders IN (flaged to 1):" for slider in sliders_inout: print slider def get_slidersOut(absorbercontroller): """The get_statusOut function is used to read the status of the sliders (0 IN, 1 OUT)."" dim_x = absorbercontroller.read_attribute("SlidersOut").dim_x if dim_x > 0: sliders_inout = absorbercontroller.SlidersOut print "Sliders OUT (flaged to 1):" for slider in sliders_inout: print slider def get_statusSliders(absorbercontroller): """The get_statusSliders function is used to read the status of the sliders (1 Error)."" dim_x = absorbercontroller.read_attribute("StatusSliders").dim_x if dim_x > 0: sliders_status = absorbercontroller.StatusSliders print "Status sliders (1 if error):" for slider in sliders_status: print slider def get_FlagError(absorbercontroller): """The get_FlagError function returns 1 if there is any slider in error""" print "Error flag (1 if error):" print absorbercontroller.FlagError def get_FlagMovementOK(absorbercontroller): """The get_FlagMovementOK function returns 1 if the last movement was smoothly done""" print "Movement flag (1 if last movement smoothly done):" print absorbercontroller.FlagMovementOK def set_position(absorbercontroller,position): """The set_position function is used to move the sliders to the given position absorbercontroller.write_attribute("Position",position) (12 bits def get_position(absorbercontroller): """The get_position function is used to read the current position (12 bits in decimal)." print "Current position (decimal):" print absorbercontroller.Position def move(absorbercontroller): """The move function is used to perform the movement of the sliders""" absorbercontroller.Move() # # main # try : absorbercontroller = DeviceProxy( "//haso111n:10000/test/absorber/1") if( len( sys.argv) == 1): get_nbsliders(absorbercontroller) get_position(absorbercontroller) get_slidersToMoveIn(absorbercontroller) get_slidersIn(absorbercontroller) get_slidersOut(absorbercontroller) get_statusSliders(absorbercontroller) get_FlagError(absorbercontroller) get_FlagMovementOK(absorbercontroller) print " " print "Run ’python absorbercontroller.py help’ to see program options" print " " else: if(sys.argv[1] == "help"): print "Usage:" print "-> to perform movement" print "python absorbercontroller.py move" print "-> to move sliders to the given position" print "python absorbercontroller.py setPosition x" print "where x is the decimal representation of 12 bits (1-> move in)" print "-> to set sliders to move" print "python absorbercontroller.py set2move x y z ..." print "where ’x, y, z ...’ would be 0’s or 1’s" print "depending on the sliders set for moving in" print "-> to get information and status" print "python absorbercontroller.py" if(sys.argv[1] == "move"): print "Moving" move(absorbercontroller) elif(sys.argv[1] == "set2move"): print "Set sliders to move in " i = 0 values = [] for lens in sys.argv: if(i > 1): values.append(int(sys.argv[i])) i = i + 1 print values set_slidersToMoveIn(absorbercontroller,values) elif(sys.argv[1] == "setPosition"): print "Moving sliders" print sys.argv[2] set_position(absorbercontroller,int(sys.argv[2])) else: print "Run ’python absorbercontroller.py help’ to see program options" except Exception, inst : print "Failed with exception !" print sys.exc_info()[0] print type(inst) # the exception instance print inst.args # arguments stored in .args 6.2.6 How to ... 6.3 Analyzer Tango Server for moving several motors as a function of the energy. pogo_html_docu/Analyzer/index.html See pogo generated info for more details. 6.3.1 Properties pogo_html_docu/Analyzer/Properties.html See pogo generated info for more details. DeviceThetaMotor. Name of the Tango Device of the theta motor. DeviceTThetaMotor. Name of the Tango Device of the ttheta motor. 6.3.2 States pogo_html_docu/Analyzer/States.html See pogo generated info for more details. MOVING. Any of the devices in MOVING state. ON. All devices in idle state. 6.3.3 Commands pogo_html_docu/Analyzer/Commands.html See pogo generated info for more details. Calibrate. Calibrate the motors taking the input argument as the energy for the position calculation. Init. Default Tango command. Initializes the device. StopMove. Stops all movements. 6.3.4 Attributes pogo_html_docu/Analyzer/Attributes.html See pogo generated info for more details. Dhkl. Dhkl value for the motor positions calculation. Distance. Distance for tthana calculation. Position. Computes the position of the motors for the energy value written in this attribute, and moves the motors to those positions. Reads the energy from the position of the motors. PositionSim. Setting this attribute does not involve any move. Instead the attribute ResultSim is filled with the calculated final positions for the motors. ResultSim. A string that returns the calculated final positions after the PositionSim attribute has been set. ThanaOffset. Theta position offset for the motor positions calculation. TthanaOffset. Ttheta position offset for the motor positions calculation. UnitLimMax. Software maximum limit for the Position. UnitLimMin. Software minimum limit for the Position. 6.3.5 Client Example This python script reads the energy from the monocromator and, according to the analyzer selected by the first given argument, computes the distance hkl and thana offset values. Giving 1 as a second argument, these values would be written to the analyzer device together with the energy value, so the motors will be moved. The limits of the energy are also set to the analyzer device with the computed values. from PyTango import * from math import sqrt,sin,asin import sys import time if( len( sys.argv) < 3): print " " print "This program requires 2 arguments:" print "--> Analyzer Id" print "--> flag for choosing if writting the computed dhkl " print " and thana_offset values to the Analyzer Tango device and move" print " move the motors (0 -> no, 1 -> yes)." print "Possible analyser values: " print "\n" print " (0) no Analyser \n" print " (1) Al 100 \n" print " (2) Al 110 \n" print " (3) Al 111 \n" print " (4) Au 111 \n" print " (5) Cu 100 \n" print " (6) Cu 110 \n" print " (7) Cu 111 \n" print " (8) Dy 001 \n" print " (9) Ge 100 \n" print " (10) Ge 110 \n" print " (11) Ge 111 \n" print " (12) LiF 100 \n" print " (13) LiF 110 \n" print " (14) MgO 110 \n" print " (15) MgO 111 \n" print " (16) PG 001 \n" print " (17) Si 100 \n" print " (18) Si 110 \n" print " (19) Si 111 \n" print " (100) Analyser is not listed \n" print "Run ’python ana_setup.py energy_value analyzer_id’" else: energy_device = DeviceProxy("p09/dcmener/mono.01") energy = energy_device.Position print energy energy = energy/1000. print energy analyser = int(sys.argv[1]) analyser_option = analyser flag_write_to_device = int(sys.argv[2]) status = 1 theta_motor = DeviceProxy( "p09/motor/exp.17") thana = theta_motor.Position etaana_motor = DeviceProxy( "p09/motor/exp.19") etaana = etaana_motor.Position #$energy=12.39842/$wavelength; wavelength=12.39842/energy; my_pi=3.14159265 finish1 = 0 ana ="nan" h = 0 k = 0 l = 0 dhkl = 0 exception = 0 mismatch = 0 continue_ana_setup = 0 if analyser == 0: ana="nan" dhkl="nan" print " You are not using any polarisation analyzer \n\n" finish1 = 1 elif analyser == 1: ana="Al 100" h = 2 k = 0 l = 0 dhkl=4.0496/2 exception=0; elif analyser == 2: ana="Al 110" h = 2 k = 2 l = 0 dhkl=4.0496/sqrt(8) exception=0 elif analyser == 3: ana="Al 111" h = 1 k = 1 l = 1 dhkl=4.0496/sqrt(3) exception=0 elif analyser == 4: ana="Au 111" h = 1 k = 1 l = 1 dhkl=4.080/sqrt(3) exception=0 elif analyser == 5: ana="Cu 100" h = 2 k = 0 l = 0 dhkl=3.610/2 exception=0 elif analyser == 6: ana="Cu 110" h = 2 k = 2 l = 0 dhkl=3.610/sqrt(8) exception=0 elif analyser == 7: ana="Cu 111" h = 1 k = 1 l = 1 dhkl=3.610/sqrt(3) exception=0 elif analyser == 8: ana="Dy 001" h = 0 k = 0 l = 2 dhkl=5.6475/2 exception=0 elif analyser == 9: ana="Ge 100" h = 2 k = 0 l = 0 dhkl=5.64613/2 exception=1 elif analyser == 10: ana="Ge 110" h = 2 k = 2 l = 0 dhkl=5.64613/sqrt(8) exception=0 elif analyser == 11: ana="Ge 111" h = 1 k = 1 l = 1 dhkl=5.64613/sqrt(3) exception=2 elif analyser == 12: ana="LiF 100" h = 2 k = 0 l = 0 dhkl=4.0258/2 exception=0 elif analyser == 13: ana="LiF 110" h = 2 k = 2 l = 0 dhkl=4.0258/sqrt(8) exception=0 elif analyser == 14: ana="MgO 110" h = 2 k = 2 l = 0 dhkl=4.2120/sqrt(8) exception=0 elif analyser == 15: ana="MgO 111" h = 1 k = 1 l = 1 dhkl=4.2120/sqrt(3) exception=0 elif analyser == 16: ana="PG 001" h = 0 k = 0 l = 2 dhkl=6.7079/2 exception=0 elif analyser == 17: ana="Si 100" h = 2 k = 0 l = 0 dhkl=5.43095/2 exception=1 elif analyser == 18: ana="Si 110" h = 2 k = 2 l = 0 dhkl=5.43095/sqrt(8) exception=0 elif analyser == 19: ana="Si 111" h = 1 k = 1 l = 1 dhkl=5.43095/sqrt(3) exception=2 elif analyser == 100: dhkl="nan" ana="nan" print "\n" print "\n" print " Please update file ana_setup.pl in directory /home/p09/prog/spec_macros/ \n\ print "\n" finish1 = 1 if finish1 == 0: analyser = sin(82*my_pi/360) ana_estop_1=12.39842/(2*dhkl*analyser/1) ana_estop_2=12.39842/(2*dhkl*analyser/2) ana_estop_3=12.39842/(2*dhkl*analyser/3) ana_estop_4=12.39842/(2*dhkl*analyser/4) analyser=sin(98*my_pi/360) ana_estart_1=12.39842/(2*dhkl*analyser/1) ana_estart_2=12.39842/(2*dhkl*analyser/2) ana_estart_3=12.39842/(2*dhkl*analyser/3) ana_estart_4=12.39842/(2*dhkl*analyser/4) if energy > ana_estart_1 and energy < ana_estop_1 and (exception == 0 or exception = dhkl=dhkl h=h k=k l=l elif energy > ana_estart_1 and energy < ana_estop_1 and exception == 1: h=h k=k l=l mismatch = 1 elif energy > ana_estart_2 and energy < ana_estop_2 and ( exception == 0 or excepti dhkl=dhkl/2 h=2*h k=2*k l=2*l elif energy > ana_estart_2 and energy < ana_estop_2 and exception == 2: h=h k=k l=l mismatch = 1 elif energy > ana_estart_3 and energy < ana_estop_3 and ( exception == 0 or exceptio dhkl=dhkl/3 h=3*h k=3*k l=3*l elif energy > ana_estart_3 and energy < ana_estop_3 and exception == 1: h=h k=k l=l mismatch = 1 elif energy > ana_estart_4 and energy < ana_estop_4: dhkl=dhkl/4 h=4*h k=4*k l=4*l else: h=h k=k l=l mismatch = 1 if mismatch == 0: thana_calc= asin( wavelength/(2*dhkl))*180/my_pi thana_offset=thana-thana_calc analyser=sin(82*my_pi/360) ana_estop=12.39842/(2*dhkl*analyser/1) analyser=sin(98*my_pi/360) ana_estart=12.39842/(2*dhkl*analyser/1) if energy print print print print print > ana_estart and energy < ana_estop: "\n" "\n" " Did you center pth (y/n) ?. If not start again the program" "\n" "\n" onoff=1 ana_flag = onoff print " You are using " + str(h) + str(k) + str(l) + " reflexion of analyser print " Lattice spacing is " + str(dhkl) + " Angstroem" print " Calculated value for position of pth is " + str(thana_calc) + " degr print " Current centered position of pth (at peta = " + str(etaana) + ") is print " Offset in pth is " + str(thana_offset) + " degrees \n" f = open(’ana_setup.output’,’w’) f.write(str(ana_flag) + " \n") f.write(str(ana) + " " + str(h) + str(k) + str(l) + " " + str(energy) + " " print " Remark: centered position of pth might change when changing peta \n" print " If this is the case, enter this menu again after centering pth at" print " the new position of peta \n" print "\n" print "\n" if flag_write_to_device == 1: analyzer_device = DeviceProxy("p09/analyzer/exp.01") analyzer_device.Dhkl = dhkl analyzer_device.ThanaOffset = thana_offset energy = energy*1000. print energy ana_estop = ana_estop*1000. ana_estart = ana_estart*1000. analyzer_device.UnitLimitMax = ana_estop analyzer_device.UnitLimitMin = ana_estart # analyzer_device.Position = energy else: mismatch: print "\n" print "\n" print " Energy = " print energy print " keV \n" print "\n" if exception != 1: print str(ana) + " works best between " print ana_estart_1 print " and " print ana_estop_1 print " keV \n" if exception == 1: print str(ana) +" works best between " print ana_estart_2 print " and " print ana_estop_2 print " keV \n" if exception != 2 and exception != 1: print " " print ana_estart_2 print " and " print ana_estop_2 print " keV \n" if exception != 1: print " " print ana_estart_3 print " and " print ana_estop_3 print " keV \n" if exception == 2 or exception == 1 or analyser_option == 16 or analyser_option print " " print ana_estart_4 print " and " print ana_estop_4 print " keV \n" print " \n" print " Select another analyser or move the energy ! \n\n\n" else: #finish1: onoff=0 ana_flag = onoff thana_offset="nan" dhkl="nan" analyser_option="nan" f = open(’ana_setup.output’,’w’) f.write(str(ana_flag) + " \n") f.write(str(ana) + " " + str(h) + str(k) + str(l) + " " + str(energy) + " " + str(a print " Wrong use of the program: \n" print " Posible errors: " print " -- You are not using any polarisation analyzer" print " -- Please center pth" 6.4 AnalyzerEP01 pogo_html_docu/AnalyzerEP01/index.html See pogo generated info for more details.. Virtual motor for controlling the energy of the analyzer-detector system in p01 by moving three motors. 6.4.1 Properties pogo_html_docu/AnalyzerEP01/Properties.html See pogo generated info for more details. 6.4.2 States pogo_html_docu/AnalyzerEP01/States.html See pogo generated info for more details. 6.4.3 Commands pogo_html_docu/AnalyzerEP01/Commands.html See pogo generated info for more details. 6.4.4 Attributes pogo_html_docu/AnalyzerEP01/Attributes.html See pogo generated info for more details. 6.5 AttoCube Tango Server for controlling the motors connected to the AttoCube Positioner. Each positioner can have six sensors, numbering from 0 to 5. The Server uses two classes: AttoCubeCtrl (connecting to the hardware) and AttoCubeMotor (for controlling every single axis). The code of the AttoCubeMotor class includes the AttoCubeCtrl class. This class is used to generate the corresponding library (libAttoCubeCtrl.a). 6.5.1 AttoCubeCtrl pogo_html_docu/AttoCubeCtrl/index.html See pogo generated info for more details. Class creating the connection to the hardware via ethernet (using multicast). Properties pogo_html_docu/AttoCubeCtrl/Properties.html See pogo generated info for more details. HardwareId. Hardware Id of the positioner to connect to. An AttoCube function finds the positioners in the system. The Hardware Id distinguish the different devices and selects which one has to be connected. States pogo_html_docu/AttoCubeCtrl/States.html See pogo generated info for more details. FAULT. Problems creating connection or errors from the AttoCube library calls. ON. No errors. Commands pogo_html_docu/AttoCubeCtrl/Commands.html See pogo generated info for more details. GetAmplitude. Returns the current amplitude (in mV). GetDCLevel. Returns the current DC level. GetFrequency. Returns the frequency. GetReference. Returns distance of reference mark to the origin, for the axis given as argument. GetRotCount. Returns the current number of rotations, in case of a rotary axis. LoadFile. Loads the given configuration file to the given axis. MoveContinous. Starts continuously positioning. MoveHome. Moves given axis to the reference position. MoveRelative. Starts approach to relative target position. MoveSingleStep. Starts a one step positioning. State. Returns the device state. Default function. Status. It gets the device status. Default function. StopMove. Stops the movement. ReadAxisState. Returns status of the given axis in a long number. ReadAxisStatus. Reads status of the given axis. ReadPosition. Reads position of the given axis. ResetPosition. Sets the origin of the given axis to the actual position. SetAmplitude. Sets the amplitude sepoint (in mV). SetAmplitudeControl. Selects type of amplitude control. 0: speed, 1: amplitude, 2: step size. GetDCLevel. Sets the DC level. SetFrequency. Sets the frequency. SetOutput. Activates/deactivates the output relais of the addressed axis. SetSingleCircleMode. Switches single circle mode. In case of activated single circle mode the number of rotations are ignored and the shortest way to target position is used. Only relevant for rotary actors. SetStepCount. Configures the number of successive steps caused by external trigger, or manual step request. SetStopDetection. Switches stop detection. 0: off, 1: on. WritePosition. Moves axis to the given position. Attributes pogo_html_docu/AttoCubeCtrl/Attributes.html See pogo generated info for more details. 6.5.2 AttoCubeMotor pogo_html_docu/AttoCubeMotor/index.html See pogo generated info for more details. Properties pogo_html_docu/AttoCubeMotor/Properties.html See pogo generated info for more details. AxisNb. Axis number (0-5). ControllerDS. Name of the AttoCubeCtrl tango device establishing the hardware connection. FlagRotaryMotor. Set to 1 if rotary motor. States pogo_html_docu/AttoCubeMotor/States.html See pogo generated info for more details. FAULT. Error. MOVING. Axis is moving. ON. Idle state. Commands pogo_html_docu/AttoCubeMotor/Commands.html See pogo generated info for more details. Calibrate. Sets the value given in the argument as the current position calculating an offset. It recalculates the software limits. Init. Default Tango command. Stop detection is set to 1. MoveContinous. Starts continuously positioning. MoveHome. Moves given axis to the reference position. MoveRelative. Starts approach to relative target position. MoveSingleStep. Starts a one step positioning. ResetMotor. Sets the origin of the given axis to the actual position. SetOutput. Activates/deactivates the output relais of the addressed axis. State. Reads the axis state from the hardware. Status. Reads the axis status from the hardware. StopMove. Stops the motor. Attributes pogo_html_docu/AttoCubeMotor/Attributes.html See pogo generated info for more details. Amplitude. Sets/Gets the current amplitude in V. AmplitudeControl. Selects type of amplitude control. 0: speed, 1: amplitude, 2: step size. Reads last set value, or -1 at the initialization. DCLevel. Sets/Gets the current DC level. Frequency. Sets/Gets the current frequency. Position. Sets/Gets the current position in mm. Rotations. Returns the current number of rotations, in case of a rotary axis (-1 for others). SingleCircleMode. Switches single circle mode. In case of activated single circle mode the number of rotations are ignored and the shortest way to target position is used. Only relevant for rotary actors. For not rotary motors the value is always -1. For rotary motors is set to 0 in the hardware at the initialization, and the changes writting to this attribute are only in software. SlewRate. Gets the current speed. StepCount. Sets/Gets the number of successive steps caused by external trigger, or manual step request. StepWidth. Gets the current step width. UnitCalibration. Offset to be added to the hardware position. Recalculated when a calibration is done (by the Calibrate command), it can also be written directly. UnitLimitMax. Software maximum limit. If both UnitLimitMax and UnitLimitMin are 0 or UnitLimitMax is smaller than UnitLimitMin they will not be used. Recalculated when a calibration is done (by the Calibrate command or writing to the UnitCalibration attribute. UnitLimitMin. Software minimum limit. If both UnitLimitMax and UnitLimitMin are 0 or UnitLimitMax is smaller than UnitLimitMin they will not be used. Recalculated when a calibration is done (by the Calibrate command or writing to the UnitCalibration attribute. 6.5.3 Example Clients 6.5.4 How to ... 6.6 AttoCubeANC300 Tango Server for controlling the two motors connected to the axis 1 and 2 of a AttoCube ANC300 Controller. The Server uses two classes: AttoCubeANC300Ctrl (Socket interface) and AttoCubeANC300Motor (for controlling every single axis). The code of the AttoCubeANC300Motor class includes the AttoCubeANC300Ctrl class. This class is used to generate the corresponding library (libAttoCubeANC300Ctrl.a). 6.6.1 AttoCubeANC300Ctrl pogo_html_docu/AttoCubeANC300Ctrl/index.html See pogo generated info for more details. Class creating the socket connection and implementing the commands for writing and reading to the socket. Properties pogo_html_docu/AttoCubeANC300Ctrl/Properties.html See pogo generated info for more details. IpAddress. IP address. PortNb. Port number. SimulationMode. 0 real mode, 1 simulation mode. States pogo_html_docu/AttoCubeANC300Ctrl/States.html See pogo generated info for more details. FAULT. Problems creating socket connection. ON. Socket connection succeeds. Commands pogo_html_docu/AttoCubeANC300Ctrl/Commands.html See pogo generated info for more details. CloseSocket. Close socket connection. State. Returns the device state. Default function. Status. It gets the device status. Default function. WriteReadSocket. Sends command to the controller and returns the answer. Attributes pogo_html_docu/AttoCubeANC300Ctrl/Attributes.html See pogo generated info for more details. 6.6.2 AttoCubeANC300Motor pogo_html_docu/AttoCubeANC300Motor/index.html See pogo generated info for more details. Properties pogo_html_docu/AttoCubeANC300Motor/Properties.html See pogo generated info for more details. AxisNumber. Motor axis number (1 or 2). SocketDS. Name of the AttoCubeANC300Ctrl tango device establishing the socket connection. States pogo_html_docu/AttoCubeANC300Motor/States.html See pogo generated info for more details. FAULT. Not able to connect to socket device. MOVING. Axis is moving. ON. Idle state. Commands pogo_html_docu/AttoCubeANC300Motor/Commands.html See pogo generated info for more details. Calibrate. Sets the value given in the argument as the current position. It recalculates the software limits. GetMode. Returns the mode of the corresponding axis (gnd or stp). MoveDownwards. Move motor in the downwards direction. Argument given in physical units (steps/conversion). MoveUpwards. Move motor in the upwards direction. Argument given in physical units (steps/conversion). SetMode. Set the given mode to the axis (gnd or stp). Movements are only allowed in stp mode. State. Gets the device state. Default Tango function. Status. Gets the device status. Default Tango function. StopMove. Stops motor movement. Attributes pogo_html_docu/AttoCubeANC300Motor/Attributes.html See pogo generated info for more details. Conversion. Factor for tranforming steps to physical units: Steps = Units * Conversion. Position. Sets/Gets the current position in physical units. The absolute position value is computed internally, taking into account the number of moved steps and the PositionSaved attribute (stored in the data base). PositionSaved. Used for accumulating the moved steps, it is stored in the database and Position is set to its value when the server is started. Written makes no action. Reads the same value as Position. UnitLimitMax. Software maximum limit. If UnitLimitMax is smaller or equal than UnitLimitMin they will not be used. UnitLimitMin. Software minimum limit. If UnitLimitMax is smaller or equal than UnitLimitMin they will not be used. 6.6.3 Example Clients 6.6.4 How to ... 6.7 AttributeMotor Tango Server for giving to any attribute the standard interface of a standard Hasylab motor. pogo_html_docu/AttributeMotor/index.html See pogo generated info for more details. 6.7.1 Properties pogo_html_docu/AttributeMotor/Properties.html See pogo generated info for more details. Accuracy. Accuracy for checking if the set value was already reached, and setting the state accordinly. If the state of the DeviceName device is not ON, the state would be set to that value, without comparing the current position to the set one. AttributeToMove. Name of the Tango attribute to be handled like the Position of a motor. DeviceName. Name of the Tango device with the AttributeToMove attribute . 6.7.2 States pogo_html_docu/AttributeMotor/States.html See pogo generated info for more details. FAULT. If DeviceName device is in FAULT. MOVING. If DeviceName device is in MOVING, or difference between current and set position is bigger than accurancy. ON. Default case. 6.7.3 Commands pogo_html_docu/AttributeMotor/Commands.html See pogo generated info for more details. Calibrate. Kept it for compatibility. Not used. Init. Default Tango command. Initializes the device. ResetMotor. Set the last set position to the current position and set the state to ON. Usefull is for some reason the device is still in MOVING state, even if the attribute is not changing its value. StopMove. Send StopMove to the DeviceName device (only for safety reasons, even if the attribute AttributeToMove doesn’t have to be affected), and performs the same as ResetMotor. 6.7.4 Attributes pogo_html_docu/AttributeMotor/Attributes.html See pogo generated info for more details. Position. Reads the value of the attribute given in the AttributeToMove property. Writes the value to that attribute, if the DeviceName device is not in ON state the server will give an exception. UnitLimMax. Software maximum limit for the Position. If UnitLimMax equal or smaller than UnitLimMin the limits will not be used. UnitLimMin. Software minimum limit for the Position. If UnitLimMin equal or bigger than UnitLimMax the limits will not be used. 6.7.5 Example 6.8 DiffracMuP09 Tango Server for implementing a virtual motor used as mu axis for the eh2 p09 diffractometer. pogo_html_docu/DiffracMuP09/index.html See pogo generated info for more details. 6.8.1 Properties pogo_html_docu/DiffracMuP09/Properties.html See pogo generated info for more details. DistanceBetweenMotors. Distance between the motors (used in the calculations). MotorDs. Name of the Tango Device of the downstream motor. MotorUs. Name of the Tango Device of the upstream motor. 6.8.2 States pogo_html_docu/DiffracMuP09/States.html See pogo generated info for more details. FAULT. Connection to the motor devices not possible. MOVING. Any of the devices in MOVING state. ON. All devices in idle state. 6.8.3 Commands pogo_html_docu/DiffracMuP09/Commands.html See pogo generated info for more details. Calibrate. Not implemented. Kept for compatibility. Init. Default Tango command. Initializes the device. StopMove. Stops us and ds motors. 6.8.4 Attributes pogo_html_docu/DiffracMuP09/Attributes.html See pogo generated info for more details. DeltaDiffHeight. Correction in distance for tilting the diffractometer, calculated from motor positions. DiffHeightFlat. Distance between the Alpha plate and the sample when the diffractometer is not tilted (used in calculations). DiffHeightTilted. Distance between the Alpha plate and the sample when the diffractometer is tilted, calculated from motor positions. DistanceHeight. Distance for DeltaDiffHeight calculation. Position. Computes the position of the motors from the virtual motor position written in this attribute, and moves us and ds motors to the calculated positions. Reads the virtual motor position from the position of the motors. PositionSim. Setting this attribute does not involve any move. Instead the attribute ResultSim is filled with the calculated final positions for the motors. ResultSim. A string that returns the calculated final positions after the PositionSim attribute has been set. UnitLimMax. Software maximum limit for the Position. UnitLimMin. Software minimum limit for the Position. 6.9 EcovarioServoMotor pogo_html_docu/EcovarioServoMotor/index.html See pogo generated info for more details.. 6.9.1 Properties pogo_html_docu/EcovarioServoMotor/Properties.html See pogo generated info for more details. 6.9.2 States pogo_html_docu/EcovarioServoMotor/States.html See pogo generated info for more details. 6.9.3 Commands pogo_html_docu/EcovarioServoMotor/Commands.html See pogo generated info for more details. 6.9.4 Attributes pogo_html_docu/EcovarioServoMotor/Attributes.html See pogo generated info for more details. 6.10 FMBOxfDCM Tango Server for controlling the Double Crystal Monochromator from FMB Oxford. The Server uses three classes: FMBOxfDCMCtrl (Socket interface), FMBOxfDCMEnergy (for operating the monochromator as a whole) and FMBOxfDCMMotor (for controlling every single motor). The code of the FMBOxfDCMEnergy class includes the FMBOxfDCMCtrl and FMBOxfDCMMotor classes. These three classes are used to generate the corresponding libraries (libFMBOxfDCMCtrl.a and libFMBOxfDCMMotor.a). The parallel and the perpendicular motor can be Oms motors. For the Petra3 extension the Bragg motor will be controlled by a tango server developed by FMBOxford. This tango server makes the conexion to the hardware, so the FMBOxfDCMCtrl class is not used any more (the commands to the controller are sent by the same class that is controlling the bragg angle). The FMBOxfDCMMotor class is also not needed, bragg motor is controlled by the new class and parallel and perpendicular are oms motors. The Server distinguishes by the Beamline property which case has to be used. For the Petra3 extension beamlines the property version can be any number lower than 9. 6.10.1 FMBOxfDCMCtrl pogo_html_docu/FMBOxfDCMCtrl/Description.html See pogo generated info for more details. Class creating the socket connection and implementing the commands for writing and reading to the socket. Properties pogo_html_docu/FMBOxfDCMCtrls/Properties.html See pogo generated info for more details. IpAddr. IP address. PortNb. Port number. SimulationMode. 0 real mode, 1 simulation mode. States pogo_html_docu/FMBOxfDCMCtrl/States.html See pogo generated info for more details. FAULT. Problems creating socket connection. ON. Socket connection succeeds. Commands pogo_html_docu/FMBOxfDCMCtrl/Commands.html See pogo generated info for more details. CloseAdrPort. Close socket connection. State. Returns the device state. Status. It gets the device status. StopMoves. Send CTRL-A for stopping all movements. WriteAdrPort. Send command to the monochromator controller. This command should not be used. After a writting one has to wait for an answer (even if it is empty) before sending another command, if not there are conflicts with the readout. WriteReadAdrPort. Send command to the monochromator controller and read the answer. Attributes pogo_html_docu/FMBOxfDCMCtrl/Attributes.html See pogo generated info for more details. 6.10.2 FMBOxfDCMEnergy pogo_html_docu/FMBOxfDCMEnergy/Description.html See pogo generated info for more details. Class for controlling the monochromator. A thread is started any time a command is perfomed, and it ends when the actions and movements are finished. This avoids timeout problems. It does not use the PLCs for energy movements. For a given energy the positions of the motors are computed with a fix ExitOffset value and the motors are moved to those positions. Properties pogo_html_docu/FMBOxfDCMEnergy/Properties.html See pogo generated info for more details. Beamline. Beamline number. Used for getting the shutter status if the commands startup or shutdown are called. BraggDevice. Name of the FMBOxfDCMMotor tango device corresponding to the Bragg Motor. BraggOffsetC0. UnitCalibration to be written to the Bragg Motor using the ChangeCrystalAndRecalibrate command for changing to crystal 0. BraggOffsetC1. UnitCalibration to be written to the Bragg Motor using the ChangeCrystalAndRecalibrate command for changing to crystal 1. BraggOffsetC2. UnitCalibration to be written to the Bragg Motor using the ChangeCrystalAndRecalibrate command for changing to crystal 2. Bragg2Device. Name of the FMBOxfDCMMotor tango device corresponding to the 2nd. Bragg Motor in the DCM GKSS monochromator (only used for version 10). Bragg2OffsetC0. UnitCalibration to be written to the Bragg Motor in the DCM GKSS monochromator (only used for version 10) using the ChangeCrystalAndRecalibrate command for changing to crystal 0. Bragg2OffsetC1. UnitCalibration to be written to the Bragg Motor in the DCM GKSS monochromator (only used for version 10) using the ChangeCrystalAndRecalibrate command for changing to crystal 1. Bragg2OffsetC2. UnitCalibration to be written to the Bragg Motor in the DCM GKSS monochromator (only used for version 10) using the ChangeCrystalAndRecalibrate command for changing to crystal 2. CrystalCutGap. Value of the gap when the crystal cut is used (crystal 2). Only used with crystal 2 for computing the ExitOffset as a function of the Bragg angle. DCrystalSI111. Lattice spacing for SI111 crystal. If value is not set or set to 0 or negative, a default value is taken. DCrystalSI311. Lattice spacing for SI311 crystal. If value is not set or set to 0 or negative, a default value is taken. FMBOxfDCMCtrlDevice. Name of the FMBOxfDCMCtrl tango device making the connection to the socket. Not used for the petra3 extension beamlines. FMBOxfDCMCtrlDevice2. Name of the a second FMBOxfDCMCtrl tango device for the case of having more motors (only used for versions bigger than 9). LongitudinalDevice. Name of the FMBOxfDCMMotor tango device corresponding to the longitudinal motor in the DCM GKSS monochromator (only used for version 10). LongitudinalOffsetC0. UnitCalibration to be written to the longitudinal Motor in the DCM GKSS monochromator (only used for version 10) using the ChangeCrystalAndRecalibrate command for changing to crystal 0. LongitudinalOffsetC1. UnitCalibration to be written to the longitudinal Motor in the DCM GKSS monochromator (only used for version 10) using the ChangeCrystalAndRecalibrate command for changing to crystal 1. LongitudinalOffsetC2. UnitCalibration to be written to the longitudinal Motor in the DCM GKSS monochromator (only used for version 10) using the ChangeCrystalAndRecalibrate command for changing to crystal 2. ParDevice. Name of the FMBOxfDCMMotor tango device corresponding to the parallel motor. Only for versions smaller than 10. ParOffsetC0. UnitCalibration to be written to the Parallel Motor using the ChangeCrystalAndRecalibrate command for changing to crystal 0. Only for versions smaller than 10. ParOffsetC1. UnitCalibration to be written to the Parallel Motor using the ChangeCrystalAndRecalibrate command for changing to crystal 1. Only for versions smaller than 10. ParOffsetC2. UnitCalibration to be written to the Parallel Motor using the ChangeCrystalAndRecalibrate command for changing to crystal 2. Only for versions smaller than 10. PerpDevice. Name of the FMBOxfDCMMotor tango device corresponding to the perpendicular motor. Only for versions smaller than 10. PerpOffsetC0. UnitCalibration to be written to the Perpendicular Motor using the ChangeCrystalAndRecalibrate command for changing to crystal 0. Only for versions smaller than 10. PerpOffsetC1. UnitCalibration to be written to the Perpendicular Motor using the ChangeCrystalAndRecalibrate command for changing to crystal 1. Only for versions smaller than 10. PerpOffsetC2. UnitCalibration to be written to the Perpendicular Motor using the ChangeCrystalAndRecalibrate command for changing to crystal 2. Only for versions smaller than 10. SimulationMode. 0 real mode, 1 simulation mode. Version. 0 -¿ old PMAC software, 1 -¿ new PMAC software, 2 -¿ new PMAC software with old conversion factors (p10), 10 -¿ DCM from GKSS, different energy calculation, 11 -¿ SBM from GKSS, different energy calculation. For the P3 extension beamlines any number lower than 9 can be used. States pogo_html_docu/FMBOxfDCMEnergy/States.html See pogo generated info for more details. FAULT. A Energy movement is tried when a motor is not active or its set position is out of limits (and it is not masked with the MaskMotorMoves attribute). MOVING. A command is being performed. ON. It is set at the beginning of the program. Server in idle state. Commands pogo_html_docu/FMBOxfDCMEnergy/Commands.html See pogo generated info for more details. ChangeCrystalAndRecalibrate. Change the crystal to the one given as argument and recalibrate the motors using the offset constant given in the properties of the device (these values will be written to the UnitCalibration attribute of the corresponding motors). The values of the offsets used for the recalibration are checked and no action is performed if they are the default ones (-9999.). In case the current or the desired crystal is the channel cut, not recalibration is done for perperdicular and parallel motors. CheckError. It checks if error in motor or timeout: 0 not error, bit 1 error in bragg motor, bit 2 error in perpendicular motor, bit 3 error in parallel motor, bit 4 timeout, bit 5 skipped. Calibrate. Set the current energy to the given value and calibrates all implied motors accordingly. HomeAll. Only implemented for version 10. It homes all motors. Shutdown. Performs an automatic system shutdown. Before starting the shutdown procedure the server checks the shutter status, only if it is closed the shutdown is performed. In case the parallel motor is an oms one, and because of that not moved by the pmac shutdown funcion, it is moved to its parallel limit before the shutdown function from the pmac is called. StartUp. Performs an automatic system start up. It uses the parameter PhasingMode for setting soft or forced phasing (not if version 0). Before starting the startup procedure the server checks the shutter status, only if it is closed the startup is performed. In case the parallel motor is an oms one, and because of that not moved by the pmac startup funcion, it is moved to its parallel limit before the startup function from the pmac is called. State. Returns the device state. Status. It gets the device status. StopMove. Stops the movements started by the Server inside of the loop looking if the movement has finished. Attributes pogo_html_docu/FMBOxfDCMEnergy/Attributes.html See pogo generated info for more details. BraggAngle. Reads the position from the Tango server corresponding to the bragg motor. Crystal. It is used for getting the right lattice distance in the energy calculations: 0 -¿ CrystalSi111, 1 -¿ CrystalSi311, 2 CrystalSi111 with crystal cut (in this case only the bragg angle is moved when the energy is set, and the ExitOffset is computed as a function of the bragg angle and the CrystalCutGap. If the parallel motor is in a position bigger than 100 when the crystal is swichted to 2, it will be moved to 99.5). For version 11, it is determined by the position of the bragg motor and by writting moves the motor. ExitOffset. Exit offset in mm. It is used for the motor position calculations. If the crystal is 2, this value is computed from the Bragg angle und the CrystalCutGap. ExitOffsetC0. Exit offset to be set when the crystal is changed to 0 using the ChangeCrystalAndRecalibrate command. The value of this attribute is set together with the ExitOffset attribute if the current crystal is 0. ExitOffsetC1. Exit offset to be set when the crystal is changed to 1 using the ChangeCrystalAndRecalibrate command. The value of this attribute is set together with the ExitOffset attribute if the current crystal is 1. MaskMotorMoves. Mask for avoiding that a motor prevent the energy to move (and the state of the device to be set to FAULT) when the is not active, or the given position is out of limits. 1 -¿ Perpendicular & 2 -¿ Parallel. PhasingMode. Allows the selection of the phasing mode: 0 -¿ soft, 1 -¿ forced. It is used by the StartUp command. Position. Reads the energy in eV, computed from the position of the motors. By writting moves the monochromator to the written value (in eV), writting in the position attribute of the implied motor devices. If the movement implies a change in the Bragg Angle larger than 10 degrees or outside the range (2.1, 55.5) the movement will not be performed. In crystal 2 only the bragg angle is moved. If any of the motors, in case a pmac motor and not an oms one is used, is not active (it is seen from a variable in the pmac) and this motor is not set in the MaskMotorMoves attribute, the state is set to FAULT and the movement is not performed. The same happens in any of the motor, in case of pmac ones, is in error (also read from pmac variables). If the position of the parallel motor corresponding to the given energy is below 25 mm, the motor will be moved to 25 mm. If the position of the perpendicular motor corresponding to the given energy is below 9 mm a Tango exception will be thrown and the energy movement will not be done. If the movement is done to bigger Bragg positions and the change in the Bragg angle is bigger than one degree, the bragg movement will be done only after the parallel axis has reached the soll position for the new given energy. The state is set to FAULT if any of the written positions is out of limits (for motors not set in the MaskMotorMoves attribute) but the rest of the motors are moved. PositionAccuracy. Reads PositionAccuracy from the Bragg Motor device. Value in eV. Only implemented for versions 1 and 2. PositionSim Setting this attribute does not involve any move. Instead the attribute ResultSim is filled with the calculated final positions. PseudoChannelCutMode. If set to 1 this mode is selected. The parallel axis will not be moved. Not movemente will be done if the position of the bragg angle is outside 5 degress of the position when this mode is set, or if the calculated parallel position is outside 15 mm from the current position. ResultSim An array of strings that returns the calculated final positions after the PositionSim attribute has been set. UnitLimitMax. Used for limiting the position (only if bigger than UnitLimitMin). UnitLimitMin. Used for limiting the position (only if smaller than UnitLimitMin). UpdateStatusRate. Rate for updating checking if the motor is still moving during a movement (in s). If it is less or equal than 0 or bigger than 1, the program set it to 1. 6.10.3 FMBOxfDCMMotor pogo_html_docu/FMBOxfDCMMotor/Description.html See pogo generated info for more details. Class for handling multiple axis movements. Properties pogo_html_docu/FMBOxfDCMMotor/Properties.html See pogo generated info for more details. AxiNb. Axis number of the coordinate system of the monochromator: 1 -¿ Bragg motor, 3 -¿ Perpendicular translation motor, 4 -¿ Parallel transaltion motor. FMBOxfDCMCtrlDevice. Name of the FMBOxfDCMCtrl tango device making the connection to the socket. SimulationMode. 0 real mode, 1 simulation mode. Version. 0 -¿ old PMAC software , 1 -¿ new PMAC software, 2 -¿ new PMAC software with old conversion factors (p10), 10 -¿ not use PMAC global movements, conversion factors has to be written to the Conversion attribute. States pogo_html_docu/FMBOxfDCMMotor/States.html See pogo generated info for more details. ALARM. Mode has been change but motors are not homed (only for GKSS motors). MOVING. Motor is moving. ON. Running without problems. FAULT. Commands pogo_html_docu/FMBOxfDCMMotor/Commands.html See pogo generated info for more details. Calibrate. Position is calibrated to be the value given as argument. UnitCalibration value is changed. ChangeModeAndHome. Change mode depending on the input argument (0-¿ open loop, 1-¿ close loop), change the Conversion attribute to the value corresponding to the new mode and home the motor. Only applicable to GKSS Monochromators (SBM -¿ version 11, DCM -¿ version 10). Jack (1,2,3 from DCM controller 1) , Lateral (4, 5 from DCM controller 1), Yaw (7,8 from DCM controller 2) and 2nd Roll (6 from controller 2) can not change the mode. Home. Moves motor to home position. Only implemented for GKSS Monochromators (SBM -¿ version 11, DCM -¿ version 10). Jack and Lateral motors (1, 2,3 and 4, 5 respectively from DCM controller 1) are homed from the FMBOxfDCMEnergy device, they can not be homed independently. ReadAxisStatus. Returns axis status variable read from pmac. State. Returns the device state. Status. It gets the device status. StopMove. Stops all motors in the PMAC. Attributes pogo_html_docu/FMBOxfDCMMotor/Attributes.html See pogo generated info for more details. Active. Write/Reads if motor is active. Set to 1 for activating it. If motor is not active, it can not be moved. AxisName. Name of the motor controlled by the device, for version 0, 1 and 2 is hard coded, for version 10 has to be written. Backlash. Backlash correction in physical units. This correction will be performed if the motors are move to a smaller position in steps. The sign of this variable is not important, the server take it as an absolute value. Conversion. The conversion factor (for version 0, 1 and 2 is hardcoded, for version 10 has to be written), counts = conversion*units. Mode. Writes/Reads current mode (0-¿ open loop, 1-¿ close loop) and change the Conversion attribute accordingly. The device goes to ALARM state until a homing is performed. Only applicable to GKSS Monochromators (SBM -¿ version 11, DCM -¿ version 10). Jack (1,2,3 from DCM controller 1) , Lateral (4, 5 from DCM controller 1), Yaw (7,8 from DCM controller 2) and 2nd Roll (6 from controller 2) can not change the mode. Position. Reads the current position in degrees for Bragg motor and mm for paralell and perpendicular motors. Writing it will move the motor to the given position, the movement is not perfomed if the motor is not active or in error (the corresponding flags are readout from the pmac). PositionAccuracy. Reads/Writes the variable motor-in-position-band from/to the PMAC. This value determine the accuracy in the position. Value in physical motor units (degress or mm). PositionCts. Reads the current position in counts. SlewDouble. Reads/writes the speed in counts/s as double. SlewDoubleMax. Reads/writes the maximum speed in counts/s as double. SlewRate. Reads/writes the current speed in counts/s as long. UnitCalibration. Offset position: Position = UnitCalibration + PositionCts/Conversion. UnitLimitMax. Used for limiting the position (only if bigger than UnitLimitMin). UnitLimitMin. Used for limiting the position (only if smaller than UnitLimitMin). UpdateStatusRate. Rate for updating checking if the motor is still moving during a movement (in s). If it is less or equal than 0 or bigger than 1, the program set it to 1. 6.10.4 FMBOxfDCMEnergy (version using PLCs in PMAC) pogo_html_docu/FMBOxfDCMEnergyWP/Description.html See pogo generated info for more details. Class for controlling the monochromator. A thread is started any time a command is perfomed, and it ends when the actions and movements are finished. This avoids timeout problems. It uses the PLCs for energy movements. Properties pogo_html_docu/FMBOxfDCMEnergyWP/Properties.html See pogo generated info for more details. BraggDevice. Name of the FMBOxfDCMMotor tango device corresponding to the Bragg Motor. It is used for reading the conversion factor. Only need for versions making global movements (0, 1 and 2), in other case is not used and the factor for the conversion is set to 1. FMBOxfDCMCtrlDevice. Name of the FMBOxfDCMCtrl tango device making the connection to the socket. FMBOxfDCMCtrlDevice2. Name of the a second FMBOxfDCMCtrl tango device for the case of having more motors (only used for version 10, where the motors are taken separately). SimulationMode. 0 real mode, 1 simulation mode. Version. 0 -¿ old PMAC software, 1 -¿ new PMAC software, 2 -¿ new PMAC software with old conversion factors (p10), 10 -¿ not use PMAC global movements. States pogo_html_docu/FMBOxfDCMEnergyWP/TangoDevStates.html See pogo generated info for more details. MOVING. A command is being performed. ON. It is set at the beginning of the program. Server in idle state. Commands pogo_html_docu/FMBOxfDCMEnergyWP/DevCommands.html See pogo generated info for more details. CheckError. It checks if error in motor or timeout: 0 not error, bit 1 error in bragg motor, bit 2 error in perpendicular motor, bit 3 error in parallel motor, bit 4 timeout, bit 5 skipped. HomeAll. Only implemented for version 10. It homes all motors. HomeJacks. Only implemented for version 10. It homes jack motors (motors 1, 2 and 3 for DCM controller 1), these motors can not be home independently. HomeLaterals. Only implemented for version 10. It homes lateral motors (motors 4 and 5 for DCM controller 1), these motors can not be home independently. MoveEnergy. Moves to the energy determined by the BraggAngle and ExitOffset attributes. It uses the attributes BraggOffsetInCts, PerpOffsetInCts and ParOffsetInCts for fine tuning, and the attribute Crystal for crystal selection (not if version 0). If the movement implies a change in the Bragg Angle larger than 10 degrees the movement will not be performed and the status will inform about that. MoveEnergyBrakeControl. Moves to the energy determined by the BraggAngle and ExitOffset attributes, with brake control, Bragg deactivation and error correction. It uses the attribute Crystal for crystal selection (not if version 0) and the attribute DeltaGain for setting a gain value to seed the positioning error correction. Shutdown. Performs an automatic system shutdown. Only allowed if the shutter is closed. Before performing the shutdown the parallel axis is moved to its negative limit. StartUp. Performs an automatic system start up. It uses the parameter PhasingMode for setting soft or forced phasing (not if version 0). Only allowed if the shutter is closed. Before performing the shutdown the parallel axis is moved to its negative limit. State. Returns the device state. Status. It gets the device status. StopMove. Stops the movements started by the Server inside of the loop looking if the movement has finished. Attributes pogo_html_docu/FMBOxfDCMEnergyWP/Attributes.html See pogo generated info for more details. BraggAngle. Bragg angle used by the MoveEnergy and MoveEnergyBrakeControl commands. It determines the energy together with the ExitOffset attribute. BraggOffsetInCts. Bragg offset with the unit in encoder counts (960000cts = 1 deg). It is used by the MoveEnergy command and allows the operator a fine tuning of the Bragg motor position. Crystal. It is used by the MoveEnergy and MoveEnergyBrakeControl commands for setting the crystal: 0 -¿ CrystalSi111, 1 -¿ CrystalSi311. DeltaGain. Gain value to seed the positioning error correction. The range of this value is 1 to 5. It is used by the MoveEnergyBrakeControl command. ExitOffset. Exit offset in mm. It is used by the MoveEnergy and MoveEnergyBrakeControl commands. It determines the energy together with the BraggAngle attribute. FlagFastMovement. If set to 1, the energy moves will be performed without checking if the axis are correctly set, the limits, and without setting the crystal. Useful for performing scans. ParOffsetInCts. Parallel offset with the unit in encoder counts (20000cts = 1 mm). It is used by the MoveEnergy command and allows the operator a fine tuning of the parallel motor position. PerpOffsetInCts. Perpendicular offset with the unit in encoder counts (20000cts = 1 mm). It is used by the MoveEnergy command and allows the operator a fine tuning of the perpendicular motor position. PhasingMode. Allows the selection of the phasing mode: 0 -¿ soft, 1 -¿ forced. It is used by the StartUp command. Position. Reads the energy in eV. By writting moves the monochromator to the written value (in eV). If the movement implies a change in the Bragg Angle larger than 10 degrees the movement will not be performed and the status will inform about that. 6.10.5 Example Clients 6.10.6 How to ... 6.11 Focusing Mirror P02 Tango Server for controlling the focusing mirrors at the p02 beamline. pogo_html_docu/FocusingMirrorP02/index.html See pogo generated info for more details. 6.11.1 Properties pogo_html_docu/FocusingMirrorP02/Properties.html See pogo generated info for more details. UpstreamTiltMotor. Device name of the upstream tilt motor of the mirror. DownstreamTiltMotor. Device name of the downstream tilt motor of the mirror. UpstreamBentMotor. Device name of the upstream bent motor of the mirror. DownstreamBentMotor. Device name of the downstream bent motor of the mirror. 6.11.2 States pogo_html_docu/FocusingMirrorP02/States.html See pogo generated info for more details. FAULT. Not able to read state from any of the connected motor devices. MOVING. Any connected motor in MOVING state. ON. All connected motors in ON state. 6.11.3 Commands pogo_html_docu/FocusingMirrorP02/Commands.html See pogo generated info for more details. State. Reads state from connected devices and set device state. Status. Tango default Status command. 6.11.4 Scalar Attributes pogo_html_docu/FocusingMirrorP02/Attributes.html See pogo generated info for more details. Curvature. Sets/Gets curvature of the mirror (mm): (UPB + DWB)/2. Ellipticity. Sets/Gets ellipticity of the mirror (mm): (UPB - DWB)/2. MirrorName. Name of the mirror for users identification. StopMove. Sends StopMove command to the four connected motors. Tilt. Sets/Gets tilt of the mirror (mrad): (UPT - DWT) * (280/1000). ZPos. Sets/Gets z position of the mirror (mm): (UPT + DWT). UPT: Upstream til, DWT: Downstream tilt, UPB: Upstream bent, DWB: Downstream bent. 6.12 GalilDMC The GalilDMC server contains 3 classes: GalilDMCCtrl which exports the TCP/IP socket connection, GalilDMCMotor which exports the motors without any assignment to slit jaws and GalilDMCSlit which exports the slit movables. 6.12.1 GalilDMCCtrl pogo_html_docu/GalilDMCCtr/index.html See pogo generated info for more details. This class exports the socket connection. Properties pogo_html_docu/GalilDMCCtrls/Properties.html See pogo generated info for more details. HostName e.g.: 192.168.57.XXX PostNo 10000 SimulationMode 0 States pogo_html_docu/GalilDMCCtrl/States.html See pogo generated info for more details. ON The server is ready to process I/O requests. FAULT An error occured. The server automatically tries to re-open the socket when the next I/O is processed. Commands pogo_html_docu/GalilDMCCtrl/Commands.html See pogo generated info for more details. ReadAllRemaining A debugging tool. The server fetches all remaining characters which were sent by the Galil controller. write read A string a sent to the Galil controller and the server receives the answer. Attributes pogo_html_docu/GalilDMCCtrl/Attributes.html See pogo generated info for more details. 6.12.2 GalilDMCMotor pogo_html_docu/GalilDMCMotor/index.html See pogo generated info for more details. This class exports the motors using the Galil names: x, y, z, w. Properties pogo_html_docu/GalilDMCMotor/Properties.html See pogo generated info for more details. Axis One of x, y, z, or w. After power-on the device is at 5, -5, 5, -5. GalilDMCCtrlDevice e.g.: p10/galildmcctrl/e2.XX SimulationMode 0 States pogo_html_docu/GalilDMCMotor/States.html See pogo generated info for more details. The client polls the dev state to detect the end of a movement. ON FAULT MOVING Commands pogo_html_docu/GalilDMCMotor/Commands.html See pogo generated info for more details. Calibrate Adjusts the UnitCalibration attribute to set the current motor position to the suplied value, [mm]. StopMove Attributes pogo_html_docu/GalilDMCMotor/Attributes.html See pogo generated info for more details. Position R: returns the current unit position [mm], W: moves the motor. UnitCalibration The calibration constant. UnitLimitMax The limit [mm]. UnitLimitMin The limit [mm]. 6.12.3 GalilDMCSlit Properties pogo_html_docu/GalilDMCSlit/Properties.html See pogo generated info for more details. Axis One of t, b, l, r, cx, cy, dx, dy. AxisXDevice The server that controls the x axis, e.g.: p10/galildmcmotor/XXX.01 AxisYDevice The server that controls the x axis, e.g.: p10/galildmcmotor/XXX.02 AxisZDevice The server that controls the x axis, e.g.: p10/galildmcmotor/XXX.03 AxisWDevice The server that controls the x axis, e.g.: p10/galildmcmotor/XXX.04 GalilDMCCtrlDevice The socket connection, e.g.: p10/galildmcctrl/XXX.01 SimulationMode States pogo_html_docu/GalilDMCSlit/States.html See pogo generated info for more details. ON FAULT MOVING Commands pogo_html_docu/GalilDMCSlit/Commands.html See pogo generated info for more details. Calibrate To be called for single axes only (t, b, r, l). The command is passed to the corresponding motor server. StopMove Attributes pogo_html_docu/GalilDMCSlit/Attributes.html See pogo generated info for more details. Position R: returns the current unit position [mm], W: moves the motor. UnitLimitMax The limit [mm]. For single axes (t, b, r, l) the value is passed to the motor server. For the others the value is stored. UnitLimitMin The limit [mm]. For single axes (t, b, r, l) the value is passed to the motor server. For the others the value is stored. 6.12.4 Example Clients 6.12.5 How to ... 6.13 Hexapod Tango Server for controlling the Hexapod from Physik Instrument (M-850 and M-840 Hexapod). The Server uses three classes: HexapodCtrl (Socket interface), HexapodConfig (with attributes for all axis), HexapodMotor (for controlling every single axis). The code of the HexapodMotor class includes the HexapodCtrl and HexapodConfig classes. These two classes are used to generate the corresponding libraries (libHexapodCtrl.a and libHexapodConfig.a). Additional to the 6 axes (X, Y, Z, U, V, Z) it can have two piezos, that are treated as additional axes (K and M). This server also controls submodules only with the 2 piezos (axes X and Z). This has to given in a property of the motor class, since the commands are different. If the Hexapod controls the 2 piezos submodule, the class HexapodConfig has not sense and it can not be used. 6.13.1 HexapodCtrl pogo_html_docu/HexapodCtrl/index.html See pogo generated info for more details. Class creating the socket connection and implementing the commands for writing and reading to the socket. Properties pogo_html_docu/HexapodCtrls/Properties.html See pogo generated info for more details. IpAddress. IP address. PortNb. Port number. SimulationMode. 0 real mode, 1 simulation mode. States pogo_html_docu/HexapodCtrl/States.html See pogo generated info for more details. FAULT. Problems creating socket connection. ON. Socket connection succeeds. Commands pogo_html_docu/HexapodCtrl/Commands.html See pogo generated info for more details. CloseSocket. Close socket connection. ReadHexapodStatus. Returns 1 if moving, 0 is not. WriteReadSocket command is not used because the protocol for this command differs from the other ones. State. Returns the device state. Status. It gets the device status. StopHexapod. Stops all movements. WriteSocket command is not used because the protocol for this command differs from the other ones. WriteReadSocket. Sends command to the hexapod controller and returns the answer. WriteSocket. Sends command to the hexapod controller. Attributes pogo_html_docu/HexapodCtrl/Attributes.html See pogo generated info for more details. 6.13.2 HexapodConfig pogo_html_docu/HexapodConfig/index.html See pogo generated info for more details. Not use if the device controls the 2 piezos module. Properties pogo_html_docu/HexapodConfig/Properties.html See pogo generated info for more details. HexapodCtrlDevice. Name of the HexapodCtrl tango device establishing the socket connection. SimulationMode. 0 real mode, 1 simulation mode. States pogo_html_docu/HexapodConfig/States.html See pogo generated info for more details. FAULT. ON. Commands pogo_html_docu/HexapodConfig/Commands.html See pogo generated info for more details. Reset. Initializes Hexapod. State. Returns the device state. Status. It gets the device status. StopMove. It does nothing. The Stop instruction doesn’t work for the Hexapod. Attributes pogo_html_docu/HexapodConfig/Attributes.html See pogo generated info for more details. PositionPivotR. Reads/Writtes pivot R position. PositionPivotS. Reads/Writtes pivot S position. PositionPivotT. Reads/Writtes pivot T position. SlewRate. Axe speed. Common for all of them. 6.13.3 HexapodMotor pogo_html_docu/HexapodMotor/index.html See pogo generated info for more details. Properties pogo_html_docu/HexapodMotor/Properties.html See pogo generated info for more details. Axis. Name of the axis: X, Y, Z, U, V or W. HexapodCtrlDevice. Name of the HexapodCtrl tango device establishing the socket connection. NbAxisInHexapos. Number of axes in hexapod. Only 2, 6 or 8 value is allowed. Any other value throws an error at the initialiation of the Tango device. By default the value is 6, devices with 8 axes will also work with this default value, for devices with 2 axes the Server only will work if this property is properly set. SimulationMode. 0 real mode, 1 simulation mode. States pogo_html_docu/HexapodMotor/States.html See pogo generated info for more details. MOVING. Axis is moving. ON. Idle state. Commands pogo_html_docu/HexapodMotor/Commands.html See pogo generated info for more details. Calibrate. Calibrate the motor to the position given as argument. Calculates UnitCalibration attribute. ResetMotor. Not implemented. Only for compatibility. Use Reset from HexapodConfig class for initializing the hexapod. State. Returns the device state. Status. It gets the device status. StopMove. It does nothing. The Stop instruction doesn’t work for the Hexapod. Attributes pogo_html_docu/HexapodMotor/Attributes.html See pogo generated info for more details. AxisName. Name of the axis controlled by the device (read from the Axis property). Conversion. Conversion factor (from read out position to physical units). Position. Reads the current position in physical units (mm or degrees depending on the axis). Writing it will move the motor to the given position. Movements are only allowed if not any other axis is being moved. Before the movement is done the hexapod checks if the given position is allowed, if not the server will throw an exception. UnitCalibration. Offset for the position. UnitLimitMax. Software maximum limit. If both UnitLimitMax and UnitLimitMin are 0 or UnitLimitMax is smaller than UnitLimitMin they will not be used. UnitLimitMin. Software minimum limit. If both UnitLimitMax and UnitLimitMin are 0 or UnitLimitMax is smaller than UnitLimitMin they will not be used. 6.13.4 Example Clients 6.13.5 How to ... 6.14 KohzuSC Tango Server for the motors controlled via GPIB with the Kohzu Stage Controller. The Server uses three classes: KohzuSCCtrl (GPIB interface), KohzuSCAxis (individual axis), KohzuSCMultiAxis (multiple movements of axis in the same controller). Each controller has four axis. With this class a library is generated (libKohzuSC.a) and the class is included in the ClassFactory of KohzuSCAxis. 6.14.1 KohzuSCCtrl pogo_html_docu/KohzuSCCtrl/index.html See pogo generated info for more details. Class implementing the commands for writing and reading via GPIB. Properties pogo_html_docu/KohzuSCCtrls/Properties.html See pogo generated info for more details. GpibBoardId. GPIB board id (for example, 0 for gpib0). GpibDeviceAddress. Device address (set in the hardware. Use adress from 0 to 16 if the Gpib connectionis direct, not using gpib-enet). GpibDeviceTimeout. Timeout for Gpib connection ( 13 -¿ 10 ms). GpibDeviceSecondaryAddress. Not used SimulationMode. 0 real mode, 1 simulation mode. States pogo_html_docu/KohzuSCCtrl/States.html See pogo generated info for more details. FAULT. ON. Commands pogo_html_docu/KohzuSCCtrl/Commands.html See pogo generated info for more details. GPIBWrite. For writing to GPIB without reading. GPIBWriteRead. Performs a reading after writing. State. Returns the device state. Status. It gets the device status. Attributes pogo_html_docu/KohzuSCCtrl/Attributes.html See pogo generated info for more details. 6.14.2 KohzuSCAxis pogo_html_docu/KohzuSCAxis/index.html See pogo generated info for more details. Class for handling each axis as a single motor. Each controller has four axis. Properties pogo_html_docu/KohzuSCAxis/Properties.html See pogo generated info for more details. AxisNb. Number of the axis in the controller (from 1 to 4). KohzuSCCtrlDevice. Name of the tango device connected to the controller of this axis. PrintDebugInfo. If 1 debug information is printed during running. SimulationMode. 0 real mode, 1 simulation mode. States pogo_html_docu/KohzuSCAxis/States.html See pogo generated info for more details. FAULT. Set if there is a readout problem. Reset to ON with the command ResetFAULTState. MOVING. Motor in movement (also is the movement has been done as a multiple drive). Read from the controller. ON. Motor is iddle. UNKNOWN. Not able to read the state of the motor from the controller. Commands pogo_html_docu/KohzuSCAxis/Commands.html See pogo generated info for more details. GetMotorSettingsInfo. Reads information about the settings of this axis from the controller. GetSpeedInfo. Reads information about the speed set in this axis from the controller. GetStatusInfo. Reads information about the status of this axis from the controller. Move. Performs the movement. Position to go is given in degrees as input argument. The rest of the parameters for the movement are set in the attributes. Sets the state to MOVING, and starts a thread checking the movement and setting the state to ON when it stops. MoveHome. Performs a movement to the origin position. MoveRel. The same as Move but given as an argument a relative position instead of the absolute one. ResetFAULTState. Resets the FAULT state to ON. State. Returns the device state. Status. It gets the device status. StopMove. Stops the motor. Attributes pogo_html_docu/KohzuSCAxis/Attributes.html See pogo generated info for more details. Acceleration. The acceleration. Steps per seconds2 . Internal transformation from/to AcceleratingTime. AcceleratingTime. Accelerating and decelerating time for the movement (x10 ms). This value is set as accelerating and decelerating time in the table speed number 9 (this is the table that will be use for any movement). AccModeForMove. Accelerating and decelerating mode used when a movement is perfomed. 1: rectangular drive, 2: trapezoidal drive, 3: asymmetric trapezoidal drive, 4: S-shaped drive, 5: asymmetric S-shaped drive. Backlash. Backlash correction value in degrees. If positive, correction in CW direction (mode 3 described in manual). If negative, correction in CWW direction (mode 4 described in manual). BaseRate. Start speed for the movement. This value is set as start speed in the table speed number 9 (this is the table that will be use for any movement). CcwLimit. If 1 the cww end switch limit is reached. CwLimit. If 1 the cw end switch limit is reached. ConversionDenominator. Denominator of the conversion factor for tranforming pulses to angles (only read). Angle = Pulses * ConversionNumerator/ConversionDenominator. ConversionNumerator. Numerator of the conversion factor for tranforming pulses to angles (only read). Angles = Pulses * ConversionNumerator/ConversionDenominator. Description. String for writing/reading the role of the motor in the difractometer. EncCorrForMove. Encoder correction mode used when a movement is perfomed. 0: invalid, 1: valid, 2: continue. Encoder. Reads encoder value in degrees. Write not implemented (not needed). HomeReturnMethod. Selected method to be used for returning the motor to the origin position (see description of methods in manual). SlewRate. Top speed for the movement. This value is set as top speed in the table speed number 9 (this is the table that will be use for any movement). SlewRateMax. The maximum slew rate. Implemented for consistency in online. SlewRateMin. The minimum slew rate. Implemented for consistency in online. Position. Returns the motor position in degrees. Writing execute the command Move, with the given position value as argument (in degrees). PositionPulses. Returns the motor position in pulses (only read). UnitCalibration. Reads/writes offset value from/to controller. Changes Position and PositionPulses values. UnitLimitMax. The upper motor limit. Implemented for consistency in online. UnitLimitMin. The lower limit of a motor. Implemented for consistency in online. 6.14.3 KohzuSCMultiAxis pogo_html_docu/KohzuSCMultiAxis/index.html See pogo generated info for more details. Class for handling multiple axis movements. Properties pogo_html_docu/KohzuSCMultiAxis/Properties.html See pogo generated info for more details. KohzuSCCtrlDevice. Name of the tango device connected to the Kohzu controller. PrintDebugInfo. If 1 debug information is printed during running. SimulationMode. 0 real mode, 1 simulation mode. Axis1Device. Name of the tango device for the axis number 1 of the connected controller. Axis2Device. Name of the tango device for the axis number 2 of the connected controller. Axis3Device. Name of the tango device for the axis number 3 of the connected controller. Axis4Device. Name of the tango device for the axis number 4 of the connected controller. States pogo_html_docu/KohzuSCMultiAxis/States.html See pogo generated info for more details. MOVING. Any motor of the controller is in movement. Read from the controller. ON. All motors are idle. FAULT. Commands pogo_html_docu/KohzuSCMultiAxis/Commands.html See pogo generated info for more details. MultiAxisDrive. Performs multi-axis position drive command. The motors to take into account for the movement are given in the spectrum attribute MotorsToMove. Backlash correction and encoder correction mode are taken from the values set in the single axis devices. Positions are taken form the Position attributes. LinearAxisDrive. Performs linear interpolate drive command. The motors to take into account for the movement are given in the spectrum attribute MotorsToMove (up to 3 axis are allowed to be move in this kind of movement. Backlash correction and encoder correction mode are taken from the values set in the single axis devices. Positions are taken form the Position attributes. State. Returns the device state. Status. It gets the device status. Attributes pogo_html_docu/KohzuSCMultiAxis/Attributes.html See pogo generated info for more details. Position1. Position to move axis number 1 when a multiple movement is performed. Position2. Position to move axis number 2 when a multiple movement is performed. Position3. Position to move axis number 3 when a multiple movement is performed. Position4. Position to move axis number 4 when a multiple movement is performed. MotorsToMove. Spectrum attribute to set/get the motors that will be move when a movement is performed (if array element is 1 the corresponding motor will be taken into account for the multiple movement). ConversionNumerators. Array with the conversion numerators for each axis (only read). ConversionDenominators. Array with the conversion denominators for each axis (only read). 6.14.4 Example Clients 6.14.5 How to ... 6.15 LensesBox Tango Server for controlling a system of maximum 12 lenses that can take the positions in or out. The control is done accessing a Beckhoff PLC, that is connected via the Ads Tango Class. This class is already included in the same proccess as the LensesBox class. IP address and port number of the device are given as properties in the Ads Tango device. pogo_html_docu/LensesBox/index.html See pogo generated info for more details. 6.15.1 Properties pogo_html_docu/LensesBox/Properties.html See pogo generated info for more details. NumberMotors. Number of motors to be written to the hardware when the tango server is started. If not set or set to -1 it will not be written. PlcServer. Name of the ads tango device running in the same process as the LensesBox device. SimulationMode. 0 real, 1 simulation. 6.15.2 States pogo_html_docu/LensesBox/States.html See pogo generated info for more details. ON Idle state. MOVING Lenses being moved. FAULT. 6.15.3 Commands pogo_html_docu/LensesBox/Commands.html See pogo generated info for more details. Calibrate. Makes nothing (implemented for compatibility with HasylabMotor). Move. Make the movements for keeping in the in position the lenses selected in the SetIN attribute. First the selected lenses are put in additionally to the ones that were already in, then the lenses that are in but no selected are taken out. Reboot. Hardware reboot. ResetMotor. Makes nothing (implemented for compatibility with HasylabMotor). State. Returns the device state. Default Tango Command. Status. It gets the device status. Default Tango Command. StopMove. Stop the movement in 4 sec (set the busy flag to 0). 6.15.4 Attributes pogo_html_docu/LensesBox/Attributes.html See pogo generated info for more details. EndSwitchIn. 1 if the motor has reached the end swicht for the in position. Only read. EndSwitchOut. 1 if the motor has reached the end swicht for the out position. Only read. NbMotors. Read/Write to/from hardware the number of motors that are/to be initialized. After setting the number of motors all lenses are in the out position (an initialization is automatically done, in other case the change would not be taken into account). Position. Read the current position (12 bits as decimal number). Writing a value will move the lenses indicated by the input (decimal number interpreted as 12 bits). StatusIN. Spectrum of 12 elements (maximum number of lenses in the system) with a value 1 or 0 depending on the position of the corresponding lens (in or out). Only read. StatusOK. Spectrum of 12 elements (maximum number of lenses in the system) with a value 1 or 0 depending on the status of the corresponding lens (ok or in error). Only read. StatusGeneral. Spectrum of 5 elements taking a value 1 or 0 for indicating the status of the system: Done, Enabled, Power, Busy, Reset (in this order). Only read. SetIN. Spectrum of 12 elements (maximum number of lenses in the system) for selecting the lenses that should be put in (they will be only move after executing the Move command). The read value indicates the lenses currently selected. UnitLimitMax. Returns maximum posible position value, according to the number of motors. Writting makes nothing. It is used as limit when setting the position. UnitLimitMin. Returns minimum posible position value (0). Writting makes nothing. It is used as limit when setting the position. 6.15.5 Client examples from PyTango import * import sys import time def set_nbmotors(lensesbox,nb_motors): """The set_nbmotors function is used to initialized the given number of motors.""" lensesbox.write_attribute("NbMotors",nb_motors) def get_nbmotors(lensesbox): """The get_nbmotors function is used to read the number of initialized motors.""" print "Number of motors:" print lensesbox.NbMotors def set_lensesToMoveIn(lensesbox, lenses): """The set_lensesToMoveIn function is used to select the lenses that will go to the IN b values = [] for p in lenses: values.append(p) lensesbox.write_attribute("SetIN",values) def get_lensesToMoveIn(lensesbox): """The get_lensesToMoveIn function is used to read the lenses that will go to the IN by dim_x = lensesbox.read_attribute("SetIN").dim_x if dim_x > 0: lenses_inout = lensesbox.SetIn print "Lenses to move In (flaged to 1):" for lens in lenses_inout: print lens def get_statusIN(lensesbox): """The get_statusIN function is used to read the status of the lenses (1 IN, 0 OUT).""" dim_x = lensesbox.read_attribute("StatusIN").dim_x if dim_x > 0: lenses_inout = lensesbox.StatusIn print "Lenses IN (flaged to 1):" for lens in lenses_inout: print lens def get_statusOK(lensesbox): """The get_statusOK function is used to read the status of the lenses (1 OK).""" dim_x = lensesbox.read_attribute("StatusOK").dim_x if dim_x > 0: lenses_inout = lensesbox.StatusOK print "Lenses OK (flaged to 1):" for lens in lenses_inout: print lens def get_statusGeneral(lensesbox): """The get_statusGeneral function is used to read the status of the lenses system""" dim_x = lensesbox.read_attribute("StatusGeneral").dim_x if dim_x > 0: lenses_inout = lensesbox.StatusGeneral dict_general_status = [] dict_general_status.append("Done:") dict_general_status.append(" Enabled:") dict_general_status.append(" Power:") dict_general_status.append(" Busy:") dict_general_status.append(" Reset:") i = 0 for lens in lenses_inout: print dict_general_status[i] print " " + str(lens) i = i + 1 def set_position(lensesbox,position): """The set_position function is used to move the lenses to the given position lensesbox.write_attribute("Position",position) (12 bits def get_position(lensesbox): """The get_position function is used to read the current position (12 bits in decimal)." print "Current position (decimal):" print lensesbox.Position def move(lensesbox): """The move function is used to perform the movement of the lenses""" lensesbox.Move() def reboot(lensesbox): """The reboot function is used to make a hardware reboot of the system""" lensesbox.Reboot() def stop(lensesbox): """The reboot function is used to make a hardware reboot of the system""" lensesbox.Stop() # # main # try : lensesbox = DeviceProxy( "//haso111n:10000/exp/lensesbox/1") if( len( sys.argv) == 1): get_nbmotors(lensesbox) get_position(lensesbox) get_lensesToMoveIn(lensesbox) get_statusIN(lensesbox) get_statusOK(lensesbox) get_statusGeneral(lensesbox) print " " print "Run ’python lensesbox.py help’ to see program options" print " " else: if(sys.argv[1] == "help"): print "Usage:" print "-> to perform movement" print "python lensesbox.py move" print "-> to move lenses to the given position" print "python lensesbox.py setPosition x" print "where x is the decimal representation of 12 bits (1-> move in)" print "-> to stop movement" print "python lensesbox.py stop" print "-> to reboot" print "python lensesbox.py reboot" print "-> to set lenses to move" print "python lensesbox.py set2move x y z ..." print "where ’x, y, z ...’ would be 0’s or 1’s" print "depending on the lenses set for moving in" print "-> to set number of motors" print "python lensesbox.py setNbMotors x" print "where x is the number of motors to be initialized" print "-> to get information and status" print "python lensesbox.py" if(sys.argv[1] == "move"): print "Moving" move(lensesbox) elif(sys.argv[1] == "reboot"): print "Rebooting" reboot(lensesbox) elif(sys.argv[1] == "stop"): print "Stopping" stop(lensesbox) elif(sys.argv[1] == "set2move"): print "Set lenses to move in " i = 0 values = [] for lens in sys.argv: if(i > 1): values.append(int(sys.argv[i])) i = i + 1 print values set_lensesToMoveIn(lensesbox,values) elif(sys.argv[1] == "setNbMotors"): print "Set number of motors to " print sys.argv[2] set_nbmotors(lensesbox,int(sys.argv[2])) elif(sys.argv[1] == "setPosition"): print "Moving lenses" print sys.argv[2] set_position(lensesbox,int(sys.argv[2])) else: print "Run ’python lensesbox.py help’ to see program options" except Exception, inst : print print print print 6.15.6 "Failed with exception !" sys.exc_info()[0] type(inst) # the exception instance inst.args # arguments stored in .args How to ... 6.16 LOM, the large offset monochromator The LOM class, which is contained in the LomEnergy (P08) and Lom500Energy (P03) servers, exports the large offset monochromator axes. 6.16.1 LOM This class accesses a Beckhoff PLC, coded by Jan Horbach. pogo_html_docu/Lom/index.html See pogo generated info for more details. Properties pogo_html_docu/Lom/Properties.html See pogo generated info for more details. Channel. The channel number selects the motor. PlcServer. Specifies the Ads Tango server, e.g.: //hasblpc:10000/blxx/exp/sps1. SimulationMode. 0 real mode, 1 simulation mode. States pogo_html_docu/Lom/States.html See pogo generated info for more details. MOVING. The motor is moving. It stays MOVING until the backlash finishes and the settle time expires. FAULT. Error. ON. Motor is idle. Commands pogo_html_docu/Lom/Commands.html See pogo generated info for more details. Calibrate The argument of this command is the true motor position. The encoder offset is changed accordingly. MoveHome. Starts the reference move. The motos stays MOVING until the reference move is finish. ResetMotor Clears the error status, ads writeChar( 0xf020, 1, 1) follow by ads writeChar( 0xf020, 1, 0) after 200 msec. StartMove Sets the AxisStart bit and waits for the axis to become BUSY. Afterwards the AxisStart bit is cleared. StopMove Sets the AxisStop bit and waits for the axis BUSY bit to become 0. Afterwards the AxisStop bit is cleared. Attributes pogo_html_docu/Lom/Attributes.html See pogo generated info for more details. ActiveMaster The ActiveMaster register, 0xf030, 0, 1 B, char. CwLimit The CW limit switch status. CcwLimit The CCW limit switch status. Conversion The conversion factor. ErrMaster The ErrMaster register, 0xf030, 1, 1 B, char. FlagEncoderHomed Bit 3 from the status bit registers, 0xf030, 520 + channel*254, 4 B, uint. FlagProtected. If this flag is set to one, no write operations are enabled. Offset. The EncoderOffset register, 0xf020, 520 + channel*256, 8 B, double. The Tango server does not change the Offset during a calibration. The Offset is set when the motor is referenced. PendingMoves. The PendingMoves register, 0xf030, 2, 2B, short. It stores the number of axes which have deviations from the setpoint. Position. The current position is calculated from PositionHw, the Conversion factor and theUnitCalibration. When written a move is initiated. Clients monitor the device state to determine when the move ends. PositionHw. The current position register of the PLC, 0xf030, 512 + channel*256, 8, double. PositionEncoder. The current position. This attribute has been implemented for compatibility reasons only. PositionSetpoint. The SetPoint register, 0xf020, 512 + channel*256, 8 B, double. StatusBits. The Status register, 0xf030, 520 + channel*256, 4 B, uint. Bit 0: BUSY, bit 1: CW limit, bit 2 CCW limit, bit 3: referenced, bit 4: setpoint out of range, bit 5: internal error, bit 6: time-out. UnitCalibration. Used together with the conversion factor to calculate the motor position from PositionHw. UnitLimitMax. The software limit. Calculated from the MinPos register, 0xf020, 532, 8 B, double, the conversion factor and the UnitCalibration, read-only. UnitLimitMin. The software limit. Calculated from the MaxPos register, 0xf020, 540, 8 B, double, the conversion factor and the UnitCalibration, read-only. UnitLimitMaxHw. The MaxPos register, 0xf020, 540, 8 B, double, read-only. UnitLimitMinHw. The MinPos register, 0xf020, 532, 8 B, double, read-only. SlewRate Implemented for compatibility reasons only. UnitBacklash Implemented for compatibility reasons only. Example Client The following script moves a Lom motor. If no destination is supplied, the current position is displayed. #!/usr/bin/python from PyTango import * import sys, time, termios init = 0 def inkey(): global init if( not init): init = 1 fd = sys.stdin.fileno() old = termios.tcgetattr( fd) new = termios.tcgetattr( fd) new[3] = new[3] & ˜termios.ICANON & ˜termios.ECHO # # VMIN - the minimum number of characters to be read # new[6] [termios.VMIN] = 0 # # VTIME - how long the driver waits for VMIN characters, unit 0.1s # new[6] [termios.VTIME] = 1 termios.tcsetattr( fd, termios.TCSADRAIN, new) sys.exitfunc = lambda: termios.tcsetattr( fd, termios.TCSADRAIN, old) key = sys.stdin.read(1) if( len( key) == 0): key = -1 else: key = ord( key) return key # # move a motor # def move_to( sps, newPos): attr= sps.read_attribute( "UnitLimitMin") minPos = attr.value attr = sps.read_attribute( "UnitLimitMax") maxPos = attr.value print " min ", minPos, ", max ", maxPos if (newPos > maxPos or newPos < minPos): print "\n Position", newPos, "outside limits", minPos, maxPos return 0 posAttr = sps.read_attribute( "Position") posAttr.value = newPos sps.write_attribute( posAttr) status = 1 while (sps.state() == DevState.MOVING): print " Current position ",sps.read_attribute( "Position").value time.sleep( 0.2) if inkey() == 32: print " stopping all moves" sps.command_inout( "StopMove") return 0 print " Cw limit ",sps.read_attribute( "CwLimit").value, print ", Ccw limit ",sps.read_attribute( "CcwLimit").value return 1 # # main # try : sps = DeviceProxy( "//hasXXXXX:10000/p08/lom/exp.01") if( len( sys.argv) == 1): print " Current position ", sps.read_attribute( "Position").value else: move_to( sps, float(sys.argv[1])) except Exception, inst : print "Failed with exception !" print sys.exc_info()[0] print type(inst) # the exception instance print inst.args # arguments stored in .args 6.16.2 LOMENERGY, P08, 1250 The LomEnergy server generates the interface to the large offset monochromator at P08. pogo_html_docu/LomEnergy/index.html See pogo generated info for more details. Properties pogo_html_docu/LomEnergy/Properties.html See pogo generated info for more details. SimulationMode. 0 real mode, 1 simulation mode. The simulation mode is not fully implemented to far. States pogo_html_docu/LomEnergy/States.html See pogo generated info for more details. MOVING. Al least one of the Lom axes is MOVING. FAULT. Error. ON. All Lom axes are idle. Commands pogo_html_docu/LomEnergy/Commands.html See pogo generated info for more details. Calibrate. The argument of this command is an energy. The linear and rotational axes of the Lom are calibrated. ResetMotor. Executes a ResetMotor on one of the Lom axes. StopMove. Executes a StopMove on one of the Lom axes. Attributes pogo_html_docu/LomEnergy/Attributes.html See pogo generated info for more details. ConstantExit The height difference, around 1250 mm. D Crystal Si311 (73 mm)or Si511 (2mm) depending on the positions of LAT1 and LAT2. Position The energy, R/W. PositionSim Setting this attribute does not involve any move. Instead the attribute ResultSim is filled with the calculated final positions. ResultSim An array of strings that returns the calculated final positions after the PositionSim attribute has been set, e.g.: Lom1Pitch = 24.2993 Lom2Pitch = 24.2993 Lom1Lin = -551.039 Lom2Lin = 551.039 emt = 0.123 emt means estimated move time. Example Client The following client operates lomenergy. Depending on the command line the current position is read or, if a destination is supplied, the motor is moved. #!/usr/bin/python # from PyTango import * import sys, time, termios init = 0 def inkey(): global init if( not init): init = 1 fd = sys.stdin.fileno() old = termios.tcgetattr( fd) new = termios.tcgetattr( fd) new[3] = new[3] & ˜termios.ICANON & ˜termios.ECHO # # VMIN - the minimum number of characters to be read # new[6] [termios.VMIN] = 0 # # VTIME - how long the driver waits for VMIN characters, unit 0.1s # new[6] [termios.VTIME] = 1 termios.tcsetattr( fd, termios.TCSADRAIN, new) sys.exitfunc = lambda: termios.tcsetattr( fd, termios.TCSADRAIN, old) key = sys.stdin.read(1) if( len( key) == 0): key = -1 else: key = ord( key) return key # # move a motor # def move_to( sps, newPos): attr= sps.read_attribute( "UnitLimitMin") minPos = attr.value attr = sps.read_attribute( "UnitLimitMax") maxPos = attr.value print " min ", minPos, ", max ", maxPos if (newPos > maxPos or newPos < minPos): print "\n Position", newPos, "outside limits", minPos, maxPos return 0 posAttr = sps.read_attribute( "Position") posAttr.value = newPos sps.write_attribute( posAttr) status = 1 while (sps.state() == DevState.MOVING): print " Current position ",sps.read_attribute( "Position").value time.sleep( 0.2) if inkey() == 32: print " stopping all moves" sps.command_inout( "StopMove") return 0 return 1 # # main # try : sps = DeviceProxy( "//haso107XX:10000/pXX/lomenergy/exp.01") if( len( sys.argv) == 1): print " Current position ", sps.read_attribute( "Position").value else: move_to( sps, float(sys.argv[1])) except Exception, inst : print "Failed with exception !" print sys.exc_info()[0] print type(inst) print inst.args 6.16.3 # the exception instance # arguments stored in .args LOM500ENERGY, P03 The Lom500Energy server generates a monochromator interface at P03. pogo_html_docu/Lom500Energy/index.html See pogo generated info for more details. Properties pogo_html_docu/Lom500Energy/Properties.html See pogo generated info for more details. SimulationMode. 0 real mode, 1 simulation mode. The simulation mode is not fully implemented to far. States pogo_html_docu/Lom500Energy/States.html See pogo generated info for more details. MOVING. Al least one of the Lom axes is MOVING. FAULT. Error. ON. All Lom axes are idle. Commands pogo_html_docu/Lom500Energy/Commands.html See pogo generated info for more details. Calibrate. The argument of this command is an energy. The linear and rotational axes of the Lom are calibrated. ResetMotor. Executes a ResetMotor on one of the Lom axes. StopMove. Executes a StopMove on one of the Lom axes. Attributes pogo_html_docu/Lom500Energy/Attributes.html See pogo generated info for more details. ConstantExit The height difference, around 500 mm. D Crystal So far Si311. Position The energy, R/W. PositionSim Setting this attribute does not involve any move. Instead the attribute ResultSim is filled with the calculated final positions. ResultSim An array of strings that returns the calculated final positions after the PositionSim attribute has been set. Lom500Pitch1 = 11.403 Lom500Pitch2 = 11.403 Lom500Lin2 = 1189.11 emt = 10 emt means estimated move time. 6.17 Meta Motor Tango Server for combining movements from several motors. Test version implementing different possibilities. pogo_html_docu/MetaMotor/index.html See pogo generated info for more details. 6.17.1 Properties pogo_html_docu/MetaMotor/Properties.html See pogo generated info for more details. DyNbMotorName. Needed for introducing dynamic attributes. Array of strings. Each element represent a dynamic attribute, all of them of the same type. The number of elements can be changed dynamically using jive. DyNbUnitsToMoveTo. Needed for introducing dynamic attributes. Array of strings. Each element represent a dynamic attribute, all of them of the same type. The number of elements can be changed dynamically using jive. DyNbMotorActive. Needed for introducing dynamic attributes. Array of strings. Each element represent a dynamic attribute, all of them of the same type. The number of elements can be changed dynamically using jive. 6.17.2 States pogo_html_docu/MetaMotor/TangoDevStates.html See pogo generated info for more details. MOVING. Any of the motors controlled by this server is moving. ON. All the motors are in idle state. 6.17.3 Commands pogo_html_docu/MetaMotor/DevCommands.html See pogo generated info for more details. Init. Initialization. Default Tango Command. State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. Move1. Move a single motor. It calls SetupUnitMove (with argument UnitsToMoveTo1) , StartMove and CompleteMove from the Tango Device MotorName1. Move. Move two motors. It calls SetupUnitMove, StartMove and CompleteMove from the Tango Devices MotorName1 and MotorName2, setting the positions UnitsToMoveTo1 and UnitsToMoveTo2 respectively. Each motor moves independently. MoveDyn. Move the motors introduced as dynamic attributes.It calls SetupUnitMove, StartMove and CompleteMove from the Tango Devices in the array DyNbMotorName, setting the positions to the ones in the array DyNbUnitsToMoveTo. MoveSyn.Move the motors controlled by the Tango Devices MotorName1 and MotorName2, but changing the SlewRates in such a way that both motors reach the set point at the same time. After the movement the SlewRates go back the the original value. StopAllMotors. Stop the movement of all motors controlled by this Server. Call the Stop function from the Device Servers. CheckMotorStates. Get the state of all motors and set the own state accordingly. 6.17.4 Attributes pogo_html_docu/MetaMotor/Attributes.html See pogo generated info for more details. UnitsToMoveTo1. Unit Position to set the motor in device MotorName1. UnitsToMoveTo2. Unit Position to set the motor in device MotorName2. MotorName1. Device Name for one of the controlled motors. MotorName2. Device Name for one of the controlled motors. MotorActive1. If 1 the motor in MotorName1 will be moved by the move commands. If 0, not. MotorActive2. If 1 the motor in MotorName2 will be moved by the move commands. If 0, not. UnitsToMoveTo. Dynamic attribute, defined by the array DyUnitsToMoveTo. It defines the characteristics of the attributes in this array. Units to move the motors in the dynamic attributes. MotorName. Dynamic attribute, defined by the array DyNbMotorName. It defines the characteristics of the attributes in this array. Device Name for Tango motors. MotorActive. Dynamic attribute, defined by the array DyNbMotorActive. It defines the characteristics of the attributes in this array. If 1 the assotiated motor will be moved by the move commands, if 0, the motor will not be moved. 6.17.5 Further developments There is a new Tango Server, MetaMotorDyn, which works only with motors give in the dynamic attributes. The move commands are reduced to Move and MoveSyn, affecting always to the dynamic attributes. The attributes related to fix motors dissapears and a new attribute is added, given the number of dynamic motors currently in the server device. 6.17.6 Clients An example of a Qt Client for this Server can be found in the afs group directory: /afs/desy.de/group/hasylab/Tango/Client/StepperMotor (MetaMotor version) or /afs/desy.de/group/hasylab/Tango/Client/StepperMotorDyn (MetaMotorDyn version) 6.18 MirrorP02 Tango Server for moving the mirrors at p02 as a function of the glancing angle. The names of the motors devices to move are hardcoded in the program: It is based on MirrorP09, but it used a fix configuration and it does not have x motors or groove constants. pogo_html_docu/MirrorP02/index.html See pogo generated info for more details. 6.18.1 Properties pogo_html_docu/MirrorP02/Properties.html See pogo generated info for more details. 6.18.2 States pogo_html_docu/MirrorP02/States.html See pogo generated info for more details. FAULT. Not able to read state from any of the motor devices. MOVING. Any of the devices in MOVING state. ON. All devices in idle state. 6.18.3 Commands pogo_html_docu/MirrorP02/Commands.html See pogo generated info for more details. Calibrate. For compatibility. Not used. Init. Default Tango command. Initializes the device. State. Determines the state reading the state of the connected motors (see States). Status. Default Tango command. StopMove. Stops all motors. 6.18.4 Attributes pogo_html_docu/MirrorP02/Attributes.html See pogo generated info for more details. BeamHeight. Beam height used for computing the motor positions. M1pitch. Current motor position. M1pitchCalc. Last calculated position for the corresponding motor. M2pitch. Current motor position. M2pitchCalc. Last calculated position for the corresponding motor. M1y. Current motor position. M1yCalc. Last calculated position for the corresponding motor. M2y. Current motor position. M2yCalc. Last calculated position for the corresponding motor. M1y0. Parameter for computing the motor positions. M2y0. Parameter for computing the motor positions. M1ypitch0. Parameter for computing the motor positions. M2ypitch0. Parameter for computing the motor positions. MOffset. Mirror offset used for computing the motor positions. Position (GlancingAngle). Computes the position of the motors for the given GlancingAngle taking into account the value of the other parameters given in the attributes and sends the computed position to the motors for moving them. Reads the value computed from the motor positions. PositionSim (GlancingAngleSim. Setting this attribute does not involve any move. Instead the attribute ResultSim is filled with the calculated final position for the motors. ResultSim. A string that returns the calculated final position for the glancing angle in PositionSim. UnitLimMax. Software maximum limit for the Position. UnitLimMin. Software minimum limit for the Position. 6.19 MirrorP09 Tango Server for moving the mirrors at p09 as a function of the glancing angle. The names of the motors devices to move are hardcoded in the program: • mirror1X. p09/spk/exp.02 • mirror1Y. p09/spk/exp.04 • mirror1pitch. p09/spk/exp.01 • mirror2X. p09/spk/exp.06 • mirror2Y. p09/spk/exp.08 • mirror2pitch. p09/spk/exp.05 pogo_html_docu/MirrorP09/index.html See pogo generated info for more details. 6.19.1 Properties pogo_html_docu/MirrorP09/Properties.html See pogo generated info for more details. 6.19.2 States pogo_html_docu/MirrorP09/States.html See pogo generated info for more details. FAULT. Not able to read state from any of the motor devices. MOVING. Any of the devices in MOVING state. ON. All devices in idle state. 6.19.3 Commands pogo_html_docu/MirrorP09/Commands.html See pogo generated info for more details. Calibrate. For compatibility. Not used. Init. Default Tango command. Initializes the device. State. Determines the state reading the state of the connected motors (see States). Status. Default Tango command. StopMove. Stops all motors. 6.19.4 Attributes pogo_html_docu/MirrorP09/Attributes.html See pogo generated info for more details. BeamHeight. Beam height used for computing the motor positions. Configuration. Selects the configuration used for computing the motor position from the parameters. ConfigurationToLoad. Display the formulas for computing the motors positions in the selected configuration. M1pitch. Current motor position. M1pitchCalc. Last calculated position for the corresponding motor. M2pitch. Current motor position. M2pitchCalc. Last calculated position for the corresponding motor. M1x. Current motor position. M1xCalc. Last calculated position for the corresponding motor. M2x. Current motor position. M2xCalc. Last calculated position for the corresponding motor. M1y. Current motor position. M1yCalc. Last calculated position for the corresponding motor. M2y. Current motor position. M2yCalc. Last calculated position for the corresponding motor. M1y0. Parameter for computing the motor positions. M2y0. Parameter for computing the motor positions. M1ygroove. Parameter for computing the motor positions. M2ygroove. Parameter for computing the motor positions. M1ypitch0. Parameter for computing the motor positions. M2ypitch0. Parameter for computing the motor positions. MOffset. Mirror offset used for computing the motor positions. Position (GlancingAngle). Computes the position of the motors for the given GlancingAngle taking into account the value of the other parameters given in the attributes and sends the computed position to the motors for moving them. Reads the value computed from the motor positions. PositionSim (GlancingAngleSim. Setting this attribute does not involve any move. Instead the attribute ResultSim is filled with the calculated final position for the motors. ResultSim. A string that returns the calculated final position for the glancing angle in PositionSim. UnitLimMax. Software maximum limit for the Position. UnitLimMin. Software minimum limit for the Position. 6.20 Multilayer Monochromator Energy Tango Server for controlling the energy of the multilayer monochromator. It uses the Lom class for controlling the monochromator motors. pogo_html_docu/MLMonoEnergy/index.html See pogo generated info for more details. 6.20.1 Properties pogo_html_docu/MLMonoEnergy/Properties.html See pogo generated info for more details. 6.20.2 States pogo_html_docu/MLMonoEnergy/States.html See pogo generated info for more details. 6.20.3 Commands pogo_html_docu/MLMonoEnergy/Commands.html See pogo generated info for more details. 6.20.4 Attributes pogo_html_docu/MLMonoEnergy/Attributes.html See pogo generated info for more details. 6.21 MMC100Micos Tango Server for the piezos controlled by the Micos Controller Serie MMC-100. The Server uses two classes: MMC100MicosCtrl, connecting to the controller via USB port, and MMC100MicosAxis for each individual axis. 6.21.1 MMC100MicosCtrl pogo_html_docu/MMC100MicosCtrl/index.html See pogo generated info for more details. Class implementing the commands for writing and reading via USB port. Properties pogo_html_docu/MMC100MicosCtrls/Properties.html See pogo generated info for more details. States pogo_html_docu/MMC100MicosCtrl/States.html See pogo generated info for more details. Commands pogo_html_docu/MMC100MicosCtrl/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/MMC100MicosCtrl/Attributes.html See pogo generated info for more details. 6.21.2 MMC100MicosAxis pogo_html_docu/MMC100MicosAxis/index.html See pogo generated info for more details. Class for handling each axis as a single motor. Properties pogo_html_docu/MMC100MicosAxis/Properties.html See pogo generated info for more details. States pogo_html_docu/MMC100MicosAxis/States.html See pogo generated info for more details. Commands pogo_html_docu/MMC100MicosAxis/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/MMC100MicosAxis/Attributes.html See pogo generated info for more details. 6.22 MonoP04 Tango Server for controlling the monochromator at p04. It talks to the hardware via EPICS. pogo_html_docu/MonoP04/index.html See pogo generated info for more details. 6.22.1 Properties pogo_html_docu/MonoP04/Properties.html See pogo generated info for more details. 6.22.2 States pogo_html_docu/MonoP04/States.html See pogo generated info for more details. 6.22.3 Commands pogo_html_docu/MonoP04/Commands.html See pogo generated info for more details. 6.22.4 Scalar Attributes pogo_html_docu/MonoP04/Attributes.html See pogo generated info for more details. 6.23 MonoUndSynchronMotor Tango Server for synchornized Monochromator and Undulator movements. Undulator velocity is adjusted during the movement for following the monochromator. pogo_html_docu/MonoUndSynchronMotor/index.html See pogo generated info for more details. 6.23.1 Properties pogo_html_docu/MonoUndSynchronMotor/Properties.html See pogo generated info for more details. 6.23.2 States pogo_html_docu/MonoUndSynchronMotor/States.html See pogo generated info for more details. 6.23.3 Commands pogo_html_docu/MonoUndSynchronMotor/Commands.html See pogo generated info for more details. 6.23.4 Scalar Attributes pogo_html_docu/MonoUndSynchronMotor/Attributes.html See pogo generated info for more details. 6.24 MultipleMotors Tango Server for a common control of movable devices (motors, energy devices ...). pogo_html_docu/MultipleMotors/index.html See pogo generated info for more details. 6.24.1 Properties pogo_html_docu/MultipleMotors/Properties.html See pogo generated info for more details. BeamlineNb. Beamline number. Not used. MasterDevice. Main device controlling the energy. SlaveDevices. List of devices controlling the energy without the one in MasterDevice. 6.24.2 States pogo_html_docu/MultipleMotors/States.html See pogo generated info for more details. OFF. Any of the devices not available (only looking at the ones activated in the MotorMask attribute). FAULT. Any of the devices in FAULT state and all available (only looking at the ones activated in the MotorMask attribute). MOVING. Any of the devices in MOVING state, all available and nonne in FAULT (only looking at the ones activated in the MotorMask attribute). ON. All devices in idle state (only looking at the ones activated in the MotorMask attribute). 6.24.3 Commands pogo_html_docu/MultipleMotors/Commands.html See pogo generated info for more details. Calibrate. Calibrates all energy devices to the value given as an argument. Init. Default Tango command. Initializes the device. StopMove. Stops all energy movements. 6.24.4 Attributes pogo_html_docu/MultipleMotors/Attributes.html See pogo generated info for more details. MotorMask. Filter for activating/deactivating the slave devices independently. Eg. if 0 no slave devices will be active, if 1 only the first one in the SlaveDevices property list, if 3 the first two, if 2 only the second one ... Position. Writting will set the position in Master and Slave Devices to the given value. Reads the position from the MasterDevice. PositionSim. Setting this attribute does not involve any move. Instead the attribute ResultSim is filled with the calculated final positions for the motors of all devices. ResultSim. A string that returns the calculated final positions after the PositionSim attribute has been set in all devices. UnitLimMax. Software maximum limit for the Position. UnitLimMin. Software minimum limit for the Position. Figure 6.1: jive, MultipleMotors 6.24.5 Example This sections shows an example for an MultipleMotors server. The server properties are displayed in figure 6.1. A LomEnergy server is the master device and two TangoMotors serve as slaves. Figure 6.2 shows a jddd widget that operated the server. 6.25 NewFocus Tango Server for controlling the NewFocus picomotors. The class NewFocus does nothig, only put together the other three classes. 6.25.1 NewFocusCtrl pogo_html_docu/NewFocusCtrl/index.html See pogo generated info for more details. Properties pogo_html_docu/NewFocusCtrl/Properties.html See pogo generated info for more details. States pogo_html_docu/NewFocusCtrl/States.html See pogo generated info for more details. Commands pogo_html_docu/NewFocusCtrl/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/NewFocusCtrl/Attributes.html See pogo generated info for more details. Figure 6.2: jddd, MultipleMotors 6.25.2 NewFocusDriver pogo_html_docu/NewFocusDriver/index.html See pogo generated info for more details. Properties pogo_html_docu/NewFocusDriver/Properties.html See pogo generated info for more details. States pogo_html_docu/NewFocusDriver/States.html See pogo generated info for more details. Commands pogo_html_docu/NewFocusDriver/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/NewFocusDriver/Attributes.html See pogo generated info for more details. 6.25.3 NewFocusPicomotor pogo_html_docu/NewFocusPicomotor/index.html See pogo generated info for more details. Properties pogo_html_docu/NewFocusPicomotor/Properties.html See pogo generated info for more details. States pogo_html_docu/NewFocusPicomotor/States.html See pogo generated info for more details. Commands pogo_html_docu/NewFocusPicomotor/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/NewFocusPicomotor/Attributes.html See pogo generated info for more details. 6.26 OMS VME58 Tango Server for the Stepper Motors controlled by the OMS (Oregon Micro Systems) VME58 board. It supports the OmsVme58 in stepping or servo modes (selected by the property Type). It also supports the Oms motors from MaxV serie (selected by the property MaxVSerie). pogo_html_docu/OmsVme58/index.html See pogo generated info for more details. 6.26.1 Properties pogo_html_docu/OmsVme58/Properties.html See pogo generated info for more details. 6.26.2 States pogo_html_docu/OmsVme58/States.html See pogo generated info for more details. 6.26.3 Commands pogo_html_docu/OmsVme58/Commands.html See pogo generated info for more details. 6.26.4 Attributes pogo_html_docu/OmsVme58/Attributes.html See pogo generated info for more details. 6.26.5 Example Clients Python, read position, move The following macro shows how to read a motor position and how a motor is moved: #!/bin/env python import time import string import sys from PyTango import * proxy = DeviceProxy( "p15/motor/exp.65") if len( sys.argv) == 1: print " Position %g " % proxy.read_attribute( "Position").value sys.exit() if len( sys.argv) != 2: print "\n usage: ./move.py [pos]" sys.exit() pos = sys.argv[1] try: status = proxy.write_attribute( "Position", float( pos)) while( proxy.state() == DevState.MOVING): print " state ", proxy.state(), print "motor position %g " % proxy.read_attribute( "Position").value time.sleep(0.1) except DevFailed: exctype , value = sys.exc_info()[:2] print "Failed with exception ! " , exctype for err in value: print print print print " " " " reason" , err.reason description" , err.desc origin" , err.origin severity" , err.severity except: print sys.exc_info()[0] sys.exit() print "motor position %g " % proxy.read_attribute( "Position").value Python, move home The following script shows how a motor is homed. This works only for axes with encoders. #!/usr/bin/env python import time import string from PyTango import * name = "p15/motor/exp.56" proxy = DeviceProxy( name) try: status = proxy.command_inout( "MoveHome") while( proxy.state() == DevState.MOVING): print " state ", proxy.state() time.sleep(0.2) print "motor position %g " % proxy.read_attribute( "Position").value print "encoder position %g " % proxy.read_attribute( "PositionEncoder").value except DevFailed: extype, value = sys.exc_info()[:2] print "Failed with exception ", extype for err in value: print " reason ", err[ "reason"] print " desc ", err[ "desc"] print " origin ", err[ "origin"] print " severity ", err[ "severity"] except: print sys.exc_info()[0] sys.exit() cpp Simple cpp example showing how to read attributes and properties. /* * example of a client using the TANGO C++ api. */ #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { unsigned long temp; float out; int nb_read; DeviceAttribute da; long acceleration; long base_rate; long slew_rate; double current_unit_position; // // create a connection to a TANGO device // DeviceProxy *device = new DeviceProxy( "tango://has107k:10000/exp/line1/mot1"); // Read the state DevState dev_state; dev_state = device->state(); // Read attributes da = device->read_attribute("Acceleration"); da >> acceleration; cout << "Acceleration " << acceleration << endl; da = device->read_attribute("BaseRate"); da >> base_rate; cout << " BaseRate " << base_rate << endl; da = device->read_attribute("SlewRate"); da >> slew_rate; cout << "SlewRate " << slew_rate << endl; // Write value to attribute DeviceAttribute *da_write = new DeviceAttribute( "Acceleration", (long)20); device->write_attribute(*da_write); // Read Properties DbData prop; prop.push_back(DbDatum("Base")); prop.push_back(DbDatum("Channel")); prop.push_back(DbDatum("AccuMin")); prop.push_back(DbDatum("AccuMax")); prop.push_back(DbDatum("SlewRateMinHw")); device->get_property(prop); unsigned long base; unsigned long channel; long accu_min; long accu_max; unsigned long slew_rate_min_hw; prop[0] prop[1] prop[2] prop[3] prop[4] >> >> >> >> >> base; channel; accu_min; accu_max; slew_rate_min_hw; cout << "Base " << base << " Channel " << channel << " AccuMin " << accu_min << " AccuMax // Write new value to existing properties or insert new ones. unsigned long base_temp = 61440; unsigned long channel_temp = 0; DbDatum base_toput("Base"), channel_toput("Channel"); DbData db_data; base_toput << base_temp; channel_toput << channel_temp; db_data.push_back(base_toput); db_data.push_back(channel_toput); device->put_property(db_data); // Execute command without arguments device->command_inout( "StartMove"); // Execute command with arguments DeviceData units_to_move_to_tmp; double units_to_move_to = 1000; units_to_move_to_tmp << units_to_move_to; device->command_inout( "SetupUnitMove", units_to_move_to_tmp); // Read string properties (for example for dynamic attributes) DbData prop1; prop1.push_back(DbDatum("dyNbUnitsToMoveTo")); prop1.push_back(DbDatum("dyNbMotorName")); DeviceProxy *device1 = new DeviceProxy( "tango://has107k:10000/exp/test/mm1"); device1->get_property(prop1); if ((prop1[0].is_empty() == false)){ vector<string> temp; short int length; prop1[0] >> temp; length = prop1[0].size(); cout << "Teresa: de prop1 " << prop1[0].size() << " " << temp[0].c_str() << " " << temp[1 } if ((prop1[1].is_empty() == false)){ vector<string> temp; short int length; prop1[1] >> temp; length = prop1[1].size(); cout << "Teresa: de prop1 " << length << " " << prop1[1].size() << " " << temp[0].c_str() } } Cpp example for setting the properties and attributes of a new OmsVme58 Device to default values. /* * File for setting the properties and attributes of a new OmsVme58 device to * default values. * */ #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { // // create a connection to the new OmsVme58 TANGO device // DeviceProxy *device = new DeviceProxy( "tango://has107k:10000/exp/line1/mot2"); // Write value to attributes DeviceAttribute *da_write1 = new DeviceAttribute( "Acceleration", (long)500000); device->write_attribute(*da_write1); DeviceAttribute *da_write2 = new DeviceAttribute( "BaseRate", (long)1000); device->write_attribute(*da_write2); DeviceAttribute *da_write3 = new DeviceAttribute("Conversion", (double)10); device->write_attribute(*da_write3); DeviceAttribute *da_write4 = new DeviceAttribute("SettleTime", (double)0.1); device->write_attribute(*da_write4); DeviceAttribute *da_write5 = new DeviceAttribute("SlewRate", (long)1000); device->write_attribute(*da_write5); DeviceAttribute *da_write6 = new DeviceAttribute("SlewRateMax", (long)134938064); device->write_attribute(*da_write6); DeviceAttribute *da_write7 = new DeviceAttribute("SlewRateMin", (long)1); device->write_attribute(*da_write7); DeviceAttribute *da_write8 = new DeviceAttribute("UnitCalibration", (double)0); device->write_attribute(*da_write8); DeviceAttribute *da_write9 = new DeviceAttribute("StepCalibration", (long)0); device->write_attribute(*da_write9); DeviceAttribute *da_write10 = new DeviceAttribute("StepBacklash", (long)100); device->write_attribute(*da_write10); DeviceAttribute *da_write11 = new DeviceAttribute("StepLimitMax", (long)1000000); device->write_attribute(*da_write11); DeviceAttribute *da_write12 = new DeviceAttribute("StepLimitMin", (long)-1000000); device->write_attribute(*da_write12); // Write default values to properties unsigned long base = 61440; unsigned long channel = 0; long accu_min = -3350000; long accu_max = 3350000; unsigned long slew_rate_min_hw = 0; unsigned long slew_rate_max_hw = 1044000; unsigned long acceleration_min_hw = 0; unsigned long acceleration_max_hw = 1000000000; unsigned short type = 0; DbDatum base_toput("Base"), channel_toput("Channel"); DbDatum accu_min_toput("AccuMin"), accu_max_toput("AccuMax"); DbDatum slew_rate_min_hw_toput("SlewRateMinHw"), slew_rate_max_hw_toput("SlewRateMaxHw"); DbDatum acceleration_min_hw_toput("AccelerationMinHw"), acceleration_max_hw_toput("Acceler DbDatum type_toput("Type"); DbData db_data; base_toput << base; channel_toput << channel; accu_min_toput << accu_min; accu_max_toput << accu_max; slew_rate_min_hw_toput << slew_rate_min_hw; slew_rate_max_hw_toput << slew_rate_max_hw; acceleration_min_hw_toput << acceleration_min_hw; acceleration_max_hw_toput << acceleration_max_hw; type_toput << type; db_data.push_back(base_toput); db_data.push_back(channel_toput); db_data.push_back(accu_min_toput); db_data.push_back(accu_max_toput); db_data.push_back(slew_rate_min_hw_toput); db_data.push_back(slew_rate_max_hw_toput); db_data.push_back(acceleration_min_hw_toput); db_data.push_back(acceleration_max_hw_toput); db_data.push_back(type_toput); device->put_property(db_data); } 6.26.6 How to ... ... move a motor There is two ways of moving a motor: • Executing the command Move, given as an argument the position in units where the motor want to be move to. • Executing the following commmands in the given order: SetupUnitPosition, with argument the position in units where the motor want to be move to (or SetupStepPosition, if the absolute final position wants to be given in steps), StartMove, and CompleteMove. ... interrupt a move Executing the command StopMove. 6.27 PhaseRetarderP09 Tango Server for the phase retarder at P09. It moves the incidence angle of the phase retarder plates as a function of the energy, to remain in QWP or HWP condition. pogo_html_docu/PhaseRetarderP09/index.html See pogo generated info for more details. 6.27.1 Properties pogo_html_docu/PhaseRetarderP09/Properties.html See pogo generated info for more details. FlagDthchiFromPrchi. If 1 the DthChi attribute will be computed from the PRCHI value, it can not be written. PRCHIMotorDevice. Name of the tango device of the prchi motor. PRTHMotorDevice. Name of the tango device of the prth motor. This is the motor that will be moved as a function of the energy. PRZSMotorDevice. Name of the tango device of the przs motor. 6.27.2 States pogo_html_docu/PhaseRetarderP09/States.html See pogo generated info for more details. FAULT. PRTHMotorDevice tango device in FAULT state. MOVING. Any motor (prth, prchi or przs) device is in MOVING state. ON. PRTHMotorDevice tango device in ON state. 6.27.3 Commands pogo_html_docu/PhaseRetarderP09/Commands.html See pogo generated info for more details. ShowContentsConfigFile. Returns the contents of the config file given in the ConfigFile attribute. LoadFile. Loads the values in the selected config file in the attributes. The przs and prchi motors are not moved by loading. The loaded values will be set in the PRZSLoaded and PRCHILoaded attributes. Executing the MoveToLoadedPositions command the motors will be moved to these loaded positions. MoveToLoadedPositions. Moves the przs and prchi motors to the positions in the PRZSLoaded and PRCHILoaded attributes. State. MOVING if any motor moves or state of the PRTHMotorDevice device in other case. Status. Default Tango command. StopMove. Stops prth motor. 6.27.4 Attributes pogo_html_docu/PhaseRetarderP09/Attributes.html See pogo generated info for more details. Amplitude. Value for the motor position calculation. Only 1, -1, 0.5 or -0.5 values are allowed. AngleNormal111. Value for the motor position calculation. ConfigFile. Name of the config file to be loaded when the LoadFile command is executed. D111. Value for the motor position calculation. DthChi. Value for the motor position calculation, if the FlagDthchiFromPrchi is set to one, this value will be computed from PRCHI and can not be written. Offset111. Value for the motor position calculation. PathConfigFiles. Directory where the config files will be looking for. Position. Computes the position of the prth motor for the energy value written in this attribute, and moves the motor to this position. Reads the last written value. PositionSim. Setting this attribute does not involve any move. Instead the attribute ResultSim is filled with the calculated final position for the PRTH motor. PRCHI. Position of the prchi motor. PRCHILoaded. Position of the prchi motor in the loaded ConfigFile. The motor will be moved to this position if the MoveToLoadedPositions command is executed. PRTH. Position of the prth motor. PRZS. Position of the przs motor. PRZSLoaded. Position of the przs motor in the loaded ConfigFile. The motor will be moved to this position if the MoveToLoadedPositions command is executed. ResultSim. A string that returns the calculated final position for the energy in PositionSim. Sign. Value for the motor position calculation. Only 1 or -1 values are allowed. UnitLimMax. Software maximum limit for the Position. It will not be used if 0 and equal to UnitLimMin. UnitLimMin. Software minimum limit for the Position. It will not be used if 0 and equal to UnitLimMax. Wplr. Value for the motor position calculation. 6.27.5 Example config file PRZS = 12.98 PRCHI = 45 D111 = 2.059785 OFFSET111 = 0.51026 ANGLENORMAL111 = 54.73561032 SIGN = +1 AMPLITUDE = 22836.05198 WPLR = -1 DTHCHI = 0 UnitLimitMin = 5000 UnitLimitMax = 7000 6.28 PhyMotion Tango Server for controlling motors using the PhyMotion Controller from Phytron. The Server consists of two classes: • PhyMotionCtrl. Socket connection to the controller. • PhyMotionMotor. Implements an axis. 6.28.1 PhyMotionCtrl pogo_html_docu/PhyMotionCtrl/index.html See pogo generated info for more details. Properties pogo_html_docu/PhyMotionCtrl/Properties.html See pogo generated info for more details. States pogo_html_docu/PhyMotionCtrl/States.html See pogo generated info for more details. Commands pogo_html_docu/PhyMotionCtrl/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/PhyMotionCtrl/Attributes.html See pogo generated info for more details. 6.28.2 PhyMotionMotor pogo_html_docu/PhyMotionMotor/index.html See pogo generated info for more details. Properties pogo_html_docu/PhyMotionMotor/Properties.html See pogo generated info for more details. States pogo_html_docu/PhyMotionMotor/States.html See pogo generated info for more details. Commands pogo_html_docu/PhyMotionMotor/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/PhyMotionMotor/Attributes.html See pogo generated info for more details. 6.29 PiezoJena Tango Servers for controlling the Piezo Jena devices. PiezoJenaCtrl connect to the Jena Controller via socket interface (terminal server), and can be used standalone for sending commands to the devices. PiezoJenaNV401CLE uses the PiezoJenaCtrl class for connecting to the hardware and offers an interface to the Jena Amplifier NV40/1CLE. 6.29.1 PiezoJenaCtrl pogo_html_docu/PiezoJenaCtrl/index.html See pogo generated info for more details. Class creating the socket connection and implementing the commands for writing and reading to the socket. Properties pogo_html_docu/PiezoJenaCtrls/Properties.html See pogo generated info for more details. IpAddr. IP address of the PC where the QXRD software talking to the detector is running. PortNb. Port number to connect the QXRD software (by default 1234). SimulationMode. Not used. States pogo_html_docu/PiezoJenaCtrl/States.html See pogo generated info for more details. FAULT. Problems creating socket connection. ON. Socket connection succed. Commands pogo_html_docu/PiezoJenaCtrl/Commands.html See pogo generated info for more details. State. Returns the device state. Default Tango command. Status. It gets the device status. Default Tango command. WriteReadSocket. Sends command to the socket and returns an answer. WriteSocket. Sends command to the socket. Attributes pogo_html_docu/PiezoJenaCtrl/Attributes.html See pogo generated info for more details. 6.29.2 PiezoJenaNV401CLE pogo_html_docu/PiezoJenaNV401CLE/index.html See pogo generated info for more details. Properties pogo_html_docu/PiezoJenaNV401CLE/Properties.html See pogo generated info for more details. SocketDS. Name of the PiezoJenaCtrl tango device making the socket connection. States pogo_html_docu/PiezoJenaNV401CLE/States.html See pogo generated info for more details. FAULT. Error in answer from the amplifier. The returned error is shown in the Status attribute. ON. Idle state. Commands pogo_html_docu/PiezoJenaNV401CLE/Commands.html See pogo generated info for more details. Calibrate. Does nothing. Kept for compatibility with the standard motor interface. State. Returns the device state. Default Tango command. Status. It gets the device status. Default Tango command. StopMove. Does nothing. Kept for compatibility with the standard motor interface. Attributes pogo_html_docu/PiezoJenaNV401CLE/Attributes.html See pogo generated info for more details. ClosedLoop. By writing changes to close (1) or open (0) loop mode. Reads the last set value. Position. Writes a value to the amplifier (in V/mum for open/close loop). Reads current value always in mum. UnitLimitMax. Software maximum limit for the Position attribute. Only used if UnitLimitMax is bigger than UnitLimitMin. UnitLimitMin. Software minimum limit for the Position attribute. Only used if UnitLimitMax is bigger than UnitLimitMin. 6.30 PiezoPiCtrl pogo_html_docu/PiezoPiCtrl/index.html See pogo generated info for more details. Class creating the connection for the Piezos from Physical Instruments (PI) and implementing the commands for writing and reading. The connection can be done via socket or via usb. If USBPort is not set in the device properties, the connection will be done via socket. 6.30.1 Properties pogo_html_docu/PiezoPiCtrls/Properties.html See pogo generated info for more details. IpAddr. IP address. PortNb. Port number. SimulationMode. 0 real mode, 1 simulation mode. Speed. Speed for usb connection. Possible values: 57600 (default), 115200 or 19200. USBPort. Port for connecting via usb, for example /dev/ttyUSB0. Default is None. 6.30.2 States pogo_html_docu/PiezoPiCtrl/States.html See pogo generated info for more details. FAULT. Problems creating socket connection. ON. Socket connection succed. 6.30.3 Commands pogo_html_docu/PiezoPiCtrl/Commands.html See pogo generated info for more details. CloseSocket. Close socket connection. State. Returns the device state. Status. It gets the device status. WriteSocket. Send command to the piezo controller. Only to be used for commands that does not have any answer. WriteReadSocket. Send command to the piezo controller and read the answer. 6.30.4 Attributes pogo_html_docu/PiezoPiCtrl/Attributes.html See pogo generated info for more details. 6.30.5 How to ... 6.31 PiezoPiE185 pogo_html_docu/PiezoPiE185/index.html See pogo generated info for more details. 6.31.1 Properties pogo_html_docu/PiezoPiE185/Properties.html See pogo generated info for more details. 6.31.2 States pogo_html_docu/PiezoPiE185/States.html See pogo generated info for more details. 6.31.3 Commands pogo_html_docu/PiezoPiE185/Commands.html See pogo generated info for more details. 6.31.4 Attributes pogo_html_docu/PiezoPiE185/Attributes.html See pogo generated info for more details. 6.32 PiezoPiE710 Tango Server for the piezo motors from Physik Instruments (PI) controlled by the E-710 modular digital multi-channel. The Server uses the classes PiezoPiE710 and PiezoPiCtrl for the socket interface. Host name and port number of the piezo are given as properties (IpAddr and PortNb) of the PiezoPiCtrl class. pogo_html_docu/PiezoPiE710/index.html See pogo generated info for more details. 6.32.1 Properties pogo_html_docu/PiezoPiE710/Properties.html See pogo generated info for more details. AxisName. Name of the axis for a given piezo. SimulationMode. 0 -¿ real mode, 1 -¿ simulation. SocketDS. Name of the PiezoPiCtrl tango device establishing the socket connection. 6.32.2 States pogo_html_docu/PiezoPiE710/States.html See pogo generated info for more details. FAULT. Not used. MOVING. Piezo moving. ON. Idle state. 6.32.3 Commands pogo_html_docu/PiezoPiE710/Commands.html See pogo generated info for more details. Calibrate. Does nothing. Only for compatibility reasons. CheckDriftStability. Returns the maximum drift between the soll and the current position. Input argument is the number of iterations for computing the maximum drift. DefineWaveform. Initializes waveform definition process and defines a waveform with the values given in the Wave attributes. The id of this waveform is 1. GetErrorStatus. Return error code read it from the Piezo controller. MoveRelative. Increments/decrements the position of the piezo by the value given as argument. ReadWaveform. Resets the internal counter and read points in waveform 1. ResetMotor. Does nothing. Only for compatibility reasons. StartWaveGenerator. Connects waveform 1 to wave generator 1, connects axis to wave generator 1 and starts movement in generator 1. StopMove. Does nothing. Only for compatibility reasons. StopWaveGenerator. Stops generator 1. 6.32.4 Attributes pogo_html_docu/PiezoPiE710/Attributes.html See pogo generated info for more details. Conversion. Only implemented for being used in Online. 1 is the only allowed value. Position. Reads the current position. By writting the piezo is moved to the given position. ServoMode has to be 1 for reading the right position and moving the piezo. SlewDouble. Set/Get SlewRate in physical units/s as double. SlewRate. Set/Get SlewRate in physical units/s as long. ServoMode. Set/Get the servo-control mode of the piezo. 1 for moving the position of the piezo. UnitLimitMax. Not used. UnitLimitMin. Not used. Voltage. Get/Set the current voltage, as measured by the A/D converter. WaveAmplitude. Amplitude to be set by the DefineWaveform command for setting a waveform. WaveCenterPoint. CenterPoint to be set by the DefineWaveform command for setting a waveform. WaveOffset. Offset to be set by the DefineWaveform command for setting a waveform. WaveSegmentLength. SegmentLength to be set by the DefineWaveform command for setting a waveform. WaveSpeedUpDown. SpeedUpDown to be set by the DefineWaveform command for setting a waveform. WaveStartPoint. StartPoint to be set by the DefineWaveform command for setting a waveform. WaveTableRate. Set/Get the sample interval used by the wave generator. WaveWaveLength. WaveLength to be set by the DefineWaveform command for setting a waveform. 6.33 PiezoPiE712 Tango Server for the piezo motors from Physik Instruments (PI) controlled by the E-712 modular digital multi-channel. The Server uses the classes PiezoPiE712 and PiezoPiCtrl for the socket interface. Host name and port number of the piezo are given as properties (IpAddr and PortNb) of the PiezoPiCtrl class. pogo_html_docu/PiezoPiE712/index.html See pogo generated info for more details. 6.33.1 Properties pogo_html_docu/PiezoPiE712/Properties.html See pogo generated info for more details. AxisName. Name of the axis for a given piezo. SimulationMode. 0 -¿ real mode, 1 -¿ simulation. SocketDS. Name of the PiezoPiCtrl tango device establishing the socket connection. 6.33.2 States pogo_html_docu/PiezoPiE712/States.html See pogo generated info for more details. FAULT. Error from Piezo controller. MOVING. Piezo moving. ON. Idle state. 6.33.3 Commands pogo_html_docu/PiezoPiE712/Commands.html See pogo generated info for more details. Calibrate. Does nothing. Only for compatibility reasons. CheckDriftStability. Returns the maximum drift between the soll and the current position. Input argument is the number of iterations for computing the maximum drift. DefineWaveform. Defines a linear wave table with Id equal to the axis number and the parameters given in the Wave attributes. It overwrites any already defined table with the same Id. MoveRelative. Increments/decrements the position of the piezo by the value given as argument. ReadWaveform. Reads all points in the waveform with axisNumber Id. ResetMotor. Does nothing. Only for compatibility reasons. StartWaveGenerator. Connects the table with axisNumber Id to the WaveGenerator for this axis and starts output of the wave generator. StopMove. Stops the piezo. StopWaveGenerator. Stops the wave generator of this axis. 6.33.4 Attributes pogo_html_docu/PiezoPiE712/Attributes.html See pogo generated info for more details. Conversion. Only implemented for being used in Online. 1 is the only allowed value. Error. Returns the master unit error. It clears the error when reading. OverflowStatus. Reports the status of the overflow signal of the piezo. Position. Reads the current position. By writting the piezo is moved to the given position. ServoMode has to be 1 for reading the right position and moving the piezo. SlewDouble. Set/Get SlewRate in physical units/s as double. SlewRate. Set/Get SlewRate in physical units/s as long. ServoMode. Set/Get the servo-control mode of the piezo. 1 for moving the position of the piezo. Memorized with write-to-hardware-at-init. UnitLimitMax. Not used. UnitLimitMin. Not used. Version. Reads master unit device identity number. Voltage. Get/Set the current voltage, as measured by the A/D converter. WaveAmplitude. Amplitude to be set by the DefineWaveform command for setting a waveform. WaveOffset. Offset to be set by the DefineWaveform command for setting a waveform. WaveSegmentLength. SegmentLength to be set by the DefineWaveform command for setting a waveform. WaveSpeedUpDown. SpeedUpDown to be set by the DefineWaveform command for setting a waveform. WaveStartPoint. StartPoint to be set by the DefineWaveform command for setting a waveform. WaveTableRate. Set/Get the sample interval used by the wave generator. WaveWaveLength. WaveLength to be set by the DefineWaveform command for setting a waveform. 6.34 PiezoPiE816 Tango Server for the piezo motors from Physik Instruments (PI) controlled by the E-816 computer interface and command intrepreter. The Server uses the classes PiezoPiE816 and PiezoPiCtrl for the socket interface. Host name and port number of the piezo are given as properties (IpAddr and PortNb) of the PiezoPiCtrl class. pogo_html_docu/PiezoPiE816/index.html See pogo generated info for more details. 6.34.1 Properties pogo_html_docu/PiezoPiE816/Properties.html See pogo generated info for more details. AxisName. Name of the axis for a given piezo. SimulationMode. 0 -¿ real mode, 1 -¿ simulation. SocketDS. Name of the PiezoPiCtrl tango device establishing the socket connection. UseDeadband. Set to 1 for checking the ’on target’ position comparting the current position with the set one using the Deadband attribute. If 0 (default) the command ONT? will be used. 6.34.2 States pogo_html_docu/PiezoPiE816/States.html See pogo generated info for more details. MOVING. Piezo moving. ON. Idle state. 6.34.3 Commands pogo_html_docu/PiezoPiE816/Commands.html See pogo generated info for more details. Calibrate. Does nothing. Only for compatibility reasons. CheckDriftStability. Returns the maximum drift between the soll and the current position. Input argument is the number of iterations for computing the maximum drift. MoveRelative. Increments/decrements the position of the piezo by the value given as argument. ResetMotor. Resets the master unit of the piezo. StopMove. Stops the piezo. 6.34.4 Attributes pogo_html_docu/PiezoPiE816/Attributes.html See pogo generated info for more details. AverageNumber. AxisName. Reads/Writes the name of the axis from/to the master unit. BaudRate. Gets the master unit baud rate setting for the RS-232 communication. Deadband. Deadband for checking if the motor is ontarget. DriftCompensationMode. Sets the drift compensation for the digital-analog converter ON (1) or OFF (0). Gets the Drift Compensation Mode setting. Error. Returns the master unit error. It clears the error when reading. OverflowStatus. Reports the status of the overflow signal of the piezo. Position. Reads the current position. By writting the piezo is moved to the given position. ServoMode has to be 1 for reading the right position and moving the piezo. SerialNumber. Reads serial number of device. ServoMode. Set/Get the servo-control mode of the piezo. 1 for moving the position of the piezo. UnitLimitMax. Not used. UnitLimitMin. Not used. Version. Reads master unit device identity number. Voltage. Get/Set the current voltage, as measured by the A/D converter. 6.35 PiezoPiE861 pogo_html_docu/PiezoPiE861/index.html See pogo generated info for more details. 6.35.1 Properties pogo_html_docu/PiezoPiE861/Properties.html See pogo generated info for more details. 6.35.2 States pogo_html_docu/PiezoPiE861/States.html See pogo generated info for more details. 6.35.3 Commands pogo_html_docu/PiezoPiE861/Commands.html See pogo generated info for more details. 6.35.4 Attributes pogo_html_docu/PiezoPiE861/Attributes.html See pogo generated info for more details. 6.36 PiezoPiGpibCtrl pogo_html_docu/PiezoPiGpibCtrl/index.html See pogo generated info for more details. Class creating a connection to the Piezos from Physical Instruments (PI) via gpib and implementing the commands for writing and reading. The standard GpibDeviceServer can not be used, because the read operation has to be performed several times for getting the complete answer from the device. 6.36.1 Properties pogo_html_docu/PiezoPiGpibCtrls/Properties.html See pogo generated info for more details. GpibBoardId. GPIB board id (for example, 0 for gpib0). GpibDeviceAddress. Device address (set in the hardware. Use adress from 0 to 16 if the Gpib connectionis direct, not using gpib-enet). GpibDeviceTimeout. Timeout for Gpib connection ( 11 - ¿ 1 s, 12 -¿ 3 s). The Tango timeout is 3 s, for that reason if 12 is set the GpibWriteRead command gives a Timeout in case a wrong command is sent, with 11 the command throws an exception. GpibDeviceSecondaryAddress. Not used SimulationMode. 0 real mode, 1 simulation mode. 6.36.2 States pogo_html_docu/PiezoPiGpibCtrl/States.html See pogo generated info for more details. FAULT. ON. 6.36.3 Commands pogo_html_docu/PiezoPiGpibCtrl/Commands.html See pogo generated info for more details. GPIBWrite. For writing to GPIB without reading. GPIBWriteRead. Performs several readings (until the answer is completed) after writing, the answer is returned with Line Feedback and black spaces, in the same way as the device answers. If the length of the gpib answer is null, the command throws an exception. This happens for example if the GpibDeviceTimeout is 11 (1 s, smaller than the 3 s of the tango timeout) and a wrong command is sent. If the GpibDeviceTimeout is 12 (3 s) a Tango timeout is produced. State. Returns the device state. Status. It gets the device status. 6.36.4 Attributes pogo_html_docu/PiezoPiGpibCtrl/Attributes.html See pogo generated info for more details. 6.36.5 How to ... 6.37 PitchRollCorrection pogo_html_docu/PitchRollCorrection/index.html See pogo generated info for more details. Class for moving two oms motors depending on the energy send to the DCM monochormator. The monochromator motor is not moved in this class. The writing to the Position attribute is done by a MultipleMotor device having as master device the FMBOxfDCMEnergy device. 6.37.1 Properties pogo_html_docu/PitchRollCorrection/Properties.html See pogo generated info for more details. 6.37.2 States pogo_html_docu/PitchRollCorrection/States.html See pogo generated info for more details. FAULT. Not able to connect to the oms motors. MOVING. Any of the oms corrected in position is moving. ON. Idle state. 6.37.3 Commands pogo_html_docu/PitchRollCorrection/Commands.html See pogo generated info for more details. State. State from the Oms Motors and set the current state to MOVING if any of them moves. Status. Default command. 6.37.4 Attributes pogo_html_docu/PitchRollCorrection/Attributes.html See pogo generated info for more details. DMCParallelNew. Position of the parallel motor computed from the energy given in the Position attribute (used for computing the new positions of the oms motors to move). DMCParallelOld. Position of the parallel motor before initializing the last move (used for computing the new positions of the oms motors to move). MCHI2. Current position of the chi2 oms motor. MTH2. Current position of the th2 oms motor. MCHI2Calc. Last calculated position at which the chi2 motor was moved. MTH2Calc. Last calculated position at which the th2 motor was moved. Position (DMCParallelNew. Reads the current position from the parallel motor. By writting computes the corresponding positions for the corrected oms motors and initialize the movement of both of them. Position. By writting computes the position of th parallel motor for this energy and the corresponding positions for the corrected oms motors and initialize the movement of both of them. Reads the last written value. SignMchi2. Sign of the correction applied to the mchi2 motor. 1, 0 and -1 values are allowed. SignMth2. Sign of the correction applied to the mth2 motor. 1, 0 and -1 values are allowed. 6.38 PlcUndulator pogo_html_docu/PlcUndulator/index.html See pogo generated info for more details. 6.38.1 Properties pogo_html_docu/PlcUndulator/Properties.html See pogo generated info for more details. PlcServer The server which exports the undulator PLC. SimulationMode 0 real mode, 1 simulation mode. 6.38.2 States pogo_html_docu/PlcUndulator/States.html See pogo generated info for more details. ON The undulator has reached the requested position and is waiting for a new request. MOVING The undulator is moving to a new position. DISABLE The undulator is disabled for the experiment. Only reading is possible. The control room has taken the control over the undulator or the local control is activated. FAULT The hardware indicates a fault. A reset might help. UNKNOWN No connection to the Ads undulator device, state cannot be evaluated. ALARM The local control indicates incoherent set and read values. 6.38.3 Commands pogo_html_docu/PlcUndulator/Commands.html See pogo generated info for more details. State. Returns the device state. Default Tango Command. Status. Returns the device status. Default Tango Command. StartMove. Start to move to desired position, the function returns immediately. StopMove. Stop moving, return immediately, don’t wait for de-acceleation. ResetMotor. Reset the motor. 6.38.4 Attributes pogo_html_docu/PlcUndulator/Attributes.html See pogo generated info for more details. CurrentGap The current Gap in µm. This value is read-only. DesiredGap The desired Gap in µm. MaxGap The Max allowed value for the Gap, in µm. It is at most 225000 µm. This value is read-only. MinGap The Min allowed value for the Gap, in µm. It is at least 8000 µm. This value is read-only. CurrentTaper The current Taper in um. This value is read-only. DesiredTaper The desired Taper in um. CurrentSpeed The current Speed. 1 unit corresponds to 0.00856 um/s. DesiredSpeed The desired Speed. 1 unit corresponds to 0.00856 um/s. Max value is 330,000. StatusByte Undulator Status Byte. This value is read-only. CtrlByte External Control Byte. This value is read-only. 6.38.5 Client examples The following client (plcUndulator client.py) can be used to setup the Undulator position. See 6.38.6 for an example of the necessary steps. #!/usr/bin/env python from PyTango import * import sys import time def usage(): print "Usage:" print " ’plcUndulator.py’ -> to get information and status" print " ’plcUndulator.py help’ -> prints this help" print " ’plcUndulator.py status’ -> Gets the undulator status" print " ’plcUndulator.py gap <gap>’ -> Set the desired gap (um)" print " ’plcUndulator.py taper <taper>’ -> Set the desired taper (um)" print " ’plcUndulator.py speed <speed>’ -> Set the desired speed" print " ’plcUndulator.py start’ -> Start moving to desired position" print " ’plcUndulator.py stop’ -> Stop moving" print " ’plcUndulator.py reset’ -> Undulator reset" def get_gap(plcUnd): print "Current Gap: %s um" % plcUnd.read_attribute("CurrentGap").value print "Desired Gap: %s um" % plcUnd.read_attribute("DesiredGap").value def set_gap(plcUnd, gap): plcUnd.write_attribute("DesiredGap", long(gap)) plcUnd.StartMove() def get_taper(plcUnd): print "Current Taper: %s um" % plcUnd.read_attribute("CurrentTaper").value print "Desired Taper: %s um" % plcUnd.read_attribute("DesiredTaper").value def set_taper(plcUnd, gap): plcUnd.write_attribute("DesiredTaper", long(gap)) plcUnd.StartMove() def get_limit_gap(plcUnd): print "Min Gap: %s um" % plcUnd.read_attribute("MinGap").value print "Max Gap: %s um" % plcUnd.read_attribute("MaxGap").value def get_speed(plcUnd): print "Speed: %s (100000 corresponds to 8.56 mm/s)" % plcUnd.read_attribute("CurrentSpee def set_speed(plcUnd, speed): plcUnd.write_attribute("DesiredSpeed", long(speed)) def start(plcUnd): plcUnd.StartMove() def stop(plcUnd): plcUnd.StopMove() def reset(plcUnd): plcUnd.ResetMotor() def status(plcUnd): print "State: %s" % plcUnd.State() print "Status: %s" % plcUnd.Status() # # main # try : plcUnd = DeviceProxy( "//haspp0xtdot:10000/p00/plcundulator/001") if (len(sys.argv)==1): get_gap(plcUnd) get_limit_gap(plcUnd) get_speed(plcUnd) status(plcUnd) print "" print "Run ’plcUndulator.py help’ to see program options" print "" else: if (sys.argv[1]=="help"): usage() elif (sys.argv[1]=="gap"): if (len(sys.argv)>2): set_gap(plcUnd, sys.argv[2]) else: get_gap(plcUnd) elif (sys.argv[1]=="taper"): if (len(sys.argv)>2): set_taper(plcUnd, sys.argv[2]) else: get_taper(plcUnd) elif (sys.argv[1]=="speed"): if (len(sys.argv)>2): set_speed(plcUnd, sys.argv[2]) else: get_speed(plcUnd) elif (sys.argv[1]=="start"): start(plcUnd) elif (sys.argv[1]=="stop"): stop(plcUnd) elif (sys.argv[1]=="reset"): reset(plcUnd) elif (sys.argv[1]=="status"): status(plcUnd) except Exception, inst : print "Failed with exception !" print sys.exc_info()[0] print type(inst) # the exception instance print inst.args # arguments stored in .args 6.38.6 How to ... The desired speed and gap can be set as follows: plcUndulator_client.py speed 100000 # set speed to 10% plcUndulator_client.py gap 25000 # set desired gap (in um) The movement will be started automatically when you set the gap value. You can check that the status of the undulator with plcUndulator_client.py status “MOVING” means that it is still moving. The movement can be stopped in any moment by running plcUndulator_client.py stop The movement to the desired position can be (re)started with plcUndulator_client.py start 6.39 SMCHydra Tango Server for controlling the two motors connected to the axis 1 and 2 of a SMC Hydra Controller (from miCos GmbH). The Server uses two classes: SMCHydraCtrl (Socket interface) and SMCHydraMotor (for controlling every single axis). It is also valid for controlling the axis of the SMC Pegasus Controller (the property FlagPegasus of the SMCHydraMotor class has to be set to 1 in this case). The code of the SMCHydraMotor class includes the SMCHydraCtrl class. This class is used to generate the corresponding library (libSMCHydraCtrl.a). Create one tango process for each controller (and the corresponding two motors), in other case errors can be produced: when a motor in one controller is moved the other controller returns error in the state. 6.39.1 SMCHydraCtrl pogo_html_docu/SMCHydraCtrl/index.html See pogo generated info for more details. Class creating the socket connection and implementing the commands for writing and reading to the socket. Properties pogo_html_docu/SMCHydraCtrl/Properties.html See pogo generated info for more details. IpAddress. IP address. PortNb. Port number. SimulationMode. 0 real mode, 1 simulation mode. States pogo_html_docu/SMCHydraCtrl/States.html See pogo generated info for more details. FAULT. Problems creating socket connection. ON. Socket connection succeeds. Commands pogo_html_docu/SMCHydraCtrl/Commands.html See pogo generated info for more details. CloseSocket. Close socket connection. State. Returns the device state. Default function. Status. It gets the device status. Default function. WriteReadSocket. Sends command to the controller and returns the answer. WriteSocket. Sends command to the controller. Attributes pogo_html_docu/SMCHydraCtrl/Attributes.html See pogo generated info for more details. 6.39.2 SMCHydraMotor pogo_html_docu/SMCHydraMotor/index.html See pogo generated info for more details. Properties pogo_html_docu/SMCHydraMotor/Properties.html See pogo generated info for more details. AxisNumber. Motor axis number (1 or 2). FlagPegasus. Set to 1 for Pegasus controller. By default it will work for the Hydra. SocketDS. Name of the SMCHydraCtrl tango device establishing the socket connection. States pogo_html_docu/SMCHydraMotor/States.html See pogo generated info for more details. MOVING. Axis is moving. ON. Idle state. Commands pogo_html_docu/SMCHydraMotor/Commands.html See pogo generated info for more details. Calibrate. Sets the value given in the argument as the current position by changing the origin position. It recalculates the software limits. InitMotor. Restarts the motor. MoveHome. Moves the motor to its home position. ResetMotor. Resets the motor. State. Reads the motor state from hardware. In case of error, set the Status to the error message coming from the controller. Status. Gets the device status. Default Tango function. StopMove. Stops motor movement. Attributes pogo_html_docu/SMCHydraMotor/Attributes.html See pogo generated info for more details. Acceleration. Sets/Gets motor acceleration in mm/s/s. ClosedLoop. Sets/Gets closed loop mode. 0 -¿ regulator is open, 1 -¿ standard regulator mode, 2 -¿ dynamic regulator mode. CcwLimit. Reads switch limit status in the reverse direction (if 1 limit reached). CcwLimitConfig. Sets/Gets configuration of reverse direction switch limit: 0 -¿ normally open, 1 -¿ normally closed, 2 -¿ disabled. CwLimit. Reads switch limit status in the forward direction (if 1 limit reached). CwLimitConfig. Sets/Gets configuration of forward direction switch limit: 0 -¿ normally open, 1 -¿ normally closed, 2 -¿ disabled. Conversion. Converts from readout to physical units. DFactor. Sets/Gets coefficient of differential portion for closed loop movements. EntranceWindowWidth. Sets/Gets entrance window width. As soon as the absolute position aberration constantly remains below the specified entrance window width for a period of time specified by TimeInWindow the in-window bit changes from inactive to active state to indicate that the position has settled. Useful for closed loop operation only. Inactive if any parameter is set to 0. ExitWindowWidth. Sets/Gets exit window width. As soon as the absolute position aberration once exceeds the exit window width, the indication bit changes from active to inactive state. Useful for closed loop operation only. Inactive if any parameter is set to 0. HomePosition. Sets/Gets distance in mm from Ccw (reverse) end switch at which Home move terminates. HwLowerLimit. Sets/Gets the hardware lower limit. HwUpperLimit. Sets/Gets the hardware upper limit. IFactor. Sets/Gets coefficient of integral portion for closed loop movements. Offset. Sets/Gets current position origin in mm. PFactor. Sets/Gets coefficient of proportional portion for closed loop movements. Position. Sets/Gets the current position in mm. SlewDouble. Sets/Gets motor velocity in mm/s as double. SlewRate. Sets/Gets motor velocity in mm/s as long. TimeOnWindow. Sets/Gets the position settling time for the in-window indication feature. UnitLimitMax. Software maximum limit. If both UnitLimitMax and UnitLimitMin are 0 or UnitLimitMax is smaller than UnitLimitMin they will not be used. UnitLimitMin. Software minimum limit. If both UnitLimitMax and UnitLimitMin are 0 or UnitLimitMax is smaller than UnitLimitMin they will not be used. 6.39.3 Example Clients 6.39.4 How to ... 6.40 Slt/Spk PLC, Beckhoff This Tango server accesses a Beckhoff PLC, coded by Jan Tolkiehn, which controls mirrors and slits, at most 4 axes. Release 1 1 includes simulation mode. Release 2 0 includes Ads class in the same process. pogo_html_docu/Spk/index.html See pogo generated info for more details. 6.40.1 Properties pogo_html_docu/Spk/Properties.html See pogo generated info for more details. Channel. The channel number selects the motor, 0 - 3. PlcServer. Specifies the Ads Tango server, e.g.: //hasblpc:10000/blxx/exp/sps2. SimulationMode. 0 real mode, 1 simulation mode. 6.40.2 States pogo_html_docu/Spk/States.html See pogo generated info for more details. MOVING. The motor is moving. FAULT. Error. ON. Motor is idle. 6.40.3 Commands pogo_html_docu/Spk/Commands.html See pogo generated info for more details. 6.40.4 Attributes pogo_html_docu/Spk/Attributes.html See pogo generated info for more details. 6.40.5 Example Client The following script moves a Spk motor. If no destination is supplied, the current position is displayed. #!/usr/bin/python from PyTango import * import sys, time, termios init = 0 def inkey(): global init if( not init): init = 1 fd = sys.stdin.fileno() old = termios.tcgetattr( fd) new = termios.tcgetattr( fd) new[3] = new[3] & ˜termios.ICANON & ˜termios.ECHO # # VMIN - the minimum number of characters to be read # new[6] [termios.VMIN] = 0 # # VTIME - how long the driver waits for VMIN characters, unit 0.1s # new[6] [termios.VTIME] = 1 termios.tcsetattr( fd, termios.TCSADRAIN, new) sys.exitfunc = lambda: termios.tcsetattr( fd, termios.TCSADRAIN, old) key = sys.stdin.read(1) if( len( key) == 0): key = -1 else: key = ord( key) return key # # # def move_to( proxy, newPos): proxy.write_attribute( "Position", newPos) while( proxy.state() == DevState.MOVING): print " state ", proxy.state() print " Current position ",proxy.read_attribute( "Position").value time.sleep( 0.5) if inkey() == 32: print " stopping all moves" proxy.command_inout( "StopMove") return 0 # # main # try : proxy = DeviceProxy( "//haso107tk:10000/hires/exp/spk1") if( len( sys.argv) == 1): print " Position ", proxy.read_attribute( "Position").value else: move_to( proxy, float(sys.argv[1])) except Exception, inst : print "Failed with exception !" print sys.exc_info()[0] print type(inst) # the exception instance print inst.args # arguments stored in .args 6.41 Tango Motor This is a template for a generic Tango motor server. It implements the minimal interface for every ’movable’. Every motor that complies to this interface can be operated from Online using such an entry in /online dir/online.xml: <device> <name>mnchrmtr</name> <type>type_tango</type> <module>motor_tango</module> <device>pXX/blenergy/exp.01</device> <control>tango</control> <hostname>haso107XX:10000</hostname> </device> As in this example, a Tango motor is well suited to provide a handle to monochromators. Features that do not fit into the minimal interface can be handled by a beamline-specific-code widget (BLSC) which refers to other attributes or commands directly. An example can be found in the TkI manual in the BLSC chapter: Lom. The attributes positionSim and resultSim make it applicable for compound devices also. More details can be found below. pogo_html_docu/TangoMotor/index.html See pogo generated info for more details. 6.41.1 Properties pogo_html_docu/TangoMotor/Properties.html See pogo generated info for more details. 6.41.2 States pogo_html_docu/TangoMotor/States.html See pogo generated info for more details. MOVING The motor is moving. FAULT Error. ON Motor is idle. 6.41.3 Commands pogo_html_docu/TangoMotor/Commands.html See pogo generated info for more details. Calibrate The argument of this command is the true motor position. ResetMotor StopMove 6.41.4 Attributes pogo_html_docu/TangoMotor/Attributes.html See pogo generated info for more details. Position The motor position, R/W. If it is written, motors are moved. The end of the move can be detected by monitoring the server state. CwLimit Optional, clients should test whether this attribute exists and then use it (Long). CcwLimit Optional, clients should test whether this attribute exists and then use it (Long). PositionSim Optional, a feature for compound devices: Setting this attribute does not involve any move. Instead the attribute ResultSim is filled with the calculated final positions. ResultSim Optional, a feature for compound devices. An array of strings that returns the calculated final positions after the PositionSim attribute has been set, e.g.: Lom1Pitch = 24.2993 Lom2Pitch = 24.2993 Lom1Lin = -551.039 Lom2Lin = 551.039 emt = 0.123 emt is the estimated move time. UnitLimitMin UnitLimitMax 6.41.5 Example Client The following client operates a TangoMotor. Depending on the command line the current position is read or, if a destination is supplied, the motor is moved. #!/usr/bin/python # from PyTango import * import sys, time, termios init = 0 def inkey(): global init if( not init): init = 1 fd = sys.stdin.fileno() old = termios.tcgetattr( fd) new = termios.tcgetattr( fd) new[3] = new[3] & ˜termios.ICANON & ˜termios.ECHO # # VMIN - the minimum number of characters to be read # new[6] [termios.VMIN] = 0 # # VTIME - how long the driver waits for VMIN characters, unit 0.1s # new[6] [termios.VTIME] = 1 termios.tcsetattr( fd, termios.TCSADRAIN, new) sys.exitfunc = lambda: termios.tcsetattr( fd, termios.TCSADRAIN, old) key = sys.stdin.read(1) if( len( key) == 0): key = -1 else: key = ord( key) return key # # move a motor # def move_to( sps, newPos): attr= sps.read_attribute( "UnitLimitMin") minPos = attr.value attr = sps.read_attribute( "UnitLimitMax") maxPos = attr.value print " min ", minPos, ", max ", maxPos if (newPos > maxPos or newPos < minPos): print "\n Position", newPos, "outside limits", minPos, maxPos return 0 posAttr = sps.read_attribute( "Position") posAttr.value = newPos sps.write_attribute( posAttr) status = 1 while (sps.state() == DevState.MOVING): print " Current position ",sps.read_attribute( "Position").value time.sleep( 0.2) if inkey() == 32: print " stopping all moves" sps.command_inout( "StopMove") return 0 return 1 # # main # try : sps = DeviceProxy( "//haso107XX:10000/pXX/lomenergy/exp.01") if( len( sys.argv) == 1): print " Current position ", sps.read_attribute( "Position").value else: move_to( sps, float(sys.argv[1])) except Exception, inst : print "Failed with exception !" print sys.exc_info()[0] print type(inst) # the exception instance print inst.args # arguments stored in .args 6.42 TcpIpMotorP10 This is an implementation of the Tango motor interface. The Tango server communicates with a TcpIp server that exports the motor. The details of the TcpIp server interface have been defined in collaboration with Andreas Malecki, IMETUM (Uni-Munich). <device> <name>newport1</name> <type>type_tango</type> <module>motor_tango</module> <device>pXX/tcpipmotorp10/exp.01</device> <control>tango</control> <hostname>happXX:10000</hostname> </device> pogo_html_docu/TcpIpMotorP10/index.html See pogo generated info for more details. 6.42.1 Properties pogo_html_docu/TcpIpMotorP10/Properties.html See pogo generated info for more details. 6.42.2 States pogo_html_docu/TcpIpMotorP10/States.html See pogo generated info for more details. MOVING The motor is moving. FAULT Error. ON Motor is idle. 6.42.3 Commands pogo_html_docu/TcpIpMotorP10/Commands.html See pogo generated info for more details. Calibrate The argument of this command is the true motor position. ResetMotor StopMove 6.42.4 Attributes pogo_html_docu/TcpIpMotorP10/Attributes.html See pogo generated info for more details. Position The motor position, R/W. If it is written, motors are moved. The end of the move can be detected by monitoring the server state. CwLimit Optional, clients should test whether this attribute exists and then use it (Long). CcwLimit Optional, clients should test whether this attribute exists and then use it (Long). UnitLimitMin UnitLimitMax 6.42.5 Example Client The following client operates a TangoMotor. Depending on the command line the current position is read or, if a destination is supplied, the motor is moved. #!/usr/bin/python # from PyTango import * import sys, time, termios init = 0 def move_to( sps, newPos): attr= sps.read_attribute( "UnitLimitMin") minPos = attr.value attr = sps.read_attribute( "UnitLimitMax") maxPos = attr.value print " min ", minPos, ", max ", maxPos if (newPos > maxPos or newPos < minPos): print "\n Position", newPos, "outside limits", minPos, maxPos return 0 posAttr = sps.read_attribute( "Position") posAttr.value = newPos sps.write_attribute( posAttr) status = 1 while (sps.state() == DevState.MOVING): print " Current position ",sps.read_attribute( "Position").value time.sleep( 0.2) return 1 # # main # try : sps = DeviceProxy( "//haso107XX:10000/pXX/tcpipmotorp10/exp.01") if( len( sys.argv) == 1): print " Current position ", sps.read_attribute( "Position").value else: move_to( sps, float(sys.argv[1])) except Exception, inst : print "Failed with exception !" print sys.exc_info()[0] print type(inst) # the exception instance print inst.args # arguments stored in .args 6.43 TwoThetaP07 pogo_html_docu/TwoThetaP07/index.html See pogo generated info for more details. 6.44 VICIMultiPosValve pogo_html_docu/VICIMultiPosValve/index.html See pogo generated info for more details.. 6.44.1 Properties pogo_html_docu/VICIMultiPosValve/Properties.html See pogo generated info for more details. 6.44.2 States pogo_html_docu/VICIMultiPosValve/States.html See pogo generated info for more details. 6.44.3 Commands pogo_html_docu/VICIMultiPosValve/Commands.html See pogo generated info for more details. 6.44.4 Attributes pogo_html_docu/VICIMultiPosValve/Attributes.html See pogo generated info for more details. 6.45 VICITwoPosValve pogo_html_docu/VICITwoPosValve/index.html See pogo generated info for more details.. 6.45.1 Properties pogo_html_docu/VICITwoPosValve/Properties.html See pogo generated info for more details. 6.45.2 States pogo_html_docu/VICITwoPosValve/States.html See pogo generated info for more details. 6.45.3 Commands pogo_html_docu/VICITwoPosValve/Commands.html See pogo generated info for more details. 6.45.4 Attributes pogo_html_docu/VICITwoPosValve/Attributes.html See pogo generated info for more details. 6.46 VmExecutor This is an implementation of the virtual motor concept using the Tango motor interface. The VmExecutor class executes code that is provided by the user. The user code defines the class VM which consists fo certain function members that need to be supplied. See the examples below. Motors of this kind are introduced to Online by such an entry in /online dir/online.xml: <device> <name>vm_slit</name> <type>type_tango</type> <module>motor_tango</module> <device>p111/vmexecutor/exp.01</device> <control>tango</control> <hostname>haspp111:10000</hostname> </device> 6.46.1 Properties VmCode The path to the file that contains the motor code. Examples can be found below. 6.46.2 States pogo_html_docu/VmExecutor/States.html See pogo generated info for more details. MOVING The motor is moving. FAULT Error. ON Motor is idle. 6.46.3 Commands pogo_html_docu/VmExecutor/Commands.html See pogo generated info for more details. StopMove 6.46.4 Attributes pogo_html_docu/VmExecutor/Attributes.html See pogo generated info for more details. Position The motor position, R/W. If it is written, motors are moved. The end of the move can be detected by monitoring the server state. CwLimit Optional, clients should test whether this attribute exists and then use it (Long). CcwLimit Optional, clients should test whether this attribute exists and then use it (Long). PositionSim Optional, a feature for compound devices: Setting this attribute does not involve any move. Instead the attribute ResultSim is filled with the calculated final positions. ResultSim Optional, a feature for compound devices. An array of strings that returns the calculated final positions after the PositionSim attribute has been set, e.g.: UnitLimitMin UnitLimitMax 6.46.5 A very trivial example In the following example, the virtual motor is a dummy device. The piece of code can be used as a template. The class name VM and the function names are fixed. #!/bin/env python import PyTango class VM: # # init_device # def __init__( self): self.ResultSim = None self.PositionSim = None self.Position = 0 self.UnitLimitMin = 0 self.UnitLimitMax = 100 return # # dev_state # def dev_state( self): argout = PyTango.DevState.ON return argout # # Position # def read_Position( self): return self.Position def write_Position( self, argin): if( argin < self.UnitLimitMin or argin > self.UnitLimitMax): PyTango.Except.throw_exception( "vm_dummy", "requested position outside limits %g %g " % (self.UnitLimitMin, self.UnitLimitMax), "VmExecutor") self.Position = argin return 1 # # UnitLimitMax # def read_UnitLimitMax( self): return self.UnitLimitMax def write_UnitLimitMax( self, argin): self.UnitLimitMax = argin # # UnitLimitMin # def read_UnitLimitMin( self): return self.UnitLimitMin def write_UnitLimitMin( self, argin): self.UnitLimitMin = argin # # CwLimit, CcwLimit # def read_CwLimit( self): return 0 def read_CcwLimit( self): return 0 # # PositionSim # def read_PositionSim( self): if self.PositionSim is None: PyTango.Except.throw_exception( "vm_dummy", "PositionSim is undefined", "VmExecutor") return self.PositionSim def write_PositionSim( self, argin): self.PositionSim = argin self.ResultSim = [] self.ResultSim.append( "x: %g " % argin) def read_ResultSim( self): if self.ResultSim is None: PyTango.Except.throw_exception( "vm_dummy", "ResultSim is undefined", "VmExecutor") return self.ResultSim def StopMove( self): return 1 6.46.6 A trivial example In the following example, the virtual motor is directly coupled to another motor. #!/bin/env python import PyTango class VM: # # init_device # def __init__( self): self.ResultSim = None self.PositionSim = None self.proxies = [] self.proxies.append( PyTango.DeviceProxy( "p111/motor/exp.01")) return # # dev_state # def dev_state( self): argout = PyTango.DevState.ON # # if one device is in FAULT the VM is in FAULT too # for proxy in self.proxies: if proxy.state() == PyTango.DevState.FAULT: argout = PyTango.DevState.FAULT break if argout == PyTango.DevState.ON: # # if one device is MOVING the VM is MOVING too # for proxy in self.proxies: if proxy.state() == PyTango.DevState.MOVING: argout = PyTango.DevState.MOVING break return argout # # Position # def read_Position( self): return self.proxies[0].read_attribute( "Position").value def write_Position( self, argin): if( argin < self.proxies[0].UnitLimitMin or argin > self.proxies[0].UnitLimitMax): PyTango.Except.throw_exception( "vm1", "requested position outside limits %g %g " % (self.proxies[0].UnitLimitMin, self.proxies[0].UnitLimitMax), "VmExecutor") self.proxies[0].write_attribute( "Position", argin) return 1 # # UnitLimitMax # def read_UnitLimitMax( self): return self.proxies[0].UnitLimitMax def write_UnitLimitMax( self, argin): self.UnitLimitMax = argin # # UnitLimitMin # def read_UnitLimitMin( self): return self.proxies[0].UnitLimitMin def write_UnitLimitMin( self, argin): self.UnitLimitMin = argin # # CwLimit, CcwLimit # def read_CwLimit( self): return self.proxies[0].CwLimit def read_CcwLimit( self): return self.proxies[0].CcwLimit # # PositionSim # def read_PositionSim( self): if self.PositionSim is None: PyTango.Except.throw_exception( "vm1", "PositionSim is undefined", "VmExecutor") return self.PositionSim def write_PositionSim( self, argin): self.PositionSim = argin self.ResultSim = [] self.ResultSim.append( "x: %g " % argin) def read_ResultSim( self): if self.ResultSim is None: PyTango.Except.throw_exception( "vm1", "ResultSim is undefined", "VmExecutor") return self.ResultSim def StopMove( self): return self.proxies[0].StopMove() 6.47 ZMX Tango Server for the Stepper Motor Power Stage model ZMX from Phytron. The Server uses the classes ZMX and Socket. Host name and port number of the Power Stage system are given as properties (HostName and Port) of the Socket tango device that is started in the same process as the zmx devices. An optimal value for the Socket Timeout property is 300. The ZMX devices make the connection with this socket device by a property SocketDevice. The Socket class is based on the one from Soleil (in Tango-ds cvs) but with a modification for avoiding a Segmentation Fault in the ZMX device when the socket is not responding. The library libtgclasses in Tango-ds svn contains the modified Socket class. pogo_html_docu/ZMX/index.html See pogo generated info for more details. 6.47.1 Properties pogo_html_docu/ZMX/Properties.html See pogo generated info for more details. Channel. Channel number of the power stage (from 0 to 15). SimulationMode. 0 -¿ real mode, 1 -¿ simulation. SocketDevice. Name of the socket tango device running in the same process as the ZMX devices. 6.47.2 States pogo_html_docu/ZMX/States.html See pogo generated info for more details. ALARM. Not used. FAULT. Set when the socket is not responding. ON. 6.47.3 Commands pogo_html_docu/ZMX/Commands.html See pogo generated info for more details. LoadFromOutputFile. Read read write attribute values from the binary file given as input argument und write the read values to hardware. ReadFileContent. Read read write attribute values from the binary file given as input argument und return the read values as command output. It can be used for checking the contents of a file before writing the values to the hardware. ReadFilesInOutputPath. Return all the files in the directory in the PathOuputFiles attribute. Reset. Power stage reset. ResetErrorZMXConnection. Reset to 0 the flag indicating an error in ZMX connection (attribute FlagErrorZMXConnection) and empty the string with the list of errors (attribute ErrorZMXConnection). RevMinus. Motor test: one motor rotation with preset run current (negative direction). Starts a thread if socket is responding with timeout, the thread runs until the socket responds. This command takes more than 3 sec, so it is not possible to avoid the time out (by setting the Timeout of the socket)without having a time out of the Tango command. RevPlus. Motor test: one motor rotation with preset run current (positive direction). Starts a thread if socket is responding with timeout, the thread runs until the socket responds. This command takes more than 3 sec, so it is not possible to avoid the time out (by setting the Timeout of the socket) without having a time out of the Tango command. SaveToOutputFile. Save current read write attribute values to binary file (file name given as input argument). State. Returns the device state. Default Tango Command. Status. It gets the device status. Default Tango Command. WriteEPROM. Write parameters in the EPROM. Starts a thread if socket is responding with timeout, the thread runs until the socket responds. With 300 ms as Timeout for the socket, it will be a time out when trying to perform this command. 600 ms are enough for avoiding the timeout. 6.47.4 Attributes pogo_html_docu/ZMX/Attributes.html See pogo generated info for more details. AxisName. Read/Write user defined name for the axis. Channel rd. Read power stage channel number (as given in the property channel). Deactivation. Read/Write deactivation. 0 = activated, 1 = deactivated. DeactivationStr. Read Deactivation and show the value as a meanfull string. DelayTime. Read/Write delay time. Read value in ms. Valid write values: from 0 to 15. set value=real value(ms) O=1, 1=2, 2=4, 3=6, 4=8, 5=10, 6=12, 7=14, 8=16, 9=20, 10=40, 11=60, 12=100, 13=200, 14=500, 15=1000. DelayTimeInfo. String for writing any info about the delay time. Error. Inquiry error from the power stage and return the corresponding description. ErrorZMXConnection. List of commands send to the ZMX and date when an connection error was produced. It is reset by executing the command ResetErrorZMXConnection or after 5 errors are produced. It uses the Checksum for detecting errors in writing or reading. FlagChangeNotSaved. If 1, some setting of the power stage has been changed (by writting to the corresponding attribute) and not write to EPROM was performed after that. Only read value. FlagErrorZMXConnection. It is 1 if an error was produced by reading/wrinting from/to the ZMS. It is reset to 0 by executing the command ResetErrorZMXConnection. It uses the Checksum for detecting errors in writing or reading. FlagSaveAutomatically. If set to 1 an automatic write to EPROM will be performed after some setting is changed (by writting to the corresponding attribute). FlagThreadRunning. 1 if the thread is running, in that case not read or write operation will be performed. Only read. HwDeactivation. 1 if hardware is not active. Only read. InputLogicLevel. Read/Write logic level of all inputs. 0 = high, 1 = low. InputLogicLevelStr. Read InputLogicLevel and show the value as a meanfull string. IntermediateVoltage. Read intermediate voltage (in V). IntermediateVoltageInfo. String for writing any info about the intermediate voltage. OperationMode. Status Service Bus. 0 = off, 1 = on. The Service Bus status is activated in ZMX+ power stage by the ’SB active’ DIP switch. By software one can only read the status. OperationModeStr. Read OperationMode and show the value as a meanfull string. Overdrive. Read/Write overdrive. 0 = on, 1 = off. OverdriveStr. Read Overdrive and show the value as a meanfull string. PathOutputFiles. Path where the commands SaveToOutputFile, LoadFromOutputFile, ReadFileContent and ReadFilesInOutputPath are performed. PowerStageStatus. Read the current status of the power stage and return the corresponding description. PreferentialDirection. Read/Write preferential direction. 1=preferential direction, 0=contrary to preferential direction. PreferentialDirectionStr. Read PreferentialDirection and show the value as a meanfull string. RunCurrent. Read/Write the run current (in A). StepWidth. Read/Write step width. Valid values: 0 to 13. 0=1/1, 2=1/2, 3=1/4, 4=1/5, 5=1/8, 6=1/10, 7=1/16, 8=1/20, 9=1/32, 10=1/64, 11=1/128, 12=1/256, 13=512. StepWidthStr. Read real value of step width in string format. StopCurrent. Read/Write the stop current (in A). Temperature. Read current temperature from the power stage (in degrees). VersionFPGA. Show version of the FPGA. VersionPS. Show version of the Power Stage. 6.47.5 Client examples """ Library containning function for handling the ZMX """ from PyTango import * import sys import time def nb_devices(nb_zmx): """The nb_devices function is used to printout the number of ZMX devices found for the g print "Number of found ZMX devices: " + str(nb_zmx) def general_info(nb_zmx, zmx_axus, zmx_device_name, zmx_proxy): """The general_info function is used to printout the general info (name/voltage/temperat for j in range(0,int(nb_zmx)): print str(zmx_axis[j]) + " " + zmx_proxy[j].AxisName + " (" + zmx_device_name[j] + " def axis_info(nb_zmx, zmx_proxy, axis_nb): """The axis_info function is used to printout the info of the axis corresponding to the if axis_nb < nb_zmx: print "ZMX axis: " + str(axis_nb) print "Axis name: " + str(zmx_proxy[axis_nb].AxisName) print "Version: " + str(zmx_proxy[axis_nb].VersionPS) print "Activation: " + str(zmx_proxy[axis_nb].DeactivationStr) print "Step resolution: " + str(zmx_proxy[axis_nb].StepWidthStr) print "Run current: " + str(zmx_proxy[axis_nb].RunCurrent) + " A" print "Stop current: " + str(zmx_proxy[axis_nb].StopCurrent) + " A" print "Motor direction: " + str(zmx_proxy[axis_nb].PreferentialDirectionStr) print "Operation mode: " + str(zmx_proxy[axis_nb].OperationModeStr) print "Delay time: " + str(zmx_proxy[axis_nb].DelayTime) + " mS" print "Voltage: " + str(zmx_proxy[axis_nb].IntermediateVoltage) + " V" print "Temperature: " + str(zmx_proxy[axis_nb].Temperature) + " C" print "Power stage status: " + str(zmx_proxy[axis_nb].PowerStageStatus) print "Error: " + str(zmx_proxy[axis_nb].Error) print "Path output files: " + str(zmx_proxy[axis_nb].PathOutputFiles) print "Save automatically to EPROM: " + str(zmx_proxy[axis_nb].FlagSaveAutomatically print "Changes not saved: " + str(zmx_proxy[axis_nb].FlagChangeNotSaved) print "Error in connection: " + str(zmx_proxy[axis_nb].ErrorZMXConnection) else: print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) def set_activation(nb_zmx, zmx_proxy, axis_nb, tmp_value): """The set_activation function is used to set the activation value of the given axis ( 0 if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1 else: if tmp_value != 0 and tmp_value != 1: print "Not allowed to set this value. 0 -> activate, 1 -> deactivate" else: zmx_proxy[axis_nb].write_attribute("Deactivation",tmp_value) def set_stepresolution(nb_zmx, zmx_proxy, axis_nb, tmp_value): """The set_stepresolution function is used to set the step resolution of the given axis. if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) else: if tmp_value < 0 or tmp_value > 13: print "Not allowed to set this value. Allowed values from 0 to 13" else: zmx_proxy[axis_nb].write_attribute("StepWidth",tmp_value) def set_preferentialdirection(nb_zmx, zmx_proxy, axis_nb, tmp_value): """The set_activation function is used to set the preferential direction of the given ax if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) else: if tmp_value != 0 and tmp_value != 1: print "Not allowed to set this value. 0 -> negative, 1 -> positive" else: zmx_proxy[axis_nb].write_attribute("PreferentialDirection",tmp_value) def set_delaytime(nb_zmx, zmx_proxy, axis_nb, tmp_value): """The set_delaytime function is used to set the delay time of the given axis.""" if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) else: if tmp_value < 0 or tmp_value > 15: print "Not allowed to set this value. Allowed values from 0 to 15" else: zmx_proxy[axis_nb].write_attribute("DelayTime",tmp_value) def set_pathoutputfiles(nb_zmx, zmx_proxy, axis_nb, tmp_value): """The set_pathoutputfiles function is used to set the path for the output files of the if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) else: zmx_proxy[axis_nb].write_attribute("PathOutputFiles",tmp_value) def set_autosavetoeprom(nb_zmx, zmx_proxy, axis_nb, tmp_value): """The set_autosavetoeprom function is used to set/unset the automatic write to eprom of if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) else: if tmp_value != 0 and tmp_value != 1: print "Not allowed to set this value. 0 -> not auto save, 1 -> auto save" else: zmx_proxy[axis_nb].write_attribute("FlagSaveAutomatically",tmp_value) def loadfromoutputfile(nb_zmx, zmx_proxy, axis_nb, tmp_value): """The loadfromoutputfile function is used to load parameters from an external file.""" if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) else: zmx_proxy[axis_nb].LoadFromOutputFile(tmp_value) def savetooutputfile(nb_zmx, zmx_proxy, axis_nb, tmp_value): """The savetooutputfile function is used to save parameters to en external file.""" if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) else: zmx_proxy[axis_nb].SaveToOutputFile(tmp_value) def readfilecontent(nb_zmx, zmx_proxy, axis_nb, tmp_value): """The readfilecontent function is used to read the parameters stored in an ouput file." if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) else: contents = zmx_proxy[axis_nb].ReadFileContent(tmp_value) for element in contents: print element def readfilesinoutputpath(nb_zmx, zmx_proxy, axis_nb): """The readfilesinoutputpath function is used to read the files in the ouput path.""" if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) else: files = zmx_proxy[axis_nb].ReadFilesInOutputPath() for element in files: print element def deleteeprom(nb_zmx, zmx_proxy, axis_nb): """The deleteeprom function is used to delete the EPROM contents.""" if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) else: zmx_proxy[axis_nb].DeleteEPROM() def writeeprom(nb_zmx, zmx_proxy, axis_nb): """The writeeprom function is used to write current settings to the EPROM.""" if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) else: zmx_proxy[axis_nb].WriteEPROM() def reset(nb_zmx, zmx_proxy, axis_nb): """The reset function is used to reset the power stage.""" if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) else: zmx_proxy[axis_nb].Reset() def revminus(nb_zmx, zmx_proxy, axis_nb): """The revminus function is used to perform a motor test: one motor rotation with prese if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) else: zmx_proxy[axis_nb].RevMinus() def revplus(nb_zmx, zmx_proxy, axis_nb): """The revplus function is used to perform a motor test: one motor rotation with preset if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) else: zmx_proxy[axis_nb].RevPlus() def reseterrorzmxconnection(nb_zmx, zmx_proxy, axis_nb): """The reseterrorzmxconnection function is used to reset the flag indicating error in ZM if axis_nb > (nb_zmx - 1): print "Not axis existing for that index. Maximum index value: " + str(nb_zmx - 1) else: zmx_proxy[axis_nb].ResetErrorZMXConnection() # # main # try : root_name = "petra3/zmxps/" db = PyTango.Database() name_dev_ask = root_name + "*" devices = db.get_device_exported(name_dev_ask) zmx_proxy = [] zmx_device_name = [] zmx_axis = [] nb_zmx = len(devices) j = 0 for name in devices: zmx_device_name.append(name) zmx_proxy.append(DeviceProxy(name)) zmx_axis.append(j) j = j + 1 if( len( sys.argv) == 1): nb_devices(nb_zmx) general_info(nb_zmx,zmx_axis,zmx_device_name,zmx_proxy) print " " print "Run ’python zmx.py help’ to see program options" print " " else: if(sys.argv[1] == "help"): print "Usage:" print "-> to read axis info" print "python zmx.py axis_info axis_number" print "-> to change activation value" print "python zmx.py set_activation axis_number value_to_set" print "with value_to_set from 0 to 1: 0 = active, 1 = deactive" print "-> to change step resolution" print "python zmx.py set_stepresolution axis_number value_to_set" print "with value_to_set from 0 to 13: 0 = 1/1, 1 = 1/2, 2 = 1/2.5, 3 = 1/4, 4 print "-> to change preferential direction" print "python zmx.py set_preferentialdirection axis_number value_to_set" print "with value_to_set from 0 to 1: 0 = negative, 1 = positive" print "-> to change delay time" print "python zmx.py set_delaytime axis_number value_to_set" print "with value_to_set from 0 to 15: 0=1, 1=2,2=4,3=6,4=8,5=10,6=12,7=14,8=16, print "-> to set path for output files" print "python zmx.py set_pathoutputfiles axis_number new_path" print "-> to change flag for auto save to EPROM" print "python zmx.py set_autosavetoeprom axis_number value_to_set" print "with value_to_set from 0 to 1: 0 -> not auto save, 1 -> auto save" print "-> to load settings from output file" print "python zmx.py loadfromoutputfile axis_number file_to_load" print print print print print print print print print print print print print print print print print print print print print "with file_to_load the name of the file to be load, it has to be in the pa "-> to save settings to output file" "python zmx.py savetooutputfile axis_number file_name" "with file_name the name of the file, it will be in the pathoutputfiles di "-> to read file content" "python zmx.py readfilecontent axis_number file_name" "with file_name the name of the file, that has to be in the pathoutputfile "-> to read file names in pathoutputfiles directory" "python zmx.py readfilesinoutputpath axis_number" "-> to delete EPROM" "python zmx.py deleteeprom axis_number" "-> to write to EPROM" "python zmx.py writeeprom axis_number" "-> to reset power stage" "python zmx.py reset axis_number" "-> to perform motor test (negative direction)" "python zmx.py revminus axis_number" "-> to perform motor test (positive direction)" "python zmx.py revplus axis_number" "-> to reset the error in ZMX connection" "python zmx.py reseterrorzmxconnection axis_number" elif(sys.argv[1] == "axis_info"): axis_info(nb_zmx, zmx_proxy, int(sys.argv[2])) elif(sys.argv[1] == "set_activation"): print "Setting activation value to " + str(sys.argv[3]) set_activation(nb_zmx, zmx_proxy, int(sys.argv[2]),int(sys.argv[3]) ) elif(sys.argv[1] == "set_stepresolution"): print "Setting step resolution to " + str(sys.argv[3]) set_stepresolution(nb_zmx, zmx_proxy, int(sys.argv[2]),int(sys.argv[3])) elif(sys.argv[1] == "set_preferentialdirection"): print "Setting preferential direction to " + str(sys.argv[3]) set_preferentialdirection(nb_zmx, zmx_proxy, int(sys.argv[2]),int(sys.argv[3])) elif(sys.argv[1] == "set_delaytime"): print "Setting delay time to " + str(sys.argv[3]) set_delaytime(nb_zmx, zmx_proxy, int(sys.argv[2]),int(sys.argv[3])) elif(sys.argv[1] == "set_pathoutputfiles"): print "Setting path for output files to " + str(sys.argv[3]) set_pathoutputfiles(nb_zmx, zmx_proxy, int(sys.argv[2]),str(sys.argv[3])) elif(sys.argv[1] == "set_autosavetoeprom"): print "Changing auto save flag to " + str(sys.argv[3]) set_autosavetoeprom(nb_zmx, zmx_proxy, int(sys.argv[2]),int(sys.argv[3])) elif(sys.argv[1] == "loadfromoutputfile"): print "Loading settings from file " + str(sys.argv[3]) loadfromoutputfile(nb_zmx, zmx_proxy, int(sys.argv[2]),str(sys.argv[3])) elif(sys.argv[1] == "savetooutputfile"): print "Save settings to file " + str(sys.argv[3]) savetooutputfile(nb_zmx, zmx_proxy, int(sys.argv[2]),str(sys.argv[3])) elif(sys.argv[1] == "readfilecontent"): print "Reading contents of file " + str(sys.argv[3]) readfilecontent(nb_zmx, zmx_proxy, int(sys.argv[2]),str(sys.argv[3])) elif(sys.argv[1] == "readfilesinoutputpath"): print "Reading files in pathoutputfiles directory" readfilesinoutputpath(nb_zmx, zmx_proxy, int(sys.argv[2])) elif(sys.argv[1] == "deleteeprom"): print "Deleting EPROM" deleteeprom(nb_zmx, zmx_proxy, int(sys.argv[2])) elif(sys.argv[1] == "writeeprom"): print "Writting EPROM" writeeprom(nb_zmx, zmx_proxy, int(sys.argv[2])) elif(sys.argv[1] == "reset"): print "Reset power stage" reset(nb_zmx, zmx_proxy, int(sys.argv[2])) elif(sys.argv[1] == "revminus"): print "Perform motor test (negative direction)" revminus(nb_zmx, zmx_proxy, int(sys.argv[2])) elif(sys.argv[1] == "revplus"): print "Perform motor test (positive direction)" revplus(nb_zmx, zmx_proxy, int(sys.argv[2])) elif(sys.argv[1] == "reseterrorzmxconnection"): print "Setting error ZMX connection to false" reseterrorzmxconnection(nb_zmx, zmx_proxy, int(sys.argv[2])) else: print "Run ’python zmx.py help’ to see program options" except Exception, inst : print "Failed with exception !" print sys.exc_info()[0] print type(inst) # the exception instance print inst.args # arguments stored in .args Chapter 7 Counter Servers 7.1 Introduction A counter server implements one channel of a counter system. 7.2 Abstract Counter Class It contains the minimum features that are needed for every counter. pogo_html_docu/counter_abstract_class/Descriptio See pogo generated info for details. 7.2.1 States pogo_html_docu/counter_abstract_class/TangoDevStates.html See pogo generated info for more details. • ON. 7.2.2 Commands pogo_html_docu/counter_abstract_class/DevCommands.html See pogo generated info for more details. • Init. Initialization. Default Tango Command. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. • Reset. It clears counter contents. 7.2.3 Attributes pogo_html_docu/counter_abstract_class/Attributes.html See pogo generated info for more details. • Counts. Contents of the counter. Set it to 0 for reseting the counter. • Offset. Offset to be used for the counter. 7.3 SIS3820 Class This class implements a counter reading a channel of a SIS3820 Multi Channel Scaler. pogo_html_docu/SIS3820/index.html See pogo generated info for details. 127 7.3.1 Properties pogo_html_docu/SIS3820/Properties.html See pogo generated info for more details. • Base. VME base address. Default vme base address for this board: 0x38000000 which translate to 939524096 for the Base value to set (it has to be done in decimal). • Channel. Channel number. Default value 0 (there are 4 channels per board). • SimulationMode. 0 real mode, 1 simulation mode. 7.3.2 States pogo_html_docu/SIS3820/States.html See pogo generated info for more details. • ON 7.3.3 Commands pogo_html_docu/SIS3820/Commands.html See pogo generated info for more details. • Init. Initialization. Default Tango Command. Needs to be invoked after powering the VME crate. • Read Returns the contents of the counter. • Reset It clears counter contents. • State It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. 7.3.4 Attributes pogo_html_docu/SIS3820/Attributes.html See pogo generated info for more details. • Counts Contents of the counter. Set it to 0 for reseting the counter. • Offset Offset to be used for the counter. It is not used in the Tango server. 7.3.5 Example Clients Python Client The following script shows how a counter and a timer are operated from Python. Note: after a power-up the counter server has to restarted or the Init command has to be invoked. #!/usr/bin/python # # A test program for the SIS3820 and the DGG2. # If you connect the CLK OUT of the DGG2 to # c1, you’ll find some counts # from PyTango import * import sys import time try : c1 = DeviceProxy( "hires/exp/c1") t1 = DeviceProxy( "hires/exp/t1") # # reset the counter # c1.command_inout( "Reset") # # start the timer # attr=t1.read_attribute( "sampleTime") attr.value = 1.0 t1.write_attribute( attr) t1.command_inout( "Start") while( t1.command_inout( "Check")): print " Timer: ", t1.command_inout( "Read") time.sleep(0.5) print " C1: reading Counts ", c1.read_attribute( "Counts").value print " C1: calling ’Read’ ", c1.command_inout( "Read") except : print "Failed with exception !" print sys.exc_info()[0] Cpp Client, with Makefile The following Cpp examples shows how a timer and a counter are opeated. Below you find the corresponding Makefile. #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { long temp; DeviceData devdata; DeviceProxy *timer = new DeviceProxy( "hires/exp/t1"); DeviceProxy *counter = new DeviceProxy( "hires/exp/c1"); DeviceAttribute *da = new DeviceAttribute( "SampleTime", (double) 3.5); timer->write_attribute( *da); cout << " starting timer with 3.5s " << endl; timer->command_inout( "Start"); devdata = counter->command_inout( "Reset"); devdata = timer->command_inout( "Check"); devdata >> temp; while( temp) { *da = counter->read_attribute( "Counts"); *da >> temp; cout << " read-counter returns " << temp << endl; devdata = timer->command_inout( "Check"); devdata >> temp; sleep(1); } } Here is the Makefile: CC = g++ TANGO_HOME = /usr/local INCLUDE_DIRS = -I $(TANGO_HOME)/include -I . LIB_DIRS = -L $(TANGO_HOME)/lib CXXFLAGS = -D_REENTRANT $(INCLUDE_DIRS) LFLAGS = $(LIB_DIRS) -ltango \ -llog4tango \ -lomniORB4 \ -lomniDynamic4 \ -lCOS4 \ -lomnithread \ -lpthread .SUFFIXES: .o .cpp .cpp.o: $(CC) $(CXXFLAGS) -c $< SIS3820Test: SIS3820Test.o $(CC) SIS3820Test.o -o SIS3820Test $(LFLAGS) clean: rm -f *.o core 7.4 V260 Class This class implements a counter reading a channel of a V260 CAEN Scaler. pogo_html_docu/V260/index.html See pogo generated info for details. 7.4.1 Properties pogo_html_docu/V260/Properties.html See pogo generated info for more details. • Base. VME base address. Default vme base address for this board: 0x100 which translate to 256 for the Base value to set (it has to be done in decimal). • Channel. Channel number. Default value 0 (there are 16 channels per board). • FlagSpecialChannel. Set to 1 if the channel contains carry. 0 by default. • SimulationMode. 0 real mode, 1 simulation mode. 7.4.2 States pogo_html_docu/V260/States.html See pogo generated info for more details. • ON 7.4.3 Commands pogo_html_docu/V260/Commands.html See pogo generated info for more details. • Init. Initialization. Default Tango Command. Needs to be invoked after powering the VME crate. • Read Returns the contents of the counter. • Reset It clears counter contents. • State It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. 7.4.4 Attributes pogo_html_docu/V260/Attributes.html See pogo generated info for more details. • Counts Contents of the counter. Set it to 0 for reseting the counter. • Offset Offset to be used for the counter. It is not used in the Tango server. 7.4.5 Example Clients Python Client The following script shows how a counter and a timer are operated from Python. Note: after a power-up the counter server has to restarted or the Init command has to be invoked. #!/usr/bin/python # # A test program for the V260 and the DGG2. # If you connect the CLK OUT of the DGG2 to # c1, you’ll find some counts # from PyTango import * import sys import time try : c1 = DeviceProxy( "hires/exp/c1") t1 = DeviceProxy( "hires/exp/t1") # # reset the counter # c1.command_inout( "Reset") # # start the timer # attr=t1.read_attribute( "sampleTime") attr.value = 1.0 t1.write_attribute( attr) t1.command_inout( "Start") while( t1.command_inout( "Check")): print " Timer: ", t1.command_inout( "Read") time.sleep(0.5) print " C1: reading Counts ", c1.read_attribute( "Counts").value print " C1: calling ’Read’ ", c1.command_inout( "Read") except : print "Failed with exception !" print sys.exc_info()[0] Cpp Client, with Makefile The following Cpp examples shows how a timer and a counter are opeated. Below you find the corresponding Makefile. #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { long temp; DeviceData devdata; DeviceProxy *timer = new DeviceProxy( "hires/exp/t1"); DeviceProxy *counter = new DeviceProxy( "hires/exp/c1"); DeviceAttribute *da = new DeviceAttribute( "SampleTime", (double) 3.5); timer->write_attribute( *da); cout << " starting timer with 3.5s " << endl; timer->command_inout( "Start"); devdata = counter->command_inout( "Reset"); devdata = timer->command_inout( "Check"); devdata >> temp; while( temp) { *da = counter->read_attribute( "Counts"); *da >> temp; cout << " read-counter returns " << temp << endl; devdata = timer->command_inout( "Check"); devdata >> temp; sleep(1); } } Here is the Makefile: CC = g++ TANGO_HOME = /usr/local INCLUDE_DIRS = -I $(TANGO_HOME)/include -I . LIB_DIRS = -L $(TANGO_HOME)/lib CXXFLAGS = -D_REENTRANT $(INCLUDE_DIRS) LFLAGS = $(LIB_DIRS) -ltango \ -llog4tango \ -lomniORB4 \ -lomniDynamic4 \ -lCOS4 \ -lomnithread \ -lpthread .SUFFIXES: .o .cpp .cpp.o: $(CC) $(CXXFLAGS) -c $< V260Test: V260Test.o $(CC) V260Test.o -o V260Test $(LFLAGS) clean: rm -f *.o core 7.5 VcExecutor This is an implementation of the virtual counter concept. The VcExecutor class executes code that is provided by the user. The user code defines the class VC which consists fo certain function members that need to be supplied. See the examples below. Note: VcExector have to return an integer value. The example 7.5.7 shows how to deal with floating point numbers. 7.5.1 Entry in online.xml Motors of this kind are introduced to Online by such an entry in /online dir/online.xml: <device> <name>exp_doris</name> <tags>expert,user</tags> <type>counter</type> <module>counter_tango</module> <device>p09/vcexecutor/doris.01</device> <control>tango</control> <hostname>haso107klx:10000</hostname> </device> <device> <name>exp_petra</name> <tags>expert,user</tags> <type>counter</type> <module>counter_tango</module> <device>p09/vcexecutor/petra.01</device> <control>tango</control> <hostname>haso107klx:10000</hostname> </device> 7.5.2 Properties pogo_html_docu/VcExecutor/Properties.html See pogo generated info for more details. VcCode The path to the file that contains the virtual counter code. Examples can be found below. 7.5.3 States pogo_html_docu/VcExecutor/States.html See pogo generated info for more details. ON always 7.5.4 Commands pogo_html_docu/VcExecutor/Commands.html See pogo generated info for more details. Reset Calls the reset Method. 7.5.5 Attributes pogo_html_docu/VcExecutor/Attributes.html See pogo generated info for more details. Counts The counter reading, RW. 7.5.6 A trivial example In the following example, the virtual counter is directly coupled to another counter. #!/bin/env python import PyTango class VC: def __init__(self): print " VC.init" self.proxies = [] self.proxies.append( PyTango.DeviceProxy( "p09/counter/exp.01")) # # dev_state # def dev_state( self): argout = self.proxies[0].State() return argout # # Counts # def read_Counts( self): print "vc1:: read-counts " return self.proxies[0].Counts def write_Counts( self, argin): print "vc1:: write-counts " self.proxies[0].Counts = argin return 1 # # reset # def Reset(self): print "vc1:: resetting ", self.proxies[0].name() # dev.proxies[0].inout( "Reset") self.proxies[0].Reset() print "vc1:: reset DONE" return True 7.5.7 The Petra Current In the following example, the virtual counter returns the Petra current. Since the return value of a counter has to be an integer value, the current reading is multiplied by 1000 and casted to long. #!/bin/env python import PyTango import HasyUtils class VC: def __init__(self): pass # # dev_state # def dev_state( self): argout = PyTango.DevState.ON return argout # # Counts # def read_Counts( self): return long(HasyUtils.petra()*1000.) def write_Counts( self, argin): pass # # reset # def Reset(self): pass 7.5.8 The VFCADC Attribute Counts The following Vc module returns the Counts attribute of a VFCADC. #!/bin/env python import PyTango class VC: def __init__(self): print " VC.init" self.proxies = [] self.proxies.append( PyTango.DeviceProxy( "p09/vfc/exp.01")) # # dev_state # def dev_state( self): argout = self.proxies[0].State() return argout # # Counts # def read_Counts( self): print "vc_attribute:: read-counts " return self.proxies[0].Counts def write_Counts( self, argin): return 1 # # reset # def Reset(self): return True If we wanted to use this device in Sardana, the file /online dir/onlineSardana.xml had to be edited to include the lines which are listed below. We assume that the VcExecutor device name is p09/vcexecutor/vfc_counts.01. After a Sardana shutdown and Sardana startup the device exp vfc01 is avalable in Spock. <device> <name>exp_vfc01</name> <tags>expert,user</tags> <type>counter</type> <module>counter_tango</module> <device>p09/vcexecutor/vfc_counts.01</device> <control>tango</control> <hostname>haso107klx:10000</hostname> <pool>pool_haso107klx</pool> <controller>vc_exp_vfc</controller> <channel>1</channel> <rootdevicename>p09/vcexecutor/vfc_counts.01</rootdevicename> </device> Chapter 8 Timer Servers 8.1 Introduction A timer server implements one channel of a timer system. 8.2 Abstract Timer Class It contains the minimum features that are needed for every timer. pogo_html_docu/timer_abstract_class/Description.ht See pogo generated info for details. 8.2.1 States pogo_html_docu/timer_abstract_class/TangoDevStates.html See pogo generated info for more details. • ON. Timer is idle. • RUNNING. Timer is busy. 8.2.2 Commands pogo_html_docu/timer_abstract_class/DevCommands.html See pogo generated info for more details. • Init. Initialization. Default Tango Command. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. • Start. It starts the timer. Set the status to RUNNING. • Stop. It stops the timer. Set the status to ON. • Check. It checks if the timer is busy. Returns 1 if busy and 0 if free. Set the status to ON if not busy. • StartAndWaitForTimer. It starts the timer and waits until it is again free. • WaitForTimer. It waits until the timer is free. 8.2.3 Attributes pogo_html_docu/timer_abstract_class/Attributes.html See pogo generated info for more details. • SampleTime. Time in seconds for running the timer. 136 8.3 DGG2 Class This class implements a counter using a channel of a dual gate generator DGG2 (VME board). pogo_html_docu/DGG2/index.html See pogo generated info for details. 8.3.1 Properties pogo_html_docu/OmsVme58/Properties.html See pogo generated info for more details. • Base. VME base address. Default vme base address for this board: 0x1000 which translate to 4096 for the Base value to set (it has to be done in decimal). • Channel. Channel number. Default value 0 (there are 2 channels per board). • SimulationMode. 0 real mode, 1 simulation mode. 8.3.2 States pogo_html_docu/DGG2/States.html See pogo generated info for more details. • ON. Timer is idle. • MOVING. Timer is busy. • RUNNING. It was used instead of MOVING, but it is not used any more. 8.3.3 Commands pogo_html_docu/DGG2/Commands.html See pogo generated info for more details. • Init Initialization. Default Tango Command. • State It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. • Start It starts the timer. Set the status to RUNNING. • StartPreset It starts the timer in preset mode. Set the status to RUNNING. • Stop It stops the timer. Set the status to ON. • Check. It checks if the timer is busy. Returns 1 if busy and 0 if free. Set the status to ON if not busy. • StartAndWaitForTimer It starts the timer and waits until it is again free. • WaitForTimer It waits until the timer is free. • Read It returns the remaining time in musec before the timer returns to idle state. 8.3.4 Attributes pogo_html_docu/DGG2/Attributes.html See pogo generated info for more details. • SampleTime Time in seconds for running the timer. • RemainingTime Time in seconds before the timer returns to idle state. 8.3.5 Example Client, Python The following example demonstrates how a DGG2 timer is operated. #!/usr/bin/python from PyTango import * import sys import time try : t1 = DeviceProxy( "hires/exp/t1") scalar=t1.read_attribute( "sampleTime") scalar.value = 3; t1.write_attribute( scalar) t1.command_inout( "Start") while( t1.command_inout( "Check")): print t1.command_inout( "Read") time.sleep(0.5) except : print "Failed with exception !" print sys.exc_info()[0] Chapter 9 IO Register Servers 9.1 Introduction A io register server implements one channel of a io register system. For each device a device property selects if it is an input or an output channel. 9.2 Abstract IO Register Class It contains the minimum features that are needed for every IO register. pogo_html_docu/ioregister_abstract_class/Descr See pogo generated info for details. 9.2.1 Properties pogo_html_docu/ioregister_abstract_class/TangoDevProperties.html See pogo generated info for more details. • FlagInputOutput. If 0 input channel, if 1 output channel. 9.2.2 States pogo_html_docu/ioregister_abstract_class/TangoDevStates.html See pogo generated info for more details. • ON. IO Register is ready. • FAULT. IO Register has problems. 9.2.3 Commands pogo_html_docu/ioregister_abstract_class/DevCommands.html See pogo generated info for more details. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. 9.2.4 Attributes pogo_html_docu/ioregister_abstract_class/Attributes.html See pogo generated info for more details. • Value. If input channel, it returns the channel content. If output channel, it is used to write 0 or 1 to the channel. 9.3 SIS3610 Class This class implements a channel of a SIS3610 io register. pogo_html_docu/SIS3610/index.html See pogo generated info for details. 139 9.3.1 Properties pogo_html_docu/SIS3610/Properties.html See pogo generated info for more details. • Base. VME base address. Default vme base address for this board: 0x10000 which translate to 65536 for the Base value to set (it has to be done in decimal). • Channel. Channel number. Default value 0 (there are 32 channels per board, normally configured 16 for inputs and 16 for outputs). • FlagInputOutput. If 0 input channel, if 1 output channel. • SimulationMode. 0 real mode, 1 simulation mode. 9.3.2 States pogo_html_docu/SIS3610/States.html See pogo generated info for more details. • ON. IO Register is ready. • FAULT. IO Register has problems. 9.3.3 Commands pogo_html_docu/SIS3610/Commands.html See pogo generated info for more details. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. 9.3.4 Attributes pogo_html_docu/SIS3610/Attributes.html See pogo generated info for more details. • Value. If input channel, it returns the channel content. If output channel, it is used to write 0 or 1 to the channel. 9.3.5 Example Clients Python Client The following script shows how an input register senses the state of an output register. #!/usr/bin/python from PyTango import * import sys import time try : ireg1 = DeviceProxy( "hires/exp/ireg1") oreg1 = DeviceProxy( "hires/exp/oreg1") attr=ireg1.read_attribute( "Value") print "ireg1, value ", attr.value attr.value = 1 oreg1.write_attribute( attr) attr=ireg1.read_attribute( "Value") print "ireg1, value ", attr.value attr.value = 0 oreg1.write_attribute( attr) except : print "Failed with exception !" print sys.exc_info()[0] Cpp Client Cpp example for setting the properties of new SIS3610 Device to default values. /* * File for setting the properties of a new SIS3610 device to * default values. * */ #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { // // create a connection to the new SIS3610 IO Register TANGO device // DeviceProxy *device = new DeviceProxy( "tango://has107k:10000/exp/line1/ireg1"); // Write default values to properties unsigned long base = 65536; unsigned long channel = 0; unsigned short flagInputOutput = 0; // 0 for input, 1 for output channel DbDatum base_toput("Base"), channel_toput("Channel"); DbDatum flagInputOutput_toput("FlagInputOutput"); DbData db_data; base_toput << base; channel_toput << channel; type_toput << flagInputOutput; db_data.push_back(base_toput); db_data.push_back(channel_toput); db_data.push_back(flagInputOutput_toput); device->put_property(db_data); } 9.4 VDOT32 Class This class implements a channel of a VDOT32 IO register. Channel 0 is output, channels 1, 2 and 3 are inputs. pogo_html_docu/VDOT32/index.html See pogo generated info for details. 9.4.1 Properties pogo_html_docu/VDOT32/Properties.html See pogo generated info for more details. 9.4.2 States pogo_html_docu/VDOT32/States.html See pogo generated info for more details. 9.4.3 Commands pogo_html_docu/VDOT32/Commands.html See pogo generated info for more details. 9.4.4 Attributes pogo_html_docu/VDOT32/Attributes.html See pogo generated info for more details. Chapter 10 ADC Servers 10.1 Introduction An ADC Server implements one channel of an ADC. 10.2 Abstract ADC Class It contains the minimum features that are needed for every adc. pogo_html_docu/adc_abstract_class/Description.html See pogo generated info for details. 10.2.1 States pogo_html_docu/adc_abstract_class/TangoDevStates.html See pogo generated info for more details. • ON. ADC is ready. • FAULT. ADC has problems. 10.2.2 Commands pogo_html_docu/adc_abstract_class/DevCommands.html See pogo generated info for more details. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. 10.2.3 Attributes pogo_html_docu/adc_abstract_class/Attributes.html See pogo generated info for more details. • Value. ADC readout. 10.3 TIP830u20 Class This class implements a channel of a TIP830u20 ADC. pogo_html_docu/TIP830u20/index.html See pogo generated info for details. 10.3.1 Properties pogo_html_docu/TIP830u20/Properties.html See pogo generated info for more details. • Base. VME base address. Default vme base address for this board: 0x800 which translate to 2048 for the Base value to set (it has to be done in decimal). • Channel. Channel number. Default value 0 (there are 8 channels per board). • SimulationMode. 0 real mode, 1 simulation mode. 143 10.3.2 States pogo_html_docu/TIP830u20/States.html See pogo generated info for more details. • ON. ADC is ready. • FAULT. ADC has problems. 10.3.3 Commands pogo_html_docu/TIP830u20/Commands.html See pogo generated info for more details. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. 10.3.4 Attributes pogo_html_docu/TIP830u20/Attributes.html See pogo generated info for more details. • Value. ADC readout. If ADC is busy the status is changed to FAULT. 10.3.5 Example Clients Python Client Section 11.4.5 demonstrates how to use an ADC and DAC. Cpp Client Cpp example for setting the properties of new TIP830u20 Device to default values. /* * File for setting the properties of a new TIP830u20 device to * default values. * */ #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { // // create a connection to the new TIP830u20 ADC TANGO device // DeviceProxy *device = new DeviceProxy( "tango://has107k:10000/exp/line1/adc1"); // Write default values to properties unsigned long base = 2048; // 0x800 unsigned long channel = 0; DbDatum base_toput("Base"), channel_toput("Channel"); DbData db_data; base_toput << base; channel_toput << channel; db_data.push_back(base_toput); db_data.push_back(channel_toput); device->put_property(db_data); } 10.4 TIP850ADC Class This class implements a channel of a TIP850-10 ADC. This class is used for building a library that will be used by the TIP850u10 class. pogo_html_docu/TIP850ADC/index.html See pogo generated info for details. 10.4.1 Properties pogo_html_docu/TIP850ADC/Properties.html See pogo generated info for more details. • Base. VME base address. Default vme base address for this board: 0x800 which translate to 2048 for the Base value to set (it has to be done in decimal). • Channel. Channel number. Default value 0 (there are 8 or 16 channels per board). • SimulationMode. 0 real mode, 1 simulation mode. • SpecialChannel. Set to 1 if: 16 single-ended inputs, and to 0 if: 8 differential inputs (16). Default value is 0. 10.4.2 States pogo_html_docu/TIP850ADC/States.html See pogo generated info for more details. • ON. ADC is ready. • FAULT. ADC has problems. 10.4.3 Commands pogo_html_docu/TIP850ADC/Commands.html See pogo generated info for more details. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. 10.4.4 Attributes pogo_html_docu/TIP850ADC/Attributes.html See pogo generated info for more details. • Value. ADC readout. If ADC is busy the status is changed to FAULT. 10.4.5 Example Clients Python Client Section 11.4.5 demonstrates how to use an ADC and DAC. Cpp Client Cpp example for setting the properties of new TIP850ADC Device to default values. /* * File for setting the properties of a new TIP850ADC device to * default values. * */ #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { // // create a connection to the new TIP850ADC ADC TANGO device // DeviceProxy *device = new DeviceProxy( "tango://has107k:10000/exp/line1/adc1"); // Write default values to properties unsigned long base = 2048; // 0x800 unsigned long channel = 0; DbDatum base_toput("Base"), channel_toput("Channel"); DbData db_data; base_toput << base; channel_toput << channel; db_data.push_back(base_toput); db_data.push_back(channel_toput); device->put_property(db_data); } 10.5 VFCADC Class This class implements a channel of a VFC ADC. It can be used as an ADC or as a counter. pogo_html_docu/VFCADC/index.html See pogo generated info for details. 10.5.1 Properties pogo_html_docu/VFCADC/Properties.html See pogo generated info for more details. • Base. VME base address. Default vme base address for this board: 0x011000 which translate to 69632 for the Base value to set (it has to be done in decimal). • Channel. Channel number. Default value 0 (there are 8 channels per board). • SimulationMode. 0 real mode, 1 simulation mode. 10.5.2 States pogo_html_docu/VFCADC/States.html See pogo generated info for more details. • ON. ADC is ready. • FAULT. ADC has problems. 10.5.3 Commands pogo_html_docu/VFCADC/Commands.html See pogo generated info for more details. • InitVFCADC. It stores the gain and offset values (use values in Gain and Offset attributes), selects external timer mode (use polarity from Polarity attribute). Set FlagVFCADCInit to true. All commands and setting functions check if this flag is set or not, case not they call this function before they are performed. • SetOffset. It writes offset value in the Offset attribute to hardware. • SetGain. It writes gain value in Gain attribute to hardware. It returns exception if value smaller than 1. • SetPolarity. It writes polarity value in Polarity attribute to hardware • Reset. It resets the ADC. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. 10.5.4 Attributes pogo_html_docu/VFCADC/Attributes.html See pogo generated info for more details. • Value. ADC readout. • Counts. Returns the result of using the adc as a counter. If a null value is written, reset is performed. • Offset. Offset value to be written to hardware by InitVFCADC or SetOffset. • Gain. Gain value to be written to hardware by InitVFCADC or SetGain. • Polarity. Polarity value to be written to hardware by InitVFCADC or SetPolarity • FlagVFCADCInit. If true InitVFCADC has been perfomed. 10.5.5 Example Clients Python Client The following example shows how a VFCADC, a DAC and timer work together. #!/usr/bin/python from PyTango import * import sys import time try : dac1 = DeviceProxy( "hires/exp/dac1") vfc1 = DeviceProxy( "hires/exp/vfc1") t1 = DeviceProxy( "hires/exp/t1") # # set the DAC output # attr=dac1.read_attribute( "voltage") attr.value = 3.5 dac1.write_attribute( attr) # # Prepare the VFC. Gain, offset and polarity are memorized attributes. # After they have been set once the are automatically written to the # device when the server is initialized. # attr.name = "Gain" attr.value = 1.0 vfc1.write_attribute( attr) vfc1.command_inout( "SetGain") attr.name = "Offset" attr.value = 0.0 vfc1.write_attribute( attr) vfc1.command_inout( "SetOffset") attr.name = "Polarity" attr.value = 1 vfc1.write_attribute( attr) vfc1.command_inout( "SetPolarity") # # reset the VFC # vfc1.command_inout( "Reset") # # start the timer # attr.name = "sampleTime" attr.value = 0.5 t1.write_attribute( attr) t1.command_inout( "Start") while( t1.command_inout( "Check")): print " Timer: ", t1.command_inout( "Read") time.sleep(0.1) # # read the VFC, notice that ’Value’ is normalized # to the sample time whereas ’Counts’ not. # print " VFC, value ", vfc1.read_attribute( "Value").value print " VFC, counts ", vfc1.read_attribute( "Counts").value except : print "Failed with exception !" print sys.exc_info()[0] Cpp Client Cpp example for setting the properties of new VFCADC Device to default values. /* * File for setting the properties of a new VFCADC device to * default values. * */ #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { // // create a connection to the new VFCADC ADC TANGO device // DeviceProxy *device = new DeviceProxy( "tango://has107k:10000/exp/line1/vfcadc1"); // Write default values to properties unsigned long base = 69632; // 0x011000 unsigned long channel = 0; DbDatum base_toput("Base"), channel_toput("Channel"); DbData db_data; base_toput << base; channel_toput << channel; db_data.push_back(base_toput); db_data.push_back(channel_toput); device->put_property(db_data); } Chapter 11 DAC Servers 11.1 Introduction A DAC Server implements one channel of a DAC. 11.2 Abstract DAC Class It contains the minimum features that are needed for every dac. pogo_html_docu/dac_abstract_class/Description.html See pogo generated info for details. 11.2.1 States pogo_html_docu/dac_abstract_class/TangoDevStates.html See pogo generated info for more details. • ON. DAC is ready. • FAULT. DAC has problems. 11.2.2 Commands pogo_html_docu/dac_abstract_class/DevCommands.html See pogo generated info for more details. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. 11.2.3 Attributes pogo_html_docu/dac_abstract_class/Attributes.html See pogo generated info for more details. • Voltage. Voltage value to be written to the hardware. Send by setting the value. • VoltageMin. Software limit. Minimum. • VoltageMax. Software limit. Maximum. 11.3 TIP551 Class This class implements a channel of a TIP551 DAC. pogo_html_docu/TIP551/index.html See pogo generated info for details. 150 11.3.1 Properties pogo_html_docu/TIP551/Properties.html See pogo generated info for more details. • Base. VME base address. Default vme base address for this board: 0xa00 which translate to 2560 for the Base value to set (it has to be done in decimal). • Channel. Channel number. Default value 0 (there are 4 channels per board). • RangeMin. 0, reflects the status of jumper J1, can be -10 or 0. • RangeMax. 10 • SimulationMode. 0 real mode, 1 simulation mode. 11.3.2 States pogo_html_docu/TIP551/States.html See pogo generated info for more details. • ON. DAC is ready. • FAULT. DAC has problems. Set to FAULT if the voltage value to be written is not allowed. 11.3.3 Commands pogo_html_docu/TIP551/Commands.html See pogo generated info for more details. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. • GetDACVoltage. It returns the last valid value written to the hardware. 11.3.4 Attributes pogo_html_docu/TIP551/Attributes.html See pogo generated info for more details. • Voltage. The value set to this attribute is sent to the hardware. If the value is not allowed (outside of limits) the status is changed to FAULT. • VoltageMin. Software limit. Minimum. • VoltageMax. Software limit. Maximum. 11.3.5 Example Clients Python Client The following script reads/writes the attributes of an ADC and a DAC. We assume that both devices are connected by a cable. Note that we set the DAC voltage limits before we change the output voltage. #!/usr/bin/python # # this script uses hires/exp/dac1 and hires/exp/adc1 # from PyTango import * import sys import time try : dac1 = DeviceProxy( "hires/exp/dac1") adc1 = DeviceProxy( "hires/exp/adc1") attr=dac1.read_attribute( "voltage") attr.name = "VoltageMax" attr.value = 10 dac1.write_attribute( attr) attr.name = "VoltageMin" attr.value = 0 dac1.write_attribute( attr) attr.name = "Voltage" attr.value = 3.5 dac1.write_attribute( attr) attr=adc1.read_attribute( "value") print adc1.name(), ", attr:", attr.name, "=", attr.value except : print "Failed with exception !" print sys.exc_info()[0] Cpp Client Cpp example for setting the properties of new TIP551 Device to default values. /* * File for setting the properties of a new TIP551 device to * default values. * */ #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { // // create a connection to the new TIP551 DAC TANGO device // DeviceProxy *device = new DeviceProxy( "tango://has107k:10000/exp/line1/dac1"); // Write value to attributes DeviceAttribute *da_write1 = new DeviceAttribute( "VoltageMin", (float)-10.); device->write_attribute(*da_write1); DeviceAttribute *da_write2 = new DeviceAttribute( "VoltageMax", (float) 10.); device->write_attribute(*da_write2); // Write default values to properties unsigned long base = 2560; // 0xa00 unsigned long channel = 0; DbDatum base_toput("Base"), channel_toput("Channel"); DbData db_data; base_toput << base; channel_toput << channel; db_data.push_back(base_toput); db_data.push_back(channel_toput); device->put_property(db_data); } 11.4 TIP850DAC Class This class implements a channel of a TIP850u10 DAC. This class is used for building a library that will be used by the TIP850u10 class. pogo_html_docu/TIP850DAC/index.html See pogo generated info for details. 11.4.1 Properties pogo_html_docu/TIP850DAC/Properties.html See pogo generated info for more details. • Base. VME base address. Default vme base address for this board: 0x800 which translate to 2048 for the Base value to set (it has to be done in decimal). • Channel. Channel number. Default value 0 (there are 4 channels per board). • SimulationMode. 0 real mode, 1 simulation mode. 11.4.2 States pogo_html_docu/TIP850DAC/States.html See pogo generated info for more details. • ON. DAC is ready. • FAULT. DAC has problems. Set to FAULT if the voltage value to be written is not allowed. 11.4.3 Commands pogo_html_docu/TIP850DAC/Commands.html See pogo generated info for more details. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. • GetDACVoltage. It returns the last valid value written to the hardware. 11.4.4 Attributes pogo_html_docu/TIP850DAC/Attributes.html See pogo generated info for more details. • Voltage. The value set to this attribute is sent to the hardware. If the value is not allowed (outside of limits) the status is changed to FAULT. • VoltageMin. Software limit. Minimum. • VoltageMax. Software limit. Maximum. 11.4.5 Example Clients Python Client The following script reads/writes the attributes of an ADC and a DAC. We assume that both devices are connected by a cable. Note that we set the DAC voltage limits before we change the output voltage. #!/usr/bin/python # # this script uses hires/exp/dac1 and hires/exp/adc1 # from PyTango import * import sys import time try : dac1 = DeviceProxy( "hires/exp/dac1") adc1 = DeviceProxy( "hires/exp/adc1") attr=dac1.read_attribute( "voltage") attr.name = "VoltageMax" attr.value = 10 dac1.write_attribute( attr) attr.name = "VoltageMin" attr.value = 0 dac1.write_attribute( attr) attr.name = "Voltage" attr.value = 3.5 dac1.write_attribute( attr) attr=adc1.read_attribute( "value") print adc1.name(), ", attr:", attr.name, "=", attr.value except : print "Failed with exception !" print sys.exc_info()[0] Cpp Client Cpp example for setting the properties of new TIP850DAC Device to default values. /* * File for setting the properties of a new TIP850DAC device to * default values. * */ #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { // // create a connection to the new TIP850DAC DAC TANGO device // DeviceProxy *device = new DeviceProxy( "tango://has107k:10000/exp/line1/dac1"); // Write value to attributes DeviceAttribute *da_write1 = new DeviceAttribute( "VoltageMin", (float)-10.); device->write_attribute(*da_write1); DeviceAttribute *da_write2 = new DeviceAttribute( "VoltageMax", (float) 10.); device->write_attribute(*da_write2); // Write default values to properties unsigned long base = 2048; // 0x800 unsigned long channel = 0; DbDatum base_toput("Base"), channel_toput("Channel"); DbData db_data; base_toput << base; channel_toput << channel; db_data.push_back(base_toput); db_data.push_back(channel_toput); device->put_property(db_data); } Chapter 12 Electrometer Servers 12.1 I404, BPM This Tango server accesses the four channel electrometer used for BPMs. pogo_html_docu/I404/index.html See pogo generated info for more details. 12.1.1 Properties pogo_html_docu/I404/Properties.html See pogo generated info for more details. 12.1.2 States pogo_html_docu/I404/States.html See pogo generated info for more details. FAULT Communication trouble. The server tries to recover from a lost connection every time I/O is requested. ON Ready 12.1.3 Commands pogo_html_docu/I404/Commands.html See pogo generated info for more details. Calib gain Reset stored gains to nominal. Calib rcl Recalls the stored calibration. Calib save Saves the active calibration to EEPROM. Init Initializes the device, opens the communication channel. Reset Send the *RST string, return the device to default conditions. 12.1.4 Attributes pogo_html_docu/I404/Attributes.html See pogo generated info for more details. Position x The position in the PETRA III coordinate system. Position y The position in the PETRA III coordinate system. Factor x position x = read position x ∗ factor x Factor y position y = read position y ∗ factor y Calib source Set/query internal calibration source state, 0 - off, 1 - to channel 1, ..., 4 - to channel 4. Conf capacitor Selects the capacitor: 0 - 100 pF, 1 - 3300 pF. Automatically changed when a new range is set. Conf hv max Set/query maximum allowable hv setting in volts. Conf hv set Set/query the external hv in volts. 155 Conf intavg Sets the no. of integrations per reading, 1 .. 15. Conf monitor Set/query the position calculation function. 1 no position calculation, 2 - quadrant mode calculations, 3 - split mode calculations Conf period Set/query the integration period in seconds. Automatically changed when a new range is set. Conf pos polarity Set/query the polarity of the current readings used for the calculations 0 - +ve, 1 - -ve Conf pos threshold Set/query (in per cent of full current scale in use) for data to be included in position calculations. Conf range Set/query the full scale current range in amps, integration period and capacitor selection are calculated by the I404. Conf readavg Set/query the number of adc readings to be taken in each integration period. Conf resolution Set/query the number of bits of effective resolution, 16 - 20, the i404 calculates the number of integration periods and adc readings per integration. Read currentI Query current reading of channel I, I = 1 .. 4. The currents are updated once per second. Read integrationtime Query the used integration time. Read hv Query hv output sense. Read position x Query the x-position (first value) which was calculated in the configured mode. Read position y Query the y-position (second value) which was calculated in the configured mode. Syst frequency Set/query the dominant noise frequency in Hz to be suppressed in the calibration routine, 50 or 60 Hz Syst save Set/query save state flag, 0 do not go to safe state when disconnected, 1 - go to safe state when disconnected (hv off) Syst serial Query the systen serial number. 12.1.5 Example Client #!/usr/bin/python from PyTango import * import sys, time, termios init = 0 def inkey(): global init if( not init): init = 1 fd = sys.stdin.fileno() old = termios.tcgetattr( fd) new = termios.tcgetattr( fd) new[3] = new[3] & ˜termios.ICANON & ˜termios.ECHO # # VMIN - the minimum number of characters to be read # new[6] [termios.VMIN] = 0 # # VTIME - how long the driver waits for VMIN characters, unit 0.1s # new[6] [termios.VTIME] = 1 termios.tcsetattr( fd, termios.TCSADRAIN, new) sys.exitfunc = lambda: termios.tcsetattr( fd, termios.TCSADRAIN, old) key = sys.stdin.read(1) if( len( key) == 0): key = -1 else: key = ord( key) return key # # main # try : sps = DeviceProxy( "//haso107tk:10000/p08/i404/exp.01") while (1): print " x ",sps.read_attribute( "Read_position_x").value, print " y ",sps.read_attribute( "Read_position_y").value time.sleep( 0.2) if inkey() == 32: break except Exception, inst : print "Failed with exception !" print sys.exc_info()[0] print type(inst) # the exception instance print inst.args # arguments stored in .args Chapter 13 Power Supply Servers 13.1 Introduction A power supply device implements one channel of a power supply system. The channel is selected by the properties of the device. 13.2 AgilentTech667x pogo_html_docu/AgilentTech667x/index.html See pogo generated info for more details. Server for controlling the Power Supplies of Agilent Technologies models 664xA, 665xA, 667xA, 668xA, and 669xA. Conexion via Gpib using the GpibDeviceServer class. 13.2.1 Properties pogo_html_docu/AgilentTech667x/Properties.html See pogo generated info for more details. 13.2.2 States pogo_html_docu/AgilentTech667x/States.html See pogo generated info for more details. 13.2.3 Commands pogo_html_docu/AgilentTech667x/Commands.html See pogo generated info for more details. 13.2.4 Attributes pogo_html_docu/AgilentTech667x/Attributes.html See pogo generated info for more details. 13.3 DeltaElektronikaSM7022 pogo_html_docu/DeltaElektronikaSM7022/index.html See pogo generated info for more details. Tango Server for controlling the HV Power Supply SM 70-22 from DeltaElektronika. The connection is done via socket. 13.3.1 Properties pogo_html_docu/DeltaElektronikaSM7022/Properties.html See pogo generated info for more details. 13.3.2 States pogo_html_docu/DeltaElektronikaSM7022/States.html See pogo generated info for more details. 13.3.3 Commands pogo_html_docu/DeltaElektronikaSM7022/Commands.html See pogo generated info for more details. 158 13.3.4 Attributes pogo_html_docu/DeltaElektronikaSM7022/Attributes.html See pogo generated info for more details. 13.4 HViseg Tango Server for controlling the HV Power Supply EHS 80 vvx from Iseg. The HV modules are inserted in a Mpod Mini crate with MpodC controller from the firma Wiener. The connection is done via Ethernet using the Simple Network Management Protocol (snmp). This protocol uses a Management Information Base (MIB) file, searched in the directory /usr/share/snmp/mibs, for matching variables and adresses. The Server uses two classes: HVisegMPODCtrl, interface to hardware and HVisegEHS80, controlling each of the channels. The code of the HVisegEHS80 class includes the HVisegMPODCtrl. This class is used to generate the corresponding librarie (libHVisegMPODCtrl.a). 13.4.1 HVisegMPODCtrl pogo_html_docu/HVisegMPODCtrl/index.html See pogo generated info for more details. Class connecting to the hardware using the snmp protocol. Properties pogo_html_docu/HVisegMPODCtrl/Properties.html See pogo generated info for more details. IpAddr. IP address. MIBFile. Name of the MIB module matching the hardware addresses (only write the name of the module, without the termination .txt of the file). SimulationMode. 0 real mode, 1 simulation mode. States pogo_html_docu/HVisegMPODCtrl/States.html See pogo generated info for more details. FAULT. Problems in the communication. ON. Communication without problems. Commands pogo_html_docu/HVisegMPODCtrl/Commands.html See pogo generated info for more details. GetValue. Read a value. State. Returns the device state. Status. It gets the device status. SetValue. Write a value. Attributes pogo_html_docu/HVisegMPODCtrl/Attributes.html See pogo generated info for more details. 13.4.2 HVisegEHS80 pogo_html_docu/HVisegEHS80/index.html See pogo generated info for more details. Class for controlling the monochromator. A thread is started any time a command is perfomed, and it ends when the actions and movements are finished. This avoids timeout problems. Properties pogo_html_docu/HVisegEHS80/Properties.html See pogo generated info for more details. ChannelNb. Number of the HV channel (from 1 to 8). CrateSlot. Number of the slot in the crate (from 1 to 4). HVisegMPODCtrlDevice. Name of the HVisegMPODCtrl tango device making the connection to the hardware. SimulationMode. 0 real mode, 1 simulation mode. States pogo_html_docu/HVisegEHS80/States.html See pogo generated info for more details. FAULT. Not used. ON. Set if the connection to the HVisegMPODCtrl is done properly. Commands pogo_html_docu/HVisegEHS80/Commands.html See pogo generated info for more details. SafetyLoopReset. Reset safety loop error in all channels. Attributes pogo_html_docu/HVisegEHS80/Attributes.html See pogo generated info for more details. ChannelNumber. Number of the channel (from 1 to 8). Read from the ChannelNb property at init. Only read. ChannelStatus. Off (0), On (1), resetEmergencyOff (2), setEmergencyOff (3), clearEvents (10). Read: An enumerated value which shows the current state of the output channel. Write: Change the state of the channel. If the channel is On, and the write value is Off, then the channel will switch Off. If the channel is Off, and the write value is On, and if no other signals (mainInhibit, outputInhibit, outputEmergencyOff or outputFailureMaxCurrent) are active, then the channel will switch on. If the write value is resetEmergencyOff, then the channel will leave the state EmergencyOff. A write of clearEvents is necessary before the voltage can ramp up again. If the write value is setEmergencyOff, then the channel will have the state EmergencyOff, which means that the High Voltage will switch off without a ramp and reset of the outputVoltage to null volts. If the write value is clearEvents, then all failure messages of the outputStatus will be reset (all channel events, all module events and the state emergencyOff). ChannelStatusStr. String with the channel status. Only read. CrateSlot. Slot of the channel (from 1 to 4). Read from the CrateSlot property at init. Only read. MeasCurrent. The measured output current [A]. Only read. MeasSenseVoltage. The measured voltage at the sense input lines [V]. Only read. MeasTerminalVoltage. The measured voltage at the output terminals [V]s. Only read. RampSpeed. Voltage Fall Slew Rate [V/s]. The slew rate of the output voltage if it increases (after switch on or if the Voltage has been changed). Read and write. SetCurrent. The current limit of the channel [A]. Read and write. SetVoltage. The nominal output voltage of the channel [V]. Read and write. 13.4.3 Example Clients 13.4.4 How to ... Chapter 14 MCA Servers 14.1 Abstract MCA Class It contains the minimum features that are needed for a Multi Channel Analizer. pogo_html_docu/mca_abstract_class/Descrip See pogo generated info for details. 14.1.1 Properties pogo_html_docu/mca_abstract_class/Properties.html See pogo generated info for more details. • MaxDataLength. Maximum lenght of the readout spectrum. 14.1.2 States pogo_html_docu/mca_abstract_class/TangoDevStates.html See pogo generated info for more details. • ON. MCA without problems. 14.1.3 Commands pogo_html_docu/mca_abstract_class/DevCommands.html See pogo generated info for more details. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. • Clear. Clear MCA and prepare it for start taking data. • Start. Start MCA acquisition. • Stop. Stop MCA acquisition. • Read. Readout MCA memory data. 14.1.4 Attributes pogo_html_docu/mca_abstract_class/Attributes.html See pogo generated info for more details. • Data. Data spectrum. • DataLength. Spectrum length to be readout. 14.2 MCA8715 Class Class for running the MCA histograming module for the 8715/8701 ADCs of Canberra. Each card has two memory banks. Up to four cards can be mounted in one carrier board. pogo_html_docu/MCA8715/index.html See pogo generated info for details. 161 14.2.1 Properties pogo_html_docu/MCA8715/Properties.html See pogo generated info for more details. • Base. VME base address. Default value 0x7000 (28672 in decimal). • Channel. Channel number. There are four channels per card. • MaxDataLength. Maximum lenght of the readout spectrum. • Base2. A24/A32 VME base address. Default for A24 0xd00000 (13631488 in decimal). • SimulationMode. 0 real mode, 1 simulation mode. 14.2.2 States pogo_html_docu/MCA8715/States.html See pogo generated info for more details. • ON. MCS without problems. 14.2.3 Commands pogo_html_docu/MCA8715/Commands.html See pogo generated info for more details. • Clear Clear MCA and prepare it for start taking data. Uses BankId. • Read Reads the MCA memory and stored the data in the attribute Data. Uses BankId. • Start Start MCA acquisition. Uses BankId. • Stop Stop MCA acquisition. Uses BankId. • State It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. • TakeCountsReference. Take current counts as reference for substracting when computing CountsDiff. 14.2.4 Attributes pogo_html_docu/MCA8715/Attributes.html See pogo generated info for more details. • BankId Specidies the memory bank for the commands. • Counts Spectrum of counts in RoIs. • Counts1 Counts in first RoI. • Counts2 Counts in second RoI. • Counts3 Counts in third RoI. • Counts4 Counts in fourth RoI. • CountsDiff Spectrum of diffrential counts in RoIs (current minus previous measurement). • Counts1Diff Differential counts in first RoI (current minus previous measurement). • Counts2Diff Differential counts in second RoI (current minus previous measurement). • Counts3Diff Differential counts in third RoI (current minus previous measurement). • Counts4Diff Differential counts in fourth RoI (current minus previous measurement). • Data Data spectrum. This attribute can be read after a Read command has been executed. • NbRoIs Number of RoIs. • DataLength Spectrum length to be readout. • RoIs Defined RoIs (image attribute). • StateBank0 0 if bank 0 ready to take data, 1 if bank 0 busy. • StateBank1 0 if bank 1 ready to take data, 1 if bank 1 busy. 14.2.5 Example Clients Python Client The following script shows how an MCA is operated. The timer is gating the ADC which feeds the MCA. #!/usr/bin/python from PyTango import * import sys import time try : mca1 = DeviceProxy( "hires/exp/mca1") t1 = DeviceProxy( "hires/exp/t1") attr = mca1.read_attribute( "BankId") attr.value = 0 mca1.write_attribute( attr) t1.command_inout( "Stop") mca1.command_inout( "Clear") mca1.command_inout( "Start") # # start the timer # attr = t1.read_attribute( "sampleTime") attr.value = 0.5 t1.write_attribute( attr) t1.command_inout( "Start") while( t1.command_inout( "Check")): print " Timer: ", t1.command_inout( "Read") time.sleep(0.1) mca1.command_inout( "Stop") mca1.command_inout( "Read") attr = mca1.read_attribute( "DataLength") len = attr.value print " Spectrum length ", len attr = mca1.read_attribute( "Data") for i in range( len): if attr.value[i] > 0 : print " i=", i, ",val=", attr.value[i] except : print "Failed with exception !" print sys.exc_info()[0] Cpp Client Cpp example for setting the properties of new MCA8715 device to default values. /* * File for setting the properties and attributes of a new MCA8715 device to * default values. * */ #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { // // create a connection to the new MCA8715 TANGO device // DeviceProxy *device = new DeviceProxy( "tango://has107k:10000/exp/line1/mca1"); // Write value to attributes DeviceAttribute *da_write1 = new DeviceAttribute( "BankId", (long)0); device->write_attribute(*da_write1); DeviceAttribute *da_write2 = new DeviceAttribute( "DataLength", (long)1000); device->write_attribute(*da_write2); // Write default values to properties unsigned long base = 28672; unsigned long channel = 0; unsigned long base2 = 13631488; long maxdatalength = 8192; DbDatum base_toput("Base"), channel_toput("Channel"); DbDatum base2_toput("Base2"), maxdatalength_toput("MaxDataLength"); DbData db_data; base_toput << base; channel_toput << channel; base2_toput << base2; maxdatalength_toput << maxdatalength; db_data.push_back(base_toput); db_data.push_back(channel_toput); db_data.push_back(base2_toput); db_data.push_back(maxdatalength_toput); device->put_property(db_data); } 14.3 XIA Class Tango server for multi-element Detector contolled by XIA DXP-XMP (Digital X-ray Processor) 14.3.1 Properties • ConfigFile .ini-file, there is stored the configuration for detector • LogFile XIA logging File, default is xmaplog.txt • LogLevel XIA logging level (from 1: errors only to 4:execution trace), default is 1 14.3.2 States • RUNNING the spectrum reading out • ON device ready to acquire • INIT device not yet initialised • MOVING device in acquisition • UNKNOWN unknown state 14.3.3 Commands • INIT Set ConfigFile • MappingPixelNext Advance pixel under host control in mapping mode. • State It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command • Status It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command • Start Start acquisition • StartMapping Start full spectrum mapping. The attribute BufferLength is set to 0. A thread is started that runs until the CurrentPixel reaches NumMapPixels or until StopMapping is called. The thread copies the data from buffer a and b to the Buffer (1D) and to the MappingData (2D) attributes. • Stop Stop acquisition. Stop command is sent to the crate and then the server waits that the acquisition is really stopped. It returns after maximum of 10 tests (50ms between 2 tries) • StopMapping Stop full spectrum mapping • Clear Set internal clear flag so that dxp memory will be cleared on next start command • SetLogFile Set logging file • SetLogLevel Set logging level 14.3.4 Attributes • BaseLineLength (long) The current size of the baseline data buffer. • BaselineThreshold (double) Baseline filter threshold, in eV. • Buffer (long, 2048 * 4096 (1D), mapping mode feature) Filled with the MCA spectra for each channel and each pixel. No header information is included. • BufferLength (long, mapping mode feature) No. of valid long-words in buffer. BufferLength is set to 0 by the command StartMapping. • CalibrationEnergy (double) in eV • CurrentPixel (long, mapping mode feature) The number of the current pixel, less than NumMapPixels. • DecayTime (double) The decay time for RC amplifiers, in musec, ignored for RESET type amps. • DetectorPolarity (double) the input signal polarity, ’1’ for positive, ’0’ negative. • FlagThreadBusy (long, mapping mode feature) The flag is 1 as long as the thread is busy. • GapTime (double) The gap time for the energy filter, in musec, read-only, this value can be set via MinimumGapTime. • GateIgnore (double) Determines whether acquisition continues or halts during pixel advance while GATE is asserted. • GateMaster (double) Sets the current module as a GATE master module, 1.0. • ICR (double, read-only) Input count rate, in counts per second • InputLogicPolarity (double) Sets the polarity of the logic signal connected to the front panel, non-inverted 0, inverted 1. • LiveTime (double, read-only) The calculated energy filter live time, in s. • MappingData (long, 2048x4096 (2D), mapping mode feature) Filled with the MCA spectra for each channel and each pixel. Each line in the image represent one spectrum. The number of lines corresponds to the number of triggers took in mapping mode. No header information is included. • MappingMode (double) 0.0 standard MCA, 1.0 full spectrum mapping, 2.0 multiple SCA mapping. • MaskMapChannels (long, mapping mode feature) Tells the thread that collects the data from the XIA buffer which of the 4 channels are connected to a detector: 1 first channel, 2 second channel, 3 first and second channels, etc. • Maxwidth (double) Minimum peak width for pile-up inspection, in muse • McaBinWidth (double) The width of an individual bin, in eV. • McaLength (long) The current size of the MCA data buffer. • MinimumGapTime (double) The minimum gap time for the energy/slow filter in musec. • NumberMcaChannels (long) The number of bins in the MCA spectrum. • NumChan (short) 1 because there is one channel per server. • NumMapPixels (long, mapping mode feature) The total number of pixels per run. • NumMapPixelsPerBuffer (long, mapping mode feature) The number of pixels per buffer. There are 2 buffers, a and b. Each has the size of 1048576 16-bit words. The structure of each buffer is: buffer-header (256 words), pixel header (256 words), pixel data ( 4 x NumberMcaChannels words), pixel header( 256 words), pixel data ( 4 x NumberMcaChannels words). If the MCAs have 8192 channels, 31 pixels can be stored in a buffer. • NumMod (ushort, read-only) The number of DXP-XMAP modules • OCR (double, read-only) Output count rate, in counts per second • PeakingTime (double) Peaking time of the energy filter, in musec. Longer peaking times produce better resolution at the cost of deadtime. HPGe have peaking times between 16 and 32 microseconds. Silicon drift detectors use 10 microseconds or less. • PixelAdvanceMode (double, mapping mode feature) Advance pixel by gate: 1, by SYNC signal: 2. • PreampGain (double) Preamplifier gain, in mV/keV • PreampType (double) 0 RESET, 1 RC • PresetType (short) 0 - no preset, 1 - fixed realtime, 2 - fixed livetime, 3 - fixed events, 4 - fixed triggers • PresetValue (double) Number of counts or seconds depending on PreseType. • RealTime (double, read-only) in s. • ResetDelay (double) The amount of time that the processor waits after the detector is reset before it processes the input signal, in musec. ignore, if the preamp type is not RESET. • Spectrum (long, 16385, read-only) Data spectrum. • TriggerLiveTime (double, read-only) in s. • TriggerGapTime (double) the gap time of the trigger filter, in musec. • TriggerPeakingTime (double) The peaking time of the trigger filter, in musec. • TriggerThreshold (double) Trigger filter threshold, in eV. 14.3.5 Client examples Single spectrum mode #!/usr/bin/env python import string import time from PyTango import * from Util import * name = "haspxiproto:20000/pxi/exp/mca1" xia = DeviceProxy( name) print " XIA status ", xia.command_inout( "Status") print " XIA start ", xia.command_inout( "Start") print " XIA status ", xia.command_inout( "Status") print " XIA stop ", xia.command_inout( "Stop") print " XIA status ", xia.command_inout( "Status") print " XIA clear ", xia.command_inout( "Clear") print " XIA status ", xia.command_inout( "Status") print " XIA McaLength ", xia.read_attribute( ’McaLength’).value s = xia.read_attribute( ’Spectrum’) print " XIA name ", s.name, " dim-x ", s.dim_x Mapping mode with software trigger from PyTango import * import sys import time try : print " Trying to connect " mca = DeviceProxy( "//hasp029rack:10000/test/xia/01") print " Connect successful " mca.MappingMode = 1.0 mca.GateMaster = 1 mca.write_attribute("NumberMcaChannels",1024) mca.write_attribute("NumMapPixels",4) mca.write_attribute("NumMapPixelsPerBuffer",2) mca.write_attribute("MaskMapChannels",1) mca.command_inout( "StartMapping") print "Mapping started" for n in range( 4): time.sleep(10) mca.command_inout( "MappingPixelNext") scalar=mca.read_attribute( "CurrentPixel") print "Current pixel: ", scalar.value time.sleep(1.1) mca.command_inout( "StopMapping") print "State" print mca.read_attribute("State").value while(mca.read_attribute("State").value != DevState.ON): time.sleep(0.1) scalar=mca.read_attribute( "Buffer") print "Buffer, dim_x: ", scalar.dim_x for i in range(scalar.dim_x): if scalar.value[i] > 400: print str(i) + " " + str(scalar.value[i]) except : print "Failed with exception !" print sys.exc_info()[0] print sys.exc_info() Mapping mode with external trigger from PyTango import * import sys import time try : print " Trying to connect " mca = DeviceProxy( "//haspp06xmap:10000/test/xia/01") print " Connect successful " mca.MappingMode = 1.0 # GateMaster tiene que ser 1 para que funcione mca.GateMaster = 1 mca.write_attribute("NumberMcaChannels",2048) mca.write_attribute("NumMapPixels",1000) # Acquisition will stop after this number of tr # mca.write_attribute("NumMapPixelsPerBuffer",140) mca.write_attribute("NumMapPixelsPerBuffer",-1) # Until buffer is full mca.write_attribute("MaskMapChannels",1) mca.command_inout( "StartMapping") print "Mapping started" while(mca.read_attribute("State").value != DevState.ON): time.sleep(0.1) scalar=mca.read_attribute( "Buffer") print "Buffer, dim_x: ", scalar.dim_x for i in range(scalar.dim_x): if scalar.value[i] > 400: print str(i) + " " + str(scalar.value[i]) except : print "Failed with exception !" print sys.exc_info()[0] print sys.exc_info() Chapter 15 Multi Channel Scaler Servers 15.1 Introduction The MCS server implements an ADC working in Multi Channel Mode. 15.2 Abstract MCS Class It contains the minimum features that are needed for a counter running in Multi Channel Scaler mode. pogo_html_docu/mcs_abstrac See pogo generated info for details. 15.2.1 Properties pogo_html_docu/mcs_abstract_class/Properties.html See pogo generated info for more details. • MaxNbChannels. Number of channels in the MCS (or maximum number that want to be readout). • MaxNbAcquisitions. Maximum number of acquisitions. 15.2.2 States pogo_html_docu/mcs_abstract_class/TangoDevStates.html See pogo generated info for more details. • ON. MCS without problems. 15.2.3 Commands pogo_html_docu/mcs_abstract_class/DevCommands.html See pogo generated info for more details. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. • SetupMCS. Set the counter for running in MultiChannel Scaler Mode. It set the preset, the number of acquisitions and number of channels to be readout. • ReadMCS. Readout the counters stored in every channel. 15.2.4 Attributes pogo_html_docu/mcs_abstract_class/Attributes.html See pogo generated info for more details. • NbChannels. Number of channels to be readout. • NbAcquisitions. Number of acquisitions to be done. • Preset. Preset value. • CountsArray. Array with the counters for every channel at each acquisition. 169 15.3 SIS3820MCS Class Class for running the SIS3820 counter in Multi Channel Scaler mode. The property FlagExternalTrigger set if the device is set for accepting external or software triggers. The Status of the device informs about the selected trigger mode. pogo_html_docu/SIS3820MCS/index.html See pogo generated info for details. 15.3.1 Properties pogo_html_docu/SIS3820MCS/Properties.html See pogo generated info for more details. • FlagExternalTriggers. Set to 1 for external trigger. 0 (software triggers) by default. • MaxNbChannels. Number of channels in the MCS (or maximum number that want to be readout). • MaxNbAcquisitions. Maximum number of acquisitions. • Base. VME base address. Default value: 0x38000000 (in decimal 939524096). • SimulationMode. 0 real mode, 1 simulation mode. 15.3.2 States pogo_html_docu/SIS3820MCS/States.html See pogo generated info for more details. • ON. MCS without problems. 15.3.3 Commands pogo_html_docu/SIS3820MCS/Commands.html See pogo generated info for more details. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. • ClearSetupMCS. Set the counter for running in MultiChannel Scaler Mode. It set the preset, the number of acquisitions and number of channels to be readout to the values in the attributes Preset, NbChannels and NbAcquisitions respectively. It set the FlagMCSSet to 1. For software triggers, it is called automatically by ReadMCS in case this flag is null. • ReadMCS. Readout the counters stored in every channel and write the values to the attribute CountsArray. For software triggers, it calls automatically SetupMCS in case FlagMCSSet is null. 15.3.4 Attributes pogo_html_docu/SIS3820MCS/Attributes.html See pogo generated info for more details. • AcquiredTriggers.. Number of acquired triggers. • NbChannels. Number of channels to be readout. When this value is written FlagMCSSet is set to null. • NbAcquisitions. Number of acquisitions to be done. When this value is written FlagMCSSet is set to null. • Preset. Preset value. When this value is written FlagMCSSet is set to null. • CountsArray. Array with the counters for every channel at each acquisition. They are ordered in such a way that the first NbChannels values of the array are the values for every channel corresponding to the first acquisition. The dimension of the array is MaxNbAcquisitions*MaxNbChannels, but for each measurement only the first NbAcquisitions*NbChannels elements of the array are filled with valid values (the rest are set to 0). 15.3.5 Client examples Cpp example for setting the properties of new SIS3820MCS device to default values. /* * File for setting the properties of a new SIS3610 device to * default values. * */ #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { // // create a connection to the new SIS3610 IO Register TANGO device // DeviceProxy *device = new DeviceProxy( "tango://has107k:10000/exp/line1/mcs1"); // Write default values to properties unsigned long base = 65536; long max_nb_channels = 32; long max_nb_acquisitions = 1000; DbDatum base_toput("Base"), max_nb_channels_toput("MaxNbChannels"); DbDatum max_nb_acquisitions_toput("MaxNbAcquisitions"); DbData db_data; base_toput << base; max_nb_channels_toput << max_nb_channels; max_nb_acquisitions_toput << max_nb_acquisitions; db_data.push_back(base_toput); db_data.push_back(max_nb_channels_toput); db_data.push_back(max_nb_acquisitions_toput); device->put_property(db_data); } Example how to operate the Multi Channel Scaler and extract the readout values /* * example of a client using the TANGO C++ api. */ #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { unsigned long temp; float out; DeviceAttribute da; long nb_channels; long nb_acquisitions; // // create a connection to a TANGO device // DeviceProxy *device = new DeviceProxy( "tango://has107k:10000/exp/line1/mcs1"); // Read maximum nb of channels and acquisitions DbData prop; prop.push_back(DbDatum("MaxNbChannels")); prop.push_back(DbDatum("MaxNbAcquisitions")); device->get_property(prop); long max_nb_channels; long max_nb_acquisitions; prop[0] >> max_nb_channels; prop[1] >> max_nb_acquisitions; cout << "Max Nb Channels " << max_nb_channels << " Max Nb Acquisitions " << max_nb_acquis // Set Preset, number of channels and number of acquisitions DeviceAttribute *da_write1 = new DeviceAttribute( "Preset", (long)100); device->write_attribute(*da_write1); DeviceAttribute *da_write2 = new DeviceAttribute( "NbChannels", (long)4); device->write_attribute(*da_write2); DeviceAttribute *da_write3 = new DeviceAttribute( "NbAcquisitions", (long)10); device->write_attribute(*da_write3); // Read NbChannels and NbAcquisitions da = device->read_attribute("NbChannels"); da >> nb_channels; da = device->read_attribute("NbAcquisitions"); da >> nb_acquisitions; cout << "Number of active channels " << nb_channels << " Number of acquisitions " << nb_ac // Execute setupmcs and readmcs (readmcs executes setupmcs case it was not // executed before) device->command_inout( "SetupMCS"); device->command_inout( "ReadMCS"); // Read channels vector<long> readout; long counts[nb_channels][nb_acquisitions]; da = device->read_attribute("CountsArray"); da >> readout; int k =0; for(int j = 0; j < (nb_acquisitions) ; j++){ for(int i= 0; i < nb_channels; i++){ counts[i][j] = readout[k]; k++; } } } Example how to operate the Multi Channel Analyzer triggered externally by the Zebra box The cable connected to the output of the Zebra box with the trigger pulses has to be plugin in the first channel of the MCS. A full example for running the MCS with Zebra triggers via a spock macro is shown in the sardana documentation. Here a sequence of the actions to be performed is shown. # Set the zebra device zebra_device.NbTriggers = nb_triggers zebra_device.TriggerInterval = trigger_interval # Set MCS mcs_device.NbAcquisitions = 0 # Continuous mode mcs_device.NbChannels = nb_mcs_channels nb_mcs_taken_triggers = nb_triggers # Clear and setup mcs mcs_device.ClearSetupMCS() # Start zebra triggering zebra_device.Arm = 1 # Check when the triggering is done while zebra_device.State() == PyTango.DevState.MOVING: time.sleep(1) # Read MCS mcs_device.ReadMCS() # MCS Data mcs_data = mcs_device.CountsArray # Zebra encoder Data zebra_data = zebra_device.EncoderSpectrum Chapter 16 Encoder Servers 16.1 Introduction It implements an encoder device. 16.2 Abstract Encoder Class It contains the minimum features that are needed for working with an encoder. pogo_html_docu/encoder_abstract_class/Des See pogo generated info for details. 16.2.1 States pogo_html_docu/encoder_abstract_class/TangoDevStates.html See pogo generated info for more details. • ON. MCS without problems. 16.2.2 Commands pogo_html_docu/encoder_abstract_class/DevCommands.html See pogo generated info for more details. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. • InitEncoder. Initializes the encoder. • Calibrate. Calibrates the encoder. Computes a new offset value for a given calibration position. 16.2.3 Attributes pogo_html_docu/encoder_abstract_class/Attributes.html See pogo generated info for more details. • Position. Current position computed from the encoder value. • Conversion. Conversion factor for computing the position. • Offset. Offset value for computing the position. 16.3 IK220 Class This class implements an encoder which talks to the IK220 PCI card of Heidenhain. pogo_html_docu/IK220/index.html See pogo generated info for details. 174 16.3.1 Properties pogo_html_docu/IK220/Properties.html See pogo generated info for more details. • Channel. Channel number. Default value 0 (the hardware supports up to 8 channels). • DeviceDir. Directory containing the encoder device files, e.g. /dev/ik220. Devices are expetected to be named DeviceDir/Channel, e.g. /dev/ik220/0, /dev/ik220/1 etc. • Mode. Selects voltage or current measurement. O for voltage measurements, 1 for current measurements. • SimulationMode. 0 real mode, 1 simulation mode. 16.3.2 States pogo_html_docu/IK220/States.html See pogo generated info for more details. • ON. Encoder without problems. 16.3.3 Commands pogo_html_docu/IK220/Commands.html See pogo generated info for more details. • State. It gets the device state (stored in its device state data member) and returns it to the caller. Default Tango Command. • Status. It gets the device status (stored in its device status data member) and returns it to the caller. Default Tango Command. • InitEncoder. Initializes the encoder. • Calibrate. Calibrates the encoder. Computes a new offset value for a given calibration position. • SetCorrectionOffOn. Set correction to off or on acording to the given input parameter ( 0 off, 1 on). • DoReference. Starts reference seeking. • CancelReference. Cancels reference. 16.3.4 Attributes pogo_html_docu/IK220/Attributes.html See pogo generated info for more details. • Position. Current position computed from the encoder value. • Conversion. Conversion factor for computing the position. • Offset. Offset value for computing the position. • StatusPort. Returns the status readout from the encoder. • P1. Parameter 1 from the encoder. See pogo generated documentation for meaning and default values. Reads and writes from and to hardware. • P2. Parameter 2 from the encoder. See pogo generated documentation for meaning and default values. Reads and writes from and to hardware. • P3. Parameter 3 from the encoder. See pogo generated documentation for meaning and default values. Reads and writes from and to hardware. • P4. Parameter 4 from the encoder. See pogo generated documentation for meaning and default values. Reads and writes from and to hardware. • P5. Parameter 5 from the encoder. See pogo generated documentation for meaning and default values. Reads and writes from and to hardware. • P6. Parameter 6 from the encoder. See pogo generated documentation for meaning and default values. Reads and writes from and to hardware. • P7. Parameter 7 from the encoder. See pogo generated documentation for meaning and default values. Reads and writes from and to hardware. • P8. Parameter 8 from the encoder. See pogo generated documentation for meaning and default values. Reads and writes from and to hardware. • P9. Parameter 9 from the encoder. See pogo generated documentation for meaning and default values. Reads and writes from and to hardware. • P10. Parameter 10 from the encoder. See pogo generated documentation for meaning and default values. Reads and writes from and to hardware. • P11. Parameter 11 from the encoder. See pogo generated documentation for meaning and default values. Reads and writes from and to hardware. • FlagIgnoreStatus.If set to 1 the encoder is used without reference mark search. 16.3.5 Client examples Cpp example for setting the properties of new IK220 Device to default values. /* * File for setting the properties of a new IK220 device to * default values. * */ #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { // // create a connection to the new IK220 TANGO device // DeviceProxy *device = new DeviceProxy( "tango://has107k:10000/exp/line1/enc1"); // Write default values to properties unsigned long channel = 0; unsigned long mode = 0; // 0 voltage, 1 current DbDatum channel_toput("Channel"), mode_toput("Mode"); DbData db_data; channel_toput << channel; mode_toput << mode; db_data.push_back(channel_toput); db_data.push_back(mode_toput); device->put_property(db_data); // Write value to attributes DeviceAttribute *da_write1 = new DeviceAttribute( "Offset", (double)0); device->write_attribute(*da_write1); DeviceAttribute *da_write2 = new DeviceAttribute( "Conversion", (double)1); device->write_attribute(*da_write2); DeviceAttribute *da_write3 = new DeviceAttribute( "FlagIgnoreStatus", (long)1); // If set device->write_attribute(*da_write3); } Chapter 17 X-ray Detector Servers 17.1 Introduction Implementations of Tango device servers for x-ray detectors. 17.2 FastSciDetector Tango Server for controlling the Fast Scintillation Detector and Fast Processing Unit (Cyberstar) from Oxford Danfysik. The Server uses two classes: FastSciDetectorCtrl (Socket interface) and FastSciDetector (the interface to the detector). The code of the FastSciDetector class includes the FastSciDetectorCtrl class. 17.2.1 FastSciDetectorCtrl pogo_html_docu/FastSciDetectorCtrl/index.html See pogo generated info for more details. Class creating the socket connection and implementing the commands for writing and reading to the socket. Properties pogo_html_docu/FastSciDetectorCtrls/Properties.html See pogo generated info for more details. IpAddr. IP address. PortNb. Port number. SimulationMode. Not used. States pogo_html_docu/FastSciDetectorCtrl/States.html See pogo generated info for more details. FAULT. Problems creating socket connection. ON. Socket connection succed. Commands pogo_html_docu/FastSciDetectorCtrl/Commands.html See pogo generated info for more details. CloseSocket. Close socket connection. State. Returns the device state. Default Tango command. Status. It gets the device status. Default Tango command. WriteSocket. Sends command to the socket without returning an answer. Only can be used for write commands. WriteReadAdrPort. Sends command to the socket and returns an answer. Only can be used for read commands. 178 Attributes pogo_html_docu/FastSciDetectorCtrl/Attributes.html See pogo generated info for more details. 17.2.2 FastSciDetector pogo_html_docu/FastSciDetector/index.html See pogo generated info for more details. Properties pogo_html_docu/FastSciDetector/Properties.html See pogo generated info for more details. UnitAddress. Unit address of the detector: an integer value from 0 to 15. Default value is 0. SocketDS. Name of the FastSciDetectorCtrl tango device making the socket connection. States pogo_html_docu/FastSciDetector/States.html See pogo generated info for more details. FAULT. Not used. ON. Server running without problems. Commands pogo_html_docu/FastSciDetector/Commands.html See pogo generated info for more details. Init. Initializes the Tango device. State. Returns the device state. Default Tango command. Status. It gets the device status. Default Tango command. Attributes pogo_html_docu/FastSciDetector/Attributes.html See pogo generated info for more details. Gain. Gets/Sets the gain in percentage. Value from 0 to 100. HVFail. Replies 1 if high voltage failure is detected, 0 otherwise. Only read attribute. HighVoltage. Gets/Sets the high voltage (if the power supply option is installed). PeakingTime. Gets/Sets the peaking time. Only 50 ns, 100 ns, 300 ns and 1000 ns values are allowed. Saturation. Replies 1 if saturation is detected, 0 otherwise. Only read attribute. SCALowerLevel. Gets/Sets the single channel analyser lower level. From 0 to 4 (or SCAUpperLevel) V. SCAUpperLevel. Gets/Sets the single channel analyser upper level. From 0 (or SCALowerLevel) to 4 V. 17.3 MaiaDetector Tango Server for the Maia X-ray microprobe detector system developed by the Brookhaven National Laboratory and the Commonwealth Scientific and Industrial Research Organisation. The Server consists of seven classes: • MaiaDetector. Empty class. Gives name to the process and allows putting the other classes inside of this process. • MaiaCtrl. Makes the communication with Maia through its control socket protocol. • MaiaLogger. Controls the logging procedure. • MaiaScan. Controls the scan settings and info. • MaiaProcessing. Controls the processing parameters. • MaiaEncoderAxis. Controls the encoder signals. • MaiaSensor. Controls voltages, current and temperatures. • MaiaFlux. Controls flux parameters. • MaiaDimension. Controls the movements of the different possible dimensions, a dimension can be a combination of Axes. • MaiaMetadata. Sets and gets the metadata. 17.3.1 MaiaDetector pogo_html_docu/MaiaDetector/index.html See pogo generated info for more details. Properties pogo_html_docu/MaiaDetector/Properties.html See pogo generated info for more details. Commands pogo_html_docu/MaiaDetector/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/MaiaDetector/Attributes.html See pogo generated info for more details. 17.3.2 MaiaCtrl pogo_html_docu/MaiaCtrl/index.html See pogo generated info for more details. Properties pogo_html_docu/MaiaCtrl/Properties.html See pogo generated info for more details. States pogo_html_docu/MaiaCtrl/States.html See pogo generated info for more details. Commands pogo_html_docu/MaiaCtrl/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/MaiaCtrl/Attributes.html See pogo generated info for more details. 17.3.3 MaiaLogger pogo_html_docu/MaiaLogger/index.html See pogo generated info for more details. Properties pogo_html_docu/MaiaLogger/Properties.html See pogo generated info for more details. States pogo_html_docu/MaiaLogger/States.html See pogo generated info for more details. Commands pogo_html_docu/MaiaLogger/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/MaiaLogger/Attributes.html See pogo generated info for more details. 17.3.4 MaiaScan pogo_html_docu/MaiaScan/index.html See pogo generated info for more details. Properties pogo_html_docu/MaiaScan/Properties.html See pogo generated info for more details. States pogo_html_docu/MaiaScan/States.html See pogo generated info for more details. Commands pogo_html_docu/MaiaScan/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/MaiaScan/Attributes.html See pogo generated info for more details. 17.3.5 MaiaProcessing pogo_html_docu/MaiaProcessing/index.html See pogo generated info for more details. Properties pogo_html_docu/MaiaProcessing/Properties.html See pogo generated info for more details. States pogo_html_docu/MaiaProcessing/States.html See pogo generated info for more details. Commands pogo_html_docu/MaiaProcessing/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/MaiaProcessing/Attributes.html See pogo generated info for more details. 17.3.6 MaiaEncoderAxis pogo_html_docu/MaiaEncoderAxis/index.html See pogo generated info for more details. Properties pogo_html_docu/MaiaEncoderAxis/Properties.html See pogo generated info for more details. States pogo_html_docu/MaiaEncoderAxis/States.html See pogo generated info for more details. Commands pogo_html_docu/MaiaEncoderAxis/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/MaiaEncoderAxis/Attributes.html See pogo generated info for more details. 17.3.7 MaiaSensor pogo_html_docu/MaiaSensor/index.html See pogo generated info for more details. Properties pogo_html_docu/MaiaSensor/Properties.html See pogo generated info for more details. States pogo_html_docu/MaiaSensor/States.html See pogo generated info for more details. Commands pogo_html_docu/MaiaSensor/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/MaiaSensor/Attributes.html See pogo generated info for more details. 17.3.8 MaiaFlux pogo_html_docu/MaiaFlux/index.html See pogo generated info for more details. Properties pogo_html_docu/MaiaFlux/Properties.html See pogo generated info for more details. States pogo_html_docu/MaiaFlux/States.html See pogo generated info for more details. Commands pogo_html_docu/MaiaFlux/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/MaiaFlux/Attributes.html See pogo generated info for more details. 17.3.9 MaiaDimension pogo_html_docu/MaiaDimension/index.html See pogo generated info for more details. Properties pogo_html_docu/MaiaDimension/Properties.html See pogo generated info for more details. States pogo_html_docu/MaiaDimension/States.html See pogo generated info for more details. Commands pogo_html_docu/MaiaDimension/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/MaiaDimension/Attributes.html See pogo generated info for more details. 17.3.10 MaiaMetadata pogo_html_docu/MaiaMetadata/index.html See pogo generated info for more details. Properties pogo_html_docu/MaiaMetadata/Properties.html See pogo generated info for more details. States pogo_html_docu/MaiaMetadata/States.html See pogo generated info for more details. Commands pogo_html_docu/MaiaMetadata/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/MaiaMetadata/Attributes.html See pogo generated info for more details. 17.4 Mar345Ctrl pogo_html_docu/Mar345Ctrl/index.html See pogo generated info for more details. Tango class for controlling the Mar345 Image Plate Detector communicating via socket to the mar345dtb program running in a linux PC connected to the detector. 17.4.1 Properties pogo_html_docu/Mar345Ctrl/Properties.html See pogo generated info for more details. IpAddr. IP address of the Linux PC where the mar345dtb program is running. PortNb. Port number opened by the mar345drb program for communicating to clients. SimulationMode. Not used. 17.4.2 States pogo_html_docu/Mar345Ctrl/TangoDevStates.html See pogo generated info for more details. FAULT. Not able to connect to socket. MOVING. A command is running in the detector. ON. Idle state. 17.4.3 Commands pogo_html_docu/Mar345Ctrl/DevCommands.html See pogo generated info for more details. ChangeMode. Change the scanmode to: 1200, 1600, 2000, 2300, 1800, 2400, 3000 or 3450. Device goes to MOVING state and a thread runs until the command is performed. Erase. Erase the mar345 image plate. Device goes to MOVING state and a thread runs until the command is performed. Init. Default Tango command. Initializes the device. Scan. Takes an image (the Filename attribute is used as argument). Device goes to MOVING state and a thread runs until the command is performed. State. Default Tango command. Returns server state. Status. Default Tango command. Returns server status. WriteReadSocket. Send command to socket and get answer. 17.4.4 Attributes pogo_html_docu/Mar345Ctrl/Attributes.html See pogo generated info for more details. LastSetMode. Last mode set with the ChangeMode command. It is set to 3450 when the Tango server is started. It is used for creating the name of the file where the image will be stored: [SavingPrefix] [automatic generated index].mar[LastSetMo SavingDirectory. Directory where the image will be stored (do not finish it with /). SavingPrefix. Prefix for the filename where the image will be stored: [SavingPrefix] [automatic generated index].mar[LastSetMode] All file names have to have a between prefix and index, if not the software for the camera will not work. 17.5 PerkinElmerDetector Tango Server for controlling the XRD 1621 Silicon Digital X-ray Detector from Perkin Elmer. The Server uses two classes: PerkinElmerCtrl (interface via socket to the windows pc where the QXRD software talking to the detector is running) and PerkinElmerDetector (the interface to the detector). The code of the PerkinElmerDetector class includes the PerkinElmerCtrl class. 17.5.1 PerkinElmerCtrl pogo_html_docu/PerkinElmerCtrl/index.html See pogo generated info for more details. Class creating the socket connection and implementing the commands for writing and reading to the socket. Properties pogo_html_docu/PerkinElmerCtrls/Properties.html See pogo generated info for more details. IpAddr. IP address of the PC where the QXRD software talking to the detector is running. PortNb. Port number to connect the QXRD software (by default 1234). SimulationMode. Not used. States pogo_html_docu/PerkinElmerCtrl/States.html See pogo generated info for more details. FAULT. Problems creating socket connection. ON. Socket connection succed. Commands pogo_html_docu/PerkinElmerCtrl/Commands.html See pogo generated info for more details. CloseSocket. Close socket connection. State. Returns the device state. Default Tango command. Status. It gets the device status. Default Tango command. WriteReadAdrPort. Sends command to the socket and returns an answer. All comands send to the QXRD software return an answer. Attributes pogo_html_docu/PerkinElmerCtrl/Attributes.html See pogo generated info for more details. 17.5.2 PerkinElmerDetector pogo_html_docu/PerkinElmerDetector/Description.html See pogo generated info for more details. Properties pogo_html_docu/PerkinElmerDetector/Properties.html See pogo generated info for more details. ControllerDevice. Name of the PerkinElmerCtrl tango device making the socket connection. States pogo_html_docu/PerkinElmerDetector/TangoDevStates.html See pogo generated info for more details. FAULT. Not used. MOVING. Taking images. ON. Idle state. Commands pogo_html_docu/PerkinElmerDetector/Commands.html See pogo generated info for more details. AcquireDarkImages. Starts dark images acquisition without saving to file. It starts a thread for setting the state. AcquireDarkImagesAndSave. Starts dark images acquisition and save images to file. It starts a thread for setting the state. AcquireKeepingFlagsUntouched. Startsimage acquisition without setting any flag. It starts a thread for setting the state. AcquireRawImages. Starts raw images acquisition without saving to file. It starts a thread for setting the state. AcquireRawImagesAndSave. Starts raw images acquisition and save images to file. It starts a thread for setting the state. AcquireSubtractedImages. Starts subtracted (raw - dark) images acquisition without saving to file. It starts a thread for setting the state. AcquireSubtractedImagesAndSave. Starts subtracted (raw - dark) images acquisition and save images to file. It starts a thread for setting the state. Init. Initializes the Tango device. State. Returns the device state. Default Tango command. Status. It gets the device status. Default Tango command. Trigger. Acquire images using the FilesBeforeTrigger and FilesAfterTrigger attributes. It starts a thread for setting the state. UpdateReadoutSettings. Reads all detector settings from hardware. Called every time a value is written to an attribute for updating the changed attribute. Attributes The current value showed in each attribute is updated by executing the UpdateReadoutSettings command or after writting a value to it. This avoids overloading the traffic in the socket. pogo_html_docu/PerkinElmerDetector/Attributes.htm See pogo generated info for more details. BinningMode. Reads/writes the binning mode: 0 -¿ no binnig, 1 -¿ 2x2 binning. ExposureTime. Reads/writes the exposure time in s. FileIndex. Reads/writes the file index: number added to the file pattern for completing the file name. FileName. Reads the name of the file currently saved. FilePattern. Reads/writes the file pattern. The file names are: ¡pattern¿-¡nnnn¿.tif, Dark: ¡pattern¿-¡nnnn¿.dark.tif, Raw:¡pattern¿=¡nnnn¿.raw.tif. FilesAfterTrigger. Reads/writes the total number of files to take after trigger. FilesBeforeTrigger. Reads/writes the total number of files to take before trigger. CameraGain. Reads/writes detector gain in pF. Only the following values are allowed: 0.25, 0.5, 1, 2, 4, 8. LogFile. Reads/writes complete name (with path) of the log file. OutputDirectory. Reads/writes the path of the directory (in the windows computer) for saving the image files. PerformDarkSubtraction. Reads/writes PerformDarkSubtraction flag. PerformIntegration. Reads/writes PerformIntegration flag. SaveDarkImages. Reads/writes SaveDarkImages flag. SaveIntegratedData. Reads/writes SaveIntegratedData flag. SaveSubtracted. Reads/writes SaveSubtracted flag. SaveRawImages. Reads/writes SaveRawImages flag. SkippedAtStart. Reads/writes the number of exposures to skip before each acquisition sequence. SkippedBetweenSaved. Reads/writes the number of exposures to skip between each saved image. SummedDarkImages. Reads/writes the number of exposures to sum for dark image. SummedSaveImages. Reads/writes the number of exposures to sum for each saved image. UserComment1. Reads/writes a string with user comments to be added to the ascii files saved together with the images. UserComment2. Reads/writes a string with user comments to be added to the ascii files saved together with the images. UserComment3. Reads/writes a string with user comments to be added to the ascii files saved together with the images. UserComment4. Reads/writes a string with user comments to be added to the ascii files saved together with the images. 17.6 Pilatus Tango Device Server for the Pilatus pixel detector series from DECTRIS. See the user guide for a detailed server description: pogo_html_docu/Pilatus/index.html See pogo generated info for more details. 17.6.1 Properties pogo_html_docu/Pilatus/Properties.html See pogo generated info for more details. 17.6.2 States pogo_html_docu/Pilatus/States.html See pogo generated info for more details. 17.6.3 Commands pogo_html_docu/Pilatus/Commands.html See pogo generated info for more details. 17.6.4 Scalar Attributes pogo_html_docu/Pilatus/Attributes.html See pogo generated info for more details. Chapter 18 MicroStrip Detector Servers 18.1 Mythen Tango Server for controlling a MYTHEN detector (http://pilatus.web.psi.ch/mythen.htm). MYTHEN is a microstrip detector system with about 15’000 channels covering 60◦ in θ. The Tango Server includes some of the MYTHEN software available also in http://people.web.psi.ch/bergamaschi/. pogo_html_docu/Mythen/index.html See pogo generated info for more details. 18.1.1 Properties pogo_html_docu/Mythen/Properties.html See pogo generated info for more details. Hostname The detector hostname (or IP address). No default value. Port The detector port. Default value: 1952. DetectorId The detector ID. Default value: 0. SimulationMode 0 real mode, 1 simulation mode. Default value: 0. 18.1.2 States pogo_html_docu/Mythen/States.html See pogo generated info for more details. ON Corresponds to the following detector states: transmitting, finished, waiting or idle. OFF Detector is offline. MOVING Corresponds to the following detector states: transmitting. FAULT Corresponds to the detector state: error. UNKNOWN None of the detector states mapped as Tango::ON, TANGO:MOVING or Tango::FAULT. 18.1.3 Commands pogo_html_docu/Mythen/Commands.html See pogo generated info for more details. State. Returns the device state. Default Tango Command. Status. Returns the device status. Default Tango Command. Refresh. Reads all values and configurations, and updates the values shown to the user. StartAcquisition. Starts the acquisition. StopAcquisition. Stops the acquisition. GetData. Gets all data from the detector (if any), processes them and writes them to file according to the preferences already setup. In principle the method is not needed (when using StartAcquisition the files are written automatically to disk). 187 GetFrame. Gets a single frame from the detector (if any), processes it and writes it to file according to the preferences already setup. In principle the method is not needed (when using StartAcquisition the files are written automatically to disk). SetConfig. Reads the configuration file and sets the values. GetConfig. Writes the configurations to file. SetParameters. Reads the detector parameters from file and sets them. GetParameters. Writes the main detector parameters to file. ReadSetupFromFile. Reads the files specified (and that could be created by get setup) and resets the complete detector configuration including flatfield corrections, badchannels, trimbits etc. SaveSetupToFile. Writes the complete detector setup (including configuration, trimbits, flat field coefficients, badchannels etc.) in a set of files for which the extension is automatically generated. ExtSigGet. Gets usage of the external digital signal i. Input: i. ExtSigSet. Sets usage of the external digital signal i. Input: “i mode”, where mode can be off, gate in active high, gate in active low, trigger in rising edge, trigger in falling edge, ro trigger in rising edge, ro trigger in falling edge, gate out active high, gate out active low, trigger out rising edge, trigger out falling edge, ro trigger out rising edge, ro trigger out falling edge. RunDigitalTest. Makes a digital test of the detector. Returns 0 if it succeeds. RunBusTest. Makes a test of the detector bus. Returns 0 if it succeeds. WriteTrimFile. Trims the detector and writes the trimfile. GetFlatFieldCorrections. Writes the flat field corrections to file. GetBadChannels. Writes the bad channels to file. GetAngularConversions. Writes the angular conversion coefficients to file. 18.1.4 Attributes pogo_html_docu/Mythen/Attributes.html See pogo generated info for more details. Online Detector is Online (1) or Offline (0) . ConfigFile. The name of the configuration file. ParameterFile. File containing the main detector parameters for the measurement. SetupFile. The complete detector setup (including configuration, trimbits, flat field coefficients, badchannels etc.) is a written to a set of files for which the extension is automatically generated. CalibrationDir. The path of the calibration files. TrimDir. The path of the trim files. TrimEnergies. The number of energies for which trimbit files exist and their value. String format: nen [e0 e1...en] OutDir. The directory to which the files will be written by default. OutFileName. The filename to which the files will be written by default (to which file and position indexes will eventually be attached). OutFileIndex. The start index of the output files (automatically incremented by the acquisition functions). EnableMerge. Set to ’true’ to enable merging of frames to a single image. Otherwise they will be kept in OutDir. MinFrames. If less than MinFrames frames are acquired, they are not merged in a single image, but just moved to MergeDir. MergeDir. The directory to which the frames will be merged (or just moved). NMaxModules. The maximum number of detector modules. (READ only) NModules. The number of detector modules. Settings. Detector settings. Can be: uninitialised, standard, fast or highgain Threshold. Detector threshold in eV. Should be half of the beam energy. It is precise only if the detector is calibrated. ExposureTime. The exposure time per frame (in s). FramePeriod. The frame period (in s). DelayAfterTrg. The delay after trigger (in ns). GatesPerFrame. The number of gates per frame. FramesPerCycle. The number of frames per cycle (e.g. after each trigger). NCycles. The number of cycles (e.g. number of triggers). NProbes. The number of probes to accumulate (max 3). DynamicRange. The dynamic range - can be 1, 4, 8,16 or 24 bits. Flags. Readout flags - can be none or storeinram. Threaded. This tells whether the postprocessing and file writing of the data is done in a separate thread (0 sequencial, 1 threaded). Check that it is set to 1 if you acquire long real time measurements and/or use the storeinram option otherwise you risk to lose your data. TrimMode. Trims the detector and writes the trimfile. Mode can be:noise, beam, improve, fix, offline. Check that the start conditions are OK!!! TrimFile. Name of trimfile (without extension .snxx). Check that the start conditions are OK!!! FlatFieldEnabled. True when the flat field corrections are enabled. FlatFieldFileName. File containing the flat field corrections. RateCorrEnabled. True when the rate corrections are enabled. RateCorrDefault. True when using default rate corrections. RateCorrDeadTime. The dead time used for rate corrections. BadChannelsEnabled. True when the the bad channels corrections are enabled. BadChannelsFileName. File containing the definition of the bad channels. AngConvEnabled. True when the the angular conversion is enabled. AngConvFileName. File containing the definition of the angular conversion coefficients. GlobalOffset. The fixed angular offset of your encoder - should be almost constant! FineOffset. A possible angualr offset of your setup - should be small but can be senseful to modify. BinSize. The binning size of the angular conversion. Positions. The number of positions at which the detector is moved during the acquisition and their values. String format: np [pos0 pos1...posnp] ModuleSerialNumber. The module serial number. (READ only) ModuleFirmwareVersion. The module firmware version. (READ only) DetectorSerialNumber. The detector serial number (MAC address). (READ only) DetectorFirmwareVersion. The detector firmware version. (READ only) DetectorSoftwareVersion. The detector software version. (READ only) MythenSoftwareVersion. The mythen software version. (READ only) DigitalTestResult. Result of the Digital Test. 0 means success. (READ only) BusTestResult. Result of the Bus Test. 0 means success. (READ only) Data. Last image data. 18.1.5 Client examples The following client (mythen client.py) can be used to setup the detector and acquire data. See 18.1.6 for an example of the necessary steps. #!/usr/bin/env python from PyTango import * import sys import time def usage(): print "Usage:" print print print print print print print print print print print print print print print print print print print print print print print " " " " " " " " " " " " " " " " " " " " " " " ’mythen_client.py’ -> to get information and status" ’mythen_client.py help’ -> prints this help" ’mythen_client.py status’ -> Gets the detector status" ’mythen_client.py trimdir <dirname>’ -> Sets the directory containing" trimbit files" ’mythen_client.py caldir <dirname>’ -> Sets the directory containig" calibration files" ’mythen_client.py outdir <dirname>’ -> Sets the directory to which data" files will be written" ’mythen_client.py fname <filename>’ -> Sets the root for output file names" ’mythen_client.py index <index>’ -> Sets the index of the output file" ’mythen_client.py settings <standard|fast|highgain>’ -> Detector settings" ’mythen_client.py threshold <threshold>’ -> Sets the detector thresholds (eV)" ’mythen_client.py exptime <exptime>’ -> Sets the exposure time (s)" ’mythen_client.py frames <framenumber>’ -> Sets the number of frames to be" acquired" ’mythen_client.py start’ -> Starts the acquisition" ’mythen_client.py frame’ -> Downloads a single frame from the detector" ’mythen_client.py data’ -> Downloads all available data from the detector" ’mythen_client.py flatfield [filename]’ -> Sets flatfield corrections" (use empty filename to disable corrections)" ’mythen_client.py ratecorr <deadtime>’ -> Sets rate corrections (ns)" (use -1 for defaule corrections, 0 to disable corrections)" def refresh(mythendet): """The refresh function is used to refresh all the attributs""" mythendet.Refresh() def get_hostname(mythendet): """The get_hostname function is used to read the hostname.""" print mythendet.get_property("hostname") def get_port(mythendet): """The get_port function is used to read the port.""" print mythendet.get_property("port") def get_det_id(mythendet): """The get_det_id function is used to read the detector ID.""" print mythendet.get_property("detectorId") def get_trimdir(mythendet): """The get_trimdir function is used to read the trimbit file directory.""" print "Trimdir: " + mythendet.read_attribute("TrimDir").value def set_trimdir(mythendet, trimdir): """The set_trimdir function is used to set the trimbit file directory.""" mythendet.write_attribute("TrimDir", trimdir) get_trimdir(mythendet) def get_caldir(mythendet): """The get_caldir function is used to read the calibration file directory.""" print "Caldir: " + mythendet.read_attribute("CalibrationDir").value def set_caldir(mythendet, caldir): """The set_caldir function is used to set the calibration file directory.""" mythendet.write_attribute("CalibrationDir", caldir) get_caldir(mythendet) def get_outdir(mythendet): """The get_outdir function is used to read the output file directory.""" print "Outdir: " + mythendet.read_attribute("OutDir").value def set_outdir(mythendet, outdir): """The set_outdir function is used to set the output file directory.""" mythendet.write_attribute("OutDir", outdir) get_outdir(mythendet) def get_outfile(mythendet): """The get_outfile function is used to read the output file name.""" print "Fname: " + mythendet.read_attribute("OutFileName").value def set_outfile(mythendet, outfile): """The set_outfile function is used to set the output file name.""" mythendet.write_attribute("OutFileName", outfile) get_outfile(mythendet) def get_outfileidx(mythendet): """The get_outfileidx function is used to read the output file index.""" print "Index: %d" % mythendet.read_attribute("OutFileIndex").value def set_outfileidx(mythendet, index): """The set_outfile function is used to set the output file name.""" mythendet.write_attribute("OutFileIndex", int(index)) get_outfileidx(mythendet) def get_settings(mythendet): """The get_settings function is used to read the detector settings.""" print "Settings: %s" % mythendet.read_attribute("Settings").value def set_settings(mythendet, settings): """The set_settings function is used to set the detector settings.""" mythendet.write_attribute("Settings", settings) get_settings(mythendet) def get_threshold(mythendet): """The get_threshold function is used to read the detector thresholds.""" print "Threshold: %d (eV)" % mythendet.read_attribute("Threshold").value def set_threshold(mythendet, thr): """The set_threshold function is used to set the detector thresholds.""" mythendet.write_attribute("Threshold", int(thr)) get_threshold(mythendet) def get_exptime(mythendet): """The get_exptime function is used to read the exposure time.""" print "ExpTime: %f (s)" % mythendet.read_attribute("ExposureTime").value def set_exptime(mythendet, exptime): """The set_exptime function is used to set the exposure time.""" mythendet.write_attribute("ExposureTime", float(exptime)) get_exptime(mythendet) def get_frames(mythendet): """The get_frames function is used to read the number of frames.""" print "Frames: %d" % mythendet.read_attribute("FramesPerCycle").value def set_frames(mythendet, frames): """The set_frames function is used to set the number of frames.""" mythendet.write_attribute("FramesPerCycle", int(frames)) get_frames(mythendet) def start_acquisition(mythendet): """The start_acquisition function is used to start the acquisition.""" mythendet.StartAcquisition() print "Acquisition started" def get_frame(mythendet): """The get_frame function is used to download a single frame from the detector.""" mythendet.GetFrame() print "Got one frame from detector" def get_data(mythendet): """The get_data function is used to download data from the detector.""" mythendet.GetData() print "Got data from detector" def get_flatfield(mythendet): """The get_flatfield function is used to get flatfield corrections.""" if (mythendet.read_attribute("FlatFieldEnabled").value): print "Flatfield: " + mythendet.read_attribute("FlatFieldFileName").value else: print "Flatfield: (disabled)" def set_flatfield(mythendet, fname): """The set_flatfield function is used to set flatfield corrections.""" if (fname==""): mythendet.write_attribute("FlatFieldEnabled", False) else: mythendet.write_attribute("FlatFieldEnabled", True) mythendet.write_attribute("FlatFieldFileName", fname) get_flatfield(mythendet) def get_ratecorr(mythendet): """The get_ratecorr function is used to get rate corrections (ns).""" if (not mythendet.read_attribute("RateCorrEnabled").value): print "Ratecorr: (disabled)" elif (mythendet.read_attribute("RateCorrDefault").value): print "Ratecorr: %f (default)" % float(mythendet.read_attribute("RateCorrDeadTime"). else: print "Ratecorr: %f (ns)" % float(mythendet.read_attribute("RateCorrDeadTime").value def set_ratecorr(mythendet, deadtime): """The set_ratecorr function is used to set rate corrections (ns).""" dtime = float(deadtime) if (dtime==-1): mythendet.write_attribute("RateCorrEnabled", True) mythendet.write_attribute("RateCorrDefault", True) elif (dtime==0): mythendet.write_attribute("RateCorrEnabled", False) else: mythendet.write_attribute("RateCorrEnabled", True) mythendet.write_attribute("RateCorrDefault", False) mythendet.write_attribute("RateCorrDeadTime", dtime) get_ratecorr(mythendet) def get_status(mythendet): """The get_state function is used to read the status.""" print mythendet.Status() # # main # try : mythendet = DeviceProxy( "//haspp0xtdot:10000/test/mythen/exp.01") if (len(sys.argv)==1): refresh(mythendet) get_hostname(mythendet) get_port(mythendet) get_det_id(mythendet) get_trimdir(mythendet) get_caldir(mythendet) get_outdir(mythendet) get_outfile(mythendet) get_outfileidx(mythendet) get_settings(mythendet) get_threshold(mythendet) get_exptime(mythendet) get_frames(mythendet) get_flatfield(mythendet) get_ratecorr(mythendet) get_status(mythendet) print " " print "Run ’mythen_client.py help’ to see program options" print " " else: if (sys.argv[1]=="help"): usage() elif (sys.argv[1] == "trimdir" and len(sys.argv)>2): set_trimdir(mythendet, sys.argv[2]) elif (sys.argv[1] == "caldir" and len(sys.argv)>2): set_caldir(mythendet, sys.argv[2]) elif (sys.argv[1] == "outdir" and len(sys.argv)>2): set_outdir(mythendet, sys.argv[2]) elif (sys.argv[1] == "fname" and len(sys.argv)>2): set_outfile(mythendet, sys.argv[2]) elif (sys.argv[1] == "index" and len(sys.argv)>2): set_outfileidx(mythendet, sys.argv[2]) elif (sys.argv[1] == "settings" and len(sys.argv)>2): set_settings(mythendet, sys.argv[2]) elif (sys.argv[1] == "threshold" and len(sys.argv)>2): set_threshold(mythendet, sys.argv[2]) elif (sys.argv[1] == "exptime" and len(sys.argv)>2): set_exptime(mythendet, sys.argv[2]) elif (sys.argv[1] == "frames" and len(sys.argv)>2): set_frames(mythendet, sys.argv[2]) elif (sys.argv[1] == "start"): start_acquisition(mythendet) elif (sys.argv[1] == "frame"): get_frame(mythendet) elif (sys.argv[1] == "data"): get_data(mythendet) elif (sys.argv[1] == "flatfield"): if (len(sys.argv)>2): set_flatfield(mythendet, sys.argv[2]) else: set_flatfield(mythendet, "") elif (sys.argv[1] == "ratecorr" and len(sys.argv)>2): set_ratecorr(mythendet, sys.argv[2]) elif (sys.argv[1] == "status"): get_status(mythendet) else: usage() except Exception, inst : print "Failed with exception !" print sys.exc_info()[0] print type(inst) # the exception instance print inst.args # arguments stored in .args 18.1.6 How to ... Mandatory setup The directories where the default trimbits and calibration files can be found must be set-up: mythen_client.py trimdir /scratch/trimbits mythen_client.py caldir /scratch/calibration Acquisition setup You will need to setup first the output file directory, name and index: mythen_client.py outdir /scratch mythen_client.py fname run mythen_client.py index 0 in this way the output files will be /scratch/run i.dat, where i starts from 0 and is automatically incremented. You will then need to setup detector thresholds and settings, exposure time, the number of real time frames and how many real time frames should be acquired: mythen_client.py mythen_client.py mythen_client.py mythen_client.py settings standard threshold 6000 exptime 1 frames 10 Acquisition The acquisition can be started with mythen_client.py start You can check that the status of the detector with mythen_client.py status “running” means that it is taking data, “idle” that the acquisition is finished. The data will be automatically downloaded to the chosen path. Should this not be done for whatever reason, you can use mythen_client.py frame to download a single frame, or mythen_client.py data to download all the available data. Data processing Flat field and rate corrections can be applied simply by running mythen_client.py flatfield myflatfield.raw mythen_client.py ratecorr -1 # default values Merging of frames to a single image If you want the acquired frames to be merged in a single image, you will have to set the following attributes: EnableMerge: true. (Default value: false.) MergeDir (the directory where raw files, logs and so on will be moved. Raw files will be moved here also when not merged.) MinFrames (frames will be merged only if their number is larger than this MinFrames, otherwise they will be just moved to MergeDir. Default value is 0, which means that frames will be always merged.) If you don’t want the frames to be moved to MergeDir, you will have to set EnableMerge to false (i.e. the default value). 18.2 MythenRoIs pogo_html_docu/MythenRoIs/index.html See pogo generated info for more details. Tango class communicating with a PiLC Tango device for permorfing an intensity normalization. 18.2.1 Properties pogo_html_docu/MythenRoIs/Properties.html See pogo generated info for more details. 18.2.2 States pogo_html_docu/MythenRoIs/States.html See pogo generated info for more details. 18.2.3 Commands pogo_html_docu/MythenRoIs/Commands.html See pogo generated info for more details. 18.2.4 Attributes pogo_html_docu/MythenRoIs/Attributes.html See pogo generated info for more details. Chapter 19 Camera Servers 19.1 Introduction It implements a camera, with the possibility of saving images to files. 19.2 AndorCamera pogo_html_docu/AndorCamera/index.html See pogo generated info for more details.. 19.2.1 Properties pogo_html_docu/AndorCamera/Properties.html See pogo generated info for more details. 19.2.2 States pogo_html_docu/AndorCamera/States.html See pogo generated info for more details. 19.2.3 Commands pogo_html_docu/AndorCamera/Commands.html See pogo generated info for more details. 19.2.4 Attributes pogo_html_docu/AndorCamera/Attributes.html See pogo generated info for more details. 19.3 Roper Scientific Quadro Camera Tango Server for Roper Scientific Cameras using the PVCAM 2.7 software. pogo_html_docu/CCDPVCAM/index.html See pogo generated info for more details. 19.3.1 Properties pogo_html_docu/CCDPVCAM/Properties.html See pogo generated info for more details. CamNum. It can run from 0 to total cams-1, with total cams the number of cameras connected to the computer. It is used for getting the name of the camera to be open. MaxPLength. Maximum length of the images in the parallel direction. MaxSLength. Maximum length of the images in the serial direction. 198 19.3.2 States pogo_html_docu/CCDPVCAM/States.html See pogo generated info for more details. FAULT. Any error in the comunication with the camera or in Tango Server. OPEN. The comunication to the camera has been stablished. RUNNING. The camera is taking images. 19.3.3 Commands pogo_html_docu/CCDPVCAM/Commands.html See pogo generated info for more details. StartContinuousAcq. Triggers the acquisition of NbFrames images in continuous mode. Data is stored in a circular buffer, without being overwritten before a frame is retrived by the application. StartFocusAcq. Triggers the acquisition of NbFrames images in focus mode. Data is stored in a circular buffer being overwritten even if the application has not retrived any frame. StartStandardAcq. Triggers the acquisition of NbFrames images in a standard way (all the acquired frames are readout). State. Tango default State command. Status. Tango default Status command. StopAcquisition. Stops the acquisition of images. 19.3.4 Scalar Attributes pogo_html_docu/CCDPVCAM/Attributes.html See pogo generated info for more details. CamName. Name of the camera (readout). FileComment. Comment written in the header of the saved binary files. ExposureMode. Exposure mode set at the start of the acquisition. ExposureModeName. Exposure mode in text. ExposureTime. Exposure time set at the start of the acquisition in s. ErrorMessage. Display error from the camera. FileDir. Path where the image files are written. FilePrefix. The prefix of the image files to be created. The full image file name will be composed as FilePrefixFileStartNumber.postfix, with postfix bin or tif. FileStartNum. The file number used when storing an image file. After saving a file, this number gets increased by one. To override an image file, the file number has to be set again. Gain. Read/Write camera gain. ImageCounter. Number of images taken. ImageFormat. Fixed to UShort (implemeted because it is used by ATK). LastPLength. Length in the parallel direction of the last readout frame. LastSLength. Length in the serial direction of the last readout frame. NbFrames. Number of frames to be taken when the acquisiotion is started. ROIs1. Serial coordinate of the point closest to the serial register readout defining the rectangular exposition area on the CCD. ROIs2. Serial coordinate of the point furthest to the serial register readout defining the rectangular exposition area on the CCD. ROIp1. Parallel coordinate of the point closest to the serial register readout defining the rectangular exposition area on the CCD. ROIp2. Parallel coordinate of the point furthest to the serial register readout defining the rectangular exposition area on the CCD. ROIpbin. Number of bins in the parallel direction. ROIsbin. Number of bins in the serial direction. Temperature. Temperature of the camera. TemperatureSetPoint. Temperature set to the camera. UseFullFrame. If set to 1 the full CCD area is readout. The attributes defining the exposition area are not taken into account. WriteDataToBinary. If set to 1 readout frames are written into binary files. The header of the binary file contains the temperature and the length of the frame (see in Client examples a program for retriving the information). . WriteDataToTiff. If set to 1 readout frames are written into tiff files. 19.3.5 Image Attributes pogo_html_docu/CCDPVCAM/Attributes.html See pogo generated info for more details. Bild. Readout image. 19.3.6 Client examples Simple cpp example showing how to get the header information and the raw image data from a saved binary file. #include <iostream> #include <stdio.h> #include <stdlib.h> using namespace std; int main () { FILE * pFile; float temperature; int result; long slength; long plength; long exposure_time; unsigned short *data; char *comment; pFile = fopen ( "bild1217326639-515160.bin" , "rb" ); if (pFile==NULL) {fputs ("File error",stderr); exit (1);} cout << "sizeof(float) " << sizeof(float) << endl; cout << "sizeof(long) " << sizeof(long) << endl; cout << "sizeof(unsigned short) " << sizeof(unsigned short) << endl; result = fread (&temperature,sizeof(float),1,pFile); cout << "Temperature : " << temperature << endl; result = fread (&slength,sizeof(long),1,pFile); cout << "sLength : " << slength << endl; result = fread (&plength,sizeof(long),1,pFile); cout << "pLength : " << plength << endl; result = fread (&exposure_time,sizeof(long),1,pFile); cout << "Exposure Time : " << exposure_time << endl; comment = (char*) malloc(sizeof(char)*200); result = fread (comment,sizeof(char),200,pFile); cout << "Comment : " << comment << endl; data = (unsigned short *) malloc(sizeof(unsigned short)*slength*plength); result = fread(data,sizeof(unsigned short),slength*plength,pFile); cout << " data[2] " << data[20] << " data[21] " << data[21] << " data[22] " << data[22] << fclose(pFile); return 0; } 19.3.7 How to ... Instructions from Michael Sprung, P10 The directory haspp10e2:/beamline/macros/ccdmacros/roseker contains instructions of how to use the camera and the necessary utility files. 19.4 ISGCamera pogo_html_docu/ISGCamera/index.html See pogo generated info for more details. Tango Server for controlling the XL camera from ISG. The software for the camera runs in a Linux PC and opens a socket for external connections. The Tango Server connects to this socket for controlling the camera. 19.4.1 Properties pogo_html_docu/ISGCamera/Properties.html See pogo generated info for more details. 19.4.2 States pogo_html_docu/ISGCamera/States.html See pogo generated info for more details. 19.4.3 Commands pogo_html_docu/ISGCamera/Commands.html See pogo generated info for more details. 19.4.4 Attributes pogo_html_docu/ISGCamera/Attributes.html See pogo generated info for more details. 19.5 LCXCamera Tango Server for controlling the LCX Camera from Roper Scientific. The software for the camera runs in a Windows PC. A perl server running in this PC allows the connection via socket from a Linux PC and sends the commands to the camera. The Server uses two classes: LCXCameraCtrl (Socket interface) and LCXCamera (the interface to the detector). The code of the LCXCamera class includes the LCXCameraCtrl class. Before starting the Tango Server, the windows program talking to the hardware and the perl server have to be running in the windows PC: • Start a sesion in the windows PC connected to the camera (haso052lcx in p10): rdesktop -a 16 -g 90% haso052lcx with the user lcxuser. • Start the windows program talking to the camera: C:\Program Files\PI Acton\WinView • Start the perl server (in a terminal with the perl prompt): perl> perl lcxserver.pl • Start the Tango Server in the Linux computer where it has been installed. 19.5.1 LCXCameraCtrl pogo_html_docu/LCXCameraCtrl/index.html See pogo generated info for more details. Class creating the socket connection and implementing the commands for writing and reading to the socket. Properties pogo_html_docu/LCXCameraCtrls/Properties.html See pogo generated info for more details. IpAddr. IP address. PortNb. Port number. SimulationMode. Not used. States pogo_html_docu/LCXCameraCtrl/States.html See pogo generated info for more details. FAULT. Problems creating the socket connection. ON. Socket connection succed. Commands pogo_html_docu/LCXCameraCtrl/Commands.html See pogo generated info for more details. CloseSocket. Close socket connection. Init. Initializes the device. Default Tango command. State. Returns the device state. Default Tango command. Status. It gets the device status. Default Tango command. WriteReadAdrPort. Sends command to the socket and returns an answer. Attributes pogo_html_docu/LCXCameraCtrl/Attributes.html See pogo generated info for more details. 19.5.2 LCXCamera pogo_html_docu/LCXCamera/index.html See pogo generated info for more details. Properties pogo_html_docu/LCXCamera/Properties.html See pogo generated info for more details. SocketDS. Name of the LCXCameraCtrl tango device making the socket connection. States pogo_html_docu/LCXCamera/States.html See pogo generated info for more details. FAULT. Not used. ON. Camera in idle state (read from the camera). RUNNING. Camera taken images (read from the camera). UNKNOWN. Tango Server not able to read the status from the camera. Commands pogo_html_docu/LCXCamera/Commands.html See pogo generated info for more details. Init. Initializes the Tango device. Default Tango command. bf Reset. Restores the connection and reinitializes LCXCameraCtrl and LCXCamera devices by executing the commands CloseSocket and Init from the LCXCameraCtrl and Init from the LCXCamera. StartAcquisition. Sends command to the camera for starting the acquisition. It throws an exception in case of error. State. Returns the device state read from the camera. Status. It gets the device status. Default Tango command. Attributes pogo_html_docu/LCXCamera/Attributes.html See pogo generated info for more details. DelayTime. Reads/Writes time between images during acquisition. ExposureTime. Reads/Writes exposure time. FileDir. Reads/Writes directory where the files will be stored. FilePrefix. Reads/Writes the first part of the name of the stored files. The full name will be: FilePrefix number.SPE. FileStartNum. Reads/Writes the file number used for the first stored image. After saving a file, this number gets increased by one. The full name will be: FilePrefix number.SPE. NbFrames. Reads/Writes the number of frames to be taken when the acquisition is started. 19.6 MarCCD pogo_html_docu/MarCCD/index.html See pogo generated info for more details. Tango class for controlling the MarCCD camera communicating via socket to the marccd program running in a linux PC connected to the detector. 19.6.1 Properties pogo_html_docu/MarCCD/Properties.html See pogo generated info for more details. Hostname. Name of the Linux PC where the marccd program is running. PortNb. Port number opened by the marccd program for communicating to clients. SimulationMode. Not used. 19.6.2 States pogo_html_docu/MarCCD/States.html See pogo generated info for more details. FAULT. Not able to connect to socket. MOVING. A command is running in the detector. ON. Idle state. 19.6.3 Commands pogo_html_docu/MarCCD/Commands.html See pogo generated info for more details. 19.6.4 Attributes pogo_html_docu/MarCCD/Attributes.html See pogo generated info for more details. 19.7 Pco Cameras Tango device server for cameras handled with the PCO software development kid. First developed on a Pco4000 camera, then on a Pco edge. See the user guide for a detailed server description: pogo_html_docu/Pco/index.html 19.7.1 Properties pogo_html_docu/Pco/Properties.html See pogo generated info for more details. 19.7.2 States pogo_html_docu/Pco/TangoDevStates.html See pogo generated info for more details. 19.7.3 Commands pogo_html_docu/Pco/DevCommands.html See pogo generated info for more details. 19.7.4 Attributes pogo_html_docu/Pco/Attributes.html See pogo generated info for more details. 19.7.5 Running with external trigger For running with external trigger the attribute TriggerMode has to be set to 3, and the Tango Server has to be in RUNNING state (by executing the command Live). 19.8 Prosilica Camera Tango Server for Prosilica Cameras. The camera can be open using the Ip address or host name. The Ip address is internally for the computer (in an ethernet board), the server has to run in any case in the computer where the camera is connected to. pogo_html_docu/ProsilicaCam/index.html See pogo generated info for more details. 19.8.1 Properties pogo_html_docu/ProsilicaCam/Properties.html See pogo generated info for more details. IpAddress. Ip address of the camera. It is used for opening the camera, alternatively the hostname can be given. XImageSize. Maximum image size in x direction. YImageSize. Maximum image size in y direction. 19.8.2 States pogo_html_docu/ProsilicaCam/States.html See pogo generated info for more details. RUNNING. The camera is taking images. FAULT. Any error in comunication with the camera or in the Tango Server. INIT. Camera API initialize. ON. Camera comunication open. 19.8.3 Commands pogo_html_docu/ProsilicaCam/Commands.html See pogo generated info for more details. CleanupCamera. Close the connection with the camera. DumpCameraSettings. Write current camera settings to ascii file. InitCamera. Open the connection with the camera. Get camera info. StartAcquisition. Calls InitCamera and start the acquisition of images. StartSingleAcquisition. Start the acquisition of an image and save it in tif format (independently of the value of the FileSaving attribute). It uses the same file names as StartAcquisition and increases the file counting attribute. State. Tango default State command. Status. Tango default Status command. StopAcquisition. Stops the acquisition of images. Calls CleanupCamera. 19.8.4 Scalar Attributes pogo_html_docu/ProsilicaCam/Attributes.html See pogo generated info for more details. ActivateBildOperations. If set to 0 not images in logarithmic scale or sqrt values is computed. 1 -¿ logarithmic scale, 2 -¿ sqrt, 3 -¿ both. AcquisitionMode. Reads/writes from the camera de acquisition mode: 0 - Continuous, 1 - SingleFrame, 2 MultiFrame, 3 - Recorder. AutoGain. Reads/writes from the camera the gain mode: 0 manual. AutoWhiteBalance. Reads/writes from the camera the white balance mode value: 0 Manual, 1 Auto, 2 AutoOnce. BinningX. Reads/writes the horizontal binning. 1 = no binning. BinningY. Reads/writes the vertical binning. 1 = no binning. BitsPixel. Reads the number of bits per pixel in the sensor. BitsPixelMax. Reads the number of bits per pixel in the sensor (same as BitsPixel). BlueBalance. Reads/writes from the camera the blue channel gain, as percent, relative to green channel. Exposure. Reads/writes the exposure time in microseconds. ExposureMode. Reads/writes from the camera the exposure mode value: 0 Manual, 1 Auto, 2 AutoOnce. FileDir. Path to the camera image files. FilePrefix. The prefix of the image files to be created. The full image file name will be composed as prefix number.postfix. The format of the written file depends on this attribute: .bin - binary, .png - png format, .tif - tiff format, .bmp bmp format. Only these three formats are supported when acquiring images. The binary format have a header with the time of the acquisition (see below an example for extracting it). FileSaving. Save a file for every image taken when true. FileStartNum. The file number used when storing an image file. After saving a file, this number gets increased by one. To override an image file, the file number has to be set again. FirmwareVersion. Reads the version of the camera. FlagDebugMode. Set to 1 for printing out some debug information. Only valid if not running in batch mode. FrameRate. Reads/writes from the camera the frame rate. FrecuencySaveFile. Frecuency for saving files. If 1, all files will be saved. Gain. Reads/writes from the camera the gain value. ImageCounter. Number of images taken. ImageEnc. Image in encoded type (format set to RawImage in pogo, so that it is seen as an image attribute and not scalar). ImageFormat. Reads/write from the image for the image format (The same as PixelFormat but returning a string. Implemeted because it is used by ATK). InfoAccess. Reads parameter Access from the camera info. InfoCameraId. Reads parameter CameraId from the camera info. InfoInterfaceId. Reads parameter InterfaceId from the camera info. InfoInterfaceType. Reads parameter InterfaceType from the camera info. InfoPartNumber. Reads parameter PartNumber (an element of the Prosilica seriel number) from the camera info. InfoPartVersion. Reads parameter PartVersion (an element of the Prosilica seriel number) from the camera info. MinHeight. Reads from the camera de minimum value of the height. MinWidth. Reads from the camera de minimum value of the width. MaxBinningX. Reads from the camera de maximum value of the binning in x. MaxBinningY. Reads from the camera de maximum value of the binning in Y. MinBinningX. Reads from the camera de minimum value of the binning in x. MinBinningY. Reads from the camera de minimum value of the binning in Y. MaxHeight. Reads from the camera de maximum value of the height. MaxWidth. Reads from the camera de maximum value of the width. PacketSize. Reads/writes size of image data packet. PixelFormat. Reads/writes from the camera de pixel format: 0 - ”Mono8”, 1 -”Mono16”, 2 -”Bayer8”, 3 ”Bayer16”, 4 - ”Rgb24”, 5 - ”Rgb48”, 6 - ”Yuv411”, 7 - ”Yuv422”, 8 - ”Yuv444”. RedBalance. Reads/writes from the camera the red channel gain, as percent, relative to green channel. RegionX. Reads/writes the start of region readout in pixels, left edge. RegionXWidth. Reads/writes the width of the image. RegionY. Reads/writes the start of region readout in pixels, top edge. RegionYHeigth. Reads/writes the height of the image. SensorHeight. Maximum height of sensor. SensorType. Reads the sensor type (values are Mono or Bayer). SensorWidth. Maximum width of sensor. StepBinningX. Reads from the camera de minimum value of the binning in x (same as MinBinningX). StepBinningY. Reads from the camera de minimum value of the binning in y (same as MinBinningY). StreamBytesPerSec. Reads/writes the bandwidth of image data, in bytes per second. TotalBytesPerFrame. Reads/writes the number of bytes per image. TriggerMode. Reads/writes from the camera the trigger mode: 0 Freerun, 1 SyncIn1, 2 SyncIn2, 3 SyncIn3, 4 SyncIn4, 5 FixedRate, 6 Software. The attribrutes for reading and/or writting camera settings are not described here. 19.8.5 Image Attributes pogo_html_docu/ProsilicaCam/Attributes.html See pogo generated info for more details. Bild. Not in use. Bild log. Attribute containing the image in logarithmic scale. Only filled if ActivateBildOperations is set to 1 or 3. Bild sqrt. Attribute containing the sqrt values of the image. Only filled if ActivateBildOperations is set to 2 or 3. Bild uchar. Attribute containing the image in case the camera pixel format has 1 byte per pixel (modes Mono8 and Bayer8). Bild ucharB. Attribute containing the image information for the blue pixels (mode Bayer8). Bild ucharG. Attribute containing the image information for the green pixels (mode Bayer8). Bild ucharR. Attribute containing the image information for the red pixels (mode Bayer8). Bild ushort. Attribute containing the image in case the camera pixel format has 2 bytes per pixel (modes Mono16, Bayer16, Yuv411 and Yuv422) Bild ulong. Attribute containing the image in any other case. 19.8.6 Client examples Simple python example to start image taking. from PyTango import * import sys import time try : t1 = DeviceProxy( "exp/gc655c/cam1") status = t1.command_inout("StartAcquisition") except : print "Failed to start acquisition !" print sys.exc_info()[0] Simple python example to stop image taking. from PyTango import * import sys import time try : t1 = DeviceProxy( "test/gc655c/cam1") t1.command_inout("StopAcquisition") except : print "Failed to stop data acquisition !" print sys.exc_info()[0] Simple cpp example to start and stop acquisition. /* * example of a client using the TANGO C++ api. */ #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { unsigned long temp; long out; int nb_read; // // create a connection to a TANGO attribute // DeviceProxy *camera = new DeviceProxy("test/gc1280m/cam1"); camera->command_inout("StartAcquisition"); AttributeProxy *attribute1 = new AttributeProxy( "test/gc1280m/cam1/WriteFramesToBinaryFil DeviceAttribute write_value1; out = 1; write_value1 << out; attribute1->write(write_value1); // usleep(300000); sleep(10); camera->command_inout("StopAcquisition"); } Simple cpp example to change Exposure time. /* * example of a client using the TANGO C++ api. */ #include <iostream> #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { long exposure_time; // // create a connection to a TANGO attribute // DeviceProxy *camera = new DeviceProxy("test/gc1280m/cam1"); camera->command_inout("InitCamera"); std::cout << "Introduce new exposure time (us):" << endl; std::cin >> exposure_time; AttributeProxy *attribute = new AttributeProxy( "test/gc1280m/cam1/Exposure"); DeviceAttribute write_value; write_value << exposure_time; attribute->write(write_value); camera->command_inout("CleanupCamera"); } Simple example how to read the date of the acquisition (in sec) from binary files. /* * example of a client using the TANGO C++ api. */ using namespace std; int main () { FILE * pFile; int result; char fecha[25]; pFile = fopen ( "test_00001.bin" , "rb" ); if (pFile==NULL) {fputs ("File error",stderr); exit (1);} result = fread (fecha,sizeof(char),25,pFile); cout << "Time : " << fecha << endl; fclose(pFile); return 0; } 19.8.7 How to ... ... take images Execute the command StartAcquisition. If you want to write the data into a file set the attribute FileSaving to 1, during or before starting the acquisition (set back to 0 for stopping writting). The file will be written in binary, png or tif format depeding on what is written in the attribute FilePostfix (.bin, .png or .tif). The files will be written in the directory FileDir, with a name given fbu FilePrefix followed by a number that is initialized to the value given in FileStartNum. The command StartAcquisition can not be performed if the Live Viewer is taking images. ... stop taking images Execute the command StopAcquisition. ... write/read a camera parameter The camera parameters are represented by Tango attributes. For reading or writting any value, the connection to the camera has to be open. If the server is in RUNNING state (camera is taking images) it would be enough to read or write the corresponding attribute. However many of the parameters are not allowed to be accessed during the image taking. If the server is in ON state: Execute InitCamera, for openning the connection. Read/Write the corresponding tango attribute. Execute CleanupCamera, for closing the connection to the camera. ... see the image with Taurus Image GUI Type in an xterm: taurusimage tango/attribute/image/name with name: Bild uchar for 8 bits images. Bild ushort for 16 bits images. Bild log for image in log scale. Bild sqrt for image in sqrt values. 19.9 Photonic Science Camera (Gemstar X-ray) Tango Server for the Gemstar X-ray CCD Camera from Photonic Science Camera. The Tango Server runs in Linux and connects via socket to the windows PC controlling the camera. pogo_html_docu/PSCamera/index.html See pogo generated info for more details. 19.9.1 Properties pogo_html_docu/PSCamera/Properties.html See pogo generated info for more details. IPAdress. IP Adress of the windows PC connected to the camera. PortNb. Port number. 19.9.2 States pogo_html_docu/PSCamera/States.html See pogo generated info for more details. ON. Default state. 19.9.3 Commands pogo_html_docu/PSCamera/Commands.html See pogo generated info for more details. AbortSnap. Aborts previous Snap command. Close. Sends command Close to the camera. Open. Sends command Open to the camera. Reset. Resets the camera. Save. Saves a picture in a file in the windows PC. SetCompress. Enables (argument 1) or disables (argument 0) the compression (using zlib) of the datareturned by GetImage. Snap. Takes a picture. SnapAndSave2. Snaps an image then, starts a parallel thread to post-process andsaves the image using the path: ’FileDirectory’ ’FilePrefix’+’FileRefNumber’+’.’+’FileFormat’ StartAcquisition. Starts the acquisition threads. NumberOfImages images are taken and saved in intervals of DeltaTime ms. State. Sets the state to RUNNING if the acquisition thread is running, ON in other case. Status. Tango default Status command. 19.9.4 Scalar Attributes pogo_html_docu/PSCamera/Attributes.html See pogo generated info for more details. DeltaTime. Time between SnapAndSave actions in the acquisition thread (in ms). ExposureTime. Reads/Writes exposure time in s. FileDirectory. Reads/Writes directory where the files will be save. FileFormat. Reads/Writes file format. File name will be: ’FilePrefix’+’FileRefNumber’+’.’+’FileFormat’. FilePrefix. Reads/Writes file name prefix. File name will be: ’FilePrefix’+’FileRefNumber’+’.’+’FileFormat’. FileRefNumber. Reads/Writes file name reference number. File name will be: ’FilePrefix’+’FileRefNumber’+’.’+’FileFormat’. FileSuffix. Reads/Writes file suffix. Not used. NumberOfImages. Number of images taken and saved in the acquisition thread. SubAreaBottom. Reads/Writes bottom coordinate of the subarea. SubAreaLeft. Reads/Writes left coordinate of the subarea. SubAreaRight. Reads/Writes right coordinate of the subarea. SubAreaTop. Reads/Writes top coordinate of the subarea. XBinning. Reads/Writes binning in horizontal direccion. YBinning. Reads/Writes binning in vertical direccion. 19.9.5 Image Attributes pogo_html_docu/PSCamera/Attributes.html See pogo generated info for more details. Image. Image. 19.10 Photonic Science Camera (X-ray Imager VHR) Tango Server for the X-ray Imager VHR CCD Camera from Photonic Science Camera. The Tango Server runs in Linux and connects via socket to the windows PC controlling the camera. This camera is composed by 4 quadrants, the attributes of any of them can be set separately. The Tango Attributes set the values to the 4 quadrants, and read the values from the first one, assuming that it is the same for all of them. pogo_html_docu/PSCameraVHR/index.html See pogo generated info for more details. 19.10.1 Properties pogo_html_docu/PSCameraVHR/Properties.html See pogo generated info for more details. IPAdress. IP Adress of the windows PC connected to the camera. PortNb. Port number. 19.10.2 States pogo_html_docu/PSCameraVHR/States.html See pogo generated info for more details. ON. Default state. 19.10.3 Commands pogo_html_docu/PSCameraVHR/Commands.html See pogo generated info for more details. AbortSnap. Aborts previous Snap command. Close. Sends command Close to the camera. Open. Sends command Open to the camera. Reset. Resets the camera. Save. Saves a picture in a file in the windows PC. Snap. Takes a picture. StartAcquisition. Starts the acquisition threads. NumberOfImages images are taken and saved in intervals of DeltaTime ms. State. Sets the state to RUNNING if the acquisition thread is running, ON in other case. Status. Tango default Status command. 19.10.4 Scalar Attributes pogo_html_docu/PSCameraVHR/Attributes.html See pogo generated info for more details. DeltaTime. Time between status readouts from the camera after starting an image acquisiton in the Acquisition thread (in ms). ExposureTime. Reads/Writes exposure time in s. FileDirectory. Writes directory where the files will be save. Reads last set value. Only after taking an image the set directory will be seen in FilePath. FilePath. Reads the complete path where the last taken picture was saved. It is composed from the last set ´ values: ’FileDirectory’FilePrefix”FileRefNumber’.’FileSufix’. FilePrefix. Writes file prefix. Reads last set value. Only after taking an image the set directory will be seen in FilePath. FileRefNumber. Writes file number. Reads last set value. Only after taking an image the set directory will be seen in FilePath. FileSuffix. Writes file sufix. Reads last set value. Only after taking an image the set directory will be seen in FilePath. NumberOfImages. Number of images taken and saved in the acquisition thread. XBinning. Reads/Writes binning in horizontal direccion. YBinning. Reads/Writes binning in vertical direccion. 19.10.5 Image Attributes pogo_html_docu/PSCameraVHR/Attributes.html See pogo generated info for more details. Image. Image. 19.11 Lambda Cameras See the user guide for a detailed server description: pogo_html_docu/Lambda/index.html 19.11.1 Properties pogo_html_docu/Lambda/Properties.html See pogo generated info for more details. 19.11.2 States pogo_html_docu/Lambda/States.html See pogo generated info for more details. 19.11.3 Commands pogo_html_docu/Lambda/Commands.html See pogo generated info for more details. 19.11.4 Attributes pogo_html_docu/Lambda/Attributes.html See pogo generated info for more details. 19.12 Gotthard Cameras See the user guide for a detailed server description: pogo_html_docu/Gotthard/index.html 19.12.1 Properties pogo_html_docu/Gotthard/Properties.html See pogo generated info for more details. 19.12.2 States pogo_html_docu/Gotthard/States.html See pogo generated info for more details. 19.12.3 Commands pogo_html_docu/Gotthard/Commands.html See pogo generated info for more details. 19.12.4 Attributes pogo_html_docu/Gotthard/Attributes.html See pogo generated info for more details. Chapter 20 Detectors in Lima 20.1 Introduction Lima is a Library for IMage Acquisition developed at ESRF. The Lima framework allows the control from different detectors as well as some features like calculations using common Tango devices. These Tango devices are, among other possible, clients of the Lima library. They can be written in c++ or python (in this case a Lima sip module is used). The use of the Lima framework for a given detector requires the implementation of its specific plugin into the library and of a specific Tango class for its configuration. A Lima Tango proccess for a detector consists of the common devices as well as the specific detector device. In http://lima.blissgarden.org/applications/tango/doc/index.html a description of the Lima Tango classes developed at ESRF can be found. 20.2 Andor Provided by ESRF (in python). Installed and configured by FS-EC (DESY). It runs only in 64 bit computers. Description in: http://lima.blissgarden.org/applications/tango/doc/andor.html 20.3 Maxipix Provided, installed and configured by ESRF. Description in: http://lima.blissgarden.org/applications/tango/doc/maxipix.html 20.4 Mythen Lima plugin and specific configuration class developed at DESY. Only the Mythen configuration device is described here. 20.4.1 Properties Hostname The detector hostname (or IP address). No default value. Port The detector port. Default value: 1952. DetectorId The detector ID. Default value: 0. 20.4.2 Commands getAttrStringValueList. Not used. getFloatParameter. Gets the value of the parameter given as argument. It has to be in the list returned by the getFloatParameterList command. 214 getFloatParameterList. Returns a list of parameters that are available for being read/write by the get/setFloatParameter commands. getIntParameter. Gets the value of the parameter given as argument. It has to be in the list returned by the getIntParameterList command. getIntParameterList. Returns a list of parameters that are available for being read/write by the get/setIntParameter commands. getStringParameter. Gets the value of the parameter given as argument. It has to be in the list returned by the getStringParameterList command. getStringParameterList. Returns a list of parameters that are available for being read/write by the get/setStringParameter commands. Refresh. Reads all values and configurations, and updates the values shown to the user. setFloatParameter. Sets a new value to the parameter given as argument. It has to be in the list returned by the getFloatParameterList command. setIntParameter. Sets a new value to the parameter given as argument. It has to be in the list returned by the getIntParameterList command. setStringParameter. Sets a new value to the parameter given as argument. It has to be in the list returned by the getStringParameterList command. 20.4.3 Scalar Attributes Positions. The number of positions at which the detector is moved during the acquisition and their values. String format: np [pos0 pos1...posnp]. TrimEnergies. The number of energies for which trimbit files exist and their value. String format: nen [e0 e1...en]. Threshold. Detector threshold in eV. Should be half of the beam energy. It is precise only if the detector is calibrated. 20.5 Pilatus Provided by ESRF (in python) and Soleil (in cpp). Installed and configured by FS-EC (DESY). Description of the python device in: http://lima.blissgarden.org/applications/tango/doc/pilatus.html 20.6 Prosilica Provided by ESRF (in python). Installed and configured by FS-EC (DESY). Description in: http://lima.blissgarden.org/applications/tango/doc/prosilica.html 20.7 RoperScientific Lima plugin and specific configuration class developed at DESY. Only the specific configuration device is described here. 20.7.1 Properties cam num. It can run from 0 to total cams-1, with total cams the number of cameras connected to the computer. It is used for getting the name of the camera to be open. 20.7.2 Commands getAttrStringValue. Not used. 20.7.3 Scalar Attributes Gain. Reads/Writes camera gain. InternalAcqMode. Reads/Writes acquisition mode: STANDARD, CONTINUOS or FOCUS. Temperature. Temperature of the camera. TemperatureSetPoint. Temperature set to the camera. UseFullFrame. If set to 1 the full CCD area is readout. The attributes defining the exposition area are not taken into account. 20.8 Pco Lima Pco Module for supporting Pco detector in DESY Described in: http://lima.blissgarden.org/camera/pco/doc/pco.html 20.8.1 Image Acquistion • Attributes configuration Please configure the following attributes before starting image acquisition Attribute acq mode acq nb frames acq trigger mode acq expo time saving mode saving directory saving format saving prefix saving suffix saving overwrite policy Description Single:default mode one frame per image Concatenation : frames are concatenated in image Accumulation : powerful mode to avoid saturation of the pixel, the exposure is shared by multiple frames Number of frames to be acquired, Default is 1 frame Internal trigger : the software trigger,start the acquisition immediately after an acqStart() call, all the acq nb frames are acquired in an sequence External trigger : wait for an external trigger signal to start the an acquisition for the acq nb frames number of frames External trigger multi : as the previous mode except that each frames need a new trigger input (e.g. for 4 frames 4 pulses are waiting for) Internal trigger multi : as for internal trigger except that for each frame the acqStart() has to called once External gate : wait for a gate signal for each frame,the gate period is the exposure time External start stop The exposure time of the image, Default is 1 second Manual : This is not supported in current version Auto Frame : rames are automatically saved according the saving parameters Auto header : Frames are only saved when the setImageHeader() is called in order to set header information with image data The directory where to save the image files Raw : save in binary format Edf : save in ESRF data format The image file prefix The image file suffix. Please configure the saving format attribute, then this attribute will be automatically adjusted In case of existing files an overwite policy is mandatory: Abort : if the file exists, the saving is aborted Overwrite : if the file exists, it is overwritten Append : if the file exists, it is appended to the file • Start Acquisition when all the attributes are configured,run the following commands for doing the image acquisition. 1.prepareAcq 2.StartAcq 20.8.2 Online Visualization • Attributes Configuration Attribute video live video last image Description True : Enable online Visualization False : Disable online visualization When the video live is true, The realtime image data can be accessed by reading this attribute • Start Visualzation After the attribute ”video live” is setted to be true. The Pco Tango server is able to provide realtime image data.In order to visualize this data, an external application need to be used. We use taurus for this purpose. The instruction on how to use taurusimage for visualizing the image can be seen in: http://hasyweb.desy.de/services/computing/Spock/node53.html If the url is invalid, please go to http://hasyweb.desy.de/services/computing/Spock/Spock.html, then search ’taurusimage’. Chapter 21 Communication 21.1 ADS (Beckhoff) Tango Server Beckhoff PLCs using the ADS protocaol. pogo_html_docu/Ads/Description.html See pogo generated info for more details. 21.1.1 Properties pogo_html_docu/Ads/Properties.html See pogo generated info for more details. HostName. The hostname of the PLC. PortNo. The port number, e.g.: 801. SimulationMode. 0 real mode, 1 simulation mode. Simulation mode simply avoid the connection to hardware. 21.1.2 Commands pogo_html_docu/Ads/Commands.html See pogo generated info for more details. The commands have an array of strings as an argument. The IndexGroup and the IndexOffset are supplied for Read and Write commands. For the Write commands there is an addition array element that holds the value. State. Tango default State command. Status. Tango default Status command. ReadDouble. Reads a double number from the PLC. ReadFloat. Reads a floating point number from the PLC. ReadChar. Reads a char number (1B) from the PLC. ReadLong. Reads a long number from the PLC. ReadShort. Reads a short number (2B) from the PLC. WriteDouble. Writes a double to the PLC. WriteFloat. Writes a float to the PLC. WriteChar. Writes a char to the PLC. WriteLong. Writes a long PLC. WriteShort. Writes a short to the PL. If a command fails, it re-opens the connection to the PLC bus coupler and re-tries the I/O. An exception is generated in case the second I/O fails also. 217 21.1.3 Example client, Lom The following examples demonstrates how a Lom motor position is read from a PLC. IndexGroup and IndexOffset select the process variable. #!/usr/bin/python from PyTango import * import sys import time # # get the current position # def get_current( sps, chan): return sps.command_inout( "ReadDouble", [ 0xf030, 512]) # # move a motor # def move_to( sps, chan, newPos): minPos = sps.command_inout( "ReadDouble", [ 0xf020, 512]) maxPos = sps.command_inout( "ReadDouble", [ 0xf020, 540]) print " min ", minPos, ", max ", maxPos if (newPos > maxPos or newPos < minPos): print "\n Position", newPos, "outside limits", minPos, maxPos return 0 sps.command_inout( "WriteDouble", [ 0xf020, 512, newPos]) sps.command_inout( "WriteChar", [ 0xf020, 0, 1]) # StartAll time.sleep( 0.03) sps.command_inout( "WriteChar", [ 0xf020, 0, 0]) status = 1 while status & 1: status = sps.command_inout( "ReadLong", [ 0xf030, 520]) errMaster = sps.command_inout( "ReadChar", [ 0xf030, 1]) print " status", status, ",", get_current( sps, chan), ", err ", errMaster time.sleep( 0.2) return 1 # # main # try : chan = 1 sps = DeviceProxy( "hires/exp/sps1") if( len( sys.argv) == 1): print " Current position ", get_current( sps, chan) else: move_to( sps, chan, float(sys.argv[1])) except Exception, inst : print "Failed with exception !" print sys.exc_info()[0] print type(inst) # the exception instance print inst.args # arguments stored in .args 21.1.4 Example client, Spk The following examples demonstrates how a Spk motor position is read from a PLC. IndexGroup and IndexOffset select the process variable. #!/usr/bin/python from PyTango import * import time, sys, termios init = 0 def inkey(): global init if( not init): init = 1 fd = sys.stdin.fileno() old = termios.tcgetattr( fd) new = termios.tcgetattr( fd) new[3] = new[3] & ˜termios.ICANON & ˜termios.ECHO new[6] [termios.VMIN] = 0 new[6] [termios.VTIME] = 1 termios.tcsetattr( fd, termios.TCSADRAIN, new) sys.exitfunc = lambda: termios.tcsetattr( fd, termios.TCSADRAIN, old) key = sys.stdin.read(1) if( len( key) == 0): key = -1 else: key = ord( key) return key # # move a motor # def move_to( sps, newPos): # # Freigabe & Regelart 1 # 0xf020: 61472 # 0xf030: 61488 sps.command_inout( "WriteLong", [ 0xf020, 0xc0, 0x8001e]) # control register time.sleep( 0.1) print " Control: 0x%x " % sps.command_inout( "ReadLong", [ 0xf020, 0xc0]) print " Status: 0x%x " % sps.command_inout( "ReadLong", [ 0xf030, 0xe1]) print " Status2: 0x%x " % sps.command_inout( "ReadChar", [ 0xf030, 0xe5]) sps.command_inout( "WriteFloat", [ 0xf020, 0x80, newPos]) time.sleep( 0.1) print " Sollposition ", sps.command_inout( "ReadFloat", [ 0xf020, 0x80]) status = sps.command_inout( "ReadLong", [ 0xf030, 0xe1]) while not (status & 1): status = sps.command_inout( "ReadLong", [ 0xf030, 0xe1]) print " Position: %9g, Status: 0x%x" % \ (sps.command_inout( "ReadFloat", [ 0xf030, 0x80]), status) time.sleep( 0.5) if inkey() == 32: # # control register # bit # 0 -> stopp all # sps.command_inout( "WriteLong", [ 0xf020, 0xc0, 0x80001]) # print " stopping all moves" return 0 return 1 # # main # try : sps = DeviceProxy( "hires/exp/sps2") if( len( sys.argv) == 1): print " Position: %g, Status: 0x%x " % \ (sps.command_inout( "ReadFloat", [ 0xf030, 0x80]), \ sps.command_inout( "ReadLong", [ 0xf030, 0xe1])) else: move_to( sps, float(sys.argv[1])) except Exception, inst : print "Failed with exception !" print sys.exc_info()[0] print type(inst) # the exception instance print inst.args # arguments stored in .args 21.2 Gateways between Tango and Tine It is necessary from an experiment running the Tango control system to communicate with the Tine control system of the accelerator. The communication must be possible in two ways. 21.2.1 Tine to Tango Accelerator parameters must be available for the experiment. This is possible with the TTTGW class (Tine To Tango GateWay) which maps Tango device names to Tine entities. pogo_html_docu/TTTGW/index.html As an example, here is a screen shot of the Tine globals which are importet by the TTTGW: 21.2.2 Tango to Tine Experiment data must be available in the Tine control system for archiving. The archiving system used is the accelerator archive driven by Tine. To make Tango data available in Tine, the Tango the Tine gateway class can be used. pogo_html_docu/TangoToTine/index.html Example The following example shows how Tango attributes of a I404 BPM server are exported to the Tine world. DeviceList The list of the Tango devices to be exported. It is possible to use the wildcard character * in the device name, e.g.: p08/i404/exp*. TineContext PEX is the choice for all Petra-3 experiments. Context names should be invented with care. TineEqmName Appears as Device Server name in the Tine world. The following figure shows the Tine Instant Client application which monitors the Read position x attribute of the BPM server p08/i404/exp.01. 21.2.3 TTTDynamicAttr pogo_html_docu/TTTDynamicAttr/Description.html This class exports to Tine only one attribute from one device, the name of the attribute and device are given in the class properties DeviceToExport and AttributeToExport, but the attribute is exported to Tine with fixed Device Name (VariableAttribute) and Device Property (Value) Tine names and always as string. In this way the attribute can be changed without having to inform Tine about the archiving of a new attribute. Tine Device Context and Device Server names are specified like in the TangoToTine class, via properties. Properties pogo_html_docu/TTTDynamicAttr/Properties.html See pogo generated info for more details. Figure 21.1: TTTGW (Tine to Tango) States pogo_html_docu/TTTDynamicAttr/States.html See pogo generated info for more details. Commands pogo_html_docu/TTTDynamicAttr/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/TTTDynamicAttr/Attributes.html See pogo generated info for more details. Figure 21.2: TangoToTineGw Figure 21.3: Tine Instant Client Chapter 22 Miscellaneous 22.1 ADWandlerWT pogo_html_docu/ADWandlerWT/index.html See pogo generated info for more details.. Server for reading two values from the A/D convertor from W&T. 22.1.1 Properties pogo_html_docu/ADWandlerWT/Properties.html See pogo generated info for more details. 22.1.2 States pogo_html_docu/ADWandlerWT/States.html See pogo generated info for more details. 22.1.3 Commands pogo_html_docu/ADWandlerWT/Commands.html See pogo generated info for more details. 22.1.4 Attributes pogo_html_docu/ADWandlerWT/Attributes.html See pogo generated info for more details. 22.2 APDDetector pogo_html_docu/APDDetector/index.html See pogo generated info for more details. Tango class for controlling the APD ACE Electronics from FMB Oxford. The code of the APDDetector class includes the APDDetectorCtrl and the GpibDeviceServer classes. The connection can be done via gpib or via socket interfaces. The Tango Server will decide depending on the property set. 22.2.1 APDDetectorCtrl pogo_html_docu/APDDetectorCtrl/index.html See pogo generated info for more details. Properties pogo_html_docu/APDDetectorCtrl/Properties.html See pogo generated info for more details. States pogo_html_docu/APDDetectorCtrl/States.html See pogo generated info for more details. Commands pogo_html_docu/APDDetectorCtrl/Commands.html See pogo generated info for more details. 223 Attributes pogo_html_docu/APDDetectorCtrl/Attributes.html See pogo generated info for more details. 22.2.2 APDDetector pogo_html_docu/APDDetector/index.html See pogo generated info for more details. Properties pogo_html_docu/APDDetector/Properties.html See pogo generated info for more details. States pogo_html_docu/APDDetector/States.html See pogo generated info for more details. Commands pogo_html_docu/APDDetector/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/APDDetector/Attributes.html See pogo generated info for more details. 22.2.3 Run a Scan in the discriminator threshold The command StartScan is implemented for making automatically scans of the number of counts as a function of the discriminator threshold. For these scans de device run with SCA as count source. The scans can be run in INT or WIN mode, selected by the attribute ScanMode. In both cases the scan is done as a function of the discriminator level, but in WIN mode a window is used with a width given by the attribute ScanWin. For perfoming it with the Tango Device you have to follow these steps: • Set the attributes: ScanMode, ScanLowLimit, ScanHighLimit, ScanStepSize and ScanIntegratingTime (also ScanWin if ScanMode is set to WIN). • Execute the command StartScan When the command StartScan is executed the device will go to state MOVING, this state remains until the scan is finished, returning to ON state. At this point the spectrum obtained in the scan can be seen in the attribute ScanSpectrum. The value of the threshold (and the window in case of WIN mode) before starting the scan will be restored once it is finished. 22.3 AttenFactorCalc Tango Server for computing attenuation factor in the p09 beamlien. pogo_html_docu/AttenFactorCalc/index.html See pogo generated info for more details. 22.3.1 Properties pogo_html_docu/AttenFactorCalc/Properties.html See pogo generated info for more details. 22.3.2 States pogo_html_docu/AttenFactorCalc/States.html See pogo generated info for more details. 22.3.3 Commands pogo_html_docu/AttenFactorCalc/Commands.html See pogo generated info for more details. 22.3.4 Attributes pogo_html_docu/AttenFactorCalc/Attributes.html See pogo generated info for more details. 22.4 BronkhorstMassFlow Tango Server for controlling the Mass Flow devices from Bronkhorst. The Server uses two classes: BronkhorstMassFlowCtrl, making the connection via USB to the Flow-Bus, and BronkhorstMassFlow, talking to one of the nodes for getting/setting the values. 22.4.1 BronkhorstMassFlow pogo_html_docu/BronkhorstMassFlow/index.html See pogo generated info for more details.. Properties pogo_html_docu/BronkhorstMassFlow/Properties.html See pogo generated info for more details. States pogo_html_docu/BronkhorstMassFlow/States.html See pogo generated info for more details. Commands pogo_html_docu/BronkhorstMassFlow/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/BronkhorstMassFlow/Attributes.html See pogo generated info for more details. 22.4.2 BronkhorstMassFlowCtrl pogo_html_docu/BronkhorstMassFlowCtrl/index.html See pogo generated info for more details.. Properties pogo_html_docu/BronkhorstMassFlowCtrl/Properties.html See pogo generated info for more details. States pogo_html_docu/BronkhorstMassFlowCtrl/States.html See pogo generated info for more details. Commands pogo_html_docu/BronkhorstMassFlowCtrl/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/BronkhorstMassFlowCtrl/Attributes.html See pogo generated info for more details. 22.5 BSCryoTempCrontrolP01 Server for the control of the temperature of the back scattering cryo at p01. It runs a feedback loop sending a voltage computed from a given resistance. pogo_html_docu/BSCryoTempCrontrolP01/index.html See pogo generated info for more details. 22.5.1 Properties pogo_html_docu/BSCryoTempCrontrolP01/Properties.html See pogo generated info for more details. 22.5.2 States pogo_html_docu/BSCryoTempCrontrolP01/States.html See pogo generated info for more details. 22.5.3 Commands pogo_html_docu/BSCryoTempCrontrolP01/Commands.html See pogo generated info for more details. 22.5.4 Attributes pogo_html_docu/BSCryoTempCrontrolP01/Attributes.html See pogo generated info for more details. 22.6 CenterThree Tango Server for controlling the Center Three Vacuum gauge controller from Leybold Vacuum. The Server uses two classes: CenterThreeCtrl (Socket interface) and CenterThree (the interface for each axis). The code of the CenterThree class includes the CenterThreeCtrl class. 22.6.1 CenterThreeCtrl pogo_html_docu/CenterThreeCtrl/index.html See pogo generated info for more details. Class creating the socket connection and sending commands to the controller. Properties pogo_html_docu/CenterThreeCtrls/Properties.html See pogo generated info for more details. IpAddr. IP address. PortNb. Port number. SimulationMode. Not used. States pogo_html_docu/CenterThreeCtrl/States.html See pogo generated info for more details. FAULT. Problems creating socket connection. ON. Socket connection succed. Commands pogo_html_docu/CenterThreeCtrl/Commands.html See pogo generated info for more details. CloseSocket. Close socket connection. State. Returns the device state. Default Tango command. Status. It gets the device status. Default Tango command. GetPressure. Returns the status and the pressure of the channel given as argument. Attributes pogo_html_docu/CenterThreeCtrl/Attributes.html See pogo generated info for more details. 22.6.2 CenterThree pogo_html_docu/CenterThree/Description.html See pogo generated info for more details. Properties pogo_html_docu/CenterThree/Properties.html See pogo generated info for more details. AxisNumber. Axis number. SocketDS. Name of the CenterThreeCtrl tango device making the socket connection. States pogo_html_docu/CenterThree/States.html See pogo generated info for more details. FAULT. Not used. ON. Server running without problems. Commands pogo_html_docu/CenterThree/Commands.html See pogo generated info for more details. Init. Initializes the Tango device. State. Returns the device state. Default Tango command. Status. It gets the device status. Default Tango command. Attributes pogo_html_docu/CenterThree/Attributes.html See pogo generated info for more details. Pressure. Reads pressure value. Set the status of the device to the channel status. 22.7 Clipboard Server for transferring values between clients. pogo_html_docu/Clipboard/index.html See pogo generated info for more details. 22.7.1 Properties pogo_html_docu/Clipboard/Properties.html See pogo generated info for more details. 22.7.2 States pogo_html_docu/Clipboard/States.html See pogo generated info for more details. FAULT. Not used. ON. Default state. 22.7.3 Commands pogo_html_docu/Clipboard/Commands.html See pogo generated info for more details. SetLine1. Write input string into Line1 attribute, increments UpdateId1 in 1 unit and returns its current value. SetLine2. Write input string into Line2 attribute, increments UpdateId2 in 1 unit and returns its current value. SetLine3. Write input string into Line3 attribute, increments UpdateId3 in 1 unit and returns its current value. SetLine4. Write input string into Line4 attribute, increments UpdateId4 in 1 unit and returns its current value. SetLine5. Write input string into Line5 attribute, increments UpdateId5 in 1 unit and returns its current value. SetLine6. Write input string into Line6 attribute, increments UpdateId6 in 1 unit and returns its current value. SetLine7. Write input string into Line7 attribute, increments UpdateId7 in 1 unit and returns its current value. SetLine8. Write input string into Line8 attribute, increments UpdateId8 in 1 unit and returns its current value. SetLine9. Write input string into Line9 attribute, increments UpdateId9 in 1 unit and returns its current value. SetLine10. Write input string into Line10 attribute, increments UpdateId10 in 1 unit and returns its current value. State. Default Tango command. Status. Default Tango command. 22.7.4 Attributes pogo_html_docu/Clipboard/Attributes.html See pogo generated info for more details. Line1. String attribute to write/read a value to tranfer. Line2. String attribute to write/read a value to tranfer. Line3. String attribute to write/read a value to tranfer. Line4. String attribute to write/read a value to tranfer. Line5. String attribute to write/read a value to tranfer. Line6. String attribute to write/read a value to tranfer. Line7. String attribute to write/read a value to tranfer. Line8. String attribute to write/read a value to tranfer. Line9. String attribute to write/read a value to tranfer. Line10. String attribute to write/read a value to tranfer. TimeStamp1. Last time at which Line1 was written (en sec). TimeStamp2. Last time at which Line2 was written (en sec). TimeStamp3. Last time at which Line3 was written (en sec). TimeStamp4. Last time at which Line4 was written (en sec). TimeStamp5. Last time at which Line5 was written (en sec). TimeStamp6. Last time at which Line6 was written (en sec). TimeStamp7. Last time at which Line7 was written (en sec). TimeStamp8. Last time at which Line8 was written (en sec). TimeStamp9. Last time at which Line9 was written (en sec). TimeStamp10. Last time at which Line10 was written (en sec). UpdateId1. Integer incremented every time Line1 attribute is written. UpdateId2. Integer incremented every time Line2 attribute is written. UpdateId3. Integer incremented every time Line3 attribute is written. UpdateId4. Integer incremented every time Line4 attribute is written. UpdateId5. Integer incremented every time Line5 attribute is written. UpdateId6. Integer incremented every time Line6 attribute is written. UpdateId7. Integer incremented every time Line7 attribute is written. UpdateId8. Integer incremented every time Line8 attribute is written. UpdateId9. Integer incremented every time Line9 attribute is written. UpdateId10. Integer incremented every time Line10 attribute is written. 22.7.5 Client Example Simply read and write attributes: from PyTango import * import sys import time try : t1 = DeviceProxy( "haso111n:10000/test/clipboard/1") line1 = t1.read_attribute("Line1") print "Line1: ", line1.value line2 = t1.Line2 print "Line2: ", line2 t1.write_attribute("Line3","mytest") except : print "Failed with exception !" print sys.exc_info()[0] Example of how to subscribe to events for automatically detecting the changes in attributes. The attribute the subscription is made to, has to have defined change events and polling. The function pus event in the callback class defines what will be done when it ocurrs a change in the subscribed attribute. from PyTango import * import sys import time # The subscribe attributes have to have events and polling class PyCallback: def push_event(self,event): if not event.err: print event.attr_name, event.attr_value.value else: print event.errors try : t1 = DeviceProxy( "haso111n:10000/test/clipboard/1") cb = PyCallback(); # We can only subscribe once # t1.subscribe_event("UpdateId2", EventType.CHANGE_EVENT, cb, []) att = AttributeProxy(’test/clipboard/1/UpdateId2’) ev = att.subscribe_event(EventType.CHANGE_EVENT, cb, []) while(1): time.sleep(1) except DevFailed, df: Except.print_exception(df) 22.7.6 Synchronization between Clients If there are clients continuously writing and reading the Line attributes, based on the UpdateId for testing if the attribute has been changed, it can happen that between the writing in the Line attribute from one of the clients and its readout of the UpdateId one other client is also writing in the attribute Line, and this can produce synchronization problems. For avoiding this, it is recommendable the use of the SetLine command, in which both actions are done simultaneously. 22.8 CollisionsSensor pogo_html_docu/CollisionsSensor/index.html See pogo generated info for more details. Tango Server for checking if a movement is allowed before performing it. If in the device server of a motor the property FlagUseCollisionsSensor is set to 1, when a movement is set the motor will connect to the CollisionsSensor device given in his property CollisionsSensorDS (in case this connection is still not done) and will send to it the command CheckCollision with three arguments: name of the motor device, beamline ( given in the property CollisionsSensorBL) and new position to be set. Only if the return of this function is 0 (movement allowed by the restrictions set in the CollisionsSensor for the movement of this motor) the movement will be performed. The checks done in the CheckCollision function are hardcoded for any motor and for any beamline. Due to the serialization of the Tango requests, the CheckCollision command can not read data from the motor device calling it. In case data from this motor is needed for checking the move condition, these data have to be send by the motor to attributes of the CollisionsSensor device implemented only for this purpose. The OmsVme58 motor class has a property that activates the send of data to the CollisionsSensor by writing in these attributes. 22.8.1 Properties pogo_html_docu/CollisionsSensor/Properties.html See pogo generated info for more details. P09Ddeltheta. P09 condition: del-theta ¡ P09Ddeltheta. P09DdiaztheightMax. P09 condition: diaz - table height ¡ P09DdiaztheightMax. P09DdiaztheightMin. P09 condition: table height - diaz ¡ P09DdiaztheightMin. P09Dnumu. P09 condition: nu-mu ¡ P09Dnumu. P09Dnumu1. P09 condition: if ptrans ¿ P09Vptrans mu-nu ¡ p09Dnumu1, else mu-nu ¡ p09Dnumu2. P09Dnumu2. P09 condition: if ptrans ¿ P09Vptrans mu-nu ¡ p09Dnumu1, else mu-nu ¡ p09Dnumu2. P09Dnumu3. P09 condition: if ctrans ¿ P09Vctrans mu-nu ¡ p09Dnumu3, else mu-nu ¡ p09Dnumu4. P09Dnumu4. P09 condition: if ctrans ¿ P09Vctrans mu-nu ¡ p09Dnumu3, else mu-nu ¡ p09Dnumu4. P09Dptransctrans. P09 condition: —ptrans-ctrans— ¡ P09Dptransctrans. P09Vctrans. P09 condition: if ctrans ¿ P09Vctrans mu-nu ¡ p09Dnumu3, else mu-nu ¡ p09Dnumu4. P09Vptrans. P09 condition: if ptrans ¿ P09Vptrans mu-nu ¡ p09Dnumu1, else mu-nu ¡ p09Dnumu2. 22.8.2 States pogo_html_docu/CollisionsSensor/States.html See pogo generated info for more details. ON. Default state. 22.8.3 Commands pogo_html_docu/CollisionsSensor/Commands.html See pogo generated info for more details. CheckCollision. Returns 0 if the movement is allowed. Requires as argument the beamline number (as string), new motor position and motor device name. Init. Default Tango command. Initializes the device. 22.8.4 Attributes pogo_html_docu/CollisionsSensor/Attributes.html See pogo generated info for more details. 22.8.5 Set a motor device for using it The motor class has to be adapted if this server wants to be used for checking possible collisions before performing a movement. Three new properties have to be implemented: FlagUseCollisionsSensor. Set to 1 if a CollisionsSensor device wants to be used. Set the default to 0, so the server will run without problems if it is not se at all. CollisionsSensorDS. Name of the CollisionsSensor device to be connected. This Server has to be running when a movement wants to be performed, but it is not necessary that it runs at the initialization. CollisionsSensorBL. Beamline number as string. It is necessary since the check of the movement depends on the motor and the beamline. FlagSendDataToCollisionsSensor. If set to 1, the motor will write in the attributes Value1 and Value2 of the CollisionsSensor device the UnitLimitMax and UnitLimitMin values. This is need for motors which need these values for the move condition. The call to the function CheckCollisions with the right arguments (beamline number, motor position to be set and motor device name) has to be called before any movement is sent to the hardware. Only if the answer of this function is 0 the movement will be performed. Optionally the ALARM state can be used for informing abour errors in the connection with the CollisionsSensor device. As an example of the implementation: In the header file: DeviceProxy *collisions_sensor_device; DevVarDoubleStringArray *collisions_sensor_data; In the init device function: if(flagUseCollisionsSensor){ collisions_sensor_data = new DevVarDoubleStringArray(); collisions_sensor_data->dvalue.length(1); collisions_sensor_data->svalue.length(2); } In the function called when a movement wants to be performed: DeviceData dout; DeviceData din; long iout; if(flagUseCollisionsSensor){ if(collisions_sensor_device == 0){ try{ collisions_sensor_device = new Tango::DeviceProxy(collisionsSensorDS); } catch(Tango::DevFailed &e){ set_state(Tango::ALARM); set_status("Not connection to CollisionsSensor device. Check CollisionsSensorDS property argout = 0; goto finish; } } if(flagSendDataToCollisionsSensor){ DeviceAttribute *da_write1 = new DeviceAttribute( "Value1", (Tango::DevDouble)attr collisions_sensor_device->write_attribute(*da_write1); DeviceAttribute *da_write2 = new DeviceAttribute( "Value2", (Tango::DevDouble)attr collisions_sensor_device->write_attribute(*da_write2); } collisions_sensor_data->svalue[0] = collisionsSensorBL.c_str(); // beamline collisions_sensor_data->dvalue[0] = (double) argin; // newposition collisions_sensor_data->svalue[1] = this->device_name.c_str(); din << collisions_sensor_data; try{ dout = collisions_sensor_device->command_inout("CheckCollision",din); } catch(Tango::DevFailed &e){ set_state(Tango::ALARM); set_status("CheckCollision command failed. Not movement."); argout = 0; goto finish; } dout >> iout; if(iout){ argout = 0; goto finish; } if(get_state() == Tango::ALARM){ set_state(Tango::ON); set_status("Device in ON state"); } } ... Continue with the movement. ... 22.8.6 Client Example The CollisionsSensor device is thought to be used by other Tango Servers before performing a movement. The following example is only useful for showing how the call to the CheckCollision function has to be done. /* * example of a client using the CollisionsSensor Server */ #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { DeviceData dd; DeviceData dout; long flag_collision; // // create a connection to the CollisionsSensor device // DeviceProxy *device = new DeviceProxy( "test/collisionssensor/1"); DevVarDoubleStringArray *in = new DevVarDoubleStringArray(); in->dvalue.length(1); in->dvalue[0] = (double) 23.9; // Position to check in->svalue.length(2); in->svalue[0] = "100"; in->svalue[1] = "test/mot/1"; dd << in; try { dout = device->command_inout("CheckCollision",dd); dout >> flag_collision; if(flag_collision) cout << "Movement not allowed" << endl; } catch(DevFailed &e) { cout << "Error in command_inout" << endl; } } 22.9 CryoConnector This Tango Server controls the devices from Oxford Cryosystems talking to the CryoConnector windows program, which makes the connection to the hardware, via xml files. The Tango Server has to run in the Windows PC where the CryoConnector does. pogo_html_docu/CryoConnector/index.html See pogo generated info for more details. 22.9.1 Properties pogo_html_docu/CryoConnector/Properties.html See pogo generated info for more details. 22.9.2 States pogo_html_docu/CryoConnector/States.html See pogo generated info for more details. 22.9.3 Commands pogo_html_docu/CryoConnector/Commands.html See pogo generated info for more details. 22.9.4 Attributes pogo_html_docu/CryoConnector/Attributes.html See pogo generated info for more details. 22.10 CryoConTempCtrl Server for the control of CryoCon Temperature controller via Gpib. pogo_html_docu/CryoConTempCtrl/index.html See pogo generated info for more details. 22.10.1 Properties pogo_html_docu/CryoConTempCtrl/Properties.html See pogo generated info for more details. 22.10.2 States pogo_html_docu/CryoConTempCtrl/States.html See pogo generated info for more details. 22.10.3 Commands pogo_html_docu/CryoConTempCtrl/Commands.html See pogo generated info for more details. 22.10.4 Attributes pogo_html_docu/CryoConTempCtrl/Attributes.html See pogo generated info for more details. 22.11 CryoSMSMagnet Server for controlling a SMS series superconducting magnet power supply from Cryogenic. The connection is done via USB. pogo_html_docu/CryoSMSMagnet/index.html See pogo generated info for more details. 22.11.1 Properties pogo_html_docu/CryoSMSMagnet/Properties.html See pogo generated info for more details. 22.11.2 States pogo_html_docu/CryoSMSMagnet/States.html See pogo generated info for more details. 22.11.3 Commands pogo_html_docu/CryoSMSMagnet/Commands.html See pogo generated info for more details. 22.11.4 Attributes pogo_html_docu/CryoSMSMagnet/Attributes.html See pogo generated info for more details. 22.12 CryoSMSPowerSupplyGpib Server for controlling a SMS series superconducting magnet power supply from Cryogenic. The connection is done via Gpib. pogo_html_docu/CryoSMSPowerSupplyGpib/index.html See pogo generated info for more details. 22.12.1 Properties pogo_html_docu/CryoSMSPowerSupplyGpib/Properties.html See pogo generated info for more details. 22.12.2 States pogo_html_docu/CryoSMSPowerSupplyGpib/States.html See pogo generated info for more details. 22.12.3 Commands pogo_html_docu/CryoSMSPowerSupplyGpib/Commands.html See pogo generated info for more details. 22.12.4 Attributes pogo_html_docu/CryoSMSPowerSupplyGpib/Attributes.html See pogo generated info for more details. 22.13 DKRF400TempHumSensor Server for reading temperature and humidity from the temperature and humidity sensor from Driesen Kern GmbH model DKRF400. The connection is done via RS232 using an USB adaptor. pogo_html_docu/DKRF400TempHumSensor/index.html See pogo generated info for more details. 22.13.1 Properties pogo_html_docu/DKRF400TempHumSensor/Properties.html See pogo generated info for more details. 22.13.2 States pogo_html_docu/DKRF400TempHumSensor/States.html See pogo generated info for more details. 22.13.3 Commands pogo_html_docu/DKRF400TempHumSensor/Commands.html See pogo generated info for more details. 22.13.4 Attributes pogo_html_docu/DKRF400TempHumSensor/Attributes.html See pogo generated info for more details. 22.14 ElcomatHR Tango Server for reading the values of the angles measured with the measuring station for high-precision angle measurement from the Moeller-Wedel Optical Elcomat HR. pogo_html_docu/ElcomatHR/index.html See pogo generated info for more details. 22.14.1 Properties pogo_html_docu/ElcomatHR/Properties.html See pogo generated info for more details. 22.14.2 States pogo_html_docu/ElcomatHR/States.html See pogo generated info for more details. 22.14.3 Commands pogo_html_docu/ElcomatHR/Commands.html See pogo generated info for more details. 22.14.4 Attributes pogo_html_docu/ElcomatHR/Attributes.html See pogo generated info for more details. 22.15 FestoCompAirDistributor Server for the control of the valves of the compressed air distributor from Festo. Connection via Beckhoff using the ads tango class. pogo_html_docu/FestoCompAirDistributor/index.html See pogo generated info for more details. 22.15.1 Properties pogo_html_docu/FestoCompAirDistributor/Properties.html See pogo generated info for more details. 22.15.2 States pogo_html_docu/FestoCompAirDistributor/States.html See pogo generated info for more details. 22.15.3 Commands pogo_html_docu/FestoCompAirDistributor/Commands.html See pogo generated info for more details. 22.15.4 Attributes pogo_html_docu/FestoCompAirDistributor/Attributes.html See pogo generated info for more details. 22.16 HaakeChiller pogo_html_docu/HaakeChiller/index.html See pogo generated info for more details. Tango class for controlling the Haake Chiller. The communication is done via socket, connecting to a terminal server talking with the device. 22.16.1 Properties pogo_html_docu/HaakeChiller/Properties.html See pogo generated info for more details. IpAddr. IP address of the terminal server. PortNb. Port number. SimulationMode. 0 real mode, 1 simulation mode. 22.16.2 States pogo_html_docu/HaakeChiller/States.html See pogo generated info for more details. ON. Device running without problems. FAULT. Problems with the socket communication. 22.16.3 Commands pogo_html_docu/HaakeChiller/Commands.html See pogo generated info for more details. OffOn. Switches the device off or on, depeding on the given argument (0 -¿ off, 1 -¿ on). ConfirmAlarm. Confirms the alarm status and return the device to running operation. Init. Default Tango command. Initializes the device. RemoteControlOffOn. Turns off or on the remote control (0 -¿ off, 1 -¿ on), if the remote control is off the ENTER-key has the control of the device. SwitchOffOn. Switches the device off or on, depeding on the given argument (0 -¿ off, 1 -¿ on). 22.16.4 Attributes pogo_html_docu/HaakeChiller/Attributes.html See pogo generated info for more details. AlarmStatus. Reads the last alarm information. ErrorInfo. Reads the failure information. ClosedLoop. Reads the current status of the closed loop control and set it by writting (0 -¿ off, 1 -¿ on). IstTemperature. Reads the current temperature value (in Celsius). SollTemperature. Reads/writtes the soll temperature value (in Celsius). 22.17 IPGLaserYLR Tango Classes for controlling the Ytterbium Fiber Lasers (models YLR-100-AC and YLR-100-SM) from IPGLaser. The IPGLaserYLRCtrl makes the socket connection to the lasers and contains the functions for writting/reading to/from both laser models. The IPGLaserYLR100AC class uses the IPGLaserYLRCtrl for connecting to the hardware, providing the specific interface for the YLR-100-AC model. The IPGLaserYLR100SM class uses the IPGLaserYLRCtrl for connecting to the hardware, providing the specific interface for the YLR-100-SM model. A static library is generated with the IPGLaserYLRCtrl class and linked to the IPGLaserYLR100AC/IPGLaserYLR100SM servers. 22.17.1 IPGLaserYLRCtrl pogo_html_docu/IPGLaserYLRCtrl/index.html See pogo generated info for more details. Class creating the socket connection and implementing the commands for writing and reading to the socket. Properties pogo_html_docu/IPGLaserYLRCtrl/Properties.html See pogo generated info for more details. IpAddress. IP address. PortNb. Port number. SimulationMode. 0 real mode, 1 simulation mode. States pogo_html_docu/IPGLaserYLRCtrl/States.html See pogo generated info for more details. FAULT. Problems creating socket connection. ON. Socket connection succeeds. Commands pogo_html_docu/IPGLaserYLRCtrl/Commands.html See pogo generated info for more details. CloseSocket. Close socket connection. State. Returns the device state. Default function. Status. It gets the device status. Default function. WriteReadYLRAC. Sends command to the YLR-100-AC laser and returns the answer (all commands to the YLR-100-AC laser returns an answer). WriteReadYLRSM. Sends command to the YLR-100-SM laser and returns the answer. It has to be used for all commands that returns an answer from the hardware. WriteYLRSM. Sends command to the YLR-100-SM laser does not return any answer. It has to be used for all commands that does not return an answer from the hardware. Attributes pogo_html_docu/IPGLaserYLRCtrl/Attributes.html See pogo generated info for more details. 22.17.2 IPGLaserYLR100AC pogo_html_docu/IPGLaserYLR100AC/index.html See pogo generated info for more details. Properties pogo_html_docu/IPGLaserYLR100AC/Properties.html See pogo generated info for more details. SocketDS. Name of the IPGLaserYLRCtrl tango device establishing the socket connection. SimulationMode. 0 real mode, 1 simulation mode. Feature not implemented. States pogo_html_docu/IPGLaserYLR100AC/States.html See pogo generated info for more details. FAULT. Connection to the socket device failed. ON. Connection to the socket device successful. Commands pogo_html_docu/IPGLaserYLR100AC/Commands.html See pogo generated info for more details. State. Gets the device state. Default Tango function. Status. Gets the device status. Default Tango function. Attributes pogo_html_docu/IPGLaserYLR100AC/Attributes.html See pogo generated info for more details. AimingBeam. Sets/Gets aiming beam status: 0 -¿ off, 1 -¿ on. Current. Sets/Gets diode current setpoint in percentage. Emission. Sets/Gets emission status: 0 -¿ off, 1 -¿ on. LaserStatus. Returns laser status in 32-bit word. OutputPower. Reads output power in W. Returns -1 if the laser is off, and -2 if the power is below the reliable measurement threshold of the laser. Temperature. Reads laser temperature. 22.17.3 IPGLaserYLR100SM pogo_html_docu/IPGLaserYLR100SM/index.html See pogo generated info for more details. Properties pogo_html_docu/IPGLaserYLR100SM/Properties.html See pogo generated info for more details. SocketDS. Name of the IPGLaserYLRCtrl tango device establishing the socket connection. SimulationMode. 0 real mode, 1 simulation mode. Feature not implemented. States pogo_html_docu/IPGLaserYLR100SM/States.html See pogo generated info for more details. FAULT. Connection to the socket device failed. ON. Connection to the socket device successful. Commands pogo_html_docu/IPGLaserYLR100SM/Commands.html See pogo generated info for more details. State. Gets the device state. Default Tango function. Status. Gets the device status. Default Tango function. Attributes pogo_html_docu/IPGLaserYLR100SM/Attributes.html See pogo generated info for more details. Current. Sets/Gets pump current setpoint in mA. Emission. Gets emission status: 0 -¿ off, 1 -¿ on. ExternalMode. Gets emission mode: 0 -¿ Internal, 1 -¿ External. Writing any value sets the emission mode to external. LaserStatus. Returns laser status in 32-bit word. OutputPower. Sets/Gets output power in W. RedLaser. Sets/Gets the red laser emission status: 0 -¿ off, 1 -¿ on. Temperature. Reads laser temperature. 22.18 Keithley2000 pogo_html_docu/Keithley2000/index.html See pogo generated info for more details. Tango class for controlling the Keithley2000. Connection via gpib. 22.18.1 Properties pogo_html_docu/Keithley2000/Properties.html See pogo generated info for more details. 22.18.2 States pogo_html_docu/Keithley2000/States.html See pogo generated info for more details. 22.18.3 Commands pogo_html_docu/Keithley2000/Commands.html See pogo generated info for more details. 22.18.4 Attributes pogo_html_docu/Keithley2000/Attributes.html See pogo generated info for more details. 22.19 Keithley3706 pogo_html_docu/Keithley3706/index.html See pogo generated info for more details. Tango class for controlling the Keithley3706 current applifier. Connection via socket or Gpib. If the property GpibDevice is set to a value different from None the connection will be done using gpib, and if it fails it will automatically try to connect via socket using the properties PortNb and Hostname (in case they are set). If GpibDevice is set to None or not set (None is the default value) the connection will be done via socket, using the properties PortNb and Hostname. The Server can run in different modes. If the property FixTemperatureMode is set to 1, configuration and all parameters are fixed and set at the initialization and the server simply reads the temperature value from one channel, shown in the Temperature attribute. In other case there is flexibility in the configuration, number of channels, poles, backplanes ... 22.19.1 Properties pogo_html_docu/Keithley3706/Properties.html See pogo generated info for more details. 22.19.2 States pogo_html_docu/Keithley3706/States.html See pogo generated info for more details. 22.19.3 Commands pogo_html_docu/Keithley3706/Commands.html See pogo generated info for more details. 22.19.4 Attributes pogo_html_docu/Keithley3706/Attributes.html See pogo generated info for more details. 22.20 Keithley428 pogo_html_docu/Keithley428/index.html See pogo generated info for more details. Tango class for controlling the Keithley428 current applifier. It uses the GpibDeviceServer class for making the conection to the hardware. The GpibDeviceServer class is a modification of the Gpib class from Soleil, header files and library needed for the compilation of the Keithley428 executable are svn in the cppserver directory. 22.20.1 Properties pogo_html_docu/Keithley428/Properties.html See pogo generated info for more details. GpibDevice. Name of the GpibDeviceServer device connecting to the keithley amplifier. 22.20.2 States pogo_html_docu/Keithley428/States.html See pogo generated info for more details. ON. Device running without problems. FAULT. Not able to connect to the GpibDeviceServer device. 22.20.3 Commands pogo_html_docu/Keithley428/Commands.html See pogo generated info for more details. Init. Default Tango command. Initializes the device. PerformZeroCorrection. Command for performing the zero correction. 22.20.4 Attributes pogo_html_docu/Keithley428/Attributes.html See pogo generated info for more details. Bypass. Set zero check on (1) or off (0). Reads from the status word the current selection, value 1 means that the zero check is on, and 0 that it is off. If the read value is 2 that means that a zero correction was performed after setting the last time the zero check. Gain. Set the gain to the amplifier: 0, 1, 2, 3 -¿ 10e3 V/A, 4 -¿ 10e4 V/A, 5 -¿ 10e5 V/A, 6 -¿ 10e6 V/A, 7 -¿ 10e7 V/A, 8 -¿ 10e8 V/A, 9 -¿ 10e9 V/A, 10 -¿ 10e10 V/A, 11 -¿ 10e11 V/A. Reads the set value from the status word of the keithley. GainStr. Gain value as string read from the keithley device. Overloaded. 1 if the device is overloaded. It reads from the error word of the keithley. 22.21 Keithley6485ml Tango Server connecting to gpib Tango devices for different Keithley 6485 devices and controlling them simultaneously. pogo_html_docu/Keithley6485ml/index.html See pogo generated info for more details. 22.21.1 Properties pogo_html_docu/Keithley6485ml/Properties.html See pogo generated info for more details. GpibDevice1. Name of a gpib Tango device to connect to. GpibDevice2. Name of a gpib Tango device to connect to. 22.21.2 States pogo_html_docu/Keithley6485ml/TangoDevStates.html See pogo generated info for more details. FAULT. Connection to any gpib Tango device failed. ON. Connection to gpib Tango device successful done. 22.21.3 Commands pogo_html_docu/Keithley6485ml/DevCommands.html See pogo generated info for more details. 22.21.4 Attributes pogo_html_docu/Keithley6485ml/Attributes.html See pogo generated info for more details. DisplayPrecision. Set the number of decimals (from 4 to 7). 22.22 Keithley6517a pogo_html_docu/Keithley6517a/index.html See pogo generated info for more details. Tango class for controlling the Keithley6517a electrometer. It uses the GpibDeviceServer class for making the conection to the hardware. The GpibDeviceServer class is a modification of the Gpib class from Soleil, header files and library needed for the compilation of the Keithley6517a executable are svn in the cppserver directory. 22.22.1 Properties pogo_html_docu/Keithley6517a/Properties.html See pogo generated info for more details. GpibDevice. Name of the GpibDeviceServer device connecting to the keithley amplifier. 22.22.2 States pogo_html_docu/Keithley6517a/States.html See pogo generated info for more details. ON. Device running without problems. FAULT. Not able to connect to the GpibDeviceServer device. 22.22.3 Commands pogo_html_docu/Keithley6517a/Commands.html See pogo generated info for more details. 22.22.4 Attributes pogo_html_docu/Keithley6517a/Attributes.html See pogo generated info for more details. 22.23 KMTronicRelay pogo_html_docu/KMTronicRelay/index.html See pogo generated info for more details.. Server for setting ON/OFF the relays of the Two Relay Controller from KMTronic. The connection is done via USB. 22.23.1 Properties pogo_html_docu/KMTronicRelay/Properties.html See pogo generated info for more details. 22.23.2 States pogo_html_docu/KMTronicRelay/States.html See pogo generated info for more details. 22.23.3 Commands pogo_html_docu/KMTronicRelay/Commands.html See pogo generated info for more details. 22.23.4 Attributes pogo_html_docu/KMTronicRelay/Attributes.html See pogo generated info for more details. 22.24 LEDSchott Tango Server for controlling the Schott LLS - LED Light Source. The Server uses two classes: LEDSchottCtrl (Socket interface) and LEDSchott (for operating the LED). The socket connection can be done via a terminal server or directly to ethernet. The behaivor is different in each of the cases. The property DirectEthernetConnection in the LEDSchottCtrl allows tell the Tango Device how the connection is done in the hardware. The code of the LEDSchott class includes the LEDSchottCtrl class. 22.24.1 LEDSchottCtrl pogo_html_docu/LEDSchottCtrl/index.html See pogo generated info for more details. Class creating the socket connection and implementing the commands for writing and reading to the socket. Properties pogo_html_docu/LEDSchottCtrls/Properties.html See pogo generated info for more details. DirectSocketConnection. Set to 1 if the LED is directly connected to ethernet (0 if the connection to ethernet is done via a terminal server, default value). IpAddr. IP address. PortNb. Port number. SimulationMode. Not used. States pogo_html_docu/LEDSchottCtrl/States.html See pogo generated info for more details. FAULT. Problems creating socket connection. ON. Socket connection succed. Commands pogo_html_docu/LEDSchottCtrl/Commands.html See pogo generated info for more details. CloseSocket. Close socket connection. State. Returns the device state. Status. It gets the device status. WriteSocket. Sends command to the socket without reading an answer. Not used, since all commands return an answer. WriteReadAdrPort. Sends command to the socket and reads the answer. Attributes pogo_html_docu/LEDSchottCtrl/Attributes.html See pogo generated info for more details. 22.24.2 LEDSchott pogo_html_docu/LEDSchott/index.html See pogo generated info for more details. Properties pogo_html_docu/LEDSchott/Properties.html See pogo generated info for more details. SocketDS. Name of the LEDSchottCtrl tango device making the socket connection. States pogo_html_docu/LEDSchott/States.html See pogo generated info for more details. FAULT. Not used.. ON. Server running without problems. Commands pogo_html_docu/LEDSchott/Commands.html See pogo generated info for more details. State. Returns the device state. Status. It gets the device status. Attributes pogo_html_docu/LEDSchott/Attributes.html See pogo generated info for more details. Intensity. Get/Set lamp intensity. LEDOffOn. Get/Set Light Source status: 0 -¿ standby, 1 -¿ on. StrobeDelay. Get/Set Triggered Strobe Delay in microseconds. StrobeIntensity. Get/Set Triggered Strobe Intensity. StrobeModeOffOn. Get/Set Triggered Strobe Mode. Off -¿ 0, On -¿ 1. StrobeOnTime. Get/Set Triggered Strobe On-Time in microseconds. Temperature. Get lamp temperature. 22.24.3 Example Clients 22.24.4 How to ... 22.25 LKS336 Server for controlling the LakeShore Model 336 Temperature Controller. The server uses four Tango classes: • LKS336. Only used as container of the other three classes. It doesn’t have any attribute or command. • GpibDeviceServer. Class for making the connection to the temperature controller via Gpib. The GpibDeviceServer class is a modification of the Gpib class from Soleil. • LKS336SensorInput. Contains attributes related to a sensor input of the temperature controller. The controller has four channels (A, B, C and D) selected in the class via a property. • LKS336HeaterOutput. Contains attributes related to a heater output of the temperature controller. The controller has four outputs (1, 2, 3 and 4) selected in the class via a property. 22.25.1 LKS336 pogo_html_docu/LKS336/index.html See pogo generated info for more details. Properties pogo_html_docu/LKS336/Properties.html See pogo generated info for more details. States pogo_html_docu/LKS336/States.html See pogo generated info for more details. Commands pogo_html_docu/LKS336/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/LKS336/Attributes.html See pogo generated info for more details. 22.25.2 LKS336SensorInput pogo_html_docu/LKS336SensorInput/index.html See pogo generated info for more details. Properties pogo_html_docu/LKS336SensorInput/Properties.html See pogo generated info for more details. States pogo_html_docu/LKS336SensorInput/States.html See pogo generated info for more details. Commands pogo_html_docu/LKS336SensorInput/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/LKS336SensorInput/Attributes.html See pogo generated info for more details. 22.25.3 LKS336HeaterOutput pogo_html_docu/LKS336HeaterOutput/index.html See pogo generated info for more details. Properties pogo_html_docu/LKS336HeaterOutput/Properties.html See pogo generated info for more details. States pogo_html_docu/LKS336HeaterOutput/States.html See pogo generated info for more details. Commands pogo_html_docu/LKS336HeaterOutput/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/LKS336HeaterOutput/Attributes.html See pogo generated info for more details. 22.26 LKS336TempCtrl pogo_html_docu/LKS336TempCtrl/index.html See pogo generated info for more details. Tango class for controlling the LakeShore Model 336 Temperature Controller. It uses the GpibDeviceServer class for making the conection to the hardware. The GpibDeviceServer class is a modification of the Gpib class from Soleil, headr files and library needed for the compilation of the LKS336TempCtrl executable are svn in the cppserver directory. The controller has two heaters (H1 and H2) and four channels (A, B, C and D). 22.26.1 Properties pogo_html_docu/LKS336TempCtrl/Properties.html See pogo generated info for more details. 22.26.2 States pogo_html_docu/LKS336TempCtrl/States.html See pogo generated info for more details. 22.26.3 Commands pogo_html_docu/LKS336TempCtrl/Commands.html See pogo generated info for more details. 22.26.4 Attributes pogo_html_docu/LKS336TempCtrl/Attributes.html See pogo generated info for more details. 22.27 LKS340TempCtrl pogo_html_docu/LKS340TempCtrl/index.html See pogo generated info for more details. Tango class for controlling the LakeShore Model 340 Temperature Controller. It uses the GpibDeviceServer class for making the conection to the hardware. The GpibDeviceServer class is a modification of the Gpib class from Soleil, headr files and library needed for the compilation of the LKS340TempCtrl executable are svn in the cppserver directory. The controller works with two internal loops (1 and 2), the class uses loop 1. The input to control from (A or B) can be set via an attribute. 22.27.1 Properties pogo_html_docu/LKS340TempCtrl/Properties.html See pogo generated info for more details. GpibDeviceName. Name of the GpibDeviceServer device connecting to the temperature controller. 22.27.2 States pogo_html_docu/LKS340TempCtrl/States.html See pogo generated info for more details. ON. Device running without problems. FAULT. Not able to connect GpibDeviceServer device. 22.27.3 Commands pogo_html_docu/LKS340TempCtrl/Commands.html See pogo generated info for more details. Init. Default Tango command. Initializes the device. 22.27.4 Attributes pogo_html_docu/LKS340TempCtrl/Attributes.html See pogo generated info for more details. ControlChannel. Set/get which input to control from. Valied values: A and B. ControlMode. Configures/queries the control loop mode. 1=manual PID, 2= Zone, 3= Open loop, 4= AutoTune PID, 5= AutoTune PI, 6= AutoTune P. ControlModeInfo. Shows the control loop mode in text. Derivative. Writes/reads D parameter. HeaterRange. Configures/queries the heater range. Valid entries: 0 - 5. Setting the range to 0 turns the heater off. Integral. Writes/reads I parameter. InputCurveA. Writes/reads the curve the channel A uses for temperature conversion. Valid entries: 0 = none, 1 - 20 = standard curves, 21 - 60 = user curves. InputCurveA. Writes/reads the curve the channel B uses for temperature conversion. Valid entries: 0 = none, 1 - 20 = standard curves, 21 - 60 = user curves. OutputChannelA. Kelvin reading for channel A. OutputChannelB. Kelvin reading for channel B. Proportional. Writes/reads P parameter. RampRate. Configures/queries the number of kelvin per minute to ramp the setpoint. RampOffOn. If 0/1 the ramping is off/on. By writting 0/1 turns the ramping off/on. SetPoint. Writes/reads the temperature set point (in Kelvin). 22.28 LoCuM4ENZ pogo_html_docu/LoCuM4ENZ/index.html See pogo generated info for more details. Tango class for controlling the 4-Channel Low-Current Monitor from ENZ. 22.28.1 Properties pogo_html_docu/LoCuM4ENZ/Properties.html See pogo generated info for more details. 22.28.2 States pogo_html_docu/LoCuM4ENZ/States.html See pogo generated info for more details. 22.28.3 Commands pogo_html_docu/LoCuM4ENZ/Commands.html See pogo generated info for more details. 22.28.4 Attributes pogo_html_docu/LoCuM4ENZ/Attributes.html See pogo generated info for more details. 22.29 MercuryiTCTempCtrl Server for controlling the MercuryiTC temperature controller from Oxford Instruments. The server uses to classes: MercuryiTCTempCtrl, making the connection to the controller, and MercuryiTCTempSensor, controlling a single sensor. 22.29.1 MercuryiTCTempCtrl pogo_html_docu/MercuryiTCTempCtrl/index.html See pogo generated info for more details. Properties pogo_html_docu/MercuryiTCTempCtrl/Properties.html See pogo generated info for more details. States pogo_html_docu/ThermoScientificTempCtrl/States.html See pogo generated info for more details. Commands pogo_html_docu/MercuryiTCTempCtrl/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/MercuryiTCTempCtrl/Attributes.html See pogo generated info for more details. 22.29.2 MercuryiTCTempSensor pogo_html_docu/MercuryiTCTempSensor/index.html See pogo generated info for more details. Properties pogo_html_docu/MercuryiTCTempSensor/Properties.html See pogo generated info for more details. States pogo_html_docu/ThermoScientificTempSensor/States.html See pogo generated info for more details. Commands pogo_html_docu/MercuryiTCTempSensor/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/MercuryiTCTempSensor/Attributes.html See pogo generated info for more details. 22.30 MirrorCalculator The MirrorCalculator Server determines the incidence of the beam in the two p06 mirrors. pogo_html_docu/MirrorCalculator/i See pogo generated info for more details. 22.30.1 Properties pogo_html_docu/MirrorCalculator/Properties.html See pogo generated info for more details. 22.30.2 States pogo_html_docu/MirrorCalculator/States.html See pogo generated info for more details. 22.30.3 Commands pogo_html_docu/MirrorCalculator/Commands.html See pogo generated info for more details. 22.30.4 Attributes pogo_html_docu/MirrorCalculator/Attributes.html See pogo generated info for more details. 22.31 MythenClient pogo_html_docu/MythenClient/index.html See pogo generated info for more details.. Server for generating a plot acumulating data of the mythen detector in a scanned energy range. The generation of the plot is automatically done running a python script subscribed to the Sardana Record and a scan in spock. 22.31.1 Properties pogo_html_docu/MythenClient/Properties.html See pogo generated info for more details. 22.31.2 States pogo_html_docu/MythenClient/States.html See pogo generated info for more details. 22.31.3 Commands pogo_html_docu/MythenClient/Commands.html See pogo generated info for more details. 22.31.4 Attributes pogo_html_docu/MythenClient/Attributes.html See pogo generated info for more details. 22.31.5 Sardana Listener This is an example of a python script subscribing to the sardana record for controlling the MythenClient server. The record will be generated when a scan is performed. #!/usr/bin/env python import import import import import PyTango random time sys taurus.core.tango.sardana.macroserver taurus.core.tango.sardana.macroserver.registerExtensions() class output_door( taurus.core.tango.sardana.macroserver.BaseDoor): def __init__( self, name, **kw): print "output_door.__init__", name self.call__init__(taurus.core.tango.sardana.macroserver.BaseDoor, name, **kw) self.total_scan_intervals = 0 self.motor_name = "" self.mythen_device = PyTango.DeviceProxy("test/mythenclient/1") def recordDataReceived( self, s, t,v): dt = taurus.core.tango.sardana.macroserver.BaseDoor.recordDataReceived( self, s, t, if dt is not None: if dt[1][’type’] == "data_desc": self.motor_name = dt[1][’data’][’ref_moveables’][0] if self.motor_name == "anen": # Name of the analyzer energy motor given in o self.total_scan_intervals = dt[1][’data’][’total_scan_intervals’] self.mythen_device.StartSpectrum() for elem in dt[1][’data’][’column_desc’]: if elem[’name’] == self.motor_name: self.energy_start = elem[’min_value’] self.energy_end = elem[’max_value’] self.mythen_device.EnergyStart = self.energy_start self.mythen_device.EnergyEnd = self.energy_end self.nb_points = dt[1][’data’][’total_scan_intervals’] self.energy_interval = (self.energy_end-self.energy_start)/self.nb_point self.mythen_device.EnergyStep = self.energy_interval return dt if dt[1][’type’] != "record_data": return dt if self.motor_name == "anen": # Name of the analyzer energy motor given in onlin motor_pos = dt[1][’data’][self.motor_name] self.mythen_device.CurrentEnergy = motor_pos return dt factory = taurus.Factory() factory.registerDeviceClass( ’Door’, output_door) door = taurus.Device("p09/door/haso111tb") The script above (called in the example test mythen.py) is started runnig the following script: #!/usr/bin/env python import sys, os, time import test_mythen if __name__ == "__main__": while 1: time.sleep(1) 22.32 OxfCryostreamCooler Tango Server for the 700 Series Cryostream Cooler from Oxford Microsystems. The Server consists of two classes: • OxfCryostreamCoolerCtrl. Makes the communication with the hardware via socket. • OxfCryostreamCooler. Connects to the OxfCryostreamCoolerCtrl device for performing actions and reading the status. 22.32.1 OxfCryostreamCoolerCtrl pogo_html_docu/OxfCryostreamCoolerCtrl/index.html See pogo generated info for more details. Properties pogo_html_docu/OxfCryostreamCoolerCtrl/Properties.html See pogo generated info for more details. States pogo_html_docu/OxfCryostreamCoolerCtrl/States.html See pogo generated info for more details. Commands pogo_html_docu/OxfCryostreamCoolerCtrl/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/OxfCryostreamCoolerCtrl/Attributes.html See pogo generated info for more details. 22.32.2 OxfCryostreamCooler pogo_html_docu/OxfCryostreamCooler/index.html See pogo generated info for more details. Properties pogo_html_docu/OxfCryostreamCooler/Properties.html See pogo generated info for more details. States pogo_html_docu/OxfCryostreamCooler/States.html See pogo generated info for more details. Commands pogo_html_docu/OxfCryostreamCooler/Commands.html See pogo generated info for more details. Attributes pogo_html_docu/OxfCryostreamCooler/Attributes.html See pogo generated info for more details. 22.33 Petra3ICS The Petra3ICS server breaks the interlock using the corresponding url address. pogo_html_docu/Petra3ICS/index.html See pogo generated info for more details. 22.33.1 Properties pogo_html_docu/Petra3ICS/Properties.html See pogo generated info for more details. Beamline. The number of the beamline. 22.33.2 States pogo_html_docu/Petra3ICS/States.html See pogo generated info for more details. ON. Default state. 22.33.3 Commands pogo_html_docu/Petra3ICS/Commands.html See pogo generated info for more details. BreakInterlock. Breaks the interlock for the beamline set in the Beamline property and the area given as an argument. If the area has two branches (area different than 1 for beamlines 2, 7 and 12) the Branch attribute is used for selecting the branch in which the interlock should be broken. GetInterlockStatus. Gets the interlock status for the beamline (0 -¿ interlock set, 3 -¿ interlock broken) set in the Beamline property and the area given as an argument. If the area has two branches (area different than 1 for beamlines 2, 7 and 12) the Branch attribute is used for selecting the branch in which the interlock should be broken. 22.33.4 Attributes pogo_html_docu/Petra3ICS/Attributes.html See pogo generated info for more details. Branch. Selects branch (A or B). Only used for beamlines 2, 7 and 12. 22.34 Petra3Info Server for displaying information about Petra3 collected from different sources. pogo_html_docu/Petra3Info/index.html See pogo generated info for more details. 22.34.1 Properties pogo_html_docu/Petra3Info/Properties.html See pogo generated info for more details. 22.34.2 States pogo_html_docu/Petra3Info/States.html See pogo generated info for more details. 22.34.3 Commands pogo_html_docu/Petra3Info/Commands.html See pogo generated info for more details. 22.34.4 Attributes pogo_html_docu/Petra3Info/Attributes.html See pogo generated info for more details. 22.35 Petra3Shutter The Petra3Shutter server reads the status of the absorber und shutters for a given beamline from the url addresses from the ICS Server. It also perfoms closing/opening of the shutters, again via url address. The names of the shutters (determining the names of the attributes) are created dynamically depending on the beamline. pogo_html_docu/Petra3Shutter/index.html See pogo generated info for more details. 22.35.1 Properties pogo_html_docu/Petra3Shutter/Properties.html See pogo generated info for more details. Beamline. The number of the beamline for which the information of the absorber and shutters will be shown. For example, 8 for p08, 10 for p10. 22.35.2 States pogo_html_docu/Petra3Shutter/States.html See pogo generated info for more details. ALARM. Not used. ON. The server run without problems. 22.35.3 Commands pogo_html_docu/Petra3Shutter/Commands.html See pogo generated info for more details. CloseOpenABS BS 0. With input argument 1/0 opens/closes the absorber and the shutter identified with 0 in the beamline. CloseOpen BS 1. With input argument 1/0 opens/closes the shutter identified with 1 (A in case of p02/p04/p07) in the beamline. It does nothing if shutter does not exist. CloseOpen BS 1B. With input argument 1/0 opens/closes the shutter identified with 1B in p02/p04/p07 beamlines. It does nothing if shutter does not exist. CloseOpen BS 2. With input argument 1/0 opens/closes the shutter identified with 2 (A in case of p02/p04/p07) in the beamline. It does nothing if shutter does not exist. CloseOpen BS 3. With input argument 1/0 opens/closes the shutter identified with 3 (A in case of p02/p04/p07) in the beamline. It does nothing if shutter does not exist. CloseOpen BS 4. With input argument 1/0 opens/closes the shutter identified with 4 (A in case of p02/p04/p07) in the beamline. It does nothing if shutter does not exist. CloseOpen BS 5. With input argument 1/0 opens/closes the shutter identified with 5 (A in case of p02/p04/p07) in the beamline. It does nothing if shutter does not exist. Init. Default Tango command. It creates the url names for closing/opening the shutters and the dynamic attributes. 22.35.4 Attributes pogo_html_docu/Petra3Shutter/Attributes.html See pogo generated info for more details. All the attributes are dynamically created in the Init function. For each shutter in the beamline four attributes are created: [ShutterName]GeschlossenLabelEn. String with the shutter state. [ShutterName]GeschlossenDisplayState. 0 closed, 3 is open. [ShutterName]OffenLabelEn. String with the shutter state. [ShutterName]OffenDisplayState. 0 closed, 3 is open. 22.36 Petra3Undulator The Petra3Undulator Server talks either to the TangoToTineGateWay (TTTGW) Server mapping the Tine Server for the Undulator that wants to be usde, or to a PlcUndulator (PTTGW) Server. The name of the TTTGW Server is given in the TTTGW Name property of this Server; alternatively the name of the PTTGW Server can be given in the PTTGW Name property. The State and Status of this Server is determined using the CtrlByte and StatusByte properties of the TTTGW/PTTGW Server. pogo_html_docu/Petra3Undulator/index.html See pogo generated info for more details. 22.36.1 Properties pogo_html_docu/Petra3Undulator/Properties.html See pogo generated info for more details. Beamline. Beamline number. Used for selecting the right constants for the conversion from gap to energy and vice versa. TTTGW Name. The name of the Tine device for the undulator. The Tine devices should be mapped automatically into Tango devices by the TTTGW (Tine To Tango GateWay) class with the same name. The Undulator class will acess the device of the Tine To Tango Gateway. PTTGW Name. The name of the plc device for the undulator. LockTimeMs. After sending a StartMove command, the state will be locked to MOVING for ’LockTimeMs’ milliseconds. This is to avoid state oscillations if the actual start of the move takes some time. 22.36.2 States pogo_html_docu/Petra3Undulator/States.html See pogo generated info for more details. ON. The undulator has reached the requested position and is waiting for a new request. MOVING. The undulator is moving to a new position. DISABLE. The undulator is disabled for the experiment. Only reading is possible. The control room has taken the control over the undulator or the local control is activated. FAULT. The hardware indicates a fault. A reset might help. UNKNOWN. No connection to the Tine undulator device, state cannot be evaluated. ALARM. The local control indicates incoherent set and read values. 22.36.3 Commands pogo_html_docu/Petra3Undulator/Commands.html See pogo generated info for more details. Calibrate. It does nothing. Defined for compatibility with the rest of the motor and energy devices. Init. Default Tango command. It makes the connection to the TTTGW Server and initializes the attributes, state and status to the current values. ResetMotor. Resets a hardware fault. It perfoms the actions of the property Reset of the mapped Tine Server. The name is choosen for compatibility with the rest of motor and energy devices. StartMove. Start a gap or taper movement to the position written in GapTarget or TaperTarget respectively. It perfoms the actions of the property Start of the mapped Tine Server. StopMove. Stop a gap or taper movement. It perfoms the actions of the property Stop of the mapped Tine Server. 22.36.4 Attributes pogo_html_docu/Petra3Undulator/Attributes.html See pogo generated info for more details. Gap. Gap of the undulator. It is read/written directly from/to the TTTGW/PTTGW Server. Writing to this attribute is equivalent to write in GapTarget and perform StartMove after that. The limits set in the Petra3Undulator class are 220/9.5 mm. The protection to write it is done, in case is needed, in the TTTGW/PTTGW Server, not in Tango, the State of this Server will be DISABLE in this case. It is an expert controlled attribute, only seen by ATK in Expert View mode. GapTarget. Position to be moved the gap to if the command StartMove is performed. It is read/written directly from/to the attribute of the same name in the TTTGW/PTTGW Server. Harmonic. Harmonic to be used in the calculation of the gap from the energy. If 0, it takes the minimum odd harmonic possible for the given energy. Position. Undulator energy computed using the gap and fitting parameters. By writting it moves the gap to the value computed from the given value, take it as energy in eV. By reading it returns the energy value computed from te current gap. PositionSim. Computes the gap for the given energy and stores the value in the ResultSim attribute. It does not make any movement. ResultSim. Shows the position of the gap computed from the energy value written in the PositionSim attribute. SetHarmonicAutomatically. If 1, the Harmonic used in the calculation of the gap from the energy will be automatically changed according to the energy to set. It takes the maximum possible odd harmonic for the given energy. Taper. The applied taper on the undulator. It is read/written directly from/to the TTTGW/PTTGW Server. Writting to this attribute is equivalent to write in TaperTarget and perform StartMove after that. The limits set in the Petra3Undulator class are 1/-1 mm. The protection to write it is done, in case is needed, in the Tine Server, not in Tango, the State of this Server will be DISABLE in this case. It is an expert controlled attribute, only seen by ATK in Expert View mode. TaperTarget. Position to be moved the taper to if the command StartMove is performed. It is read/written directly from/to the attribute of the same name in the TTTGW/PTTGW Server. UnitLimitMax. Maximum allowed energy for the selected harmonic. If attribute Harmonic is 0, takes the maximum energy for the 7th harmonic. The value is computed asuming K= 0. Writting makes nothing. UnitLimitMin. Minimum allowed energy for the selected harmonic. If attribute Harmonic is 0, takes the minimum energy for the 1st harmonic. The value is computed using the K value for the minimum gap. Writting makes nothing. Velocity. The moving velocity of the undulator gap in % of the maximum velocity. It is read/written directly from/to the TTTGW/PTTGW Server. The limits set in the Petra3Undulator class are 100/0. The protection to write it is done, in case is needed, in the Tine Server, not in Tango, the State of this Server will be DISABLE in this case. 22.37 PfeifferGauge pogo_html_docu/PfeifferGauge/index.html See pogo generated info for more details.. Server for controlling the dual-gauge (TPG262) and the multi-gauge (TPG256A) pressure measurement and control devices from Pfeiffer. The property TPGType selects the gauge type. The additional attributes for the TPG256A (six channels instead of two) are dinamically created if TPGType is set to 256. 22.37.1 Properties pogo_html_docu/PfeifferGauge/Properties.html See pogo generated info for more details. 22.37.2 States pogo_html_docu/PfeifferGauge/States.html See pogo generated info for more details. 22.37.3 Commands pogo_html_docu/PfeifferGauge/Commands.html See pogo generated info for more details. 22.37.4 Attributes pogo_html_docu/PfeifferGauge/Attributes.html See pogo generated info for more details. 22.38 PiLC pogo_html_docu/PiLC/index.html See pogo generated info for more details. Tango class communicating with the FPGA from the RaspberryPi. 22.38.1 Properties pogo_html_docu/PiLC/Properties.html See pogo generated info for more details. 22.38.2 States pogo_html_docu/PiLC/States.html See pogo generated info for more details. 22.38.3 Commands pogo_html_docu/PiLC/Commands.html See pogo generated info for more details. 22.38.4 Attributes pogo_html_docu/PiLC/Attributes.html See pogo generated info for more details. 22.39 PIPEClient Tango Server connecting to the PIPE (Photon-Ion spectrometer at PEtra III) control system for transfering information to Tango. pogo_html_docu/PIPEClient/index.html See pogo generated info for more details. 22.39.1 Properties pogo_html_docu/PIPEClient/Properties.html See pogo generated info for more details. 22.39.2 States pogo_html_docu/PIPEClient/States.html See pogo generated info for more details. 22.39.3 Commands pogo_html_docu/PIPEClient/Commands.html See pogo generated info for more details. 22.39.4 Scalar Attributes pogo_html_docu/PIPEClient/Attributes.html See pogo generated info for more details. 22.40 PIPEKeithley Tango Server for reading the information from the Keithley of the PIPE control system. It uses the PIPEClient class for making the conexion. pogo_html_docu/PIPEKeithley/index.html See pogo generated info for more details. 22.40.1 Properties pogo_html_docu/PIPEKeithley/Properties.html See pogo generated info for more details. 22.40.2 States pogo_html_docu/PIPEKeithley/States.html See pogo generated info for more details. 22.40.3 Commands pogo_html_docu/PIPEKeithley/Commands.html See pogo generated info for more details. 22.40.4 Scalar Attributes pogo_html_docu/PIPEKeithley/Attributes.html See pogo generated info for more details. 22.41 PLCTempCtrlP02 Tango Server for controlling the oven temperature at P02 beamline. Connection via Beckhoff PLC using the Ads Tango class. pogo_html_docu/PLCTempCtrlP02/index.html See pogo generated info for more details. 22.41.1 Properties pogo_html_docu/PLCTempCtrlP02/Properties.html See pogo generated info for more details. 22.41.2 States pogo_html_docu/PLCTempCtrlP02/States.html See pogo generated info for more details. 22.41.3 Commands pogo_html_docu/PLCTempCtrlP02/Commands.html See pogo generated info for more details. 22.41.4 Scalar Attributes pogo_html_docu/PLCTempCtrlP02/Attributes.html See pogo generated info for more details. 22.42 RMUp04 Tango Server for controlling the focusing unit at p04. It talks to the hardware via EPICS. pogo_html_docu/RMUp04/index.html See pogo generated info for more details. 22.42.1 Properties pogo_html_docu/RMUp04/Properties.html See pogo generated info for more details. 22.42.2 States pogo_html_docu/RMUp04/States.html See pogo generated info for more details. 22.42.3 Commands pogo_html_docu/RMUp04/Commands.html See pogo generated info for more details. 22.42.4 Scalar Attributes pogo_html_docu/RMUp04/Attributes.html See pogo generated info for more details. 22.43 SardanaStarter The SardanaStarter Server starts and stops Pool and MacroServer process based on a selected configuration file. Starting the processes creates the devices in the Tango Database, stopping the processes delete the created database entries. The processes are started when the server starts running, using the file given in the DefaultConfigFile property, and stopped when the server is stopped, using the copy of the configuration file in the ConfigFile attribute (file with the same name and the termination .back, this file is automatically generated when a file is used for starting the processes). pogo_html_docu/SardanaStarter/Description.html See pogo generated info for more details. 22.43.1 Properties pogo_html_docu/SardanaStarter/Properties.html See pogo generated info for more details. DefaultConfigFile. Default name of the configuration file, including directory path, to be used for starting Pool and MacroServer processes. Both processes will be started at the initialization of the server based on this file. The content of this property is copied to the ConfigFile attribute. 22.43.2 States pogo_html_docu/SardanaStarter/TangoDevStates.html See pogo generated info for more details. FAULT. Not implemented. ON. Pool and MacroServer processes are running. STANDBY. Pool and MacroServer processes are not running. 22.43.3 Commands pogo_html_docu/SardanaStarter/DevCommands.html See pogo generated info for more details. Init. Default Tango command. It starts Pool and MacroServer processes using the configuration file given in the DefaultConfigFile property. The configuration file is copied in a file in the same directory and with the same name adding the termination .back, this file will be used for stopping Pool and MacroServer processes. It copies the content of the DefaultConfigFile property in the ConfigFile attribute. StartSardana. It starts Pool and MacroServer processes based on the file given in the ConfigFile attribute. It makes a copy of this file with the same name adding the termination .back. This backup file will be used for stopping the processes, this allows changing the configuration file even if Pool and MacroServer processes are running. StopSardana. It stops Pool and MacroServer processes based on the file given in the ConfigFile attribute. It uses the file with the termination .back in case it exits, for being sure that the file for stopping the processes is the same that the one used for starting it, this avoids problems deleting entries in the Tango database. 22.43.4 Attributes pogo_html_docu/SardanaStarter/Attributes.html See pogo generated info for more details. ConfigFile. Complete file name, including directory path, of the configuration file used by the StartSardana and StopSardana commands. At the initialization of the server the DefaultConfigFile property is copied to this attribute. 22.44 SaveLoadAttrs Tango class for saving the current values of the attributes of any selected tango device to an ascii file or write to the attributes the values stored in an ascii file. The format of the file is: attribute_name : value : data_format : writable pogo_html_docu/SaveLoadAttrs/index.html See pogo generated info for more details. 22.44.1 Properties pogo_html_docu/SaveLoadAttrs/Properties.html See pogo generated info for more details. 22.44.2 States pogo_html_docu/SaveLoadAttrs/States.html See pogo generated info for more details. 22.44.3 Commands pogo_html_docu/SaveLoadAttrs/Commands.html See pogo generated info for more details. 22.44.4 Attributes pogo_html_docu/SaveLoadAttrs/Attributes.html See pogo generated info for more details. 22.45 SPSeh2 Server for the controlling variables in the sps in p02 eh2. Connection via Beckhoff using the ads tango class. pogo_html_docu/SPSeh2/index.html See pogo generated info for more details. 22.45.1 Properties pogo_html_docu/SPSeh2/Properties.html See pogo generated info for more details. 22.45.2 States pogo_html_docu/SPSeh2/States.html See pogo generated info for more details. 22.45.3 Commands pogo_html_docu/SPSeh2/Commands.html See pogo generated info for more details. 22.45.4 Attributes pogo_html_docu/SPSeh2/Attributes.html See pogo generated info for more details. 22.46 SRSResGasAnalyzer pogo_html_docu/SRSResGasAnalyzer/index.html See pogo generated info for more details.. 22.46.1 Properties pogo_html_docu/SRSResGasAnalyzer/Properties.html See pogo generated info for more details. 22.46.2 States pogo_html_docu/SRSResGasAnalyzer/States.html See pogo generated info for more details. 22.46.3 Commands pogo_html_docu/SRSResGasAnalyzer/Commands.html See pogo generated info for more details. 22.46.4 Attributes pogo_html_docu/SRSResGasAnalyzer/Attributes.html See pogo generated info for more details. 22.47 T95TempProgLinkam Server for the control of the T95 Temperature Programmer from Linkam Scientific Instruments. pogo_html_docu/T95TempProgLinkam/index.html See pogo generated info for more details. 22.47.1 Properties pogo_html_docu/T95TempProgLinkam/Properties.html See pogo generated info for more details. 22.47.2 States pogo_html_docu/T95TempProgLinkam/States.html See pogo generated info for more details. 22.47.3 Commands pogo_html_docu/T95TempProgLinkam/Commands.html See pogo generated info for more details. 22.47.4 Attributes pogo_html_docu/T95TempProgLinkam/Attributes.html See pogo generated info for more details. 22.48 TIP850u10 Class This class put together the TIP850DAC und TIP850ADC classes. pogo_html_docu/TIP850u10/index.html See pogo generated info for details. 22.48.1 Properties pogo_html_docu/TIP850u10/Properties.html See pogo generated info for more details. 22.48.2 States pogo_html_docu/TIP850u10/States.html See pogo generated info for more details. 22.48.3 Commands pogo_html_docu/TIP850u10/Commands.html See pogo generated info for more details. 22.48.4 Attributes pogo_html_docu/TIP850u10/Attributes.html See pogo generated info for more details. 22.49 TGA1240WaveGen pogo_html_docu/TGA1240WaveGen/index.html See pogo generated info for more details. Tango class for controlling the TGA1240 Waveform generator. Connection via gpib. 22.49.1 Properties pogo_html_docu/TGA1240WaveGen/Properties.html See pogo generated info for more details. 22.49.2 States pogo_html_docu/TGA1240WaveGen/States.html See pogo generated info for more details. 22.49.3 Commands pogo_html_docu/TGA1240WaveGen/Commands.html See pogo generated info for more details. 22.49.4 Attributes pogo_html_docu/TGA1240WaveGen/Attributes.html See pogo generated info for more details. 22.50 ThermocoupleioLogikE2262 pogo_html_docu/ThermocoupleioLogikE2262/index.html See pogo generated info for more details. Tango Server for controlling the thermocouple ioLogikE2262. The communication is done via CGI commands using a standard http protocol. 22.50.1 Properties pogo_html_docu/ThermocoupleioLogikE2262/Properties.html See pogo generated info for more details. 22.50.2 States pogo_html_docu/ThermocoupleioLogikE2262/States.html See pogo generated info for more details. 22.50.3 Commands pogo_html_docu/ThermocoupleioLogikE2262/Commands.html See pogo generated info for more details. 22.50.4 Attributes pogo_html_docu/ThermocoupleioLogikE2262/Attributes.html See pogo generated info for more details. 22.51 ThermoScientificTempCtrl pogo_html_docu/ThermoScientificTempCtrl/index.html See pogo generated info for more details.. 22.51.1 Properties pogo_html_docu/ThermoScientificTempCtrl/Properties.html See pogo generated info for more details. 22.51.2 States pogo_html_docu/ThermoScientificTempCtrl/States.html See pogo generated info for more details. 22.51.3 Commands pogo_html_docu/ThermoScientificTempCtrl/Commands.html See pogo generated info for more details. 22.51.4 Attributes pogo_html_docu/ThermoScientificTempCtrl/Attributes.html See pogo generated info for more details. 22.52 UndulatorP04 pogo_html_docu/UndulatorP04/index.html See pogo generated info for more details. Class for the undulator in p04. The formulas and parameters for the conversions from gap to energy and energy to gap are loaded from a python file (the name of this file is given in the UndulatorCode property). 22.52.1 Properties pogo_html_docu/UndulatorP04/Properties.html See pogo generated info for more details. 22.52.2 States pogo_html_docu/UndulatorP04/States.html See pogo generated info for more details. 22.52.3 Commands pogo_html_docu/UndulatorP04/Commands.html See pogo generated info for more details. 22.52.4 Scalar Attributes pogo_html_docu/UndulatorP04/Attributes.html See pogo generated info for more details. 22.52.5 Example of the file with conversion formulas and parameters #!/bin/env python import sys # Parameters for converting Gap (mm) to Energy par_p = [446.956214989159, -116.181965697312, 16.3673029209249, -1.02639166315795, 0.0375373 # Parameters for converting Energy to Gap (mm) par_c = [0.375992508974348 , 0.0612960540130145, -8.15556111844620e-05, 7.62290492864854e-08 class Undulator: def read_Position(self, current_gap): current_position = par_p[0] + par_p[1]*current_gap + par_p[2]*pow(current_gap,2) + par_p[3]* return current_position def calculate_Gap( self, energy): set_gap = par_c[0]+par_c[1]*energy+par_c[2]*pow(energy,2)+par_c[3]*pow(energy,3)+par_c[4]*po return set_gap def main(): if len(sys.argv)<2: print "Usage: python undulator.py [energy (eV)] [gap(mm)]" else: und = Undulator() energy = float(sys.argv[1]) computed_gap = und.calculate_Gap(energy) print "For energy " + str(energy) + " eV computed gap " + gap = float(sys.argv[2]) computed_energy = und.read_Position(gap) print "For gap " + str(gap) + " mm computed energy " + str(computed_gap) + " mm" str(computed_energy) + " eV" if __name__ == "__main__": main() 22.53 VarianGetterpump pogo_html_docu/VarianGetterpump/index.html See pogo generated info for more details. 22.53.1 Properties pogo_html_docu/VarianGetterpump/Properties.html See pogo generated info for more details. 22.53.2 States pogo_html_docu/VarianGetterpump/States.html See pogo generated info for more details. 22.53.3 Commands pogo_html_docu/VarianGetterpump/Commands.html See pogo generated info for more details. 22.53.4 Attributes pogo_html_docu/VarianGetterpump/Attributes.html See pogo generated info for more details. 22.54 Vibrations The Vibrations Server proccesses data coming from a seismometer, for computing the oscilations in the petra hall. The Tango class corresponds to data in one direction. The data are read from ascii files writen by an external program in an afs directory, this directory is given in one property of the server. pogo_html_docu/Vibrations/index.html See pogo generated info for more details. 22.54.1 Properties pogo_html_docu/Vibrations/Properties.html See pogo generated info for more details. DeviceDirectory. Identifies the direction of the device in the room: nord (S1n), east (S1e) or z (S1z). FilesPath. Directory where the files with the information from the seismometer are read from. 22.54.2 States pogo_html_docu/Vibrations/States.html See pogo generated info for more details. ALARM. Exceptions in processing thread (read status for more information). FAULT. Problems in the reading or processing of the files. ON. Reading and processing files. STANDBY. Waiting for files. 22.54.3 Commands pogo_html_docu/Vibrations/Commands.html See pogo generated info for more details. • State. Overloads the default function, taking into account the state of the reading/processing. • State. Overloads the default function, giving information about the reading/processing. 22.54.4 Attributes pogo_html_docu/Vibrations/Attributes.html See pogo generated info for more details. 22.55 WebThermograph pogo_html_docu/WebThermograph/index.html See pogo generated info for more details. 22.55.1 Properties pogo_html_docu/WebThermograph/Properties.html See pogo generated info for more details. 22.55.2 States pogo_html_docu/WebThermograph/States.html See pogo generated info for more details. 22.55.3 Commands pogo_html_docu/WebThermograph/Commands.html See pogo generated info for more details. 22.55.4 Attributes pogo_html_docu/WebThermograph/Attributes.html See pogo generated info for more details. 22.56 WebThermoHygrobarograph pogo_html_docu/WebThermoHygrobarograph/index.html See pogo generated info for more details. 22.56.1 Properties pogo_html_docu/WebThermoHygrobarograph/Properties.html See pogo generated info for more details. 22.56.2 States pogo_html_docu/WebThermoHygrobarograph/States.html See pogo generated info for more details. 22.56.3 Commands pogo_html_docu/WebThermoHygrobarograph/Commands.html See pogo generated info for more details. 22.56.4 Attributes pogo_html_docu/WebThermoHygrobarograph/Attributes.html See pogo generated info for more details. 22.57 XMCD pogo_html_docu/XMCD/index.html See pogo generated info for more details. Tango class communicating with a PiLC Tango device for permorfing an intensity normalization. 22.57.1 Properties pogo_html_docu/XMCD/Properties.html See pogo generated info for more details. 22.57.2 States pogo_html_docu/XMCD/States.html See pogo generated info for more details. 22.57.3 Commands pogo_html_docu/XMCD/Commands.html See pogo generated info for more details. 22.57.4 Attributes pogo_html_docu/XMCD/Attributes.html See pogo generated info for more details. 22.58 Zebra Tango class for operating the Zebra box (digital signal level converter and position capture box). The connection to the Zebra can be done directly to the computer using the USB connection or to a terminal server. In case the USB connection is used, the property PortNb has to be set to -1 and the IPAdress has to be set to the name of the USB device, for example /dev/ttyUSB1. By setting the attribute Arm to 1, trigger pulses are generated in the TTL Output set in the Property TTLOutput. The time between triggers and the pulse length are set in the TriggerInterval and TriggerPulseTime attributes, respectively. The number of triggers to be generated is set in the attribute NbTriggers. The gate for the triggers can be started based on time or in encoder position. The property GateTriggByPos allows to select between this two operation modes. If set to 0, the trigger pulses start after setting Arm to 1. If set to 1, the trigger pulses start after setting Arm to 1 when the position of the encoder connected to the first encoder signal reaches the position set in the Attribute TriggerPosStart. This position is given in physical units, the conversion to encoder units is done using the properties PosConversionFactor and PosOffset, that has to be set correctly. If the calibration of the motor encoder and the of the Zebra are synchronized the PosOffset property has to be set to 0. The Attribute TriggerPosWidth can be used for fixing a window for stopping the pulse trigger generation, if positive the direction for stopping the trigger has to be the increasing one and if negative the decreasing one. If the number of triggers want to be fixed, without taking into account the final encoder position, set the attribute TriggerPosWidth to an amount outside the posible encoder range. In position trigger mode, the trigger pulses can be also stopped setting Arm to 0. Up to four encoder signals can be connected to the Zebra box and readout internally for each generated trigger. The property EncoderMask select which enconder signals want to be readout (ex. 1, for reading the signal connected to channel 1; 3 for reading the signals connected to channels 1 and 2; 8 for reading signal connected to channel 4, etc.). The values of the encoder signals for each trigger are exported in the spectrum attributes of the Tango class. If only one encoder signal is readout the corresponding values are in the attribute EncoderSpectrum (independently of in which channel this signal is connected), if two encoder signals are readout the values will go to the attributes EncoderSpectrum and Encoder2Spectrum and so sucessively. A cable from the TTL output selected has to be connected to the trigger input of the device that wants to be triggered (for example, the XIA detector or the SIS3820 Multichannel Scaler). The property TTLOutputMask selects to which TTL outputs is connected the trigger signal. The status of the Tango device is set to MOVING during the trigger generation, and it goes back to ON when it is finished. pogo_html_docu/Zebra/index.html See pogo generated info for more details. 22.58.1 Properties pogo_html_docu/Zebra/Properties.html See pogo generated info for more details. 22.58.2 States pogo_html_docu/Zebra/States.html See pogo generated info for more details. 22.58.3 Commands pogo_html_docu/Zebra/Commands.html See pogo generated info for more details. 22.58.4 Attributes pogo_html_docu/Zebra/Attributes.html See pogo generated info for more details. Chapter 23 Matlab Binding Matlab can be used as client for Tango. The matlabtango binding is installed in: /usr/lib/matlabtango If you don’t have it in your computer ask for the installation. For using it: • Start matlab as usual • Set binding paths: addpath(’/usr/lib/matlabtango/mex-file’) addpath(’/usr/lib/matlabtango/m-files’) addpath(’/usr/lib/matlabtango/m-files/utils’) addpath(’/usr/lib/matlabtango/m-files/in-progess’) addpath(’/usr/lib/matlabtango/m-files/object-layer’) addpath(’/usr/lib/matlabtango/m-files/regression-test’) • Check that the binding works, for example, with: tango_ping(’sys/database/2’) • Make the conexion to the Tango device you want to control, ex.: devtest=tango.Device(’p10/timer/e2.01’) • Start working with the created device. Typing: devtest. you will see the list of the API for the Tango Device in matlab. For example, for getting an attribute: devtest.get_attribute(’SampleTime’) or reading its current value: devtest.get_attribute(’SampleTime’).read 264 Index DAC, 151, 153 DGG2, 138 Example DGG2, 138 MCA, 163 register input, 140 output, 140 SIS3610, 140 TIP551, 151 TIP850DAC, 153 265
© Copyright 2024