66f9dcea0a608ec323370e514aefc0f9.ppt
- Количество слайдов: 21
Software for the New General detector Controller (NGC) DETECTORS FOR ASTRONOMY Garching (Germany), 12 -16 October 2009 Claudio Cumani / Jörg Stegmeier
NGC System Overview 4 - ADC Detector Clock/Bias Driver Up NGC LLCU (Linux) Sequencer Detector Shutter-Ctrl Up [N] - ADC Down Preamp-Ctrl Down AQ [N] - ADC FEB Up 2 3 Detector Detector Up [N] - ADC Down 2 3 [N] - ADC Up Down 2 3 Up [N] - ADC Down AQ NGC LLCU (Linux) LLCU = Linux Local Control Unit 2
NGC Computing Architecture n Programming Language: n C++ for control processes n IWS (Linux) Tcl/Tk for GUI and Startup. Scripts Instrument LAN Fast Ethernet/ Gigabit-Ethernet NGC LLCU (Linux) … With the current Linux-PC model we can achieve 200 Mbytes/s sustained input data-rate with co-adding (double correlated read-out) NGC LLCU (Linux) 3
Goals n n One software basis for both optical and infrared applications. Maximum heritage of the strength of both IRACE (infrared predecessor) and FIERA (optical predecessor). Modular object oriented architecture. Configurable for all possible system realizations (i. e. number of ADC-modules, number of bias-generators etc. ). n Easily programmable clock-pattern generation. n Synchronization with external events. n Version control and automated testing. 4
The Processes Instrument Workstation Error-System GUI Config. -Files Database FITS-Files Command/ Reply Data-Acquisition-Process Acquisition Process (Pre-Processing, Sorting, …) Device Driver Commands NGC LLCU Real-Time Display Control Server Driver-Interface-Process Data Log-System PCI-Bus Interface Fiber-Optic-Link to NGC Front End 5
NGC-DCS Control Server n n n The control server can be used as NGC-HW Control Sub. System of the NGC Optical Software (NGCOSW). That is the maximum degree of communality as the same compiled and linked object is used by both applications to access the HW. It can be configured at Run-Time for the one or the other purpose. This is also used as general Engineering Tool. Instrument Workstation GUI Config. -Files Command/ Reply Error-System Log-System Database FITS-Files Control Server Infrared Applications 6
Controller Programming n n n The detector voltages are defined in a Voltage Configuration File in Short-FITS format (xxx. v). Clock-Pattern blocks can be defined both in ASCIIFormat (xxx. clk) and in a Binary Format (xxx. bclk, output of the Graphical Editing Tool Blue. Wave). The formats can be converted automatically. Synchronization with external events (e. g. trigger) can be done after any state in any clock-pattern block. A Sequencer Programming Language has been defined to program the clock-pattern execution. There may be Multiple Sequencer Instances within one detector front end system. 7
Clock-Pattern Generation n n The clock pattern blocks define sequences of clock states, which are stored in a RAM inside the NGC sequencer hardware. The bits in the RAM define the state of each physical clock line plus: n n n Some control bits (“wait-for-trigger”, “end-of-pattern”). The duration of each state (dwell time) is defined in the state itself. Patterns can be programmed via a graphical tool (Bluewave) PATRAM Pattern RAM High Pattern RAM Low … + 0: 00000001010000000000000000 State 1 … + 1: 000000010100000001 000000000000000100 State 2 … + 2: 000000010100000001 000000000000000100 State 3 : … +(n-1): 10000001010000000000000000 State n … + n: 00000001010000000000000000 State 1 … +(n+1): 000000010100000001 000000000000000100 State 2 … +(n+2): 000000010100000001 000000000000000100 State 3 : … +(n+m-1): 10000001010000000000000000 State m Pattern 1 Pattern 2 ^ ^ ^ ^ ^ 64 60 56 52 48 44 40 36 32 28 24 20 16 12 8 4 1 Clock End of Pattern 8
Sequencer Programming n The sequencer program defines the order of execution of the defined clock pattern blocks. n Simple 7 -instruction code RAM. n Easy to be compiled. Address :
Sequencer Program Language n n n The sequencer program language is fully driven by Setup Parameters (e. g. detector integration time, number of integrations, window parameters, …). Support of Arithmetic Expression Evaluation (TCL-syntax) to derive any program-loop parameter from the setup parameters and to compute attributes like exposure time estimation and minimum DIT. Support of Sub-Routines and Include-Files to minimize the code length. 10
External Synchronization n n Synchronization points can be inserted at any place in any clock pattern executed by the sequencer program (i. e. set the “wait-for-trigger” bit in the particular state). When reaching such a point the pattern execution is suspended until the arrival of an external trigger signal. 11
Infrared “Exposures” n n Sustained Detector Read-Out and Video Display (display remains active during the “Exposure”). Sustained Data-Transfer between NGC-LLCU and Instrument Workstation for application specific Post. Processing (slow control loops, e. g. secondary autoguiding). Starting an “Exposure” basically means “starting to transfer data to disk”. Burst-Mode for fast raw data acquisition. 12
Data Acquisiton Processes n Multi-threaded pre-processing framework. n High concurrency (receive, process, transfer to multiple readers, handle command). n n n One process per read-out mode guarantees maximum independency and maximum safety (cannot corrupt working code, releases all resources). Template Processes have been developed, which are an easy-to-use and stand-alone tool to visualize NGC rawdata on the real-time display. Standard acquisition processes for the ESO Standard IR Detectors (HAWAII 1 Kx 1 K, HAWAII 2 -RG 2 Kx 2 K, SELEX, AQUARIUS, …) are available within the NGC software package. Special setups (e. g. mosaics) may require special software modules. 13
Frame Types n n User-definable Frame-Types (Raw-Sample, Mean-Value, Standard-Deviation, Half-Chop-Cycle, Intermediate Results…). The types can be selected to be generated/stored during an exposure. Exposure Break-Conditions can be set per “per frametype”. Individual SW-Windows per frame-type. 14
Data Interface n FITS-Files n n Direct connection to Acquisition Process (e. g. real-time display) n n Wait for exposure termination and read the generated FITS-file(s). Retrieve the binary image data with just minimum header information (dimension, type, sequential number). Post-Processing Call-Back n The control server calls a user-defined procedure before the frame is stored. 15
Optical vs. IF NGC n n Active intervention of the control-server during the exposure is required (application of new voltages in each state “wiping”, “integrating”, “reading”). “Active” interface to different kinds of shutter controllers (open/close, status check, open/close delays, etc. ). 16
Finite State Machine Detector controllers can be modeled as finite state machines i. e. : model of behavior composed of a finite number of states, transitions between those states, and actions 17
State Machine - UML n n Designed using UML (Unified Modeling Language) From this model, code can be automatically generated! 18
wsf Code generation tool: ESO wsf - workstation software framework: 1. state design (described by a configuration file) 2. automatic code generation from state design “automatically generated” code handles state transitions, messages, commands, error conditions, etc. (NOT the actions needed to drive an exposure!) 3. implementation of detector control code (CCD, shutter, etc) 19
Results n Code dimension: n n n NGC Base-SW: 220000 lines of code (Test SW = 16 %) NGC IR-SW: 36000 lines of code (Test SW = 12 %) NGC Optical SW: 82000 lines of code (Test SW = 27 %) Code dimension for optical NGC ~ code dimensions for FIERA controller Automatically generated code for optical NGC is 78% of the total optical NGC code (without Test SW) All NGC software modules are under version control and contain test procedures for automated testing according to the ESO VLT SOFTWARE standards. 20
Goals are achieved… q One software basis for both optical and infrared applications. q Maximum heritage of the strength of both IRACE (infrared predecessor) and FIERA (optical predecessor). q Modular object oriented architecture. q Configurable for all possible system realizations (i. e. number of ADC-modules, number of bias-generators etc. ). q Easily programmable clock-pattern generation. q Synchronization with external events. q Version control and automated testing. 21


