Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#fix format of pressure readings
#.C.S. 2019
#
from tango import *
sip120 = DeviceProxy('rpcbridge/rpc2tangobridge/sip120')
sip400 = DeviceProxy('rpcbridge/rpc2tangobridge/sip400')
sip120attrlist = sip120.get_attribute_list()
for att in sip120attrlist:
attconf=sip120.get_attribute_config(att)
attconf.format='%6.2e'
attconf.events.arch_event.archive_rel_change = '20'
attconf.events.arch_event.archive_period = '360000'
attconf.events.ch_event.rel_change = '10'
try:
sip120.set_attribute_config(attconf)
sip120.poll_attribute(att,3000)
except:
print ('fail for %s', att)
pass
sip400attrlist = sip400.get_attribute_list()
for att in sip400attrlist:
attconf=sip400.get_attribute_config(att)
attconf.format='%6.2e'
attconf.events.arch_event.archive_rel_change = '20'
attconf.events.arch_event.archive_period = '360000'
attconf.events.ch_event.rel_change = '10'
try:
sip400.set_attribute_config(attconf)
sip400.poll_attribute(att,3000)
except:
print ('fail for %s', att)
pass