pv alive script
This commit is contained in:
18
get_bernina_PVs_alive
Executable file
18
get_bernina_PVs_alive
Executable file
@@ -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')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user