LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Temperature Measurement with NI USB 6216

I am measuring the temperature with E type thermocouple. I'm using NI USB DAQ6216 where CJC is provided by NI-USB TC01. I'm also controlling the temperature by implementing a PID control using DAQ 6216 to output 90 kHz sine wave to the heating element. I'm also attaching the VI.

 

Question 1: I see some weird jumps in temperature measurements. Please see the picture attached.

Question 2: The DAQ memory gets full and it throws an error and stops controlling the output voltage. Whatever output voltage it is sending, it stays untill we clicked continue or stop. How to make the output voltage to zero if any error occurs and how to avoid this buffer error?

 

Much thanks in anticipation.

Download All
0 Kudos
Message 1 of 2
(124 Views)

Hi qualiakbar,

 


@qhaliakbar wrote:

I am measuring the temperature with E type thermocouple.

I'm using NI USB DAQ6216 where CJC is provided by NI-USB TC01.

I'm also controlling the temperature by implementing a PID control using DAQ 6216 to output 90 kHz sine wave to the heating element.


  • Do you read the TC temperature using your NI6216 or do you read it using the TC01? This will make a difference…
  • In your VI the Sine generator is set to 10.1Hz. You should set reasonable default values in all controls…
  • I (strongly) recommend to get rid of ALL ExpressVIs and replace them by "ordinary" functions. No bluish DDT wires anymore! (Read this!)

@qhaliakbar wrote:

Question 1: I see some weird jumps in temperature measurements. Please see the picture attached.


What is the accuracy of your measurement setup? We are talking about "jumps" of 60mK! (I guess you use a °C scale in your graph as you forgot to write a unit on your Y axis label.)

For a TC-E the relation is ~65µV/K at 70°C - or ~4µV/60mK: does your equipment allow to measure with an accuracy of less than 4µV?

 


@qhaliakbar wrote:

Question 2: The DAQ memory gets full and it throws an error and stops controlling the output voltage. Whatever output voltage it is sending, it stays untill we clicked continue or stop. How to make the output voltage to zero if any error occurs and how to avoid this buffer error?


There are some weird things in your VI:

  • You have a wait of 2ms in the loop. Why?
  • You create a sine wave of 60k samples, but the AO-DAQAssistent is set to output just 100 samples!?
  • The sine wave generation is set to a sample rate of 600kS/s: with just 100 samples to output you would need to create a new waveform each 167µs! Are you sure all your numeric constants are choosen correctly?

I recommend (again) to rebuild the VI with using only plain DAQmx functions instead of the DAQAssistents. Task creation belongs before the loop, task cleanup after the loop. Inside the loop you only need to read the TC and output the AO array!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(100 Views)