forked from awendt/pyrelacs
adding reading of the daq product name
This commit is contained in:
parent
c81c74f004
commit
190882dc9c
19
pyrelacs/input.py
Normal file
19
pyrelacs/input.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import uldaq
|
||||||
|
from IPython import embed
|
||||||
|
import typer
|
||||||
|
|
||||||
|
|
||||||
|
def connect():
|
||||||
|
try:
|
||||||
|
devices = uldaq.get_daq_device_inventory(uldaq.InterfaceType.USB)
|
||||||
|
daq_device = uldaq.DaqDevice(devices[0])
|
||||||
|
daq_device.connect()
|
||||||
|
print(f"Connected to daq_device {devices[0].product_name}")
|
||||||
|
|
||||||
|
except uldaq.ULException as e:
|
||||||
|
print('\n', e)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
typer.run(connect)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user