first commit
[bl_monitoring.git] / bl_instance / build_bl.py
blobf912f2f4a9cfd8cb4f0b51d9f74e36bcf7dd3242
1 #!/usr/bin/env python
2 #######################################
3 import sys, os
5 bl_instance_path = '/home/experiences/proxima1/com-proxima1/olga/work/bl_monitoring/bl_instance'
6 print "bl_instance_path = ", bl_instance_path
8 from bl_model.bl_elems import *
9 ####################################
12 u20 = motorized_beamModifier( 'u20', # nickname
13 'ans-c10', # vacuum_cell
14 'ei', # dev_group
15 ['c-u20'], # devices
16 0.001 # delta
19 frontend = beam_stopper( 'frontend', # nickname
20 'tdl-i10-c/vi/tdl.1/frontEndStateValue', # beamAccess_attrFullname
21 [5, 6], # beamAccess_attrVals
22 0.1 # delta
25 slit1 = motorized_beamModifier( 'slit1',
26 'i10-c-c01',
27 'ex',
28 ['fent_h.1', 'fent_v.1'],
29 0.001
32 imag1 = extractable_beamMonitor( 'imag1',
33 'i10-c-c01',
34 'dt',
35 ['imag1-analyzer', 'imag1-pos', 'imag1-vg'],
36 'imag1-pos/isInserted'
39 mono = motorized_beamModifier( 'mono',
40 'i10-c-c02',
41 'op',
42 ['mono1'],
43 0.0005
46 slit2 = motorized_beamModifier( 'slit2',
47 'i10-c-c02',
48 'ex',
49 ['fent_h.2', 'fent_v.2'],
50 0.001
53 xbpm1 = beam_monitor( 'xbpm1', # nickname
54 'i10-c-c02', # vacuum_cell
55 'dt', # dev_group
56 #['xbpm_diode.1', 'xbpm_diode.1-pos']
57 ['xbpm_diode.1'] # devices
60 obx1 = beam_stopper( 'obx1',
61 'i10-c-c03/ex/obx.1/State',
62 ['OPEN']
65 xbpm2 = beam_monitor( 'xbpm2',
66 'i10-c-c03',
67 'dt',
68 #['xbpm_diode.2', 'xbpm_diode.2-pos']
69 ['xbpm_diode.2']
72 h_mir = motorized_beamModifier( 'h_mir',
73 'i10-c-c04',
74 'op',
75 ['mir1-mt_tx'],
76 0.001 # delta for Tx ??????????
79 v_mir = motorized_beamModifier( 'v_mir',
80 'i10-c-c04',
81 'op',
82 ['mir2-mt_tz'],
83 0.001 # delta for Tz ??????????
86 att = motorized_beamModifier( 'att',
87 'i10-c-c04',
88 'ex',
89 ['att.1'],
90 0.01 # delta for transmission
93 xbpm3 = beam_monitor( 'xbpm3',
94 'i10-c-c04',
95 'dt',
96 ['xbpm_diode.3']
99 slit3 = motorized_beamModifier( 'slit3',
100 'i10-c-c04',
101 'ex',
102 ['fent_h.3', 'fent_v.3'],
103 0.001
106 xbpm4 = beam_monitor( 'xbpm4',
107 'i10-c-c04',
108 'dt',
109 ['xbpm_diode.4']
112 xbpm5 = beam_monitor( 'xbpm5',
113 'i10-c-c04',
114 'dt',
115 ['xbpm_diode.5']
118 slit4 = motorized_beamModifier( 'slit4',
119 'i10-c-c04',
120 'ex',
121 ['fent_h.4', 'fent_v.4'],
122 0.001
124 #####################################################################################
125 beam_path = [
126 frontend,
127 u20,
128 slit1,
129 mono,
130 slit2,
131 xbpm1,
132 obx1,
133 xbpm2,
134 h_mir, v_mir, att, xbpm3,
135 slit3, xbpm4,
136 xbpm5, slit4
138 ###################################################################################
140 ring_current = continuousEnvironment_elem('ring_current',
141 'ans',
142 'ca',
143 ['machinestatus'],
144 2000
147 ring_beam = continuousEnvironment_elem('ring_beam',
148 'ans-c10',
149 'dg',
150 ['calc-sdc-position-angle']
152 tdl_beam = continuousEnvironment_elem('tdl_beam',
153 'tdl-i10-c',
154 'dg',
155 ['xbpm.1','xbpm.2']
158 mono_temp1 = continuousEnvironment_elem('mono_temp1',
159 'i10-c-c02',
160 'op',
161 ['mono1-pt100.1'],
162 5000
165 mono_temp2 = continuousEnvironment_elem('mono_temp2',
166 'i10-c-c02',
167 'ex',
168 ['lash.1'],
169 5000
172 mir_temp = continuousEnvironment_elem('mir_temp',
173 'i10-c-c04',
174 'vi',
175 ['tc.1'],
176 5000
179 gonio_temp = continuousEnvironment_elem('gonio_temp',
180 'i10-c-cx1',
181 'vi',
182 ['tc.1'],
183 5000
186 continuous_env = [
187 ring_current,
188 ring_beam,
189 tdl_beam,
190 mono_temp1,
191 mono_temp2,
192 mir_temp,
193 gonio_temp
197 ###################################
198 if __name__ == '__main__':
200 xbpm2.define_blSteadiness(beam_path )
202 for elem in xbpm2.blSteadiness_elems:
203 elem.print_params()
204 for p in xbpm2.beamAccess_params:
205 print p.attr_fullName