19 lines
660 B
Python
19 lines
660 B
Python
def create_device(url, parent=None):
|
|
"""Create a device form a definition string(see URLDevice)
|
|
|
|
Args:
|
|
url(str or list of string): the device definition string (or list of strings)
|
|
parent(bool, optional): parent device
|
|
|
|
Returns:
|
|
The created device (or list of devices)
|
|
"""
|
|
return ch.psi.pshell.core.UrlDevice.create(url, parent)
|
|
|
|
|
|
devices = create_device(["ca://SINDI02-DBLM025:LOSS_SIGNAL_RAW?monitored=true&op=sum" ]) #SINDI02-DBLM025:LOSS_SIGNAL_RAW
|
|
try:
|
|
mscan([], devices , 10, -1, save=False) #ar is ony updated on read
|
|
#tscan( devices , 5, 0.1)
|
|
finally:
|
|
devices[0].parent.close() |