From b3f2a221a5d7cf8e2b7c5ad5b49453000c0aa655 Mon Sep 17 00:00:00 2001
From: Claudio Scafuri <claudio.scafuri@elettra.eu>
Date: Tue, 27 Sep 2022 16:12:03 +0200
Subject: [PATCH] new RV_KG09 setup

---
 etc/fixevents.py    | 21 +++++++++++++++++++++
 etc/fixhelperapp.py |  3 ++-
 2 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 etc/fixevents.py

diff --git a/etc/fixevents.py b/etc/fixevents.py
new file mode 100644
index 0000000..960dea3
--- /dev/null
+++ b/etc/fixevents.py
@@ -0,0 +1,21 @@
+
+from tango import *
+gp=Group('sip')
+gp.add('l04/vacuum/sip*')
+
+sips = gp.get_device_list()
+for sipname in sips:
+    print(sipname)
+    attname=sipname+'/Pressure'
+    sip=AttributeProxy(attname)
+    cfx=sip.get_config()
+    cfx.events.arch_event.archive_rel_change='20'
+    cfx.events.arch_event.archive_period='3600000'
+    sip.set_config(cfx)
+    sip.poll(5000)
+    attname=sipname+'/State'
+    sipst=AttributeProxy(attname)
+    cfx=sipst.get_config()
+    cfx.events.arch_event.archive_period='3600000'
+    sipst.poll(5000)
+    print(sipname, " OK")
diff --git a/etc/fixhelperapp.py b/etc/fixhelperapp.py
index ed6eec8..d2e065d 100644
--- a/etc/fixhelperapp.py
+++ b/etc/fixhelperapp.py
@@ -11,9 +11,10 @@ appname = 'FourUHV-gui' #change!
 db = Database()
 
 # get list of devicese form server/instance
-instances=['4uhv-srv/vac_bsa03']
+instances=['4uhv-srv/kg09-01','4uhv-srv/kg09-02']
 #instances=['4uhv-srv/vac_a02']
 for instance in instances:
+    print("instance", instance)
     devlistraw=[]
     devlistraw = db.get_device_class_list(instance).value_string
     idx = 0
-- 
GitLab