LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find if a value of a graph has stabilized.

Solved!
Go to solution

Hello, I usually run a while loop and store data in a shift register. It stores time and temperature data. I want to find out if the temperature has stabilized in last 15 minutes(Change in temperature between min and max is 2 degree celcius). But, I am not sure how to do that. Could any one help me with this?

 

Thanks,
Best,
Jarir

0 Kudos
Message 1 of 17
(1,761 Views)

Well, a graph is just a passive indicator, so you need to operate on the array data. Assuming the values are spaced equally in time, you can calculate the time increment per array element and thus how many elements you need to account for 15 minutes. You could look at "array min&max" for that array subset. You could even use the ptbypt version with the history size matched to your time interval. You could also do a ptbypt linear fit of the last N points and see if the slope is below a certain threshold.

 

How noisy is the data? Maybe you need to reject outliers or apply some filtering.

0 Kudos
Message 2 of 17
(1,745 Views)

Are you storing an array of data, or a single point? You should store an array with at least 15 minutes worth of data. 

 

If performance is not an issue, a simple way would be to write the data to a chart, making sure the history length accommodates at least 15 minutes worth of data. Then you can use a property node to read out the entire chart history and make your calculations on it.

0 Kudos
Message 3 of 17
(1,744 Views)

For each temperature location I take a reading every 15 minutes and call this Action Engine (or Functional Global variable) 

 

It keeps the last four measurements in an array.

 

Everytime I update I rotate the array one position. 

 

This throws out the oldest measurement and then I replace element 0 with the new measurement.

 

Then Min/Max the array and check to see of they are within 2 degrees

 

Stab.png

 

I misread your question. Our stabilization standard is temperatures variations must be less that 2 degrees for 4 consecutive 15 minute intervals  

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 17
(1,725 Views)

Hello @Knight of NI, I am storing the data to an array using build array function and shift registers. From here, could you please clarify more how I can store data in an array for the latest 15 minutes only. Because, with my approach, I store data for the whole time of the experiment.

0 Kudos
Message 5 of 17
(1,702 Views)

I am storing the data in an array. Additionally, performance is also an issue. Is there any way to store the latest 15 minutes of data only? 

0 Kudos
Message 6 of 17
(1,701 Views)

You can look at the block diagram of a "PtByPt" VI to see how they limit the array to a maximum length.

 

One example is Mean PtByPt.vi

0 Kudos
Message 7 of 17
(1,693 Views)
Solution
Accepted by Jarir

Also, here is a simple way to abuse a queue to do it for you.

Screenshot 2023-06-22 124849.png

0 Kudos
Message 8 of 17
(1,689 Views)

This might work. Thank you

0 Kudos
Message 9 of 17
(1,684 Views)

I will try this as well. Thank you.

0 Kudos
Message 10 of 17
(1,683 Views)