Loading ADoutputs.py +14 −2 Changes for ADoutputs.py: 14 added lines, 2 removed lines. Original line number Original line Diff line number Diff line Loading @@ -14,17 +14,29 @@ If the daq is not found, whenever trying to send signals, the command will be pr import warnings import warnings try: from mcculw import ul from mcculw import ul from mcculw.enums import InterfaceType, ULRange, InfoType, BoardInfo, DigitalIODirection from mcculw.enums import InterfaceType, ULRange, InfoType, BoardInfo, DigitalIODirection from mcculw.ul import ULError from mcculw.ul import ULError from props.digital import DigitalProps from props.digital import DigitalProps from props.ao import AnalogOutputProps from props.ao import AnalogOutputProps except ValueError: warnings.warn('Problem importing ul from mcculw, Thus might happen in Linux') import uldaq as ul from uldaq import InterfaceType from uldaq import Range as ULRange ul.ignore_instacal() #instacal will be ignored try: ul.ignore_instacal() #instacal will be ignored except NameError: print('Instacall not ignored because mcculw not imported') except AttributeError: print('Instacall not ignored because you imported uldaq and there is no instacal in that case') # First of all, I check which daqs are available and print it. # First of all, I check which daqs are available and print it. devices = ul.get_daq_device_inventory(interface_type=InterfaceType.USB) devices = ul.get_daq_device_inventory(interface_type=InterfaceType.USB) if len(devices) == 1 : if len(devices) == 1 : Loading Loading
ADoutputs.py +14 −2 Changes for ADoutputs.py: 14 added lines, 2 removed lines. Original line number Original line Diff line number Diff line Loading @@ -14,17 +14,29 @@ If the daq is not found, whenever trying to send signals, the command will be pr import warnings import warnings try: from mcculw import ul from mcculw import ul from mcculw.enums import InterfaceType, ULRange, InfoType, BoardInfo, DigitalIODirection from mcculw.enums import InterfaceType, ULRange, InfoType, BoardInfo, DigitalIODirection from mcculw.ul import ULError from mcculw.ul import ULError from props.digital import DigitalProps from props.digital import DigitalProps from props.ao import AnalogOutputProps from props.ao import AnalogOutputProps except ValueError: warnings.warn('Problem importing ul from mcculw, Thus might happen in Linux') import uldaq as ul from uldaq import InterfaceType from uldaq import Range as ULRange ul.ignore_instacal() #instacal will be ignored try: ul.ignore_instacal() #instacal will be ignored except NameError: print('Instacall not ignored because mcculw not imported') except AttributeError: print('Instacall not ignored because you imported uldaq and there is no instacal in that case') # First of all, I check which daqs are available and print it. # First of all, I check which daqs are available and print it. devices = ul.get_daq_device_inventory(interface_type=InterfaceType.USB) devices = ul.get_daq_device_inventory(interface_type=InterfaceType.USB) if len(devices) == 1 : if len(devices) == 1 : Loading