Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

PyDAQmx and USB-6000/USB-TC01 Thermocouple Device

Highlighted

Hello all, 


I am thinking of purchasing the same device for an application of my company. Can somebody verify that the code works/works as supposed?

0 Kudos
Message 21 of 26
(619 Views)
Highlighted

Here are some useful link that can work for you in the future about

PyDAQmx

https://pythonhosted.org/PyDAQmx/usage.html

 

This GitHub page is awesome, a lot of examples  https://github.com/ni/nidaqmx-python

 

Here is an official white paper http://www.ni.com/white-paper/53059/en/ about    NI and Python Resources

 

Here is a really good pdf https://media.readthedocs.org/pdf/nidaqmx-python/latest/nidaqmx-python.pdf 

 

have a great day.

 

0 Kudos
Message 22 of 26
(604 Views)
Highlighted

I conflated the two versions, 

 

One is PyDAQmx  and the other is NI-DAQmx  Python API 

0 Kudos
Message 23 of 26
(589 Views)
Highlighted

Hello,

I tried to run the script given but I get the following error:

    sensor = NiUsbTC01()
  File "nitc.py", line 33, in __init__
    self.nidaq = ctypes.WinDLL(nidaq_dll_path)
  File "C:\Python35-32\lib\ctypes\__init__.py", line 347, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

 

The reason is that I don't have the nicau.dll. How can I get it to run without installing all the nidaqmx runtime?

 

Cheers!

 

0 Kudos
Message 24 of 26
(511 Views)
Highlighted

Unfortunately, you'll indeed need it. Use the commented-out line:

self.nidaq = ctypes.windll.nicaiu

My code from above is incorrect for that matter, since using only the one DLL doesnt work, which I hadnt realized before I tested it on another machine where the runtime wasnt installed.

 

I also tried to walk down all the dependencies, hoping it'll be just a couple of DLLs that I'd have to add and that it would be portable, but no luck, I finally gave up. But let me know if you can come up with something, it's quite annyoing that you have to install a whopping 300MB software bundle to be able to read out a simple temperature sensor...

0 Kudos
Message 25 of 26
(505 Views)
Highlighted

Hello all,

In order to run the python script you have to include the absolute file path of nicau.dll (mine is "C:/Windows/SysWOW64/nicaiu.dll").

I attach the code.

0 Kudos
Message 26 of 26
(237 Views)