Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Calibrate thermocouples in DAQ Assistant using spreadsheet data?

Solved!
Go to solution

Hi All,

For my first LabVIEW application, I'm attempting to automate calibration of thermocouples by measuring their response to various temperatures in a dry-well calibrator. I get the six thermocouples' temperatures through SCXI 1303/1102/1600, and have six channels set up in DAQ assistant in one of my subVIs.

I compare these values to the calibrator temperature I acquire through VISA serial in another subVI. All these values are written into a .csv file.

Can I import this data into the DAQ Assistant to use for calibration? Is there a simpler way to associate the calibration data with the channel? Currently, I could manually copy-and-paste the spreadsheet cells into the calibration sheet, but that just seems silly.

If there is anything I could provide to help in solving the problem, let me know!

Thanks! 

0 Kudos
Message 1 of 7
(7,484 Views)
Solution
Accepted by Zoysiamo

Hi Zoysiamo,

 

It is possible to automate calibration using the lower-level DAQmx VIs, in particular the DAQmx Channel Property Node. Using that you can specify the pre-scaled and the scaled values for your channel. I would recommend taking a look at this community example. The property node configuration will be similar to as shown below:

 

Untitled.jpg

Best regards,
Rohan B
Message 2 of 7
(7,436 Views)

Rohan,

Thank you so much! I was looking for something just like that. A clueless NI applications engineer told me this afternoon that there was no such VI/property node, and I would have to scale the data after the fact. Very glad to find that some of you guys know your product!

It'll be great to have a programmatic solution - I wasn't looking forward to manual entry of all the data.

Zoysiamo

0 Kudos
Message 3 of 7
(7,429 Views)

I haven't had luck searching for this information, so I'll ask for clarification here:

What is the distinction between the ScaledVals and PreScaledVals? Each time I iterate through my main VI, I form an array of values pre-calibration and the "true" value - which values would these correspond to?

Also, can I append values to the [Pre]ScaledVals table or will I overwrite it each time I call the property node?

 

Essentially, this is the behavior I'd like:

My program runs through a loop several times, collecting a new true value and a set of uncalibrated points.

It appends these to an array of calibration values using the DAQmx channel property node.

As more values are added to the array, the calibration improves until each virtual channel is calibrated satisfactorily.

 

I feel like I'm 90% of the way there, I just need to figure out how to implement the data structures properly to interface with the channel properties.

Thanks again!

0 Kudos
Message 4 of 7
(7,380 Views)

Hi Zoysiamo,

 

You may actually need to use the DAQmx Create Scale VI to initialize your scale. After that you can use the property node to configure it as you start to receive new values. I don't think that using the property nodes will automatically append new values. You will likely have to overwrite the values yourself. I would suggest taking a look at the Custom Scales help in LabVIEW/DAQmx Help and using this KnowledgeBase article as a starting point. The Help explains how prescaled refers to values expressed prior to custom scaling, and scaled refers to values expressed after the custom scale is applied.

Best regards,
Rohan B
0 Kudos
Message 5 of 7
(7,328 Views)

Rohan,

Thank you, that was a crucial piece of information I was missing. If I am correct, using my precalibrated data as prescaled data and my calibrator data as scaled data in a tabular scale, DAQmx will interpolate values and apply the necessary offsets when I use those channels. That is great.

The issue I foresee is that I need different scales for each channel, and I have chosen to use predefined channels as inputs to the Create Task vi. Do I need to change over to using the Create Channel vi as shown in the KnowledgeBase article to define a scale for the channel? Additionally, the AI Thermocouple variant of the channel seems to lack the scale input present with the AI Voltage - what do I do with that?

0 Kudos
Message 6 of 7
(7,311 Views)

 

Hi Zoysiamo,

 

If you need different scales for different channels, then use the Create Channel VI. Unfortunately, as shown in this forum, you cannot use the custom scale with an AI Thermocouple task.

Best regards,
Rohan B
0 Kudos
Message 7 of 7
(7,306 Views)