Commit 1094833a authored by reiche's avatar reiche

Added support to individual turn off the dispersive sections

parent 2e5c1789
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>636</width>
<height>668</height>
<width>627</width>
<height>732</height>
</rect>
</property>
<property name="windowTitle">
......@@ -20,7 +20,7 @@
<x>20</x>
<y>70</y>
<width>591</width>
<height>361</height>
<height>421</height>
</rect>
</property>
<property name="title">
......@@ -30,7 +30,7 @@
<property name="geometry">
<rect>
<x>80</x>
<y>310</y>
<y>366</y>
<width>30</width>
<height>30</height>
</rect>
......@@ -43,7 +43,7 @@
<property name="geometry">
<rect>
<x>130</x>
<y>310</y>
<y>366</y>
<width>131</width>
<height>30</height>
</rect>
......@@ -56,7 +56,7 @@
<property name="geometry">
<rect>
<x>10</x>
<y>41</y>
<y>97</y>
<width>71</width>
<height>16</height>
</rect>
......@@ -74,7 +74,7 @@
<property name="geometry">
<rect>
<x>10</x>
<y>110</y>
<y>166</y>
<width>91</width>
<height>16</height>
</rect>
......@@ -92,7 +92,7 @@
<property name="geometry">
<rect>
<x>12</x>
<y>180</y>
<y>236</y>
<width>101</width>
<height>16</height>
</rect>
......@@ -110,7 +110,7 @@
<property name="geometry">
<rect>
<x>12</x>
<y>250</y>
<y>306</y>
<width>101</width>
<height>16</height>
</rect>
......@@ -128,7 +128,7 @@
<property name="geometry">
<rect>
<x>16</x>
<y>318</y>
<y>374</y>
<width>60</width>
<height>15</height>
</rect>
......@@ -146,7 +146,7 @@
<property name="geometry">
<rect>
<x>280</x>
<y>230</y>
<y>286</y>
<width>131</width>
<height>51</height>
</rect>
......@@ -168,7 +168,7 @@
<property name="geometry">
<rect>
<x>280</x>
<y>20</y>
<y>76</y>
<width>131</width>
<height>51</height>
</rect>
......@@ -190,7 +190,7 @@
<property name="geometry">
<rect>
<x>280</x>
<y>90</y>
<y>146</y>
<width>131</width>
<height>51</height>
</rect>
......@@ -212,7 +212,7 @@
<property name="geometry">
<rect>
<x>280</x>
<y>160</y>
<y>216</y>
<width>131</width>
<height>51</height>
</rect>
......@@ -234,7 +234,7 @@
<property name="geometry">
<rect>
<x>130</x>
<y>90</y>
<y>146</y>
<width>131</width>
<height>51</height>
</rect>
......@@ -256,7 +256,7 @@
<property name="geometry">
<rect>
<x>130</x>
<y>160</y>
<y>216</y>
<width>131</width>
<height>51</height>
</rect>
......@@ -278,7 +278,7 @@
<property name="geometry">
<rect>
<x>130</x>
<y>230</y>
<y>286</y>
<width>131</width>
<height>51</height>
</rect>
......@@ -300,7 +300,7 @@
<property name="geometry">
<rect>
<x>432</x>
<y>90</y>
<y>146</y>
<width>131</width>
<height>51</height>
</rect>
......@@ -322,7 +322,7 @@
<property name="geometry">
<rect>
<x>130</x>
<y>20</y>
<y>76</y>
<width>131</width>
<height>51</height>
</rect>
......@@ -344,7 +344,7 @@
<property name="geometry">
<rect>
<x>430</x>
<y>164</y>
<y>220</y>
<width>131</width>
<height>51</height>
</rect>
......@@ -366,7 +366,7 @@
<property name="geometry">
<rect>
<x>430</x>
<y>229</y>
<y>285</y>
<width>131</width>
<height>51</height>
</rect>
......@@ -388,7 +388,7 @@
<property name="geometry">
<rect>
<x>432</x>
<y>24</y>
<y>80</y>
<width>131</width>
<height>51</height>
</rect>
......@@ -410,7 +410,7 @@
<property name="geometry">
<rect>
<x>280</x>
<y>314</y>
<y>370</y>
<width>281</width>
<height>20</height>
</rect>
......@@ -419,12 +419,51 @@
<string notr="true">SF-BC-SERVER:PING</string>
</property>
</widget>
<widget class="caMenu" name="camenu_2">
<property name="geometry">
<rect>
<x>130</x>
<y>30</y>
<width>131</width>
<height>30</height>
</rect>
</property>
<property name="channel" stdset="0">
<string notr="true">SF-BC-SERVER:SINLH-ONOFF</string>
</property>
</widget>
<widget class="caMenu" name="camenu_3">
<property name="geometry">
<rect>
<x>280</x>
<y>30</y>
<width>131</width>
<height>30</height>
</rect>
</property>
<property name="channel" stdset="0">
<string notr="true">SF-BC-SERVER:SINBC-ONOFF</string>
</property>
</widget>
<widget class="caMenu" name="camenu_4">
<property name="geometry">
<rect>
<x>430</x>
<y>30</y>
<width>131</width>
<height>30</height>
</rect>
</property>
<property name="channel" stdset="0">
<string notr="true">SF-BC-SERVER:S10BC-ONOFF</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_2">
<property name="geometry">
<rect>
<x>20</x>
<y>440</y>
<y>510</y>
<width>591</width>
<height>71</height>
</rect>
......@@ -503,7 +542,7 @@
<property name="geometry">
<rect>
<x>20</x>
<y>520</y>
<y>590</y>
<width>591</width>
<height>91</height>
</rect>
......@@ -733,8 +772,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>636</width>
<height>23</height>
<width>627</width>
<height>22</height>
</rect>
</property>
</widget>
......
......@@ -36,6 +36,7 @@ pvdb = {
'hihi' : 4, 'high' : 4,'low' : 0, 'lolo': 0},
'SINLH-OFFSET' : {'prec': 3, 'unit' : 'mm',
'hihi' : 0, 'high' : 0,'low' : -20.1, 'lolo': -21},
'SINLH-ONOFF' : {'type' : 'enum', 'enums': ['OFF', 'ON']},
'SINBC-TOF' : {'prec': 3, 'unit' : 'ps',
'hihi' : 160, 'high' : 150 ,'low' : 0, 'lolo': 0},
......@@ -45,6 +46,7 @@ pvdb = {
'hihi' : 5., 'high' : 5 ,'low' : 0, 'lolo': 0},
'SINBC-OFFSET' : {'prec': 3, 'unit' : 'mm',
'hihi' : 0, 'high' : 0,'low' : -540 , 'lolo': -550},
'SINBC-ONOFF' : {'type' : 'enum', 'enums': ['OFF', 'ON']},
'S10BC-TOF' : {'prec': 3, 'unit' : 'ps',
......@@ -55,6 +57,7 @@ pvdb = {
'hihi' : 4, 'high' : 4,'low' : 0, 'lolo': 0},
'S10BC-OFFSET' : {'prec': 3, 'unit' : 'mm',
'hihi' : 0, 'high' : 0,'low' : -490, 'lolo': -500},
'S10BC-ONOFF' : {'type' : 'enum', 'enums': ['OFF', 'ON']},
'STATUS' : {'type': 'enum',
......@@ -80,7 +83,7 @@ class BDServerBunchCompressor(Driver):
self.config['BC2']=BCcal('BC2')
self.version='5.0.0'
self.version='6.0.0'
self.program='BunchCompressorSetup'
......@@ -119,7 +122,7 @@ class BDServerBunchCompressor(Driver):
self.MotUpdate={'BC1':False,'BC2':False,'LH':False}
self.InputUpdate={'BC1':None,'BC2':None,'LH':None}
self.OnOff={'BC1':0,'BC2':0,'LH':0}
# activity level: 0 - Running, 1 - Monitoring
self.activity = 2 # to keep the timer thread running
......@@ -140,7 +143,6 @@ class BDServerBunchCompressor(Driver):
self.pvBC2R56=PV('S10BC02:R56')
# define the main thread to work and change
self.timer_running=False
self.time=None
......@@ -167,6 +169,10 @@ class BDServerBunchCompressor(Driver):
self.activity=status
self.setParam('STATUS',status)
self.OnOff['LH'] = self.getParam('SINLH-ONOFF')
self.OnOff['BC1']= self.getParam('SINBC-ONOFF')
self.OnOff['BC2']= self.getParam('S10BC-ONOFF')
if self.activity == 0:
self.setParam('PING',datetime.now().strftime('Running at %Y-%m-%d %H:%M:%S'))
elif self.activity == 1 :
......@@ -176,6 +182,8 @@ class BDServerBunchCompressor(Driver):
# this is the event loop if a motor has changed externally
for key in self.MotUpdate.keys():
if self.OnOff[key] == 0:
continue
if self.MotUpdate[key]:
self.updateEPICS(key)
self.MotUpdate[key]=False
......@@ -185,6 +193,8 @@ class BDServerBunchCompressor(Driver):
# this is th event loop if the setting in the BC server has changed
for key in self.InputUpdate.keys():
if self.OnOff[key] ==0:
continue
field=self.InputUpdate[key]
if not field == None:
self.updateConfig(key,field)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment