Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
Alan Campbell | PXD SC | 19.07.12 | Page 1
BelleII PXD DAQ/SC integrated approach
PXD slow control and daq control ( whitebook )
Requirements
Plans
Alan CampbellBelleII PXD DAQ/SCBayrischzell 19.07.2012
State Machine(daq run)State Machine
(daq run)
Overview – Control systemFrontend Layer
User Interface Layer
PowersupplyCooling
CrateControl
FrontendElectronic
ATCA
FrontendElectronic
DHH
Slow Control
State Machine(accelerator)
LV
State Machine(accelerator)
HV
State Machine(daq run)
State Machine(daq run)
DHCxcontrol
State Machine(daq run)
PMCxcontrolCrate
LVPanel
CoolerPanel
ATCAExpert
Panel(s)HV
Panel
RUNControlPanel
DHHExpert
Panel(s)
Master State Machine(accelerator)
Master State Machine(daq run)
Services Layer Alarm Handler
AlarmPanel
Archiver eLogOS+Software
Installation ServicesDatabase
Message Log
Process Control
Control Layer
DAQ Control
Alan Campbell | PXD SC | 19.07.12 | Page 3
BelleII PXD DAQ/SC integrated approach
> Integrated approach : one technology for slow control/daq control
Reduce manpower – implementation and maintainance
Spread knowledge
Reduce complexity
Adopt existing technology – gain from experience
Follow a well tried approach so don't forget parts ( “to be done later” ) like alarm handling, access control
Common approach focus for all systems ( atca/onsen+datcon,dhh/dhp/dcd/switcher,power,cooling ) - understood by all, operators/developer/systems
Usable for test stands, test beams
Expandable
In PXD slow control and daq control are strongly linked due to multistep powerup/asic setup procedure
Alan Campbell | PXD SC | 19.07.12 | Page 4
Requirements on control system - GENERAL
Unified access : measurements/settings (PV) should all be accessed with identical metaphor
measurements/settings individually accessable by unique name
Network based – efficient use of network – many 1000s of measurements/settings possible
Location transparency “Plug-and-play” – free to reorganise and expand system
Fault tolerance – automatic reconnect on process restarts or network outages
Access Control : PV modification by operator/expert only
Alarm : PV defines its own limits
Display : PV defines its display limits , measurement accuracy and units
Simulation : PV can operate without hardware to allow code development ahead of time
Alan Campbell | PXD SC | 19.07.12 | Page 5
Requirements on control system – Frontend/control layer
Support for devices eg PLC,serial
expandable as we have mainly custom devices → prefer open source
Support for platforms
linux,realtime kernel, intel/powerpc/microblaze → multiplatform
operating system interface layer - threads,clocks
Frontend Layer
State Machine language
ease programming and make control structure explicit
Control Layer
Alan Campbell | PXD SC | 19.07.12 | Page 6
Requirements on control system – Operator interface/Services
Multiplatform : linux , windows, macos
Remote Access ( secure tunnel )
Web access ( possibility to restrict to display only )
Rapid development – easy start , test setup usage
Integrated documentation
Archiver : storage of PV in database ( oracle/mysql/postgres..)
Alarmer : store, acknowledge, prioritise
Message log
Log book
Gateway : bridge to external control systems
User Interface Layer
Services Layer
Alan Campbell | PXD SC | 19.07.12 | Page 7
EPICS
> From Argonne National Lab – developed since 1994
> open source licence ( bsd like ) – freely distributable/modifiable
> Can compile ourselves for any linux/windows/lynx/rtems... version
> Community support
Many contributions also from Helmholtz Institutes
> Widely used everywhere except CERN
especially in accelerator controls , cryogenics
Babar, D0
KEK
> EPICS universe contains many add-ons, multiple solutions eg for user interface, archiver , device support etc.
> Biannual EPICS developer meetings
Alan Campbell | PXD SC | 19.07.12 | Page 8
Working with EPICS
EPICSIOC
[Frontend]
EPICSDatabase GUI
OrText editor
EPICS datapoints (PV) are defined in theFrontend system via settings files.Macro system for multiple identical devices.VisualDCT GUI
Frontend maintains datapoint and associated settings eg value limits,display limits,alarm limits etc.
EPICS provides software for the frontend'C' , portable, runs on linux,rtems,lynx on microblaze,arm
Alan Campbell | PXD SC | 19.07.12 | Page 9
Working with EPICS - IOC
EPICSIOC
[Frontend]
Hardware
Alan Campbell | PXD SC | 19.07.12 | Page 10
Working with EPICS - IOC
EPICSIOC
[Frontend]
In EPICS IOC the PV are actually records in its in memory database.
These records have each associated record support code. There are records for analogue and digital input and output , but also for calculations, fanin/out, power supply control, waveformetc.
Complete control algorithms can be achieved by linking records , and assigning values to the record parameters.Records propagate alarms, and can link to other PVs.This can be done by text coding or with help of a GUI.Hence complete frontend often needs no coding, just configuration.
Records also point to device support layer of IOC.Device support is available for many hardware modules/busses.
EPICS Channel Access provides network access to all PVs
IOC has been prepared on onsen powerpc linux capable of accessing fpga registers and tested in Siegen.
Alan Campbell | PXD SC | 19.07.12 | Page 11
Working with EPICS - IOC
EPICSIOC
[Frontend]
In EPICS IOC the PV are actually records in its in memory database.
These records have each associated record support code. There are records for analogue and digital input and output , but also for calculations, fanin/out, power supply control, waveformetc.
Complete control algorithms can be achieved by linking records , and assigning values to the record parameters.Records propagate alarms, and can link to other PVs.This can be done by text coding or with help of a GUI.Hence complete frontend often needs no coding, just configuration.
Records also point to device support layer of IOC.Device support is available for many hardware modules/busses.
EPICS Channel Access provides network access to all Pvs
IOC has been prepared on onsen powerpc linux capable of accessing fpga registers and tested in Siegen.
Alan Campbell | PXD SC | 19.07.12 | Page 12
Working with EPICS – Channel Access
EPICSIOC
[Frontend]
EPICS Channel Access provides network access to all PVs- IOC record links can access PVs in other IOCs- channel access clients ( display panels,archiver,alarmer.. )
Location of PV is discovered by broadcast request for list of PVChannel access servers reply if they match
Efficient use of networkreads:- clients set monitor on PV in which they are interested- server sends only significant changeswrites:- many write requests are collected in client and sent in a batch- same socket used for access to all PV in an IOC→ many 1000s channels can be handled
Servers are aware of client shutdown/crash and remove monitors.Clients are aware of server shutdown/crash and reconnect when server comes back up.- operator display grays disconnected channels
Alan Campbell | PXD SC | 19.07.12 | Page 13
EPICS - Middle Layer
EPICS can act as middle layer in two ways:
> SoftIOC software ( same as frontend )
user C code can be introduced in via eg subroutine record
SNL State Notation Compiler/Sequencer – C like language with easy access to PVs and SNL GUI editor
> Channel access client software and simple channel access server ( no EPICS database ). This is available both for C++ and Java.
C++/Java program can be extended with EPICS PV client/server functionality
Use favourite database access method to setup frontends from postgres tables
Upper middle layer – State machine fanout – could be implemented as softioc with SNL. Implementation started as first exercise.
Alan Campbell | PXD SC | 19.07.12 | Page 14
EPICS - Middle Layer
http://www-csr.bessy.de/control/SoftDist/sequencer/index.html
Alan Campbell | PXD SC | 19.07.12 | Page 15
EPICS – User interface layer
Command line/scripts: caget/caput/camonitor shell commands and comfortable python interface
Graphical user interface:
Several – legacy X window code MEDM, comfortable Qt widgets and
CSS “Control System Studio” ( DESY/UniHH, now also ORNL... + KEK )
CSS is most promising – it provides access to all tools in a single environment
copy/paste or drag/drop between PV browser/alarm display/display panels/log book etc.
Eclipse RCP rich client platform , RAP rich ajax platform based
KEK accelerator groups have introduced CSS and EPICS and made several CSS developments in 2011
→ download CSS KEK version http://www-linac.kek.jp/cont/css/
Alan Campbell | PXD SC | 19.07.12 | Page 16
EPICS – CSS
> contains graphical editor for GUI Javascript or python code linked to widgets
> Immediately runnable in development environment ( Eclipse ) Displays can then be run on display clients
> Complete client download from web> Runs on any system with java virtual machine> Can download updates from within client> Displays can be published on tomcat server
→ usable from any web browserefficient due to browser side gui drawing ( qooxdoo javascript )
GUI addons provide> PV browser, trend plotting ( including history )> Drag and drop of PV between tools> Elog integration – snapshot export to elog> Alarm GUI integration> Automatic update service – clients offer new versions as soon as published> IOC database editor> IOC SNL editor> User logon
“Headless” eclipse applications deployed without gui implement eg archiver
Alan Campbell | PXD SC | 19.07.12 | Page 17
EPICS – CSS – operator panel creation
Alan Campbell | PXD SC | 19.07.12 | Page 18
EPICS – CSS – tools
There are several CSS plugins for same task, from different labs.→ propose to follow what is used at KEK as much as possible( Kazuro Furukawa )
→ can add interfaces to Belle2 choices ( eg database, message log .. )
Alan Campbell | PXD SC | 19.07.12 | Page 19
PXD daq/slow control what is needed ?
PXD Run Control
Belle2 Run Control
DHH00 DHH03DHH00 DHH02
Power00 Power01 Power02
… DHH39
commands status
ONSEN DATCON
State Machines
… Power39
Cooler
DHHC00 DHHC01 ..DHHC05 ONSEN00..39 DATCONSCOOLER
Power00 Power02 Power02 … Power39
Frontend – Hardware access
Alan Campbell | PXD SC | 19.07.12 | Page 20
PXD slow control : COOLER ?
We need access via EPICS.
CO2 cooler will come from CERN developers with PVSS user interface to Siemens S7 PLC and with local panel PC control.
Currently forsee to integrate to EPICS via export via DIM from PVSS and EPICS-DIM interface, as this leaves delivered system as is.
Maybe eventually move to EPICS-S7 driver and redo GUI in CSS.●S7nodave PLC driver allows comfortable access to Siemens PLC
● http://oss.aquenos.com/epics/s7nodave/docs/1.0.0/manual.html
Alan Campbell | PXD SC | 19.07.12 | Page 21
PXD slow control : ONSEN/DATCON/ATCA
ONSEN/DATACON→ fpga register setup + monitoringAccess via ethernet to EPICS IOC on Xilinx embedded powerpc linux and memory mapped interface.→ already tested on Giessen compute nodeNow “only” configuration needed.
ATCA power/temperature monitoring → access via ipmi over lan EPICS driver needs to be developed
Alan Campbell | PXD SC | 19.07.12 | Page 22
PXD slow control : DHHC/DHH/DHP/DCD/Switcher
DHHC→ fpga register setup + monitoringAccess via ethernet to EPICS IOC on Xilinx microblaze linux and memory mapped interface and/or device driver(s)→ similar to Giessen compute node
DHHC will provide access to frontend via optical interface and standalone program on DHH
Alan Campbell | PXD SC | 19.07.12 | Page 23
PXD slow control : Power Supplies
PXD power supplies ( 22 voltages ) is controlled via ethernet to internal ARM based microcontroller with realtime kernel.
EPICS IOC code will be developed to interface to the chromosome software.
Alan Campbell | PXD SC | 19.07.12 | Page 24
Summary
Propose to base PXD slow control/daq control will on EPICS/CSS Link to Belle2 via NSM at top level for control/status and at services level eg message log, database