Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Temp Measurement using NI USB TC01

Hi All,

         My Objective is simple. I need a function that gives me the current temp that the sensor on NI USB TC 01 is reading. I have tried to look at the C Examples that come with the NI device, but that runs into some error altogether. I came across this function

 

int32 __CFUNC DAQmxGetCalDevTemp(const char deviceName[], float64 *data);

 

Here is my code snippet

 

const char deviceName[]="dev1";

float64 data;

int32 mytemp= DAQmxGetCalDevTemp( deviceName, &data);

 

 

I have an MFC app in which I am trying to get this temp value, if I use this function , I get 0 as the value of "data" and a -200197 as the value of mytemp. This is an error code, I get that, but I cansee the device in my MAX, so device is being recognised fine, its UI shows the right temperature, so changing ports on the PC wouldnt makea difference.

 Has anybody used this function ? do You need some device configuration prior to using this function? Any help would be appreciated

How would you recommend going about this?

 

Thanks

Vivek

0 Kudos
Message 1 of 3
(5,820 Views)

Looks like you already started a thread about this here.

Rohama K.
0 Kudos
Message 2 of 3
(5,815 Views)

Hi,

    My apologies on posting this twice,but I did not receive a reply on that& I was rushing against a deadline, so I figured maybe I can start a new thread. Do you have any suggestions for the problem I discussed?

 

Thanks

Vivek

0 Kudos
Message 3 of 3
(5,811 Views)