From 39061777cff4d8be2d22925c9ec643a9fa0b16dd Mon Sep 17 00:00:00 2001 From: lemke_h Date: Sat, 13 Feb 2021 15:28:48 +0100 Subject: [PATCH] pv alive script --- get_bernina_PVs_alive | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 get_bernina_PVs_alive diff --git a/get_bernina_PVs_alive b/get_bernina_PVs_alive new file mode 100755 index 0000000..bf6960f --- /dev/null +++ b/get_bernina_PVs_alive @@ -0,0 +1,18 @@ +#!/sf/bernina/anaconda/bernina_envs/default/bin/python +import sys +from epics import caget_many +sys.path.insert(0,'/sf/bernina/config/src/python/eco') +from eco import bernina +bernina.namespace.init_all() +ach = [o['channel'] for o in bernina.namespace.get_initialized_aliases()[0] if o['channeltype']=='CA'] +av = caget_many(ach) +ach = [c for c,v in zip(ach,av) if not v==None] + +with open(sys.argv[1],'w') as f: + for ch in ach: + f.write(ch+'\n') + + + + +