New ScreenPanel
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
def bsget(channel):
|
||||
"""Reads an values a bsread stream, using the default provider.
|
||||
|
||||
Args:
|
||||
channel(str or list of str): channel name(s)
|
||||
Returns:
|
||||
PV value
|
||||
|
||||
"""
|
||||
channels = to_list(channel)
|
||||
st = Stream(None, None)
|
||||
try:
|
||||
for c in channels:
|
||||
st.addScalar(c, c, 1,0)
|
||||
st.initialize()
|
||||
st.start()
|
||||
st.waitValueNot(None, 5000)
|
||||
if type(channel) is str:
|
||||
return st.getValue(channel)
|
||||
return st.values
|
||||
finally:
|
||||
st.close()
|
||||
|
||||
bsget("Int32Scalar")
|
||||
Reference in New Issue
Block a user