Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

using TC01 in MS Visual Studio c program

Solved!
Go to solution

I am developing a simple c program in MS Visual Studio 2019 that includes code to get measurements from the NI TC01 thermometer. Below and attached is a stand alone version. I had a similar routine running a few years ago on a different PC and a different version of Visual Studio.

 

The TC01 works ok with NiMax.

 

The function 'DAQmxCreateAIThrmcplChan' does not work and returns an error. Any help is appreciated.

 

fredette_0-1704822480630.png

 

thanks, mark

 

 

 

0 Kudos
Message 1 of 2
(858 Views)
Solution
Accepted by topic author fredette

My I did not realize that 'DAQmxCreateAIThrmcplChan' needs the device name, which in my case is 'Dev3'. My code had it as 'Dev1'. I found the device name in NiMax.

 

fredette_0-1704909447742.png

 

I changed the name in my code and now everything works. I also found some code that searches for devices, checks for a match and returns the device name. I added that to my project and it is attached.

 

0 Kudos
Message 2 of 2
(821 Views)