From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Temperature Stabilization Detection Not Working Correctly

I am trying to write a program that detects when the temperature from a thermocouple (on channel 6) has stabilized, and starts recording the data to file when this occurs.

 

The criteria for stabilization is such that if the difference between the temperature at a given time and the temperature at x (adjustable value) seconds earlier is less than a specified threshold value, then it is stabilized.

 

I wrote a while loop that waits x seconds and uses shift registers to compare values between iterations of the loop. Ideally, the program would get the temperature for t=0, wait x seconds, and compare the temperature values for t=0 and t=x. However, the input from the DAC assistant appears to get "backed up" during the wait, and on the second iteration, it compares t=0 with t=1. I would like to know how to remove values from t=1 to t=x-1 from the data stream. Please let me know if you have a solution.

0 Kudos
Message 1 of 4
(2,205 Views)

Well we use a different standard for stabilization here per UL1778 Section 49 "Temperature change shall be less than 2 degrees C over 3 consecutive 15 minute intervals" and I created an "action engine" to test for it.

 

You feed it a numeric array containing your measurements every 15 minutes to test for stabilization

 

You might have to change the High and Low limits depending on your application in the "Write" state.

 

I use this in a program for thermal testing power transformers and use redings outside of 0C and 200C as open thermocouple detection.

 

tstab.png

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 4
(2,199 Views)

I ran across this post the other day, it sounds like it could help you out:

 

https://forums.ni.com/t5/LabVIEW/A-should-be-simple-DAQmx-question-take-finite-samples-in/m-p/361991...

 

(BTW, in general it's fairly poor practice to use the DAQ Assistant in "real" programs- you'll be much better off in the long term to understand the underlying DAQmx functions.)

0 Kudos
Message 3 of 4
(2,187 Views)

What wait are you putting into the wait function in the loop?

 

You set your DAQ Assistant to read 1 sample at a time at 1 Hz.  If you wait any longer than 1 second with that wait function, the samples will be coming in faster than you are reading them since you are reading them only one at a time.

 

Instead of Continuous samples, try N samples.  But better yet is to use one of the examples provided above.

0 Kudos
Message 4 of 4
(2,175 Views)