Title: High level applications and EPICS control
1High level applications and EPICS control
GUOBAO SHEN NSLS-II, Control Group May 4th, 2009
2Contents
- From device control to beam control
- HLA environments
- MMLT
- Python
- Model server
3From device control to beam control
- Goal
- Desired accelerator beam
- Accelerator device control
- Hardware subsystem control
- Magnet power supply, beam diagnostics,
- Accelerator beam control
- Realized through device control
4From device control to beam control
- Accelerator device control
Displayer
Device Model
Controller
Sensor
Actuator
Device
5From device control to beam control
- Accelerator device control
- Distributed and modular architecture
- EPICS based device control
- Flexible, extensible, reusable, pluggable
Channel Access Client (CAC)? Connection Data
Transfers
Connection Server
Channel Access Protocol
Connection Data Transfers Channel Access
Server (CAS)?
Connection Data Transfers Channel Access
Server (CAS)?
DB Engine
Types
DB Engine
Types
Device Support
Device Support
Driver Support
Driver Support
I/O Controller
I/O Controller
6From device control to beam control
Operator Interface
Model based Control
High Level Applications
Beam Monitor
Accelerator Device
Beam
7HLA environments
- What is a HLA environment?
- A software environment for beam commissioning
operation - Physics applications, model based control
- Data archiving analysis
- Machine status save restore
- Machine real time status presentation
- Database related applications
- Available environments
- MMLT, SDDS, XAL,
8HLA environments
- Desired features
- Scripting
- Online simulator
- Convenient low level access
- Channel Access supporting
- Plotting and Graphical User Interface
- Numerical libraries (Optional)?
9(No Transcript)
10(No Transcript)
11(No Transcript)
12MMLT
- MMLT is selected
- Closer to our modular architecture
- Rich available applications
- Used by many facilities for many years
13MMLT
- MMLT Enhancement
- Multi-simulators support
14MMLT
- MMLT Enhancement
- Directory structure
MMLT ROOT
Applications
EPICS CA
Links
Machine
MML
Tracy (.so)?
Elegant(.so)?
AT
AT
Tracy
Elegant
NSLS2
S.R.
S.R.
15MMLT
use at simulator by default setpathnsls2 use
tracy simulator setpathnsls2 tracy switch to
online switch2online
16MMLT
- Display (plotfamily)
- Beta plotting
-
(b) against AT -
- (a) against Tracy-3
17MMLT
- Scripting Example Orbit Correction
- Refer to Greg Portmanns example EPICS Meeting
April 27, 2005
Create an Orbit Error vcm .0005
randn(180,1) 180 vertical correctors at
the NSLS-II setsp('VCM', vcm) Get the
vertical orbit Y getam('BPMy') plot vertical
orbit figuresubplot(3,1,1)plot(Y) Get the
Vertical response matrix from the model Ry
getrespmat('BPMy', 'VCM') 180x180
matrix Computes the SVD of the response
matrix Ivec 124 U, S, V svd(Ry, 0)
Find the corrector changes use 48 singular
values DeltaAmps -V(,Ivec) S(Ivec,Ivec)-1
U(,Ivec)' Y Changes the corrector
strengths setsp('VCM', DeltaAmps) plot
residual orbit after one orbit-correction
iteration Y2 getam('BPMy')subplot(3,1,2)plot(Y
2) plot different between residual orbit and
original subplot(3,1,3) plot(Y-Y2,Y)
18MMLT
- Chromaticity measurement
-
- (a) against Tracy-3
(b) against AT
19MMLT
- Beam based alignment
- against AT
against Tracy-3
X
Y
X
Y
20(No Transcript)
21(No Transcript)
22(No Transcript)
23Python
- Why python?
- Good scripting language
- Good interface with other language
- Good math libraries
- Good GUI libraries
- Platform Independent
- Open source, free license
24Python
Scripting Example Access simulation server via CA
!/usr/bin/python2.5 matplotlib is used for
plotting "Virtual Accelerator Orbit
Test" import sys from time import sleep from
pylab import Use ca library from
Diamond sys.path.append("./ca/build/lib")? from
dca import
System library
Channel access library
25(No Transcript)
26(No Transcript)
27(No Transcript)
28(No Transcript)