LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx read thermocouple and voltages from other sensors

Hello,

 

I have sensors that I read using the AI Voltage functionality from the Create Channel tool.

However, I also need to read a thermocouple output, which is done using the AI Temp TC option.

I am using subVIs to read these sensors in my main VI.

Individually, they work great, but when used together, I always encounter the following issue:

Error -50103 occurred at DAQmx Start Task.vi: 7220001

Possible Reason(s): The specified resource is reserved. The operation could not be completed as specified.

 

The structure of my subVIs is the same as below for both readings.

The error always occurs at the end of the second DAQmx Start Task.

Do you have any ideas on how to resolve this issue?

 

PaskalM_0-1722901460350.png

 

Thank you : )

 

0 Kudos
Message 1 of 9
(400 Views)

Yes, in most NI DAQs it is expected.

 

In most NI DAQs, you can have only one hardware timed DAQmx Task of Analog Input type. This means, any number of channels you wish to acquire must be part of this one DAQmx Task.

 

In your case, since the first DAQmx Task used up the available one DAQmx task resource, there is none remaining for the second task to use and hence the error "resource is reserved".

 

If you want to read temperature from more than one TC, list the Physical channels as comma separate and run.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 9
(394 Views)

Thank you, that is good to know !

 

Actually, I am using only one thermocouple, and my other sensor is a load cell that provides six analog voltage outputs.

If I read the voltage from my thermocouple instead of using the AI Temp TC option, how can I convert the voltage back to the temperature value ?

0 Kudos
Message 3 of 9
(371 Views)

Hi Paskal,

 


@PaskalM wrote:

If I read the voltage from my thermocouple instead of using the AI Temp TC option, how can I convert the voltage back to the temperature value ?


There are tables for each kind of thermocouple.

There are (estimation) formulas for each kind of thermocouple to convert voltage to temperature…

LabVIEW comes with a ready-to-use conversion VI.

 

Which DAQ device do you use? Does it come with a CJC?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(359 Views)

You can combine multiple channels in a single task.

See Easily Synchronize and Trigger NI-DAQmx with Channel Expansion

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 5 of 9
(330 Views)

Thank you ! I didn't know about this VI for converting voltage to temperature.

However, since I’m unsure what to specify for the CJC voltage, I’m getting weird temperature values compared to when I use the AI Temp TC. How can I determine the correct value to specify ?

 

I’m using this DAQ : NI PCIe-6363. How can I know if it comes with a CJC ?

 

0 Kudos
Message 6 of 9
(316 Views)

Hi Paskal,

 


@PaskalM wrote:

I’m using this DAQ : NI PCIe-6363. How can I know if it comes with a CJC ?


By reading the manual and specsheet!

 

As the 6363 is a "generic" multifunction DAQ board it doesn't come with a CJC. Atleast it supports a ±0.1V input range…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(308 Views)

We recently went through this issue:  Temperature acquisition on NI USB-6259 - NI Community

 

Bottom Line - Multi-purpose DAQs can read thermocouples since they output a small voltage that relates to a temperature...

BUT, they are no match for a dedicated product like the 9211 series:  NI-9211 - NI which use 24-bit ADCs with low noise pre-amps and built-in temperature compensation junction ICs.  They also allow you to use the TC input modes of DAQmx making programming for them trivial.

 

If you only need one channel and can pay the price ($170), the little USB-TC01 is a great TC interface that has plug and play features.

 

If you MUST use your 6363 (which is a great DAQ for multi-purpose), you will have to create your own calibration curve and deal with more noise than you probably want.  Look at my example code in the link above.  It should work for the 6363 as well as it did with my little USB-6002.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 8 of 9
(299 Views)

Thank you, the USB-TC01 seems like an interesting option, maybe for another project. For now, I don't need super high precision; actually, ±5 degrees Celsius will be plenty enough for my purposes.

I thought about implementing the calibration formula, but it looked really ugly, and I couldn't believe no one had done it already, which is why I kept looking on internet.

But I cannot believe how it is possible to get reasonably good results using the AI Temp TC option for readings, compared to nothing conclusive from the conversion VI from LabVIEW.

I guess I will just look for the best linear approximation based on the VI you showed in the other conversation

0 Kudos
Message 9 of 9
(267 Views)