Skip to content
Snippets Groups Projects
Commit 6c99c80e authored by Claudio Scafuri's avatar Claudio Scafuri :speech_balloon:
Browse files

python script to fix format and events for sip

parent 442d4b9d
No related branches found
No related tags found
No related merge requests found
#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
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