mccdaq / mcculw

MCC Universal Library Python API for Windows
MIT License
78 stars 30 forks source link

Problems with MCC DAQ Universal Library #13

Closed wjmason28 closed 2 years ago

wjmason28 commented 5 years ago

I need to use an MCC DAQ USB-2408-2AO to make temperature measurements from 8 thermocouples. I'm using the Universal Library and Python to be able to eventually synchronize the data acquisition with other processes, but every time that I run my code, I get the error:

mcculw.ul.ULError: Error 30: Invalid voltage (or current) range.

Here is my Python Script so far:

from mcculw import ul from mcculw.enums import ULRange

inventory = ul.get_daq_device_inventory(1, number_of_devices=1) print(inventory) ul.ignore_instacal() ul.create_daq_device(1,inventory[0])

ULRange.BIPPT078VOLTS ul.a_input_mode(1,0)

temps = ul.t_in_scan(1,0,7,0) print(temps)

The DAQ and thermocouples already work with the software that they came with (DAQami), so I'm pretty sure this is not a hardware problem. Does anyone know what I am doing wrong? Is there some configuration that I have overlooked?

As a side note, I have already read the post at https://github.com/mccdaq/mcculw/issues/7. It hasn't been helpful for my case.

Thanks for you time!

wjmason28 commented 5 years ago

After investigating a little more, I found that even the example codes give me this error.

jeffreyg3 commented 5 years ago

Please see the attached example. It reads from the first 4 channels of the USB-2408 as temperature. usb_2408_2416_3TCs.zip