TANGO
Device Server



Sequencer Server for LINAC
Device Description

LinacSequencer Class

Revision: Release_1_1 - Author: bourtemb - CVS repository: ESRF

Sequencer server to execute the necessary sequences to change the state of the LINAC.

ESRF Linac

The sequences are executed by a dedicated thread.
See Linac sequences definition page for a detail on the macros used to change the state of the Linac.

This server uses FLEX and BISON to parse the linac configuration files.
The Linac configuration files must begin with the following characters :
#        ###   #     #    #     #####
Otherwise, there will be an ErrorReadingFile exception when trying to read a bad file.

The linac configuration files are in the directory /operation/linac/conf
You can edit the files with nedit.
!! All the characters on a line after a # are considered as comments. !!
Tip: If you view a file with nedit, you can enable the syntax highlighting  to see the comments in another color.
You can do that by choosing Preferences -> Language Mode -> Csh in the nedit menu.

Here is an example of  Linac configuration file :
#        ###   #     #    #     #####
#         #    ##    #   # #   #     #
#         #    # #   #  #   #  #
#         #    #  #  # #     # #
#         #    #   # # ####### #
#         #    #    ## #     # #     #
#######  ###   #     # #     #  #####


# Focus KLY1 180.0 A
elin/focus/kly1/current->__value: 180.0
# Focus KLY2 155.0 A
elin/focus/kly2/current->__value: 155.0
# Focus KLY3 158.0 A
elin/focus/kly3/current->__value: 158.0
# Focus KLY4 179.0 A
elin/focus/kly4/current->__value: 179.0
# Focus KLY5 160.0 A
elin/focus/kly5/current->__value: 160.0
# Focus KLY6 170.0 A
elin/focus/kly6/current->__value: 170.0
# B1 coil 0.0 A
elin/focus/b1coil/current->__value: 0.0
# B2 coil 14.0 A
elin/focus/b2coil/current->__value: 14.0
# Buncher Solenoid 68.0 A
elin/focus/buncher/current->__value: 68.0
# Magnetic lens 0.00 A
elin/focus/lens/current->__value: 0.00
# Triplet 2.32 A
elin/focus/triplet/current->__value: 2.32
# S1 solenoid 80.0 A
elin/focus/sect1/current->__value: 80.0
# S2 solenoid 10.0 A
elin/focus/sect2/current->__value: 10.0
# ELIN/STEER/GH1 0.00 A
elin/steer/gh1/current->__value: 0.00
# ELIN/STEER/GV1 0.00 A
elin/steer/gv1/current->__value: 0.00
# ELIN/STEER/BH1 0.40 A
elin/steer/bh1/current->__value: 0.40
# ELIN/STEER/BV1 -0.20 A
elin/steer/bv1/current->__value: -0.20
# ELIN/STEER/BH2 1.00 A
elin/steer/bh2/current->__value: 1.00
# ELIN/STEER/BV2 0.30 A
elin/steer/bv2/current->__value: 0.30
# ELIN/STEER/S1H1 -0.30 A
elin/steer/s1h1/current->__value: -0.30
# ELIN/STEER/S1V1 -0.50 A
elin/steer/s1v1/current->__value: -0.50
# ELIN/STEER/S1H2 -0.30 A
elin/steer/s1h2/current->__value: -0.30
# ELIN/STEER/S1V2 -1.20 A
elin/steer/s1v2/current->__value: -1.20
# ELIN/STEER/TRIPLET 0.00 A
elin/steer/triplet/current->__value: 0.00
# ELIN/STEER/S2H1 -0.65 A
elin/steer/s2h1/current->__value: -0.65
# ELIN/STEER/S2V1 0.10 A
elin/steer/s2v1/current->__value: 0.10
# ELIN/STEER/S2H2 0.00 A
elin/steer/s2h2/current->__value: 0.00
# ELIN/STEER/S2V2 0.50 A
elin/steer/s2v2/current->__value: 0.50
# ELIN/STEER/CHAN16 0.00 A
elin/steer/chan16/current->__value: 0.00
# mod 1 hv 19.20 kV
elin/mod1/hv/highvoltage->__value: 19.20
# mod 2 hv 16.95 kV
elin/mod2/hv/highvoltage->__value: 16.95
# vpfn1 33.00 kV
elin/mod1/run/vpfn->__value: 33.00
# vpfn2 33.00 kV
elin/mod2/run/vpfn->__value: 33.00
# buncher phase -103.0 deg
elin/rf/run/bunchphase->__value: -103.0
# pbuncher phase 70.0 deg
elin/rf/run/pbunchphase->__value: 70.0
# pbuncher atten 7.0 %
elin/rf/run/pbunchattenu->__value: 7.0
# section phase 79.0 deg
elin/rf/run/sect2phase->__value: 79.0
# gun heating v 5.70 V
elin/gun/aux/heatv->__value: 5.70
# gun grid v -92.0 V
elin/beam/run/gridv->__value: -92.0
# gun pulse v 0.0 V
elin/beam/run/pulsev->__value: 0.0
# gun pulse length 2.00 óm
elin/beam/run/pulsel->__value: 2.00
# gun hv 75.0 kV
elin/gun/hv/highvoltage->__value: 75.0
# frequency 2998.16 MHz
elin/rf/run/frequency->__value: 2998.160100
# Short pulse
elin/beam/run/pulsetype->__value: "SHORT"
# timer rf 44.50 ós
elin/rf/run/delay->__value: 44.50
# timer mod1 58.45 ós
elin/mod1/run/delay->__value: 58.45
# timer mod2 58.35 ós
elin/mod2/run/delay->__value: 58.35
# timer mod1_s 3.00 ós
elin/mod1/run/delays->__value: 3.00
# timer mod2_s 3.00 ós
elin/mod2/run/delays->__value: 3.00

!! All the blue lines are considered as comments !!

Tip: This file can be loaded by Jive, it is the same file format. In theory, there is no real interest in loading a linac file in jive.
One interest could be to change easily the memorized value of a particular device attribute of the linac when the device is not exported.
Then, the next time its server will be started, it will set the value we want at initialization for the memorized attributes.


ESRF - Software Engineering Group